Skip to content

Releases

melchizedek-agents 1.18.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 23:19

A minor release for tools an application defines without code: a credential
a YAML names is read through the credential source, so a key held in an
application's keychain reaches an OpenAPI entry, an OAuth client and a
remote MCP server by name (ADR 0161, ADR 0163); the OpenAPI parser and the
address guard are stated entries (ADR 0162); and the registry lists its
tools with their descriptions (ADR 0164). No migration.

Breaking — read before upgrading

These are type-level; a YAML that loaded on 1.17 loads unchanged.

  • McpAuthConfig.oauth2 is optional. An mcp_auth or an mcp_servers
    entry's auth may now hold bearer_env or header instead, so a typed
    consumer that reads .oauth2.<field> needs ?..
  • OpenApiOperation.readOnly is a required field. Code that builds an
    OpenApiOperation by hand sets it (true for a GET).
  • CredentialUse.role gains 'header'. An exhaustive switch over it
    needs the new case.

Added

  • A remote MCP server's static credential by variable name. mcp_auth
    and an mcp_servers entry's auth take exactly one of oauth2,
    bearer_env: NAME or header: { env: NAME, name } (ADR 0163). The value
    is read through the credential source, then the environment, at each
    request. It goes only to the server's own origin, over https or to a
    loopback host over http, and only to a host MELCHIZEDEK_CREDENTIAL_HOSTS
    binds when that is set. It follows no redirect to another origin and never
    appears in a log line or a tool error. A header the HTTP layer or the
    transport sets (Host, Content-Length, Mcp-Session-Id, …) is refused
    at load. MCP_BEARER_TOKENS applies, unchanged, to a server with no
    auth. New export mcpStaticCredential (tools/mcpToolFactory).
  • The OpenAPI parser and the SSRF host check are stated entries.
    melchizedek-agents/openapi exports parseOpenApiSpec and
    isReadOperation, and melchizedek-agents/net exports checkHost,
    blockedHostReason and setHostResolver; the main entry re-exports the
    parser, the check and the types OpenApiOperation, OpenApiParameter,
    OpenApiParameterLocation and OpenApiParseOptions (ADR 0162). An
    OpenApiOperation carries summary (the spec's own) and readOnly (a
    GET: what an entry without operations exposes). parseOpenApiSpec
    holds text handed to it to MAX_SPEC_BYTES.
  • registeredTools() (the main entry and melchizedek-agents/tools)
    lists every tool a YAML can name, sorted as registeredToolNames(), as
    { name, description, kind, condition? }. The kind is function,
    provider, instruction, toolset, or conditional with what must hold
    (run_code: MELCHIZEDEK_CODE_SANDBOX=on) (ADR 0164). Types
    RegisteredTool and RegisteredToolKind.

Changed

  • Tool credentials read through the credential source. An OpenAPI
    entry's bearer_env or api_key.env, and an oauth2 block's
    client_id_env and client_secret_env, are read by name through
    setCredentialSource, then process.env, after the same
    credentialEnvProblem check (ADR 0161). Before, they read process.env
    only, so a key an application held in its keychain failed the compile
    with "not set". An OpenAPI key is checked at compile and read again before
    each call, so a key replaced or removed takes effect on the next call; a
    call whose variable is no longer set answers an error naming it and sends
    nothing, where 1.17 sent the value read at compile. The doctor counts a
    variable the source holds as set. New helper credentialEnvValue
    (tools/credentialEnv).

melchizedek-agents 1.17.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 21:52
v1.17.0

1.17.0: Gemini 4 Hydrogen

melchizedek-agents 1.16.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 02:11
df84641

A minor release for observability: a program that runs several turns is
recorded as a run of steps, and every turn names the run and the step that
started it (ADR 0159). One additive migration, 0026_run_key.

Apply the schema before upgrading the engine. npx melchizedek-db apply --telemetry runs migration 0026 and db/telemetry.sql. The sinks write the
new columns on every row, so a ledger without them refuses the rows (they
are spooled to the dead-letter file, and telemetry:replay re-sends them
once the schema is applied), and the A2A server refuses a database below
the shipped schema version. Rolling upgrade, in this order: apply 0026
(additive and nullable; 1.15 servers and workers keep running against it),
then start the 1.16 servers. Rows written before keep NULL in every new
column.

