qlogicagent 2.24.1 → 2.24.2

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 (297) hide show
  1. package/README.md +52 -324
  2. package/dist/agent.js +38 -43
  3. package/dist/cli.js +7 -7
  4. package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -7
  5. package/dist/default-project-knowledge/rules/project-workflow.md +6 -6
  6. package/dist/index.js +265 -1018
  7. package/dist/orchestration.js +10 -10
  8. package/dist/types/agent/runtime-vars.d.ts +1 -16
  9. package/dist/types/agent/tool-loop/compression-pipeline.d.ts +0 -2
  10. package/dist/types/agent/tool-loop.d.ts +0 -6
  11. package/dist/types/agent/types.d.ts +3 -22
  12. package/dist/types/cli/acp-commands.d.ts +4 -5
  13. package/dist/types/cli/acp-message-router.d.ts +1 -2
  14. package/dist/types/cli/acp-session-handlers.d.ts +6 -12
  15. package/dist/types/cli/acp-session-host.d.ts +5 -48
  16. package/dist/types/cli/adapter-launch-config.d.ts +14 -0
  17. package/dist/types/cli/agent-runtime-bootstrap.d.ts +2 -23
  18. package/dist/types/cli/agent-runtime-session-state.d.ts +1 -6
  19. package/dist/types/cli/base-tool-bootstrap.d.ts +0 -2
  20. package/dist/types/cli/cli-acp-request-handler.d.ts +3 -5
  21. package/dist/types/cli/core-tool-coordinator.d.ts +0 -4
  22. package/dist/types/cli/core-tools/agent-tool-service.d.ts +0 -3
  23. package/dist/types/cli/core-tools/fork-system-prompt.d.ts +1 -5
  24. package/dist/types/cli/handlers/files-handler.d.ts +0 -6
  25. package/dist/types/cli/handlers/turn-handler.d.ts +7 -83
  26. package/dist/types/cli/main.d.ts +2 -4
  27. package/dist/types/cli/permission-approval-bridge.d.ts +2 -6
  28. package/dist/types/cli/permission-bootstrap.d.ts +2 -12
  29. package/dist/types/cli/plugin-bootstrap.d.ts +2 -4
  30. package/dist/types/cli/runtime-hook-bootstrap.d.ts +0 -21
  31. package/dist/types/cli/session-context.d.ts +4 -14
  32. package/dist/types/cli/session-coordinator.d.ts +1 -9
  33. package/dist/types/cli/stdio-acp-protocol-coordinator.d.ts +2 -9
  34. package/dist/types/cli/stdio-acp-request-host.d.ts +3 -15
  35. package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +3 -23
  36. package/dist/types/cli/stdio-runtime-bootstrap.d.ts +0 -8
  37. package/dist/types/cli/stdio-runtime-services.d.ts +2 -13
  38. package/dist/types/cli/stdio-server.d.ts +6 -128
  39. package/dist/types/cli/tool-bootstrap.d.ts +4 -8
  40. package/dist/types/cli/tool-catalog.d.ts +2 -2
  41. package/dist/types/cli/tool-invoker-factory.d.ts +0 -2
  42. package/dist/types/cli/tool-registry-adapter.d.ts +3 -7
  43. package/dist/types/cli/tool-result-processor.d.ts +0 -1
  44. package/dist/types/cli/turn-core.d.ts +6 -10
  45. package/dist/types/cli/turn-event-forwarder.d.ts +6 -3
  46. package/dist/types/cli/turn-lifecycle.d.ts +0 -3
  47. package/dist/types/cli/turn-project-router.d.ts +0 -7
  48. package/dist/types/contracts/hooks.d.ts +1 -20
  49. package/dist/types/contracts/tool-execution-evidence.d.ts +20 -1
  50. package/dist/types/contracts/turn-event.d.ts +2 -2
  51. package/dist/types/orchestration/index.d.ts +1 -1
  52. package/dist/types/protocol/notifications.d.ts +2 -9
  53. package/dist/types/protocol/wire/acp-protocol.d.ts +12 -186
  54. package/dist/types/protocol/wire/capability-transport.d.ts +0 -2
  55. package/dist/types/protocol/wire/index.d.ts +2 -10
  56. package/dist/types/protocol/wire/notification-payloads.d.ts +4 -989
  57. package/dist/types/protocol/wire/thread-protocol.d.ts +24 -3
  58. package/dist/types/runtime/config/tunable-defaults.d.ts +3 -75
  59. package/dist/types/runtime/execution/forked-agent.d.ts +2 -5
  60. package/dist/types/runtime/execution/streaming-tool-executor.d.ts +0 -2
  61. package/dist/types/runtime/execution/tool-result-storage.d.ts +13 -4
  62. package/dist/types/runtime/infra/agent-paths.d.ts +4 -54
  63. package/dist/types/runtime/infra/agent-project-projection.d.ts +20 -0
  64. package/dist/types/runtime/infra/background-tasks.d.ts +3 -3
  65. package/dist/types/runtime/infra/default-path-service.d.ts +0 -7
  66. package/dist/types/runtime/infra/llmrouter-catalog.d.ts +1 -1
  67. package/dist/types/runtime/infra/model-registry.d.ts +6 -9
  68. package/dist/types/runtime/infra/project-store.d.ts +3 -3
  69. package/dist/types/runtime/infra/subagent-turn-snapshot.d.ts +54 -7
  70. package/dist/types/runtime/infra/task-runtime.d.ts +1 -1
  71. package/dist/types/runtime/ports/agent-runtime-ports.d.ts +1 -3
  72. package/dist/types/runtime/ports/index.d.ts +0 -4
  73. package/dist/types/runtime/ports/path-service.d.ts +1 -9
  74. package/dist/types/runtime/ports/tool-contracts.d.ts +0 -1
  75. package/dist/types/runtime/session/agent-session-projection.d.ts +37 -0
  76. package/dist/types/runtime/tasks/task-types.d.ts +2 -25
  77. package/dist/types/skills/mcp/mcp-manager.d.ts +2 -2
  78. package/dist/types/skills/plugins/plugin-loader.d.ts +1 -1
  79. package/dist/types/skills/skill-system/skill-category.d.ts +4 -2
  80. package/dist/types/skills/tools.d.ts +1 -18
  81. package/dist/types/test-support/project-store-fixture.d.ts +4 -4
  82. package/dist/types/transport/acp-event-emitter.d.ts +1 -20
  83. package/dist/types/transport/acp-server.d.ts +8 -88
  84. package/package.json +4 -96
  85. package/dist/agent-contract.js +0 -1
  86. package/dist/host-contract.js +0 -1
  87. package/dist/host-session-collection-contract.js +0 -1
  88. package/dist/memory-category-contract.js +0 -1
  89. package/dist/permissions.js +0 -1
  90. package/dist/plugin-marketplace-compute.js +0 -1
  91. package/dist/project-memory-host.js +0 -38
  92. package/dist/protocol.js +0 -1
  93. package/dist/skill-category-contract.js +0 -1
  94. package/dist/tunables.js +0 -1
  95. package/dist/types/agent/memory-recall-context.d.ts +0 -22
  96. package/dist/types/agent/memory-recall-injection.d.ts +0 -32
  97. package/dist/types/cli/acp-extended-handlers.d.ts +0 -110
  98. package/dist/types/cli/acp-extended-host-adapter.d.ts +0 -20
  99. package/dist/types/cli/community-resource-installer.d.ts +0 -39
  100. package/dist/types/cli/community-skill-installer.d.ts +0 -18
  101. package/dist/types/cli/community-workflow-installer.d.ts +0 -29
  102. package/dist/types/cli/default-project-bootstrap.d.ts +0 -12
  103. package/dist/types/cli/dream-host-adapter.d.ts +0 -24
  104. package/dist/types/cli/gateway-rpc-connection.d.ts +0 -50
  105. package/dist/types/cli/handlers/community-handler.d.ts +0 -14
  106. package/dist/types/cli/handlers/config-handler.d.ts +0 -19
  107. package/dist/types/cli/handlers/control-handler.d.ts +0 -29
  108. package/dist/types/cli/handlers/dream-handler.d.ts +0 -41
  109. package/dist/types/cli/handlers/goal-handler.d.ts +0 -66
  110. package/dist/types/cli/handlers/memory-handler.d.ts +0 -23
  111. package/dist/types/cli/handlers/product-handler.d.ts +0 -35
  112. package/dist/types/cli/handlers/session-handler.d.ts +0 -29
  113. package/dist/types/cli/handlers/skill-curator-handler.d.ts +0 -8
  114. package/dist/types/cli/handlers/solo-handler.d.ts +0 -25
  115. package/dist/types/cli/handlers/turn-baseline-handler.d.ts +0 -8
  116. package/dist/types/cli/handlers/workflow-compute-handler.d.ts +0 -8
  117. package/dist/types/cli/handlers/working-materials-handler.d.ts +0 -9
  118. package/dist/types/cli/idle-dream-coordinator.d.ts +0 -57
  119. package/dist/types/cli/memory-background-coordinator.d.ts +0 -26
  120. package/dist/types/cli/memory-candidate-service.d.ts +0 -75
  121. package/dist/types/cli/memory-coordinator.d.ts +0 -40
  122. package/dist/types/cli/multi-agent-handler-host.d.ts +0 -16
  123. package/dist/types/cli/multi-agent-state-coordinator.d.ts +0 -8
  124. package/dist/types/cli/orchestration-memory-context.d.ts +0 -23
  125. package/dist/types/cli/product-acp-params.d.ts +0 -30
  126. package/dist/types/cli/product-coordinator.d.ts +0 -21
  127. package/dist/types/cli/project-memory-store-factory.d.ts +0 -12
  128. package/dist/types/cli/project-template-seeder.d.ts +0 -5
  129. package/dist/types/cli/rpc-registry.d.ts +0 -56
  130. package/dist/types/cli/session-history-coordinator.d.ts +0 -8
  131. package/dist/types/cli/session-query-service.d.ts +0 -27
  132. package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +0 -56
  133. package/dist/types/cli/stdio-session-runtime-coordinator.d.ts +0 -17
  134. package/dist/types/cli/task-distillation-coordinator.d.ts +0 -146
  135. package/dist/types/cli/turn-ask-user-setup.d.ts +0 -24
  136. package/dist/types/cli/turn-suggestion-generator.d.ts +0 -15
  137. package/dist/types/contracts/memory-recall-packet.d.ts +0 -31
  138. package/dist/types/contracts/memory-response-contract.d.ts +0 -2
  139. package/dist/types/host-contract/fts-segment.d.ts +0 -20
  140. package/dist/types/host-contract/index.d.ts +0 -1819
  141. package/dist/types/host-contract/memory-category.d.ts +0 -8
  142. package/dist/types/host-contract/skill-category.d.ts +0 -5
  143. package/dist/types/host-session-collection-contract.d.ts +0 -65
  144. package/dist/types/orchestration/agent-instance.d.ts +0 -215
  145. package/dist/types/orchestration/agent-roster.d.ts +0 -32
  146. package/dist/types/orchestration/dag-scheduler.d.ts +0 -219
  147. package/dist/types/orchestration/delegate-approval-policy.d.ts +0 -8
  148. package/dist/types/orchestration/delegate-bridge.d.ts +0 -8
  149. package/dist/types/orchestration/goal-acceptance.d.ts +0 -17
  150. package/dist/types/orchestration/goal-context-envelope.d.ts +0 -7
  151. package/dist/types/orchestration/goal-loop-coordinator.d.ts +0 -151
  152. package/dist/types/orchestration/goal-mode-adapters.d.ts +0 -152
  153. package/dist/types/orchestration/goal-run-persistence.d.ts +0 -21
  154. package/dist/types/orchestration/goal-run-types.d.ts +0 -225
  155. package/dist/types/orchestration/planner-memory-brief.d.ts +0 -39
  156. package/dist/types/orchestration/product-budget.d.ts +0 -94
  157. package/dist/types/orchestration/product-checkpoint.d.ts +0 -50
  158. package/dist/types/orchestration/product-dag-mutation-applier.d.ts +0 -10
  159. package/dist/types/orchestration/product-persistence.d.ts +0 -90
  160. package/dist/types/orchestration/product-planner.d.ts +0 -332
  161. package/dist/types/orchestration/product-run-coordinator.d.ts +0 -49
  162. package/dist/types/orchestration/product-worktree.d.ts +0 -19
  163. package/dist/types/orchestration/run-state-host-authority.d.ts +0 -7
  164. package/dist/types/orchestration/solo-evaluator.d.ts +0 -179
  165. package/dist/types/orchestration/solo-persistence.d.ts +0 -47
  166. package/dist/types/orchestration/solo-spec-builder.d.ts +0 -58
  167. package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +0 -23
  168. package/dist/types/orchestration/testing/host-agent-provider-directory-fixture.d.ts +0 -7
  169. package/dist/types/orchestration/testing/run-state-client-double.d.ts +0 -13
  170. package/dist/types/orchestration/workflow/budget-permission-gate.d.ts +0 -94
  171. package/dist/types/orchestration/workflow/builtin-capabilities.d.ts +0 -3
  172. package/dist/types/orchestration/workflow/builtin-executors.d.ts +0 -18
  173. package/dist/types/orchestration/workflow/capability-catalog.d.ts +0 -72
  174. package/dist/types/orchestration/workflow/cron-schedule.d.ts +0 -36
  175. package/dist/types/orchestration/workflow/data-item.d.ts +0 -39
  176. package/dist/types/orchestration/workflow/expression.d.ts +0 -60
  177. package/dist/types/orchestration/workflow/host-executors.d.ts +0 -15
  178. package/dist/types/orchestration/workflow/n8n-expression.d.ts +0 -48
  179. package/dist/types/orchestration/workflow/n8n-import.d.ts +0 -64
  180. package/dist/types/orchestration/workflow/n8n-template-compat.d.ts +0 -5
  181. package/dist/types/orchestration/workflow/node-registry.d.ts +0 -32
  182. package/dist/types/orchestration/workflow/node-schema.d.ts +0 -249
  183. package/dist/types/orchestration/workflow/params-schema.d.ts +0 -69
  184. package/dist/types/orchestration/workflow/qla-executor-host.d.ts +0 -63
  185. package/dist/types/orchestration/workflow/run-checkpoint-store.d.ts +0 -53
  186. package/dist/types/orchestration/workflow/run-history-store.d.ts +0 -103
  187. package/dist/types/orchestration/workflow/semantic-acceptance.d.ts +0 -65
  188. package/dist/types/orchestration/workflow/trigger-validation.d.ts +0 -22
  189. package/dist/types/orchestration/workflow/workflow-audit-store.d.ts +0 -31
  190. package/dist/types/orchestration/workflow/workflow-authoring.d.ts +0 -74
  191. package/dist/types/orchestration/workflow/workflow-bundle.d.ts +0 -51
  192. package/dist/types/orchestration/workflow/workflow-controller.d.ts +0 -237
  193. package/dist/types/orchestration/workflow/workflow-edit-context.d.ts +0 -46
  194. package/dist/types/orchestration/workflow/workflow-error.d.ts +0 -28
  195. package/dist/types/orchestration/workflow/workflow-intent-contract.d.ts +0 -56
  196. package/dist/types/orchestration/workflow/workflow-patch.d.ts +0 -122
  197. package/dist/types/orchestration/workflow/workflow-render.d.ts +0 -40
  198. package/dist/types/orchestration/workflow/workflow-runtime.d.ts +0 -184
  199. package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +0 -122
  200. package/dist/types/orchestration/workflow/workflow-store.d.ts +0 -85
  201. package/dist/types/orchestration/workflow/workflow-template-setup.d.ts +0 -65
  202. package/dist/types/orchestration/workflow/workflow-trigger.d.ts +0 -43
  203. package/dist/types/orchestration/workflow-chat-builder.d.ts +0 -152
  204. package/dist/types/orchestration/worktree-task-prompt.d.ts +0 -1
  205. package/dist/types/permissions.d.ts +0 -4
  206. package/dist/types/project-memory-host.d.ts +0 -4
  207. package/dist/types/protocol/agent-contract.d.ts +0 -93
  208. package/dist/types/protocol/methods.d.ts +0 -645
  209. package/dist/types/protocol/wire/acp-agent-management.d.ts +0 -533
  210. package/dist/types/protocol/wire/agent-events.d.ts +0 -1
  211. package/dist/types/protocol/wire/agent-methods.d.ts +0 -500
  212. package/dist/types/protocol/wire/agent-rpc.d.ts +0 -100
  213. package/dist/types/protocol/wire/gateway-contract.d.ts +0 -61
  214. package/dist/types/protocol/wire/gateway-rpc.d.ts +0 -1177
  215. package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +0 -31
  216. package/dist/types/protocol/wire/turn.d.ts +0 -208
  217. package/dist/types/runtime/community/autonomy-budget.d.ts +0 -26
  218. package/dist/types/runtime/community/community-consent-client.d.ts +0 -55
  219. package/dist/types/runtime/community/package-materialize.d.ts +0 -19
  220. package/dist/types/runtime/community/ranged-download.d.ts +0 -21
  221. package/dist/types/runtime/community/registry-signature.d.ts +0 -48
  222. package/dist/types/runtime/execution/dream-agent.d.ts +0 -273
  223. package/dist/types/runtime/execution/dream-category-context.d.ts +0 -47
  224. package/dist/types/runtime/execution/memory-decay.d.ts +0 -73
  225. package/dist/types/runtime/execution/turn-progress-notifier.d.ts +0 -16
  226. package/dist/types/runtime/hooks/memory-hooks.d.ts +0 -111
  227. package/dist/types/runtime/infra/acp-host-handler.d.ts +0 -31
  228. package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +0 -209
  229. package/dist/types/runtime/infra/acp-usage-tracker.d.ts +0 -46
  230. package/dist/types/runtime/infra/cloud-auth-host-authority.d.ts +0 -4
  231. package/dist/types/runtime/infra/feedback-distillation-worker.d.ts +0 -20
  232. package/dist/types/runtime/infra/feedback-distillation.d.ts +0 -32
  233. package/dist/types/runtime/infra/feedback-event-store.d.ts +0 -179
  234. package/dist/types/runtime/infra/feedback-host-authority.d.ts +0 -4
  235. package/dist/types/runtime/infra/feedback-outbox.d.ts +0 -26
  236. package/dist/types/runtime/infra/feedback-redaction.d.ts +0 -71
  237. package/dist/types/runtime/infra/feedback-upload-client.d.ts +0 -39
  238. package/dist/types/runtime/infra/feedback-upload-worker.d.ts +0 -11
  239. package/dist/types/runtime/infra/host-agent-provider-directory.d.ts +0 -17
  240. package/dist/types/runtime/infra/project-authority-facade.d.ts +0 -11
  241. package/dist/types/runtime/infra/project-data-paths.d.ts +0 -24
  242. package/dist/types/runtime/infra/project-host-authority.d.ts +0 -11
  243. package/dist/types/runtime/infra/project-instructions-store.d.ts +0 -30
  244. package/dist/types/runtime/infra/turn-baseline-store.d.ts +0 -102
  245. package/dist/types/runtime/infra/turn-telemetry-store.d.ts +0 -100
  246. package/dist/types/runtime/infra/working-materials-store.d.ts +0 -29
  247. package/dist/types/runtime/memory/find-relevant-memories.d.ts +0 -26
  248. package/dist/types/runtime/memory/implicit-extraction.d.ts +0 -69
  249. package/dist/types/runtime/memory/memory-recall-attribution.d.ts +0 -24
  250. package/dist/types/runtime/ports/memory-provider.d.ts +0 -219
  251. package/dist/types/runtime/ports/memory-recall-source.d.ts +0 -14
  252. package/dist/types/runtime/ports/memory-writer.d.ts +0 -70
  253. package/dist/types/runtime/ports/project-memory-store.d.ts +0 -49
  254. package/dist/types/runtime/prompt/host-skill-directory.d.ts +0 -16
  255. package/dist/types/runtime/session/group-session-split.d.ts +0 -38
  256. package/dist/types/runtime/session/inbound-upload-persistence.d.ts +0 -47
  257. package/dist/types/runtime/session/session-catalog.d.ts +0 -12
  258. package/dist/types/runtime/session/session-deletion-guard.d.ts +0 -4
  259. package/dist/types/runtime/session/session-locator.d.ts +0 -26
  260. package/dist/types/runtime/session/session-metadata-store.d.ts +0 -8
  261. package/dist/types/runtime/session/session-paths.d.ts +0 -8
  262. package/dist/types/runtime/session/session-permission-store.d.ts +0 -6
  263. package/dist/types/runtime/session/session-persistence.d.ts +0 -37
  264. package/dist/types/runtime/session/session-recovery.d.ts +0 -62
  265. package/dist/types/runtime/session/session-resource-key.d.ts +0 -28
  266. package/dist/types/runtime/session/session-resume.d.ts +0 -9
  267. package/dist/types/runtime/session/session-schema.d.ts +0 -10
  268. package/dist/types/runtime/session/session-summary.d.ts +0 -7
  269. package/dist/types/runtime/session/session-title.d.ts +0 -9
  270. package/dist/types/runtime/session/session-transcript-store.d.ts +0 -30
  271. package/dist/types/runtime/session/session-types.d.ts +0 -113
  272. package/dist/types/runtime/session/session-write-queue.d.ts +0 -3
  273. package/dist/types/skills/memory/host-memory-provider.d.ts +0 -235
  274. package/dist/types/skills/memory/memdir.d.ts +0 -111
  275. package/dist/types/skills/memory/memory-content-safety.d.ts +0 -1
  276. package/dist/types/skills/memory/memory-vector-utils.d.ts +0 -2
  277. package/dist/types/skills/memory/task-distillation.d.ts +0 -183
  278. package/dist/types/skills/plugins/plugin-marketplace.d.ts +0 -43
  279. package/dist/types/skills/skill-system/skill-bundles.d.ts +0 -8
  280. package/dist/types/skills/skill-system/skill-lifecycle.d.ts +0 -89
  281. package/dist/types/test-support/run-state-authority-setup.d.ts +0 -1
  282. package/dist/types/transport/delegate-client.d.ts +0 -82
  283. package/dist/types/transport/host-capability-client.d.ts +0 -21
  284. package/dist/types/transport/host-cloud-auth-client.d.ts +0 -10
  285. package/dist/types/transport/host-community-client.d.ts +0 -7
  286. package/dist/types/transport/host-feedback-client.d.ts +0 -25
  287. package/dist/types/transport/host-profile-client.d.ts +0 -19
  288. package/dist/types/transport/host-project-client.d.ts +0 -16
  289. package/dist/types/transport/host-request-client.d.ts +0 -42
  290. package/dist/types/transport/host-run-state-client.d.ts +0 -23
  291. package/dist/types/transport/host-session-client.d.ts +0 -30
  292. package/dist/types/tunables.d.ts +0 -2
  293. package/dist/types/workflow-host.d.ts +0 -38
  294. package/dist/workflow-host.js +0 -11
  295. /package/dist/types/{host-contract → protocol/wire}/acp-content.d.ts +0 -0
  296. /package/dist/types/{host-contract → runtime/infra}/project-id.d.ts +0 -0
  297. /package/dist/types/{host-contract → runtime/infra}/provider-profile.d.ts +0 -0
