melchizedek-agents 0.20.0 → 1.0.1

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