Fixed: a turn is always its own trace. A turn started while the calling
code had a span active became a child of that span and took its trace id, so
two turns run under one span shared one trace. A turn's trace id keys its
model time and call count, its per-model usage and so its price, its payload
policy and its erasure, so those turns were mispriced, and erasing one's
session deleted the other's rows. traceAgentRun now opens the turn's root
span with root: true: every turn has a trace id of its own and no parent,
whatever span is active around it. The traceparent option is unchanged (a
link, never a parent). A caller who read a turn's spans as children of their
own span no longer finds them there; inside a run, the run's key ties them
(below).

Added

  • traceRun and traceStep (lib/observability/run.ts; from the
    package index and at melchizedek-agents/observability/run).
    traceRun({ name, id?, meta? }, fn) runs fn as a run: a root step in a
    trace of its own, and a run context (an AsyncLocalStorage) for
    everything fn starts. traceStep(name, fn, { meta? }) runs fn as a
    child of the step that is active; outside a run it is a run of its own.
    A step is a span named step.execute <name> carrying step.name,
    run.id and its labels as meta.<key>. Both return what fn returns; a
    step whose fn throws is marked failed, with error.type (the error's
    name), and rethrows. A step records no argument, no result and no error
    message. A run's id is the caller's (a string of at most 256 characters,
    refused when shaped like a key or token) or a UUID; a name is one line of
    at most 128 characters (MAX_STEP_NAME_CHARS). meta follows the
    metadata limits of 1.9.0 (key pattern, 256-character strings, numbers,
    booleans, at most 32 keys, credential-shaped values dropped, strings
    through the telemetry redactor); what is dropped is named in one warning,
    by key (stepMetaAttributes). In a turn that opted out of tracing a
    step records nothing and sets no run context. currentRun() returns
    { id, name, traceId, stepSpanId } inside a run. New types
    TraceRunOptions, TraceStepOptions, RunContext.
  • The run key on spans. When a span starts inside a run: a turn's root
    span gets run.id, run.name and run.step_span_id (the span id of the
    step that was active); a step, and every other span the ledger keeps that
    is opened outside a turn (an llm.request under a step, a script's
    script.invoke and script.call), gets run.id. A turn's own spans get
    none. A run's root step also carries run.name and, as it ends,
    run.llm_calls and run.models: the model calls made directly in its
    trace, which no turn counts. melchizedek-agents/observability/runContext
    holds the context and the attribute names (RUN_ID_ATTRIBUTE,
    RUN_NAME_ATTRIBUTE, RUN_STEP_ATTRIBUTE).
  • traceModelCall({ provider, model }, fn): how a model call made
    outside an agent is traced. fn makes the call and returns { result, usage? }, usage in the model contract's terms ({ inputTokens, outputTokens, thinkingTokens?, cacheReadTokens?, cacheWriteTokens? },
    input and output each counting everything); result is returned. The
    call gets the llm.request span and adk_telemetry row an agent's call
    gets: under its step and carrying the run's id inside a run, priced by the
    ledger when model is an id model_pricing holds. Inside a turn it counts
    against the turn's step budget and stops with the turn; a refused call
    throws (with the stop's code) without calling fn. No request or
    response is recorded. New type ModelCallOutcome.
  • The step kind and the run key in the ledger (migration
    0026_run_key).
    ledgerSpanKind returns 'step' for step.execute <name>, LedgerSpanKind gains 'step', and STEP_SPAN_PREFIX names the
    prefix (./observability/lineage). adk_turns gains run_id and
    run_step_span_id; adk_telemetry gains run_id (set on a run's steps
    and direct calls, NULL on a turn's own rows, its root row included); both
    get a partial index on (run_id, ts) WHERE run_id IS NOT NULL
    (idx_adk_turns_run, idx_adk_telemetry_run). TurnRow gains run_id
    and run_step_span_id, TelemetryRow gains run_id
    (./observability/supabaseSpanExporter). adk_telemetry.kind is plain
    text, so the new kind needs no constraint change, and
    TELEMETRY_SCHEMA_VERSION stays 2, as it did for 0016's columns.

Unchanged

  • A script run keeps its shape and its own key (script.run); inside a run
    its spans and its turns carry the run's key like any others.
  • A turn outside a run writes the rows it wrote before, with NULL in the
    three new columns.

melchizedek-agents 1.15.6

Choose a tag to compare

@github-actions github-actions released this 08 Nov 19:12
3dcc91c

Fixed: a background job can only be changed by the claim that holds it.
claimNext gives every claim its own token (migration 0025_task_claim_token,
ADR 0157), and renew, saveCheckpoint, finish and the new
requeueInterrupted match it, along with the worker id, running status and
a lease that has not run out, so a worker that lost a job can no longer finish
it, clear its checkpoint or end the next worker's run. An expired lease is
refused before recover() has run, and every exit from running clears the
claim in the same write. finish now answers accepted or lost: a lost
finish reports no success, writes no record and leaves the checkpoint alone,
on Postgres and, within what a file can promise, on the JSON store. The worker
(melchizedek-worker) runs one renewal at a time, trusts only the last lease
the store confirmed, stops as soon as it cannot confirm it, tells a lost claim
from SIGTERM and from a model error, and reaps expired leases between polls on
Postgres. The token sits beside record, so task_get, task_list and the
operator view never show it.

Additive on melchizedek-agents/tools/taskTools and ./storage/postgres:
new JobClaim, ClaimedTask, FinishResult, FencedTaskBackend and
requireFencedBackend; OwnedTask gains an optional claim;
TaskBackend.finish widens to Promise<void | FinishResult>; applyFinish
returns FinishResult; postgresTaskBackend, fileTaskBackendWith,
fileTaskBackend and PostgresStorage.taskQueue are typed
FencedTaskBackend. A custom TaskBackend written against the earlier shape
still type-checks, but the built-in worker requires FencedTaskBackend and
refuses any other. On both built-in backends a job that carries no claim is
lost, never written.

Rolling upgrade, in this order: apply migration 0025 (additive and nullable;
old workers keep running against it, and the A2A server refuses a database
below the shipped schema version, so this also precedes any new server); stop
or drain every old worker; start the new workers. An earlier release neither
writes nor checks the token, so the guarantee holds only once the old workers
are gone. A job an old worker left running has no token: it is left alone
while its lease lives, recovered once it expires, and fenced from its next
claim.

Fixed: signing out of ChatGPT wins over a sign-in or refresh still in
flight.
Tokens no longer come back after a sign-out, two sign-ins at once
leave one session, a cancelled sign-in stores nothing, and a lock left behind
by a crash no longer holds up the next sign-out (ADR 0158). The credential
file carries a lifecycle epoch, read as zero when absent: a committed
sign-in and every sign-out advance it, and each result is written only if the
epoch the work started under still stands, under a short lock never held
across the browser or the network; refresh keeps its one-at-a-time flight on
its own lease (<file>.refresh.lock). signIn, signOut and
chatGptSignInStatus now report the epoch (SignInResult.epoch, the new
SignOutResult with its epoch, ChatGptSignInStatus.epoch, and
StoredSignIn.epoch in the file); none of them returns a token. signIn has
a new failure code, superseded, for a sign-in a sign-out or a newer sign-in
overtook; discover takes an optional signal; clearTokens is gone from
lib/chatgpt/store.ts, an unguarded write. lib/chatgpt is outside the
exports map, but the desktop app loads it by path from dist/lib/chatgpt/,
so its changes are recorded here. The file stays version: 1, an older
engine can read it, and no migration is needed.

melchizedek-agents 1.15.5

Choose a tag to compare

@github-actions github-actions released this 08 Nov 04:38

Added: memory_preload_queries, standing recall for a syndicate's core
memory.
Up to 8 queries a long-term syndicate declares; before each
request, preload_memory also recalls up to 2 records for each, after the
records the message itself recalls and without repeats (ADR 0156). They run
once per silo per turn; load_memory is unchanged. The search request gains
an optional purpose: 'preload', and ToolContext.searchMemory an optional
second argument carrying it.

Changed: the Patient Advocate keeps a whole-person profile. Its
memory_extraction_rules file every record under one of fourteen profile
domains (identity, conditions, medications, allergies, results, care-plan,
care-team, symptoms, nutrition, lifestyle, psychology, values, support,
communication). The domain word opens the record's text and is never an index
key, keys stay specific, and each record holds one fact, so a correction
retires only the record it is about. Records name whose they are when the
user is a caregiver. Psychology records hold the person's own words or an
observed pattern with its evidence, never a label or diagnosis. A
profile_domains variable resolves into both the extractor's rules and
Asclepius's new <patient_profile> section, which uses the domains when it
answers, notes personal facts as they arrive, and asks for a missing domain
one at a time; never_store drops identifiers, contact and payment details.
Its memory_preload_queries bring allergies, current medications,
communication, values, support and psychology into every request.

Fixed: memory extraction is no longer cut off by its own thinking. The
extractor's default output cap rises from 4096 to 16384 tokens and it thinks
at low effort (reasoning on modelExtractor). On a thinking model the cap
covers thinking: the default extraction model spent 3-4k tokens thinking on a
short transcript, so records were truncated and the rest never stored. A call
that still reaches the cap drops its unfinished last line, which could parse
as a whole record, and logs a warning (onTruncated).

melchizedek-agents 1.15.4

Choose a tag to compare

@github-actions github-actions released this 07 Nov 17:40

Changed: the Research example's step cap is 24, up from 16. At 16 a
question that needs a full landscape (a phase 3 trial's results against its
field) ran out of steps before it answered. The three-step research budget
is unchanged; 24 is the runaway backstop only.

Changed: seven starter prompts are written in the same register as the
rest.
critic, image_production, syndicate, style_council,
current_events, connectors and the account_memory template lose
capitalised and bold emphasis (MUST, NEVER, EXACTLY, ### headings) for
plain rules with their reasons; the critic's gate reads as two score bands,
and connectors gains its TASK: line. No route, tool, schema or
threshold changed.

Changed: the Prompt Writer knows the whole syndicate file and writes in
controlled language.
A syndicate_rules variable, read by the Architect,
the Writer and the Auditor, lists every coordination form (delegation,
dispatch:, workflow:, script:), nesting, root and agent key, registry
tool, where an output schema belongs, and the code controls that enforce a
prompt's limits. prompt_checklist gains rule 11 (STE-inspired wording) and
rule 12 (loops: objective, state, steps, evaluation, limits, final output,
and the code control behind each limit); a repair keeps a pasted prompt's
capitals labels, and its regression test is written Given, When, Then.

melchizedek-agents 1.15.3

Choose a tag to compare

@github-actions github-actions released this 07 Nov 16:33

Changed: the Research example spends model steps, not searches. Its
routes no longer hold check_retraction (literature results flag retracted
work and the science guard checks every identifier an answer prints) or
survey_field; cited_by stays on landscape alone, and landscape gains
web_extract, so a number an abstract lacks is read from the paper instead
of searched for again. A shared tool_budget asks for independent calls in
one step and at most three research steps, and max_steps: 16 is the
backstop. Both tools stay in the engine and on the MCP science server.

melchizedek-agents 1.15.2

Choose a tag to compare

@github-actions github-actions released this 07 Nov 03:09

Fixed: a turn's usage and cost left out generate_image. The tool called
Gemini's image model outside the tracer, so its tokens never reached the
turn's usage or the ledger's cost_usd. The call is now an llm.request
through traceLlmGeneration, like every other model call: its tokens count in
the turn's usage, it counts against max_steps, and a cancelled turn stops it
before the request. Migration 0024 adds the price row for
gemini-3.1-flash-image-preview ($0.50 in, $60.00 out at the image rate,
$3.00 thinking, from Google's page for gemini-3.1-flash-image;
verified_at NULL, since the preview id is not listed). A typical image costs
about $0.08. Apply it with npx melchizedek-db apply before upgrading; without it,
a turn that made an image prices NULL.

melchizedek-agents 1.15.1

Choose a tag to compare

@github-actions github-actions released this 06 Nov 16:08

Fixed: a conversation stuck on Anthropic after an approval (ADR 0155).
When one model step made several tool calls and one of them required
approval, the calls beside it ran but their results were never stored. After
the approval the history held the step's calls with only the approved one
answered, and Anthropic refused every later request with tool_use ids were found without tool_result blocks immediately after. The loop now stores the
other calls' results before the approval request. The request builder also
gives any call the history leaves unanswered an error result: an approval
the person moved on from by typing a new message, a run that ended between a call and its
result, and sessions stored before this release, which recover without
editing. Gemini, which accepted the unanswered calls, sees the same history
plus those results.

melchizedek-agents 1.15.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 21:02

Breaking — read before upgrading

  • Compaction and masking are on for every agent (ADR 0152, 0154). A
    context: block used to be allowed on delegates only and nothing
    compacted unless it set compact_after_tokens. Now every agent compacts
    when a request passes 60% of its model's context window
    (lib/models/contextWindow.ts holds the table; an unknown model counts
    as 100k; an Ollama model reads its own context length, default 4,096),
    and a tool result older than the last 6 events and longer than 1,000
    characters goes to the model as a stub it can fetch back with
    recall_tool_result. context: off on an agent restores the old
    behaviour; compact_after_tokens: 0 and mask_over_chars: 0 switch
    the two off separately; keep_recent_events and summary_model are
    the other keys. A request the provider refuses as too long is retried
    once after a forced compaction.
  • A defineTool result is capped at 20,000 characters unless the spec
    sets maxResultChars (0 lifts the cap). A tool that returned more now
    returns the head and a note saying so.

The prompt prefix is stable (ADR 0151). Text that changes between an
agent's requests (preload_memory's recall) leaves the system prompt for
ModelRequest.turnNotes, which every adapter places after the history, so
a provider's prefix cache covers the tools, the system prompt and the
history. An InstructionTool marked volatile: true writes there. The
Claude adapter sends cache_control: { type: 'ephemeral' } on Anthropic's
own API.

The summary is sectioned and anchored (ADR 0153): Intent, Stated facts,
Decisions, Artifacts, Open, Last state, written from the previous summary
and the new span only, tool calls and results included, within 1,200 words.
A summary the model fails to write is skipped (the turn goes on with the
full history, and the span records compaction.skipped) instead of
replacing the history with nothing. A compacted event carries
summaryFormat: 'sections/1'; the summary's own model call carries
llm.purpose: compaction and llm.compaction.events.

CapabilityReport.contextWindow says how many tokens a model's context
holds, when the table knows the model.

The server image is published with every release (ADR 0149).
ghcr.io/jhwadman/melchizedek-serve:<version> (and :latest) for
linux/amd64 and linux/arm64, with a build-provenance attestation; the
GitHub Release carries its digest as melchizedek-serve-v<version>.digest.
Pull by that digest.

A syndicate in one environment variable. melchizedek-serve (and
startServer from melchizedek-agents/server) reads
MELCHIZEDEK_AGENT_YAML, the whole syndicate file base64-encoded, and
serves it as MELCHIZEDEK_AGENT_ID (default agent) and as the default
syndicate, from a private directory that becomes the agents directory. A
definition that does not load stops the boot. It refuses
MELCHIZEDEK_AGENTS_DIR beside it, a syndicate argument other than its
own, and a nested yaml_reference its bundled_references does not carry.
Unset, nothing changes.

The Dockerfile builds again. npm ci ran the package's own
prepare (the build) before the sources were copied, so docker build
failed; both stages now install with --ignore-scripts.

The registry works on any Postgres (ADR 0150). With DATABASE_URL, the
server loads registry:<id> and A2A_REGISTRY_AGENTS rows from that
database (in MELCHIZEDEK_DB_SCHEMA when it names one) instead of over the
Supabase API, and melchizedek-registry publishes, rolls back and retires
there too. Without DATABASE_URL, nothing changes. In the library:
melchizedek-agents/registry exports postgresRegistryReader(pool) and its
functions take a supabase-js client or anything with pg's query (a
pg.Pool, PGlite); loadSyndicateFromRegistry(id, { registry }) reads
through a RegistryReader; postgresStorage returns registry, and
createA2AApp reads storage.registry when it is given. A deployment that
sets both DATABASE_URL and Supabase credentials, for different databases,
now reads the registry from DATABASE_URL's.