@@ -1,29 +0,0 @@
1
- /**
2
- * Community WORKFLOW install (IT-5, spec D35/D23): download the published package, verify
3
- * size+checksum against registry metadata, gunzip, and parse the SANITIZED WorkflowBundle.
4
- *
5
- * Deliberately NOTHING lands on disk here: a workflow bundle is a declarative graph, not an
6
- * executable artifact — applying it goes through the same `workflow.import` write path every
7
- * other bundle uses (validateWorkflowDef gate, project-scoped persistence, and external
8
- * connection reconfiguration in node/MCP settings). This function only fetches + verifies + parses.
9
- *
10
- * NOT the executable launcher-gate path: bundles carry no code; they run inside the engine's
11
- * restricted expression language under the D29/D30 permission gates, and applying one never
12
- * activates it (activation requires publish + the unattended grant door).
13
- */
14
- import type { CommunityInstallResolution } from "../runtime/community/community-consent-client.js";
15
- export interface CommunityWorkflowBundlePayload {
16
- kind: "workflow";
17
- mode: "bundle";
18
- resourceId: string;
19
- version: string;
20
- sourceTier: string;
21
- riskTier: string;
22
- /** The sanitized WorkflowBundle JSON (current schemaVersion) — feed to workflow.import. */
23
- bundle: Record<string, unknown>;
24
- manifest: unknown;
25
- }
26
- export interface InstallCommunityWorkflowOptions {
27
- fetchFn?: typeof fetch;
28
- }
29
- export declare function installCommunityWorkflowResource(install: CommunityInstallResolution, options?: InstallCommunityWorkflowOptions): Promise<CommunityWorkflowBundlePayload>;
@@ -1,12 +0,0 @@
1
- import type { NotificationMethodMap } from "../protocol/notifications.js";
2
- import type { PathService, ProjectMemoryStore, ProjectMemoryStoreFactory } from "../runtime/ports/index.js";
3
- export interface DefaultProjectBootstrapDeps {
4
- pathService: PathService;
5
- projectMemoryStoreFactory: ProjectMemoryStoreFactory;
6
- sendNotification<M extends keyof NotificationMethodMap>(method: M, params: NotificationMethodMap[M]): void;
7
- }
8
- /**
9
- * Bind compute state to the active Host project. The Gateway must already have
10
- * hydrated the Project snapshot; qlogicagent never creates or repairs projects.
11
- */
12
- export declare function ensureDefaultProjectBootstrap(deps: DefaultProjectBootstrapDeps): Promise<ProjectMemoryStore>;
@@ -1,24 +0,0 @@
1
- import type { TurnConfig } from "../agent/types.js";
2
- import type { AgentRpcError } from "../protocol/wire/index.js";
3
- import type { DreamHandlerHost } from "./handlers/dream-handler.js";
4
- export interface DreamHostAdapterDeps {
5
- getActiveTurn(): AbortController | null;
6
- setActiveTurn(value: AbortController | null): void;
7
- getCurrentTransport(): DreamHandlerHost["currentTransport"];
8
- getCurrentApiKey(): string;
9
- getCurrentModel(): string;
10
- getCurrentHooks(): DreamHandlerHost["currentHooks"];
11
- getMemoryProvider(): DreamHandlerHost["memoryProvider"];
12
- getMemoryUserId(): string;
13
- ensureMemoryProvider(): void;
14
- getToolCatalog(): DreamHandlerHost["toolCatalog"];
15
- getTaskStore(): DreamHandlerHost["taskStore"];
16
- getVerbose(): boolean;
17
- log(message: string): void;
18
- resolveMemoryRoot(): string;
19
- resolveTranscriptDir(): string;
20
- resolveAgent(config: TurnConfig): unknown | null;
21
- sendNotification(method: string, params: Record<string, unknown>): void;
22
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
23
- }
24
- export declare function createDreamHostAdapter(deps: DreamHostAdapterDeps): DreamHandlerHost;
@@ -1,50 +0,0 @@
1
- /**
2
- * GatewayRpcConnection — the JSON-RPC request lifecycle for the gateway contract.
3
- *
4
- * Owns the per-request bookkeeping: the gateway contract (dedup/settle/expire), the
5
- * in-flight request ledger (id → meta), and the deadline timers; plus the wire-side
6
- * response builders. Extracted from StdioServer to separate its "protocol routing"
7
- * concern from its "runtime state container" concern — StdioServer keeps the
8
- * transport, message dispatch, and ACP routing, and delegates the request-lifecycle
9
- * mechanics here through thin sendResponse/sendError methods.
10
- *
11
- * It does NOT own the transport: the raw frame writer is injected via `write`, so the
12
- * server stays in charge of transport ownership / start / close / ACP routing.
13
- *
14
- * Covered by stdio-server.contract.test.ts (contract gate, dedup, deadline expiry,
15
- * late-response drop).
16
- */
17
- import { GatewayRpcContract, type AgentRpcError, type AgentRpcRequest } from "../protocol/wire/index.js";
18
- export interface GatewayRpcConnectionDeps {
19
- /** Raw transport send — writes one JSON-RPC frame to the wire. */
20
- write: (msg: unknown) => void;
21
- log: (message: string) => void;
22
- }
23
- export declare class GatewayRpcConnection {
24
- private readonly contract;
25
- private readonly inflight;
26
- private readonly deadlineTimers;
27
- private readonly write;
28
- private readonly log;
29
- constructor(deps: GatewayRpcConnectionDeps);
30
- /** The gateway contract — exposed for control-handler metrics/cancel. */
31
- get rpcContract(): GatewayRpcContract;
32
- /** True while a request id is in flight (no response settled yet). */
33
- hasInFlight(id: string | number): boolean;
34
- /**
35
- * Run the gateway contract gate for an inbound request (caller guarantees the
36
- * id is present and the method is not meta-optional). Returns true if the caller
37
- * should dispatch; false if the request was rejected/deduped — in which case a
38
- * response has already been written.
39
- */
40
- begin(id: string | number, msg: AgentRpcRequest): boolean;
41
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
42
- /** Convenience over sendResponse for handlers that build the error inline. */
43
- sendError(id: string | number, code: AgentRpcError["code"], message: string, data?: unknown): void;
44
- /** Clear the in-flight ledger + deadline timers (server shutdown). */
45
- dispose(): void;
46
- private clearLifecycle;
47
- private sendContractError;
48
- private sendContractErrorOrResult;
49
- private scheduleDeadline;
50
- }
@@ -1,14 +0,0 @@
1
- import { type CommunityConsentClient } from "../../runtime/community/community-consent-client.js";
2
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
3
- import type { HostCapabilityClient } from "../../transport/host-capability-client.js";
4
- import type { HostCommunityClient } from "../../transport/host-community-client.js";
5
- export type { CommunityConsentClient, CommunityInstallRiskTier, CommunityInstallResolution, } from "../../runtime/community/community-consent-client.js";
6
- export interface CommunityHandlerHost {
7
- resolveCommunityConsentClient?: () => CommunityConsentClient | null;
8
- getHostCapabilityClient?(): HostCapabilityClient | undefined;
9
- getHostCommunityClient?(): HostCommunityClient | undefined;
10
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
11
- }
12
- export declare function handleCommunityResolveInstall(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
13
- export declare function handleCommunityListResourceVersions(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
14
- export declare function handleCommunityInstallResource(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -1,19 +0,0 @@
1
- /**
2
- * Provider/catalog and task-list handlers retained after the public config.* RPC teardown.
3
- * Profile/tunable state is gateway-owned and is available to agent tools only through private X7.
4
- */
5
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
6
- import type { BackgroundTaskManager } from "../../runtime/infra/background-tasks.js";
7
- import type { TaskStore } from "../../runtime/infra/task-runtime.js";
8
- import type { ToolCatalog } from "../../runtime/ports/index.js";
9
- export interface ConfigHandlerHost {
10
- taskStore: TaskStore;
11
- backgroundTasks: BackgroundTaskManager;
12
- toolCatalog?: ToolCatalog;
13
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
14
- }
15
- export declare function handleToolsList(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
16
- export declare function handleProviderList(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
17
- export declare function handleTodosList(this: ConfigHandlerHost, msg: AgentRpcRequest): Promise<void>;
18
- export declare function handleTasksList(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
19
- export declare function handleTasksCancel(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
@@ -1,29 +0,0 @@
1
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
2
- import type { NotificationMethodMap } from "../../protocol/notifications.js";
3
- import type { ToolCatalog } from "../../runtime/ports/index.js";
4
- export interface ControlHandlerHost {
5
- running: boolean;
6
- startedAt: number;
7
- packageVersion: string;
8
- toolCatalog: ToolCatalog;
9
- activeTurn: AbortController | null;
10
- rpcContract: {
11
- metrics(): unknown;
12
- cancel(requestId: string, reason?: string): boolean;
13
- };
14
- log(message: string): void;
15
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
16
- sendNotification<M extends keyof NotificationMethodMap>(method: M, params: NotificationMethodMap[M]): void;
17
- ensureDefaultProject(): void | Promise<void>;
18
- /** LH-10: propagate an explicit cancel to the background tasks the current
19
- * session launched. No-op if the host has no task registry. */
20
- cancelBackgroundTasksForSession?(sessionId?: string): void;
21
- /** Actual registered RPC method names (single source of truth = the live registry), so the
22
- * initialize capability declaration never drifts from what's really handled. */
23
- getRegisteredMethods(): string[];
24
- }
25
- export declare function handleInitialize(this: ControlHandlerHost, msg: AgentRpcRequest): void;
26
- export declare function handlePing(this: ControlHandlerHost, msg: AgentRpcRequest): void;
27
- export declare function handleHealth(this: ControlHandlerHost, msg: AgentRpcRequest): void;
28
- export declare function handleMetrics(this: ControlHandlerHost, msg: AgentRpcRequest): void;
29
- export declare function handleCancel(this: ControlHandlerHost, msg: AgentRpcRequest): void;
@@ -1,41 +0,0 @@
1
- /**
2
- * Dream/memory consolidation handler — extracted from StdioServer.
3
- * Handles: memory.dream
4
- */
5
- import type { TurnConfig } from "../../agent/types.js";
6
- import type { AgentRpcError, AgentRpcRequest } from "../../protocol/wire/index.js";
7
- import { type DreamRunDeps } from "../../runtime/execution/dream-agent.js";
8
- import { type DecayCycleDeps } from "../../runtime/execution/memory-decay.js";
9
- import type { TaskStore } from "../../runtime/infra/task-runtime.js";
10
- import type { ToolCatalog } from "../../runtime/ports/index.js";
11
- type DreamMemoryProvider = NonNullable<DreamRunDeps["memoryProvider"]> & DecayCycleDeps["adapter"];
12
- export interface DreamHandlerHost {
13
- activeTurn?: AbortController | null;
14
- currentTransport: DreamRunDeps["transport"] | null;
15
- currentApiKey: string;
16
- currentModel: string;
17
- currentHooks?: DreamRunDeps["hooks"] | null;
18
- memoryProvider?: DreamMemoryProvider | null;
19
- memoryUserId?: string;
20
- /** Lazy read-path init for the L2 memory provider (cheap, side-effect-free DB open). Consumers
21
- * that can run before any turn (goal planning's orchestration memory context, memory.atlas)
22
- * must call this before reading memoryProvider — on a cold process nothing else has built it. */
23
- ensureMemoryProvider?(): void;
24
- toolCatalog: ToolCatalog;
25
- taskStore: TaskStore;
26
- verbose?: boolean;
27
- log(message: string): void;
28
- resolveMemoryRoot?(): string;
29
- resolveTranscriptDir?(): string;
30
- resolveAgent(config: TurnConfig): unknown | null;
31
- sendNotification(method: string, params: Record<string, unknown>): void;
32
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
33
- }
34
- export declare function handleDream(this: DreamHandlerHost, msg: AgentRpcRequest, parentSignal?: AbortSignal): Promise<void>;
35
- /**
36
- * [B15] dream 后置维护三链:importance decay → 冲突消解/待定 claim 晋升 → 提案消费。
37
- * 每次 dream 尝试后运行(不看 dream 成败;调用点见 handleDream),三链彼此错误隔离 ——
38
- * 任一链失败只留 error 级日志,不阻断后续链。导出仅供单测钉行为,生产唯一调用方是 handleDream。
39
- */
40
- export declare function runPostDreamMaintenance(host: DreamHandlerHost, memoryRoot: string): Promise<void>;
41
- export {};
@@ -1,66 +0,0 @@
1
- import type { GoalLoopCoordinator } from "../../orchestration/goal-loop-coordinator.js";
2
- import type { GoalInstructionKind, GoalTurnContext } from "../../orchestration/goal-run-types.js";
3
- export declare class GoalHandler {
4
- private readonly coordinator;
5
- private readonly activeDrivers;
6
- constructor(coordinator: GoalLoopCoordinator);
7
- private scheduleDrive;
8
- start(params: {
9
- goal: string;
10
- cwd?: string;
11
- agentPool?: string[];
12
- budget?: {
13
- maxTotalTokens?: number;
14
- maxDurationMs?: number;
15
- };
16
- turnContext?: GoalTurnContext;
17
- }): Promise<{
18
- ok: true;
19
- goalRunId: string;
20
- }>;
21
- message(params: {
22
- goalRunId: string;
23
- text: string;
24
- kind?: GoalInstructionKind;
25
- }): Promise<{
26
- ok: true;
27
- queued: true;
28
- }>;
29
- pause(params: {
30
- goalRunId: string;
31
- }): Promise<{
32
- ok: true;
33
- }>;
34
- resume(params: {
35
- goalRunId: string;
36
- newGoal?: string;
37
- additionalBudget?: {
38
- maxTotalTokens?: number;
39
- maxDurationMs?: number;
40
- };
41
- }): Promise<{
42
- ok: true;
43
- }>;
44
- updateGoal(params: {
45
- goalRunId: string;
46
- newGoal: string;
47
- }): Promise<{
48
- ok: true;
49
- }>;
50
- stop(params: {
51
- goalRunId: string;
52
- }): Promise<{
53
- ok: true;
54
- }>;
55
- recover(params: {
56
- goalRunId: string;
57
- }): Promise<{
58
- ok: true;
59
- recovered: boolean;
60
- }>;
61
- dismiss(params: {
62
- goalRunId: string;
63
- }): Promise<{
64
- ok: true;
65
- }>;
66
- }
@@ -1,23 +0,0 @@
1
- /** Agent-resident proposal extraction. Public search is Runtime Host-native. */
2
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
3
- import type { MemoryHandlerProvider } from "../../runtime/ports/index.js";
4
- import { type MemoryModelPurpose } from "../memory-candidate-service.js";
5
- interface MemoryLlmClient {
6
- model: string;
7
- apiKey: string;
8
- transport: {
9
- stream(request: Record<string, unknown>, apiKey: string): AsyncIterable<{
10
- type: string;
11
- text?: string;
12
- }>;
13
- };
14
- }
15
- export interface MemoryHandlerHost {
16
- memoryProvider?: MemoryHandlerProvider | null;
17
- memoryUserId?: string;
18
- ensureMemoryProvider?(): void;
19
- resolveClientForPurpose?(purpose: MemoryModelPurpose): MemoryLlmClient | null;
20
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
21
- }
22
- export declare function handleMemoryPropose(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
23
- export {};
@@ -1,35 +0,0 @@
1
- /**
2
- * Product mode glue.
3
- *
4
- * The ACP surface (`x/product.*`) lives in `acp-extended-handlers.ts` and is the only Product entry
5
- * point the Gateway routes to. This module keeps the pieces that surface shares: the coordinator
6
- * accessors, the host type, and the phase-agnostic cancel.
7
- */
8
- import type { ProductPlanningOwner } from "../../orchestration/product-planner.js";
9
- import type { AgentRpcError } from "../../protocol/wire/index.js";
10
- import { type ProductCoordinatorHost } from "../product-coordinator.js";
11
- export type { ProductCoordinatorHost } from "../product-coordinator.js";
12
- export interface ProductHandlerHost extends ProductCoordinatorHost {
13
- getActiveProjectRoot(): string;
14
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
15
- }
16
- export { writeProductProjectPlanStatus } from "../product-coordinator.js";
17
- export declare function ensureProductOrchestrator(this: ProductCoordinatorHost): import("../../orchestration/agent-instance.js").ProductOrchestrator;
18
- export declare function ensureProductPlanner(this: ProductCoordinatorHost): import("../../orchestration/product-planner.js").ProductPlanner;
19
- /**
20
- * Cancel a product no matter which lifecycle phase it is in. The orchestrator only knows
21
- * POST-confirm (executing) sessions; while the leader is still PLANNING, the product lives in
22
- * `ProductPlanner.sessions` instead. Previously cancel only routed to `orchestrator.delete`, so
23
- * cancelling a stalled planning leader threw "Product not found" and never killed it.
24
- *
25
- * Strategy (idempotent):
26
- * 1. Try `orchestrator.delete` (post-confirm path).
27
- * 2. If that fails because the product isn't an orchestrator session ("not found"), fall back to
28
- * `planner.cancel` (planning-phase path — kills the leader process).
29
- * 3. If neither side has the product, resolve ok rather than throwing (cancel is best-effort).
30
- */
31
- export declare function cancelProductAnyPhase(orchestrator: {
32
- delete(productId: string, owner: ProductPlanningOwner): Promise<void>;
33
- }, planner: {
34
- cancel(productId: string, owner: ProductPlanningOwner): Promise<void>;
35
- }, productId: string, owner: ProductPlanningOwner): Promise<void>;
@@ -1,29 +0,0 @@
1
- /**
2
- * Compute-only session handlers.
3
- *
4
- * Gateway owns project/session discovery, metadata, lifecycle and deletion. This
5
- * file deliberately retains only the three operations that require live agent
6
- * compute state: thread creation, history hydration for a supervised execution,
7
- * and a diagnostic snapshot of the current compute session.
8
- */
9
- import { createMemoryPrefetchState } from "../../runtime/hooks/memory-hooks.js";
10
- import { SessionState } from "../../runtime/session/session-state.js";
11
- import { type AgentRpcError, type AgentRpcErrorCode, type AgentRpcRequest } from "../../protocol/wire/index.js";
12
- import type { SessionHistoryCoordinator } from "../session-history-coordinator.js";
13
- export interface SessionHandlerHost {
14
- currentSessionId?: string;
15
- currentModel?: string;
16
- sessionState?: SessionState | null;
17
- memoryPrefetchState?: ReturnType<typeof createMemoryPrefetchState>;
18
- sessionHistory: Pick<SessionHistoryCoordinator, "saveResumedSession">;
19
- log(message: string): void;
20
- setActiveWorkdir(workdir: string): void;
21
- getActiveProjectRoot(): string;
22
- enableIdleDream(): void;
23
- sendNotification(method: string, params: Record<string, unknown>): void;
24
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
25
- sendError(id: string | number, code: AgentRpcErrorCode | number, message: string, data?: unknown): void;
26
- }
27
- export declare function handleThreadCreate(this: SessionHandlerHost, msg: AgentRpcRequest): void;
28
- export declare function handleSessionResume(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
29
- export declare function handleSessionGetInfo(this: SessionHandlerHost, msg: AgentRpcRequest): void;
@@ -1,8 +0,0 @@
1
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
2
- import type { HostCapabilityClient } from "../../transport/host-capability-client.js";
3
- export interface SkillCuratorHandlerHost {
4
- getHostCapabilityClient(): HostCapabilityClient | undefined;
5
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
6
- }
7
- export declare function handleSkillsPromote(this: SkillCuratorHandlerHost, msg: AgentRpcRequest): Promise<void>;
8
- export declare function handleSkillsCurator(this: SkillCuratorHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -1,25 +0,0 @@
1
- /**
2
- * Solo mode handlers — extracted from StdioServer.
3
- * Handles: solo.start, solo.cancel, solo.select,
4
- * solo.delete, solo.message, solo.evaluate
5
- */
6
- import type { HostAgentProviderDirectory } from "../../runtime/infra/host-agent-provider-directory.js";
7
- import { SoloEvaluator } from "../../orchestration/solo-evaluator.js";
8
- import type { DelegateBridge } from "../../orchestration/delegate-bridge.js";
9
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
10
- export interface SoloHandlerHost {
11
- soloEvaluator: SoloEvaluator | null;
12
- providerDirectory: HostAgentProviderDirectory;
13
- sendNotification(method: string, params: Record<string, unknown>): void;
14
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
15
- handleMcpToolCall(memberId: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
16
- /** Lazily resolves the required Gateway delegate rail. */
17
- getDelegateBridge?(): DelegateBridge | undefined;
18
- }
19
- export declare function ensureSoloEvaluator(this: SoloHandlerHost): SoloEvaluator;
20
- export declare function handleSoloStart(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
21
- export declare function handleSoloCancel(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
22
- export declare function handleSoloSelect(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
23
- export declare function handleSoloDelete(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
24
- export declare function handleSoloMessage(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
25
- export declare function handleSoloEvaluate(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -1,8 +0,0 @@
1
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
2
- export interface TurnBaselineHandlerHost {
3
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
4
- }
5
- export declare function handleTurnBaselineGetSummary(this: TurnBaselineHandlerHost, msg: AgentRpcRequest): Promise<void>;
6
- export declare function handleTurnBaselineListRecent(this: TurnBaselineHandlerHost, msg: AgentRpcRequest): Promise<void>;
7
- export declare function handleTurnBaselineGetFileBaseline(this: TurnBaselineHandlerHost, msg: AgentRpcRequest): Promise<void>;
8
- export declare function handleTurnBaselineGetFileDiff(this: TurnBaselineHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -1,8 +0,0 @@
1
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
2
- import type { ToolCatalog } from "../../runtime/ports/index.js";
3
- export interface WorkflowComputeHandlerHost {
4
- toolCatalog?: ToolCatalog;
5
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
6
- }
7
- /** Stateless compute port. Workflow definitions, runs, and approvals remain gateway-owned; authentication is outside Workflow. */
8
- export declare function handleComputeToolInvoke(this: WorkflowComputeHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -1,9 +0,0 @@
1
- import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
2
- export interface WorkingMaterialsHandlerHost {
3
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
4
- }
5
- export declare function handleWorkingMaterialsGet(this: WorkingMaterialsHandlerHost, msg: AgentRpcRequest): Promise<void>;
6
- export declare function handleWorkingMaterialsReplace(this: WorkingMaterialsHandlerHost, msg: AgentRpcRequest): Promise<void>;
7
- export declare function handleWorkingMaterialsUpsert(this: WorkingMaterialsHandlerHost, msg: AgentRpcRequest): Promise<void>;
8
- export declare function handleWorkingMaterialsRemove(this: WorkingMaterialsHandlerHost, msg: AgentRpcRequest): Promise<void>;
9
- export declare function handleWorkingMaterialsReorder(this: WorkingMaterialsHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -1,57 +0,0 @@
1
- import { type DreamState } from "../agent/runtime-vars.js";
2
- import type { AgentRpcRequest } from "../protocol/wire/index.js";
3
- type TimerHandle = {
4
- unref?: () => void;
5
- };
6
- export interface IdleDreamTimers {
7
- setTimeout(callback: () => void, delayMs: number): TimerHandle;
8
- clearTimeout(timerId: TimerHandle): void;
9
- }
10
- export interface IdleDreamClient {
11
- model: string;
12
- apiKey: string;
13
- }
14
- export interface IdleDreamCoordinatorOptions {
15
- dreamState?: DreamState;
16
- now?: () => number;
17
- randomId?: () => string;
18
- timers?: IdleDreamTimers;
19
- log(message: string): void;
20
- getCurrentSessionId(): string;
21
- getCurrentTurnCount(): number;
22
- hasForegroundTurn(): boolean;
23
- resolveDreamClient(): IdleDreamClient | null;
24
- resolveMemoryRoot(): string;
25
- resolveTranscriptDir(): string;
26
- listRecentSessions(): Promise<Array<{
27
- sessionId: string;
28
- }>>;
29
- runDream(message: AgentRpcRequest, signal: AbortSignal): Promise<void>;
30
- runBackgroundWork(label: string, work: (signal: AbortSignal) => Promise<void>): Promise<boolean>;
31
- /**
32
- * Optional idle-time hook run on every idle fire BEFORE the dream gates (so it is not blocked by
33
- * dream cooldown / missing LLM transport). Used for the feedback redaction+upload sweep
34
- * (design §9 item 5). Errors are swallowed so a sweep failure never breaks dream.
35
- */
36
- onIdle?(signal: AbortSignal): Promise<void>;
37
- }
38
- export declare class IdleDreamCoordinator {
39
- private readonly options;
40
- private readonly dreamState;
41
- private readonly now;
42
- private readonly randomId;
43
- private readonly timers;
44
- private idleTimer;
45
- private idleCycle;
46
- private idleDreamTurnId;
47
- constructor(options: IdleDreamCoordinatorOptions);
48
- applyEnvOverrides(env: Record<string, string | undefined>): void;
49
- enable(minutes?: number): void;
50
- handleTurnNotification(method: string, params?: Record<string, unknown>): void;
51
- yieldToForegroundTurn(): void;
52
- cancelTimer(): void;
53
- resetTimer(): void;
54
- triggerIdleDream(): Promise<void>;
55
- private runIdleDreamCycle;
56
- }
57
- export {};
@@ -1,26 +0,0 @@
1
- export type MemoryBackgroundWork = (signal: AbortSignal) => Promise<void>;
2
- export interface MemoryBackgroundCoordinatorOptions {
3
- defaultTimeoutMs?: number;
4
- idleCycleTimeoutMs?: number;
5
- maxTimeoutRetries?: number;
6
- }
7
- /**
8
- * One process-wide lane for memory learning work. Foreground turns have strict
9
- * priority: they abort active work and queued jobs resume serially afterwards.
10
- */
11
- export declare class MemoryBackgroundCoordinator {
12
- private readonly log;
13
- private foregroundReservations;
14
- private active;
15
- private readonly queue;
16
- private nextSequence;
17
- private readonly defaultTimeoutMs;
18
- private readonly idleCycleTimeoutMs;
19
- private readonly maxTimeoutRetries;
20
- constructor(log?: (message: string) => void, options?: MemoryBackgroundCoordinatorOptions);
21
- beginForegroundTurn(): void;
22
- endForegroundTurn(): void;
23
- schedule(label: string, work: MemoryBackgroundWork): Promise<boolean>;
24
- private enqueue;
25
- private drain;
26
- }
@@ -1,75 +0,0 @@
1
- interface MemoryLlmClient {
2
- model: string;
3
- apiKey: string;
4
- transport: {
5
- stream(request: Record<string, unknown>, apiKey: string): AsyncIterable<{
6
- type: string;
7
- text?: string;
8
- }>;
9
- };
10
- }
11
- /** Model purposes the memory pipeline can resolve (text + multimodal). */
12
- export type MemoryModelPurpose = "smallModel" | "textGeneration";
13
- export interface MemoryCandidateHost {
14
- memoryProvider?: {
15
- search?(query: string, userId: string, options?: {
16
- limit?: number;
17
- }): Promise<Array<{
18
- id: string;
19
- content: string;
20
- score?: number;
21
- metadata?: Record<string, unknown>;
22
- }>>;
23
- } | null;
24
- resolveClientForPurpose?(purpose: MemoryModelPurpose): MemoryLlmClient | null;
25
- }
26
- export interface MemoryAttachment {
27
- type: string;
28
- filename: string;
29
- mimeType: string;
30
- text: string;
31
- url: string;
32
- path: string;
33
- size?: number;
34
- }
35
- export interface RelatedMemoryHit {
36
- id: string;
37
- text: string;
38
- score: number;
39
- category?: string;
40
- }
41
- export interface MemoryCandidate {
42
- id: string;
43
- text: string;
44
- category: string;
45
- importance: number;
46
- confidence: number;
47
- source: string;
48
- eventDate: string;
49
- tags: string[];
50
- relatedMemoryIds: string[];
51
- evidence: Array<Record<string, unknown>>;
52
- requiresConfirmation: boolean;
53
- reason: string;
54
- }
55
- export interface MemoryCandidateParams {
56
- text?: string;
57
- attachments?: unknown[];
58
- tags?: unknown;
59
- category?: unknown;
60
- importance?: unknown;
61
- source?: unknown;
62
- autoExtract?: boolean;
63
- }
64
- export declare function normalizeInputCandidate(input: unknown): MemoryCandidate | null;
65
- export declare function buildMemoryCandidates(ctx: MemoryCandidateHost, params: MemoryCandidateParams, userId: string): Promise<{
66
- candidates: MemoryCandidate[];
67
- related: RelatedMemoryHit[];
68
- source: "llm" | "deterministic";
69
- }>;
70
- export declare function buildMemoryCandidateProposal(ctx: MemoryCandidateHost, params: MemoryCandidateParams, userId: string): Promise<{
71
- candidates: MemoryCandidate[];
72
- relatedMemories: RelatedMemoryHit[];
73
- extractor: "llm" | "deterministic";
74
- }>;
75
- export {};