melchizedek-agents 0.20.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/.env.example +4 -5
  2. package/AGENT_SETUP.md +3 -3
  3. package/CHANGELOG.md +240 -0
  4. package/DOCUMENTATION.md +142 -150
  5. package/QUICKSTART.md +12 -11
  6. package/README.md +11 -11
  7. package/config/agents/examples/image_production.yaml +2 -2
  8. package/config/agents/syndicateSchema.yaml +52 -26
  9. package/dist/lib/a2a/app.d.ts +17 -12
  10. package/dist/lib/a2a/app.js +16 -6
  11. package/dist/lib/a2a/executor.d.ts +10 -14
  12. package/dist/lib/a2a/executor.js +10 -18
  13. package/dist/lib/a2a/remoteAgent.d.ts +5 -12
  14. package/dist/lib/a2a/remoteAgent.js +5 -12
  15. package/dist/lib/compile.d.ts +76 -86
  16. package/dist/lib/compile.js +100 -116
  17. package/dist/lib/compileNative.d.ts +44 -56
  18. package/dist/lib/compileNative.js +91 -89
  19. package/dist/lib/config.d.ts +6 -6
  20. package/dist/lib/config.js +6 -6
  21. package/dist/lib/doctor.d.ts +8 -14
  22. package/dist/lib/doctor.js +10 -46
  23. package/dist/lib/index.d.ts +12 -9
  24. package/dist/lib/index.js +10 -11
  25. package/dist/lib/loadSyndicate.d.ts +3 -3
  26. package/dist/lib/loadSyndicate.js +2 -2
  27. package/dist/lib/memory/erase.d.ts +1 -1
  28. package/dist/lib/memory/erase.js +1 -1
  29. package/dist/lib/memory/namespace.d.ts +12 -14
  30. package/dist/lib/memory/namespace.js +13 -14
  31. package/dist/lib/memory/providers.d.ts +4 -5
  32. package/dist/lib/memory/providers.js +12 -6
  33. package/dist/lib/memory/supabaseMemoryService.d.ts +9 -30
  34. package/dist/lib/memory/supabaseMemoryService.js +8 -30
  35. package/dist/lib/model.d.ts +6 -12
  36. package/dist/lib/model.js +6 -12
  37. package/dist/lib/models/adapterResolver.d.ts +21 -40
  38. package/dist/lib/models/adapterResolver.js +32 -40
  39. package/dist/lib/models/chatCompletionsAdapter.d.ts +12 -33
  40. package/dist/lib/models/chatCompletionsAdapter.js +13 -18
  41. package/dist/lib/models/circuitBreaker.d.ts +5 -5
  42. package/dist/lib/models/circuitBreaker.js +5 -5
  43. package/dist/lib/models/claudeAdapter.d.ts +9 -26
  44. package/dist/lib/models/claudeAdapter.js +11 -15
  45. package/dist/lib/models/claudeModels.d.ts +4 -4
  46. package/dist/lib/models/claudeModels.js +4 -4
  47. package/dist/lib/models/contract.d.ts +11 -11
  48. package/dist/lib/models/contract.js +6 -6
  49. package/dist/lib/models/errorResponse.d.ts +13 -20
  50. package/dist/lib/models/errorResponse.js +0 -12
  51. package/dist/lib/models/fallbackAdapter.d.ts +7 -8
  52. package/dist/lib/models/gatewayAdapter.d.ts +1 -1
  53. package/dist/lib/models/gatewayAdapter.js +1 -1
  54. package/dist/lib/models/geminiAdapter.d.ts +5 -6
  55. package/dist/lib/models/geminiAdapter.js +9 -10
  56. package/dist/lib/models/geminiState.d.ts +8 -8
  57. package/dist/lib/models/geminiState.js +8 -8
  58. package/dist/lib/models/genaiMapping.d.ts +82 -36
  59. package/dist/lib/models/genaiMapping.js +41 -41
  60. package/dist/lib/models/gptAdapter.d.ts +11 -11
  61. package/dist/lib/models/gptAdapter.js +13 -13
  62. package/dist/lib/models/kimiAdapter.d.ts +6 -7
  63. package/dist/lib/models/kimiAdapter.js +6 -9
  64. package/dist/lib/models/ollamaAdapter.d.ts +3 -3
  65. package/dist/lib/models/ollamaAdapter.js +3 -3
  66. package/dist/lib/models/providerMap.d.ts +6 -5
  67. package/dist/lib/models/providerMap.js +6 -5
  68. package/dist/lib/models/providerState.d.ts +3 -2
  69. package/dist/lib/models/providerState.js +3 -2
  70. package/dist/lib/models/reasoning.d.ts +1 -1
  71. package/dist/lib/models/registry.d.ts +26 -73
  72. package/dist/lib/models/registry.js +31 -144
  73. package/dist/lib/models/retry.d.ts +2 -2
  74. package/dist/lib/models/retry.js +2 -2
  75. package/dist/lib/models/schemaNormalize.d.ts +25 -55
  76. package/dist/lib/models/schemaNormalize.js +30 -100
  77. package/dist/lib/observability/lineage.d.ts +3 -3
  78. package/dist/lib/observability/lineage.js +10 -10
  79. package/dist/lib/observability/supabaseSpanExporter.js +1 -1
  80. package/dist/lib/observability/tracer.d.ts +25 -23
  81. package/dist/lib/observability/tracer.js +26 -63
  82. package/dist/lib/persistence/supabaseProvider.d.ts +4 -3
  83. package/dist/lib/runtime/approvals.d.ts +1 -1
  84. package/dist/lib/runtime/credentials.d.ts +1 -1
  85. package/dist/lib/runtime/events.d.ts +3 -4
  86. package/dist/lib/runtime/events.js +3 -4
  87. package/dist/lib/runtime/logging.d.ts +3 -8
  88. package/dist/lib/runtime/logging.js +3 -8
  89. package/dist/lib/runtime/memoryService.d.ts +4 -6
  90. package/dist/lib/runtime/memoryService.js +3 -5
  91. package/dist/lib/runtime/native/agentLoop.d.ts +18 -16
  92. package/dist/lib/runtime/native/agentLoop.js +38 -26
  93. package/dist/lib/runtime/native/compaction.d.ts +10 -11
  94. package/dist/lib/runtime/native/compaction.js +10 -11
  95. package/dist/lib/runtime/native/delegate.d.ts +13 -14
  96. package/dist/lib/runtime/native/delegate.js +11 -18
  97. package/dist/lib/runtime/native/history.d.ts +5 -6
  98. package/dist/lib/runtime/native/history.js +5 -6
  99. package/dist/lib/runtime/native/interrupts.d.ts +6 -6
  100. package/dist/lib/runtime/native/interrupts.js +6 -6
  101. package/dist/lib/runtime/native/request.d.ts +24 -24
  102. package/dist/lib/runtime/native/request.js +35 -24
  103. package/dist/lib/runtime/native/selfCorrection.d.ts +32 -32
  104. package/dist/lib/runtime/native/selfCorrection.js +34 -34
  105. package/dist/lib/runtime/native/step.d.ts +23 -23
  106. package/dist/lib/runtime/native/step.js +49 -27
  107. package/dist/lib/runtime/native/taskMode.d.ts +8 -8
  108. package/dist/lib/runtime/native/taskMode.js +8 -8
  109. package/dist/lib/runtime/native/telemetry.d.ts +11 -11
  110. package/dist/lib/runtime/native/telemetry.js +11 -11
  111. package/dist/lib/runtime/native/tempState.d.ts +4 -4
  112. package/dist/lib/runtime/native/tempState.js +4 -4
  113. package/dist/lib/runtime/nativeTurn.d.ts +29 -32
  114. package/dist/lib/runtime/nativeTurn.js +30 -41
  115. package/dist/lib/runtime/questions.d.ts +8 -9
  116. package/dist/lib/runtime/questions.js +1 -2
  117. package/dist/lib/runtime/runtimeFlag.d.ts +28 -14
  118. package/dist/lib/runtime/runtimeFlag.js +38 -16
  119. package/dist/lib/runtime/sessions.d.ts +10 -12
  120. package/dist/lib/runtime/sessions.js +10 -12
  121. package/dist/lib/runtime/syndicateTurn.d.ts +44 -45
  122. package/dist/lib/runtime/syndicateTurn.js +163 -158
  123. package/dist/lib/runtime/turnControl.d.ts +8 -8
  124. package/dist/lib/runtime/turnControl.js +8 -8
  125. package/dist/lib/session/supabaseSessionService.d.ts +7 -21
  126. package/dist/lib/session/supabaseSessionService.js +7 -43
  127. package/dist/lib/session/transcript.d.ts +16 -26
  128. package/dist/lib/session/transcript.js +17 -57
  129. package/dist/lib/storage/postgres/sessionService.d.ts +6 -20
  130. package/dist/lib/storage/postgres/sessionService.js +6 -39
  131. package/dist/lib/syndicateSchema.js +7 -6
  132. package/dist/lib/toolRegistry.d.ts +9 -14
  133. package/dist/lib/toolRegistry.js +36 -33
  134. package/dist/lib/tools/auth.d.ts +1 -1
  135. package/dist/lib/tools/auth.js +1 -1
  136. package/dist/lib/tools/examples.d.ts +2 -4
  137. package/dist/lib/tools/examples.js +2 -4
  138. package/dist/lib/tools/generateImageTool.d.ts +3 -3
  139. package/dist/lib/tools/generateImageTool.js +4 -5
  140. package/dist/lib/tools/inspectImageTool.d.ts +2 -2
  141. package/dist/lib/tools/inspectImageTool.js +3 -4
  142. package/dist/lib/tools/mcpToolFactory.d.ts +4 -24
  143. package/dist/lib/tools/mcpToolFactory.js +19 -9
  144. package/dist/lib/tools/memoryTools.d.ts +5 -6
  145. package/dist/lib/tools/memoryTools.js +5 -6
  146. package/dist/lib/tools/nativeTools.d.ts +9 -14
  147. package/dist/lib/tools/nativeTools.js +9 -14
  148. package/dist/lib/tools/openapiTools.d.ts +5 -7
  149. package/dist/lib/tools/openapiTools.js +6 -13
  150. package/dist/lib/tools/scienceTools.d.ts +3 -3
  151. package/dist/lib/tools/scienceTools.js +8 -10
  152. package/dist/lib/tools/skillToolset.d.ts +1 -2
  153. package/dist/lib/tools/skillToolset.js +1 -2
  154. package/dist/lib/tools/skills/executor.d.ts +1 -1
  155. package/dist/lib/tools/skills/executor.js +1 -1
  156. package/dist/lib/tools/skills/frontmatter.d.ts +2 -2
  157. package/dist/lib/tools/skills/frontmatter.js +2 -2
  158. package/dist/lib/tools/skills/tools.d.ts +8 -10
  159. package/dist/lib/tools/skills/tools.js +9 -11
  160. package/dist/lib/tools/tool.d.ts +24 -40
  161. package/dist/lib/tools/tool.js +24 -56
  162. package/dist/lib/tools/toolContract.d.ts +8 -13
  163. package/dist/lib/tools/toolContract.js +6 -17
  164. package/dist/lib/tools/webExtractTool.d.ts +2 -2
  165. package/dist/lib/tools/webExtractTool.js +3 -4
  166. package/dist/lib/tools/wikiTools.d.ts +2 -2
  167. package/dist/lib/tools/wikiTools.js +5 -6
  168. package/dist/lib/tools/xApiSearchTool.d.ts +2 -2
  169. package/dist/lib/tools/xApiSearchTool.js +3 -4
  170. package/dist/lib/tools/xaiSearchParams.d.ts +2 -5
  171. package/dist/lib/tools/xaiSearchParams.js +2 -5
  172. package/dist/lib/wiki/agentRun.d.ts +10 -11
  173. package/dist/lib/wiki/agentRun.js +24 -42
  174. package/dist/lib/workflow/agentNode.d.ts +10 -1
  175. package/dist/lib/workflow/agentNode.js +5 -3
  176. package/dist/lib/workflow/graph.d.ts +8 -9
  177. package/dist/lib/workflow/graph.js +12 -12
  178. package/dist/lib/workflow/nodeEvents.d.ts +5 -5
  179. package/dist/lib/workflow/nodeEvents.js +5 -5
  180. package/dist/lib/workflow/pause.d.ts +5 -4
  181. package/dist/lib/workflow/pause.js +5 -4
  182. package/dist/lib/workflow/resume.d.ts +4 -4
  183. package/dist/lib/workflow/resume.js +4 -4
  184. package/dist/lib/workflow/route.d.ts +7 -7
  185. package/dist/lib/workflow/route.js +8 -8
  186. package/dist/lib/workflow/scheduler.d.ts +44 -2
  187. package/dist/lib/workflow/scheduler.js +60 -6
  188. package/dist/lib/workflow/toolNode.d.ts +18 -29
  189. package/dist/lib/workflow/toolNode.js +29 -35
  190. package/dist/lib/workflow/turn.d.ts +29 -20
  191. package/dist/lib/workflow/turn.js +111 -24
  192. package/dist/lib/workflow.d.ts +34 -60
  193. package/dist/lib/workflow.js +34 -168
  194. package/dist/lib/workflowConfig.d.ts +2 -10
  195. package/dist/lib/workflowConfig.js +2 -31
  196. package/dist/scripts/a2a_server.js +1 -2
  197. package/dist/scripts/assistant_worker.d.ts +2 -2
  198. package/dist/scripts/assistant_worker.js +8 -7
  199. package/dist/scripts/doctor.d.ts +2 -2
  200. package/dist/scripts/doctor.js +2 -2
  201. package/dist/scripts/syndicate_chat.js +14 -24
  202. package/package.json +3 -9
  203. package/skills/briefs/_shared.md +2 -2
  204. package/skills/briefs/melchizedek-author.md +2 -2
  205. package/skills/briefs/melchizedek-models.md +6 -6
  206. package/skills/melchizedek-author/SKILL.md +2 -2
  207. package/skills/melchizedek-models/SKILL.md +5 -5
package/.env.example CHANGED
@@ -19,11 +19,10 @@ GOOGLE_GENAI_API_KEY=
19
19
  # keep their task list and job queue. Default: outputs/tasks.json.
20
20
  # MELCHIZEDEK_TASKS_FILE=outputs/tasks.json
21
21
 
22
- # ── Optional: runtime (ADR 0045) ──────────────────────────────────────────────
23
- # Which runtime runs a turn's agents: adk (default) or native (the engine's own loop).
24
- # MELCHIZEDEK_RUNTIME=adk
25
- # Which adapter serves a Gemini model id on the native path: adk (default) or engine.
26
- # GEMINI_ADAPTER=adk
22
+ # ── Runtime (ADR 0107) ────────────────────────────────────────────────────────
23
+ # Every turn runs on the engine's own loop. MELCHIZEDEK_RUNTIME and
24
+ # GEMINI_ADAPTER need no value: native and engine are the only ones, and adk
25
+ # (removed in 1.0.0) stops the server at startup.
27
26
 
28
27
  # ── Optional: MCP (Model Context Protocol) ────────────────────────────────────
29
28
  # ALLOW_PRIVATE_MCP: set to "true" to permit mcp_server_url values pointing at
package/AGENT_SETUP.md CHANGED
@@ -119,9 +119,9 @@ One-shot mode (answers and exits — this is also how you'll script it):
119
119
  npm run syndicate:critic -- "In two sentences, why did the Library of Alexandria decline?"
120
120
  ```
121
121
 
122
- And the floor of the whole framework — one agent, no syndicate, plain
123
- ADK. `scripts/direct_call.ts` is the ~30-line block you'll copy when an
124
- agent belongs inside your own code rather than behind a YAML:
122
+ And the floor of the whole framework — one model call, no syndicate, no
123
+ agent framework. `scripts/direct_call.ts` is the short block you'll copy when a
124
+ model call belongs inside your own code rather than behind a YAML:
125
125
 
126
126
  ```bash
127
127
  npm run demo:direct -- "In one sentence: what is an agent?"
package/CHANGELOG.md CHANGED
@@ -6,6 +6,246 @@ the starter pack and the templates), not the repo's full history.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.0.0 — 2026-10-08
10
+
11
+ Release 1.0.0: Google ADK is gone (ADR 0107). Every turn runs on the
12
+ engine's own agent loop and workflow scheduler, which have been the default
13
+ since 0.20.0; the ADK runtime, the ADK peer dependency and everything that
14
+ existed only for them are removed. What a conversation stores does not
15
+ change: sessions written by ADK, or by 0.x on either runtime, resume.
16
+
17
+ ### Breaking — read before upgrading
18
+
19
+ - **Breaking: the ADK runtime is removed.** `native` is the only runtime.
20
+ `MELCHIZEDEK_RUNTIME=adk` is a startup error: `createA2AApp` (the A2A
21
+ server), `melchizedek-chat` and `melchizedek-worker` throw the new
22
+ `RuntimeRemovedError`, which names 1.0.0 and the fix, and
23
+ `runSyndicateTurn` throws it for `runtime: 'adk'` before the session is
24
+ touched. `melchizedek-doctor` reports it as a problem (`--check` fails).
25
+ `MELCHIZEDEK_RUNTIME=native` is still accepted and changes nothing.
26
+ `RuntimeName` is `'native'`; `RUNTIMES` is `['native']`.
27
+ - **Breaking: `@google/adk` is no longer used.** It is gone from
28
+ `peerDependencies`, `peerDependenciesMeta` and `devDependencies`, and
29
+ nothing in the package loads it: uninstall it. The package has no
30
+ top-level `await` any more, so it loads from CommonJS through `require()`
31
+ again (Node's `require(esm)`: on by default from Node 22.12, behind
32
+ `--experimental-require-module` on 22.6–22.11). `@google/genai` stays a
33
+ dependency, used only by the Gemini adapter, the image tools and memory
34
+ embeddings.
35
+ - **Breaking: `runSyndicateTurn` takes the engine's session and memory
36
+ interfaces.** `sessionService` is a `SessionService`
37
+ (`lib/runtime/sessions.ts`: `create`, `get`, `list`, `delete`, `append`)
38
+ and `memoryService` a `MemoryService` (`lib/runtime/memoryService.ts`:
39
+ `ingest`, `search`), no longer ADK's `BaseSessionService` and
40
+ `BaseMemoryService`. The parameter names, the option keys and the result
41
+ are unchanged. `ingestTurnMemory` takes the same two interfaces and calls
42
+ `memoryService.ingest`. `TurnEvents.onEvent` receives a `TurnEvent` (the
43
+ JSON ADK's `Event` carried). `transformAgent` transformed ADK agents: any
44
+ value is refused with `UnsupportedOnRuntimeError` before the session is
45
+ touched.
46
+ - **Breaking: the stores and the memory service lose their ADK methods.**
47
+ `InProcessSessionService`, `PostgresSessionService`,
48
+ `SupabaseSessionService` and `ProjectedSessionService` are the engine's
49
+ `SessionService` only: `createSession`, `getSession`, `listSessions`,
50
+ `deleteSession` and `appendEvent` are gone (use `create`, `get`, `list`,
51
+ `delete`, `append(session, event)`). `ProjectedSessionService` takes an
52
+ engine store. `SupabaseVectorMemoryService` drops `addSessionToMemory`
53
+ and `searchMemory` (use `ingest(session, { extractionRules,
54
+ extractionModel })` and `search`); `namespacedMemoryService` pins `search`
55
+ and `ingest`. The A2A app's `storage.sessionService` and
56
+ `storage.memoryService` take the engine's interfaces. The stored rows are
57
+ unchanged.
58
+ - **Breaking: `GEMINI_ADAPTER=adk` is an error.** Every Gemini id runs on
59
+ the engine's `GeminiAdapter`. `GEMINI_ADAPTER=engine` (or
60
+ `{ gemini: 'engine' }`) is accepted and changes nothing; `adk` throws an
61
+ error naming 1.0.0. `GeminiAdapterChoice` is `'engine'`.
62
+ - **Breaking: removed exports.** From `melchizedek-agents`:
63
+ `AdkNotInstalledError`, `adkInstalled`, `asAdkSessionService`,
64
+ `asSessionService`, `compileGraph`, `compileSubagent`, `compileWorkflow`,
65
+ `CompiledWorkflow`, `toFunctionTool`, `registerAvailableProviders`,
66
+ `GatewayLlm`. From `melchizedek-agents/runtime`: the same runtime names,
67
+ and `retryPlugins` (self-correction is the loop's own, from `retries:`).
68
+ From `melchizedek-agents/compile`: `compileGraph`, `compileSubagent`,
69
+ `requireApprovalOn`, `requireApprovalOnBaseTool` (gate an own Tool with
70
+ `requireApproval`), and `CompileOptions.nodeConfig`. From
71
+ `melchizedek-agents/models/registry`: `registerAvailableProviders`,
72
+ `GatewayLlm`, `TracedGemini`. These subpaths resolved to deleted files and
73
+ are gone: `melchizedek-agents/models/adkShim`, `models/adkGeminiAdapter`,
74
+ `models/tracedGemini`, `models/claudeLlm`, `models/gptLlm`,
75
+ `models/grokLlm`, `models/kimiLlm`, `models/ollamaLlm`, `models/gatewayLlm`,
76
+ `models/openAiCompatibleLlm`, `models/fallback`, `tools/adkTool`,
77
+ `tools/webSearchTool`, `tools/urlContextTool`, `tools/xSearchTool`,
78
+ `tools/collectionsSearchTool` (the server-side tools are the markers in
79
+ `melchizedek-agents/tools/nativeTools`). `lib/workflow.ts` keeps the
80
+ `workflow:` block's contract; `compileWorkflow`, `assembleWorkflow`,
81
+ `toRetryConfig` and `nodeSettings` are gone. The exports map's paths are
82
+ unchanged.
83
+ - **Breaking: tools are the engine's own, and ADK tools are refused.** The
84
+ registry holds the engine's `Tool`, `InstructionTool`, `NativeToolMarker`
85
+ and `Toolset` (`lib/tools/tool.ts`), with no ADK `FunctionTool` around
86
+ them. `webExtractTool`, `generateImageTool`, `inspectImageTool`,
87
+ `xApiSearchTool`, `remoteAgentTool()`, `createMcpTools()` and
88
+ `buildOpenApiTools()` return own `Tool`s (`declaration()`,
89
+ `execute(args, ctx)`). `registerTool` refuses an ADK tool (anything with
90
+ `runAsync`) with an error that names 1.0.0 and `defineTool`, and refuses
91
+ an object that is not a tool. `toFunctionTool`'s replacement: define the
92
+ tool with `defineTool` (a zod schema and `execute(args, ctx)`) and
93
+ register it; a `defineTool` contract is the engine's `Tool`.
94
+ `runWikiAgent` (`melchizedek-agents/wiki/agentRun`) takes `tools: Tool[]`.
95
+ - **Breaking: a model resolver returns an id or a `ModelAdapter`.**
96
+ `CompileOptions.resolveModel` returns `string | ModelAdapter | undefined`
97
+ (`melchizedek-agents/model`), and the registry's `resolveModel` returns
98
+ the engine's `ModelAdapter`, with the same BYOK scoping. A resolver that
99
+ returns an ADK model class is refused with `UnsupportedOnRuntimeError`
100
+ before any model call. `registerAvailableProviders` is replaced by
101
+ `logProviderStatuses(log?)`, which returns and logs the provider statuses
102
+ and registers nothing: a model id resolves when an agent first calls it.
103
+ `modelExtractor`'s `resolve` seam returns a `ModelAdapter`.
104
+ - **Breaking: a resolver's plain `{ model, apiKey }` object is refused.**
105
+ Anything `resolveModel` returns that is neither a model id string, a
106
+ `ModelAdapter` (an object with `generate()` and a string `model`) nor
107
+ `undefined` is refused with `UnsupportedOnRuntimeError` when the agent is
108
+ compiled, before any model call; the message names 1.0.0 and the type of
109
+ what came back, never its contents. Before, the engine passed such an
110
+ object over and resolved the agent's YAML id on the environment's key, so a
111
+ BYOK caller ran on the operator's key. A BYOK resolver returns an adapter,
112
+ for example `new ClaudeAdapter({ model, apiKey })` from
113
+ `melchizedek-agents/model`.
114
+ - **Breaking: an ADK tool is refused everywhere.** An object with
115
+ `runAsync` is refused with an error naming 1.0.0 and `defineTool` wherever
116
+ it arrives: `registerTool`, a compiled agent's tool list, a workflow tool
117
+ node, a Toolset's `getTools()` and `extraTools` on a model request. Before,
118
+ the last two skipped it silently.
119
+ - **Breaking: `createA2AApp` stops on `GEMINI_ADAPTER=adk`** at startup with
120
+ the 1.0.0 error, as it does on `MELCHIZEDEK_RUNTIME=adk`, instead of
121
+ failing at the first Gemini call.
122
+ - **Breaking: dead model and tool exports removed.**
123
+ `melchizedek-agents/models/errorResponse` drops `providerErrorResponse` and
124
+ `isRetryableErrorResponse` (use `withRetryVerdict(response,
125
+ errorDecision(err))` and read `customMetadata['error.retryable']`);
126
+ `models/schemaNormalize` drops `toolDeclarationFor` (use
127
+ `contractToolDeclaration`); `models/claudeAdapter` drops
128
+ `ClaudeModelRequest` and its `claudeReasoning`; `models/chatCompletionsAdapter`
129
+ drops `ChatCompletionsRequest` and `OlderSpelling` (adapters take
130
+ `ModelRequest`). `melchizedek-agents/tools/toolContract` drops
131
+ `toolCallContextFrom`, and `melchizedek-agents/tools/tool` drops
132
+ `OWN_TOOL`; `toolOf`, `instructionToolOf` and `toolsetOf` no longer look
133
+ inside a wrapper. `nativeToolOf` recognises only the engine's own marker.
134
+ Kimi K3 no longer sends `reasoning_effort: max`, which had no contract
135
+ level and was reachable only through the removed older spelling.
136
+ - **Breaking: the doctor's runtime report has no `adk` field.**
137
+ `runtimeReport()` returns the runtime and its source, or the problem.
138
+
139
+ ### Migration
140
+
141
+ 1. `npm uninstall @google/adk`, and unset `MELCHIZEDEK_RUNTIME=adk` and
142
+ `GEMINI_ADAPTER=adk` wherever they are set.
143
+ 2. Replace `new InMemorySessionService()` and
144
+ `asAdkSessionService(new InProcessSessionService())` with
145
+ `new InProcessSessionService()` (or your Postgres or Supabase store), and
146
+ call `create` / `get` / `append(session, event)` where you called
147
+ `createSession` / `getSession` / `appendEvent`.
148
+ 3. Replace a custom `BaseMemoryService` with a `MemoryService`
149
+ (`ingest`, `search`).
150
+ 4. Replace ADK `FunctionTool`s and `toFunctionTool(...)` with `defineTool`
151
+ contracts, and register them with `registerTool`.
152
+ 5. Replace `registerAvailableProviders()` with `logProviderStatuses()`.
153
+ 6. A custom `resolveModel` returns a model id or a `ModelAdapter`
154
+ (`resolveAdapter` from `melchizedek-agents/model`), not an ADK `BaseLlm`.
155
+ A resolver that returned a plain `{ model, apiKey }` object returns an
156
+ adapter built with that key instead (`new ClaudeAdapter({ model, apiKey })`
157
+ or the provider's own adapter class); the plain object is refused.
158
+ 7. Run turns through `runSyndicateTurn` where you compiled ADK agents with
159
+ `compileGraph`, `compileSubagent` or `compileWorkflow`.
160
+
161
+ ### Fixed
162
+
163
+ - **Server-side tool calls are recorded again.** A GPT or Grok answer that
164
+ searched (web search, X search, collections) records its server-side tool
165
+ calls as `ToolCall` events and counts them in the ledger row's
166
+ `tool_calls`. Since 0.20.0 made the engine's loop the default, those
167
+ calls were lost: the record lived in the deleted ADK shim. The native step
168
+ carries them onto the final (`lib/runtime/native/step.ts`);
169
+ `tests/nativeLedgerCounts.test.ts` pins it.
170
+
171
+ ### Unchanged by design
172
+
173
+ - The stored Event JSON (`adk_sessions.events`, `adk_session_events`), the
174
+ interrupt names (`adk_request_confirmation`, `ask_user`,
175
+ `adk_request_input`, `adk_request_credential`) and their argument shapes,
176
+ the A2A surface, and the table names. The ADK-written session fixtures
177
+ (`tests/fixtures/sessions`) resume.
178
+
179
+ ### Added and changed
180
+
181
+ - **One output-token meaning on the ledger (ADR 0107).** For every
182
+ provider, `output_tokens` (and `llm.tokens.output`) excludes the thinking
183
+ and `thinking_tokens` carries it, so output plus thinking is the
184
+ provider's own output count. This is what the engine's loop has written
185
+ since 0.20.0; it supersedes the ledger clauses of ADR 0056 and ADR 0057,
186
+ which kept the provider's meaning on the ADK path. Rows written before
187
+ 0.20.0 for GPT, Grok, Kimi and the gateways used that older meaning: a
188
+ query comparing output across that boundary subtracts `thinking_tokens`
189
+ from those rows.
190
+
191
+ - **New exports.** From the barrel and `melchizedek-agents/runtime`:
192
+ `RuntimeRemovedError`, and the types `SessionService`, `Session`,
193
+ `SessionKey`, `MemoryService`, `MemoryEntry`, `MemoryIngestOptions`,
194
+ `MemorySearchRequest`, `MemorySearchResult` and `TurnEvent`. From the
195
+ barrel: `UnsupportedOnRuntimeError`, `logProviderStatuses`, and the types
196
+ `Tool` and `ToolContext`.
197
+ - **An import-graph test holds the line** (`tests/importGraph.test.ts`):
198
+ nothing under `lib/` or `scripts/` names Google ADK, and `@google/genai`
199
+ is imported only by the Gemini adapter and its genai mapping, the image
200
+ tools and memory embeddings.
201
+
202
+ - **A workflow syndicate runs its whole graph as a dispatch route or a
203
+ workflow node (ADR 0106).** A `yaml_reference` to a workflow syndicate
204
+ used to run its orchestrator alone there; it now runs the whole graph on
205
+ the child session filed under the entry's name, as a delegated subagent
206
+ already did (ADR 0098). As a plan-dispatch route its last output is the
207
+ turn's answer, and the conversation keeps the message and that answer. As
208
+ a workflow node its last output is the node's output. A `map` over
209
+ one and an `ask_user` node inside one are refused by name. Each nested
210
+ walk has its own node-run ceiling (ADR 0105). **Breaking for a direct
211
+ caller:** `compileSubagentSpec` refuses a workflow reference by name
212
+ instead of compiling its orchestrator; compile the entry
213
+ with `compileEntrySpec`. `melchizedek-agents/compile` adds
214
+ `compileEntrySpec`, `EntrySpec`, `workflowAgentSpecs`,
215
+ `workflowEntryNames` and `WorkflowSpec.workflows`; the exports map and the
216
+ barrel are unchanged.
217
+
218
+ - **Skill scripts on a workflow node (ADR 0106).** `skills.scripts: local`
219
+ is allowed on a workflow node's agent: each `run_skill_script` call pauses
220
+ the node and the walk for a person's approval, as `require_approval` does,
221
+ and runs once after it, with the minimal script environment of ADR 0086.
222
+ Still refused on an agent a `map` node runs.
223
+
224
+ - **Docs: `config/agents/syndicateSchema.yaml` describes the engine as it
225
+ runs.** Its comments say that the runtime runs every key, explain the ADK
226
+ spellings and "Maps to:" lines as spellings, prefer
227
+ `reasoning:` over `generateContentConfig.thinkingConfig`, and no longer
228
+ call Gemini "ADK-native", plan-dispatch "A2A-only", or `require_approval`
229
+ unsupported inside a workflow. Comments only.
230
+
231
+ - **A workflow walk has a node-run ceiling (ADR 0105).** `max_steps`
232
+ counts model calls, so a routed cycle through nodes that make none (a tool
233
+ node and its route step looping on each other) ran until the turn's
234
+ deadline. A walk now starts at most
235
+ `max(20 × max_steps, 100)` node runs (1,000 at the default of 50); the run
236
+ that would pass it fails its node with `NodeRunLimitError`, stored as the
237
+ workflow's node-error event, and the turn fails with the new error code
238
+ `NODE_RUN_LIMIT` and the progress line `Stopped: the workflow reached its
239
+ limit of <n> node runs`. A legitimate loop under the ceiling is unchanged;
240
+ raise `max_steps` to raise it.
241
+
242
+ - **Docs: the shipped documentation describes the engine as 1.0.0 runs it
243
+ (WS5-3, WS5-2b).** `README.md`, `QUICKSTART.md`, `DOCUMENTATION.md`,
244
+ `AGENT_SETUP.md` and the agent skills under `skills/` describe the
245
+ engine's own loop, model contract, tools, sessions and workflow
246
+ scheduler, with no ADK to install, and no longer call Gemini
247
+ "ADK-native".
248
+
9
249
  ## 0.20.0 — 2026-10-08
10
250
 
11
251
  Release 0.20.0: the native runtime is the default, and `@google/adk` is an