qlogicagent 2.23.14 → 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 +2 -6
  11. package/dist/types/agent/types.d.ts +9 -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 +4 -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 +8 -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 +8 -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,18 +1,15 @@
1
1
  import type { AgentLogger, ToolInvoker } from "../agent/types.js";
2
2
  import type { HookRegistry } from "../contracts/hooks.js";
3
- import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
4
3
  import type { AcpPermissionRequestParams } from "../protocol/wire/index.js";
5
- import type { MemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
6
4
  import type { BackgroundTaskManager } from "../runtime/infra/background-tasks.js";
7
5
  import type { TaskStore } from "../runtime/infra/task-runtime.js";
8
- import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMetadataResolver, PermissionRuleEnginePort, PathService, ProjectMemoryStore, ToolCatalog } from "../runtime/ports/index.js";
6
+ import type { PermissionMetadataResolver, PermissionRuleEnginePort, PathService, ToolCatalog } from "../runtime/ports/index.js";
9
7
  import type { McpManager } from "../skills/mcp/mcp-manager.js";
10
8
  import type { PluginLoader } from "../skills/plugins/plugin-loader.js";
11
9
  import type { CliAgentClient } from "./cli-agent-builder.js";
12
10
  import { type CliCoreToolHostDeps } from "./core-tool-coordinator.js";
13
11
  import { type PermissionBootstrapDeps } from "./permission-bootstrap.js";
14
12
  import type { RuntimePermissionRuleEngine } from "./permission-runtime-service.js";
15
- import type { LLMTransport } from "./provider-core-facade.js";
16
13
  import { type FileWatcher } from "./runtime-watcher-bootstrap.js";
17
14
  export type { FileWatcher };
18
15
  export interface AgentRuntimeBootstrapDeps {
@@ -25,18 +22,6 @@ export interface AgentRuntimeBootstrapDeps {
25
22
  projectRoot: string;
26
23
  pathService: PathService;
27
24
  getActiveWorkdir?: () => string;
28
- memdir: ProjectMemoryStore;
29
- getMemdir?: () => ProjectMemoryStore | null;
30
- currentUserId: string;
31
- memoryPrefetchState: MemoryPrefetchState;
32
- getLastUserMessage(): string | undefined;
33
- getLastAssistantMessage(): string | undefined;
34
- resolveSmallModelClient(): {
35
- transport: LLMTransport;
36
- apiKey: string;
37
- model: string;
38
- } | null;
39
- scheduleBackgroundMemoryWork(label: string, work: (signal: AbortSignal) => Promise<void>): Promise<boolean>;
40
25
  agentClient: CliAgentClient;
41
26
  toolCatalog: ToolCatalog;
42
27
  currentMcpManager: McpManager | null;
@@ -49,11 +34,8 @@ export interface AgentRuntimeBootstrapDeps {
49
34
  getPluginSkills(): ReturnType<PluginLoader["getPluginSkills"]>;
50
35
  getAcpPermissionSession(): {
51
36
  sessionId: string;
52
- requestPermission(params: AcpPermissionRequestParams): Promise<{
53
- optionId?: string;
54
- }>;
37
+ requestPermission(params: AcpPermissionRequestParams): Promise<import("../protocol/wire/index.js").AcpPermissionRequestResult>;
55
38
  } | undefined;
56
- sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
57
39
  existingPermissionRuleEngine?: RuntimePermissionRuleEngine;
58
40
  resolveSandboxPermissionSnapshot?: PermissionBootstrapDeps["resolveSandboxPermissionSnapshot"];
59
41
  coreToolHost: CliCoreToolHostDeps;
@@ -63,9 +45,6 @@ export interface AgentRuntimeBootstrapDeps {
63
45
  }
64
46
  export interface AgentRuntimeBootstrapResult {
65
47
  hooks: HookRegistry;
66
- memoryHandlerProvider: MemoryHandlerProvider | null;
67
- memoryDreamProvider: MemoryDreamRuntimeProvider | null;
68
- memoryUserId: string;
69
48
  permissionChecker: PermissionMetadataResolver;
70
49
  permissionUnregister: () => void;
71
50
  ruleEngine: PermissionRuleEnginePort;
@@ -1,5 +1,5 @@
1
1
  import type { HookRegistry } from "../contracts/hooks.js";
2
- import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMetadataResolver, PermissionRuleEnginePort, ToolCatalog } from "../runtime/ports/index.js";
2
+ import type { PermissionMetadataResolver, PermissionRuleEnginePort, ToolCatalog } from "../runtime/ports/index.js";
3
3
  import type { McpManager } from "../skills/mcp/mcp-manager.js";
4
4
  import type { PluginLoader } from "../skills/plugins/plugin-loader.js";
5
5
  import type { AgentRuntimeBootstrapResult, FileWatcher } from "./agent-runtime-bootstrap.js";
@@ -21,9 +21,6 @@ export declare class AgentRuntimeSessionState {
21
21
  private readonly mcpBySession;
22
22
  pluginLoader: PluginLoader | null;
23
23
  fileWatcher: FileWatcher | null;
24
- memoryProvider: MemoryHandlerProvider | null;
25
- memoryDreamProvider: MemoryDreamRuntimeProvider | null;
26
- memoryUserId: string;
27
24
  constructor(now?: () => number);
28
25
  getPluginSkills(): ReturnType<PluginLoader["getPluginSkills"]>;
29
26
  applyBootstrap(sessionId: string, result: AgentRuntimeBootstrapResult): void;
@@ -32,7 +29,6 @@ export declare class AgentRuntimeSessionState {
32
29
  getPermissionState(sessionId: string): PermissionState | undefined;
33
30
  getRuntimeState(sessionId: string): SessionRuntimeState | undefined;
34
31
  getPermissionUnregister(sessionId: string): (() => void) | null;
35
- resetAfterSessionDispose(): void;
36
32
  stopFileWatcher(): void;
37
33
  getMcpToolCatalog(sessionId: string, baseCatalog: ToolCatalog): ToolCatalog;
38
34
  getMcpManager(sessionId: string): McpManager | null;
@@ -45,7 +41,6 @@ export declare class AgentRuntimeSessionState {
45
41
  disconnectMcp(sessionId: string): Promise<void>;
46
42
  disconnectAllMcp(): Promise<void>;
47
43
  unregisterPermissions(sessionId?: string): void;
48
- resetMemoryProviders(): void;
49
44
  private ensureMcpSession;
50
45
  private retirePermissionUnregister;
51
46
  private flushRetiredPermissionUnregisters;
@@ -1,4 +1,3 @@
1
- import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
2
1
  import type { ToolBootstrap } from "../runtime/ports/index.js";
3
2
  import type { PathService } from "../runtime/ports/index.js";
4
3
  import type { MediaPersistence } from "../runtime/infra/media-persistence.js";
@@ -8,7 +7,6 @@ export interface BaseToolBootstrapDeps {
8
7
  pathService: PathService;
9
8
  mediaPersistence?: MediaPersistence;
10
9
  log(message: string): void;
11
- sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
12
10
  getTaskScopeKey?(): string | undefined;
13
11
  getCurrentTurnId?(): string | undefined;
14
12
  isGroupSecurityMode?(): boolean;
@@ -1,16 +1,14 @@
1
1
  import type { AcpRequestHandler } from "../transport/acp-server.js";
2
- import type { PermissionApprovalResolver } from "../runtime/ports/index.js";
3
- import * as acpExtended from "./acp-extended-handlers.js";
2
+ import type { PermissionMetadataResolver } from "../runtime/ports/index.js";
4
3
  import * as acpSession from "./acp-session-handlers.js";
5
4
  export interface CliAcpRequestHandlerHost extends acpSession.AcpSessionHost {
6
5
  activeTurn: AbortController | null;
7
6
  turnDone?: Promise<void>;
8
7
  /** Id of the turn currently running; used to key cancel requests. */
9
8
  currentTurnId?: string;
10
- permissionChecker?: PermissionApprovalResolver | null;
9
+ permissionChecker?: PermissionMetadataResolver | null;
11
10
  /** LH-10: propagate an explicit cancel to the background tasks the given (or
12
11
  * current) session launched. No-op if the host has no task registry. */
13
12
  cancelBackgroundTasksForSession?(sessionId?: string, parentTurnId?: string): void;
14
- scheduleBackgroundMemoryWork(label: string, work: (signal: AbortSignal) => Promise<void>): Promise<boolean>;
15
13
  }
16
- export declare function createCliAcpRequestHandler(host: CliAcpRequestHandlerHost, packageVersion: string, extendedHost?: acpExtended.AcpExtendedHost): AcpRequestHandler;
14
+ export declare function createCliAcpRequestHandler(host: CliAcpRequestHandlerHost, packageVersion: string): AcpRequestHandler;
@@ -3,7 +3,6 @@ import type { HookRegistry } from "../contracts/hooks.js";
3
3
  import type { BackgroundTaskManager } from "../runtime/infra/background-tasks.js";
4
4
  import type { ToolCatalog } from "../runtime/ports/index.js";
5
5
  import type { LLMTransport } from "./provider-core-facade.js";
6
- import type { HostProfileClient } from "../transport/host-profile-client.js";
7
6
  export interface CliCoreToolHostDeps {
8
7
  getAgent(): unknown | null;
9
8
  getCurrentTransport(): LLMTransport | null;
@@ -18,10 +17,7 @@ export interface CliCoreToolHostDeps {
18
17
  getBackgroundTasks(): BackgroundTaskManager | null;
19
18
  getConversationHistory(): readonly ChatMessage[] | null;
20
19
  isGroupContext(): boolean;
21
- getMemoryIndex(): string | null;
22
- sendNotification(method: string, params: Record<string, unknown>): void;
23
20
  handleMcpToolCall(memberId: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
24
- getHostProfileClient?(): HostProfileClient | undefined;
25
21
  }
26
22
  export interface CliCoreToolCoordinatorDeps {
27
23
  host: CliCoreToolHostDeps;
@@ -15,7 +15,6 @@ export interface AgentToolServiceHost {
15
15
  /** Session id of the launching turn — stamped on background tasks so an
16
16
  * explicit cancel can reach the work this session spawned (LH-10). */
17
17
  readonly currentSessionId?: string;
18
- sendNotification(method: string, params: Record<string, unknown>): void;
19
18
  /** Unified background execution registry. Required for background=true forks. */
20
19
  getBackgroundTasks(): BackgroundTaskManager | null;
21
20
  /**
@@ -28,8 +27,6 @@ export interface AgentToolServiceHost {
28
27
  isGroupContext(): boolean;
29
28
  /** Active project root — for loading the subagent's project rules / AGENTS. */
30
29
  getActiveProjectRoot(): string;
31
- /** Lightweight memory INDEX block injected into the subagent system prompt. */
32
- getMemoryIndex(): string | null;
33
30
  }
34
31
  export interface AgentToolServiceOptions {
35
32
  host: AgentToolServiceHost;
@@ -2,10 +2,9 @@
2
2
  * Subagent system-prompt assembly.
3
3
  *
4
4
  * A forked subagent starts FRESH (no parent conversation by default), but it
5
- * still needs three things the parent has, injected by policy:
5
+ * still needs two things the parent has, injected by policy:
6
6
  * 1. Persona — who it is and how it should behave (agent definition).
7
7
  * 2. Project rules — the same .qlogicagent/rules + AGENTS.md the parent loads.
8
- * 3. Memory — the lightweight memory INDEX (user preferences / project facts).
9
8
  *
10
9
  * Without these the subagent produces off-convention work and ignores standing
11
10
  * user/project context. This mirrors Claude Code's "compose a delegation
@@ -20,8 +19,6 @@ export interface SubagentSystemPromptInput {
20
19
  cwd?: string;
21
20
  /** Hook registry (instruction loader uses it). */
22
21
  hooks?: HookRegistry;
23
- /** Lightweight memory INDEX block (memdir.getIndexForPrompt()), or null. */
24
- memoryIndex: string | null;
25
22
  /**
26
23
  * Inject project rules / AGENTS. True for the in-process fork (it has no turn
27
24
  * pipeline of its own). False for a subprocess team member, which assembles its
@@ -36,7 +33,6 @@ export declare function personaForAgentDefinition(agentDef: AgentDefinition): st
36
33
  * and the subprocess team member, so their standing context is identical:
37
34
  * 1. persona — who the subagent is / how it behaves (caller-supplied)
38
35
  * 2. project rules / AGENTS — the same getInstructions the parent loads
39
- * 3. memory — the lightweight memdir INDEX (preferences / project facts)
40
36
  *
41
37
  * Returns undefined when there is genuinely nothing to inject.
42
38
  */
@@ -1,7 +1 @@
1
- import type { AgentRpcError, AgentRpcRequest } from "../../protocol/wire/index.js";
2
- export interface FilesHandlerHost {
3
- getActiveProjectRoot(): string;
4
- sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
5
- }
6
1
  export declare function resolveProjectDir(projectId: string): string | undefined;
7
- export declare function handlePlansList(this: FilesHandlerHost, msg: AgentRpcRequest): void;
@@ -1,99 +1,40 @@
1
1
  /**
2
2
  * Turn execution handlers — extracted from StdioServer.
3
- * Handles: the shared turn pipeline (runTurnPipeline) + thread.user_response (ask-user answers).
3
+ * Handles the shared ACP turn pipeline.
4
4
  */
5
5
  import { type ModelPurpose } from "../../runtime/infra/model-registry.js";
6
6
  import { type InstructionFileInfo } from "../../runtime/prompt/instruction-loader.js";
7
7
  import type { HookRegistry } from "../../contracts/hooks.js";
8
8
  export { isStructuredPlannerSystemPrompt } from "../../contracts/structured-planner.js";
9
- import type { AppendMessageOutcome } from "../../runtime/session/session-transcript-store.js";
10
9
  import type { PermissionMetadataResolver, ToolCatalog } from "../../runtime/ports/index.js";
11
10
  import type { ChatMessage, TokenUsage, ToolDefinition, TurnConfig } from "../../agent/types.js";
12
- import type { AgentRpcRequest } from "../../protocol/wire/agent-rpc.js";
13
11
  type UnderstandMediaKind = "image" | "video" | "audio";
14
- interface PendingAskUserRequest {
15
- resolve(answers: Record<string, string> | null): void;
16
- }
17
12
  export interface TurnControlHandlerHost {
18
13
  activeTurn: AbortController | null;
19
14
  permissionChecker?: PermissionMetadataResolver | null;
20
15
  toolCatalog?: ToolCatalog;
21
- pendingAskUser: Map<string, PendingAskUserRequest>;
22
16
  log(message: string): void;
23
- sendResponse(id: string | number, result?: unknown, error?: unknown): void;
24
- /** Mid-turn guidance queue (运行中引导) — drained by the tool loop each round. */
25
- pendingTurnGuidance?: string[];
26
17
  currentSessionId?: string;
27
18
  currentTurnId?: string;
28
19
  getActiveProjectRoot?(): string;
29
20
  }
30
- /**
31
- * turn.guide — queue user guidance INTO the running turn (队列"运行中引导").
32
- * The text lands in the tool loop's next round as a user message, and is
33
- * persisted to the session transcript so later turns keep it in history.
34
- * Fails when no turn is active (caller falls back to the plain queue).
35
- */
36
- export declare function handleTurnGuide(this: TurnControlHandlerHost, msg: AgentRpcRequest): void;
37
- /**
38
- * First-turn session-title generation, extracted so the caller can run it
39
- * fire-and-forget (see run()). Behavior is identical to the previous inline
40
- * block; the only change is that the LLM round-trip inside `generateTitle`
41
- * no longer sits on the critical path before executeTurnCore.
42
- *
43
- * Dependencies are injected so this is a pure, testable unit:
44
- * - `generateTitle` wraps generateSessionTitle (which keeps the deterministic
45
- * fast-path internally — it is NOT bypassed here).
46
- * - `fallbackTitle` wraps titleFromPromptFallback (applied when generation
47
- * yields nothing).
48
- * - `persistTitle` wraps updateSessionMetadata (swallowing its own errors).
49
- *
50
- * Returns a promise for the async work; callers that want fire-and-forget
51
- * should `void` it (with a `.catch(() => {})` guard).
52
- */
53
- export interface FirstTurnTitleGenerationDeps {
54
- existingTitle: string | undefined;
55
- firstUserText: string;
56
- sessionId: string;
57
- projectId: string | undefined;
58
- generateTitle(firstUserText: string): Promise<string | null>;
59
- fallbackTitle(firstUserText: string): string;
60
- persistTitle(title: string): Promise<void>;
61
- sendNotification(method: string, params: Record<string, unknown>): void;
62
- log(message: string): void;
63
- }
64
- export declare function runFirstTurnTitleGeneration(deps: FirstTurnTitleGenerationDeps): Promise<void>;
65
21
  /**
66
22
  * Loud trace for fire-and-forget background persistence work inside the turn pipeline.
67
23
  * Replaces the old silent `.catch(() => {})` pattern (judgment-over-mechanism: a failed write
68
24
  * must at least be diagnosable in the engine log, never swallowed).
69
25
  */
70
26
  export declare function logTurnBackgroundFailure(context: string, err: unknown): void;
71
- /**
72
- * Per-turn transcript-persist failure reporter. A lost transcript write means the conversation is
73
- * missing messages after a reload — that must be VISIBLE: console.error every failure with turn
74
- * context, and emit ONE `turn.recovery` notification per turn (first failure only) so the user is
75
- * told without flooding the stream when several writes of the same turn fail.
76
- * "skipped-deleted" is the legal late-write no-op on a deleted session — not a failure, no trace.
77
- */
78
- export declare function createTranscriptPersistFailureReporter(deps: {
79
- turnId: string;
80
- sessionId: string;
81
- sendNotification(method: string, params: Record<string, unknown>): void;
82
- }): (which: string, outcome: AppendMessageOutcome | {
83
- rejected: unknown;
84
- }) => void;
85
27
  /**
86
28
  * Load the INSTRUCTIONS.md / project-rules block for a turn. A load failure means the WHOLE turn
87
29
  * runs without the user's standing rules — the old inline catch called that "non-fatal" and left
88
- * zero trace. Degrading is still the right call (the turn can proceed), but it must be visible:
89
- * console.error + a `turn.recovery` note in the turn event stream.
30
+ * zero trace. Degrading is still the right call (the turn can proceed), but it must be visible
31
+ * in the adapter diagnostic log.
90
32
  * `loadInstructions` is injectable so tests can force a failure; defaults to getInstructions.
91
33
  */
92
34
  export declare function loadInstructionBlockForTurn(deps: {
93
35
  cwd: string;
94
36
  turnId: string;
95
37
  hooks?: HookRegistry;
96
- sendNotification(method: string, params: Record<string, unknown>): void;
97
38
  loadInstructions?(cwd: string, hooks?: HookRegistry): Promise<InstructionFileInfo[]>;
98
39
  }): Promise<string | undefined>;
99
40
  export declare function hydrateTurnConfigFromModelMetadata(config: TurnConfig): TurnConfig;
@@ -107,20 +48,7 @@ export declare function hydrateAttachmentReferenceUrlsForTurn(messages: ChatMess
107
48
  */
108
49
  export declare function augmentLastUserMessageContent(messages: ChatMessage[], modelContext: string): ChatMessage[];
109
50
  export declare function getLatestUserTextForTurn(messages: readonly ChatMessage[]): string;
110
- /**
111
- * Two-layer memory INDEX block for the per-turn conversation channel (global
112
- * owner cheat-sheet first, then project notes; injected before the last user
113
- * message). Living here instead of the system prompt
114
- * is deliberate: INDEX content changes whenever Host project memory is updated,
115
- * and as a volatile system-prompt section every update re-encoded the byte-stable
116
- * prefix plus the whole conversation history on the next turn. In the per-turn
117
- * channel only the tail changes — the cached prefix survives.
118
- */
119
- export declare function buildMemoryIndexBlock(globalBlock: string | null, projectBlock: string | null): string | null;
120
- export declare function buildMemoryIndexAdmissionReceipt(globalBlock: string | null, projectBlock: string | null, sessionId: string, turnId: string): Record<string, unknown> | null;
121
- export declare function injectContextBeforeLastUser(messages: ChatMessage[], context: string): ChatMessage[];
122
51
  export declare function refreshPermissionCheckerToolMeta(permissionChecker: PermissionMetadataResolver | null | undefined, tools: ToolDefinition[]): void;
123
- export declare function handleUserResponse(this: TurnControlHandlerHost, msg: AgentRpcRequest): void;
124
52
  interface ModalityRegistryView {
125
53
  acceptsInputModality(modality: string, purpose: ModelPurpose): boolean;
126
54
  isToolProjected(purpose: ModelPurpose): boolean;
@@ -152,12 +80,9 @@ export interface MediaUnderstandingPlan {
152
80
  *
153
81
  * Reliability note: unlike the eager path, this DEPENDS on the model calling the tool — the medium is not
154
82
  * transcribed anywhere, so if the model ignores the notice the understanding does not happen this turn
155
- * Cross-turn is fine WITHIN a live session: the model's prior
156
- * image_understand call (carrying the image_url ref) stays in the running conversation, so a later turn
157
- * can re-read the same image verified by a 2-turn test. The only gap is a COLD resume: the on-disk
158
- * transcript stores just the user text (media stripped) + the assistant's text, not the tool calls/results
159
- * (see appendMessage), so re-opening the session in a fresh process rebuilds history without the ref —
160
- * the model then has only its earlier answer text, not a way to look again.
83
+ * Cross-turn behavior depends on the exact Host-owned history snapshot projected
84
+ * on the next prompt. The adapter keeps no separate transcript or media reference
85
+ * store, so it cannot silently diverge from Host state.
161
86
  *
162
87
  * Attachments were saved to disk + rewritten to short gateway local-media URLs by persistInboundUploadsForTurn
163
88
  * upstream, so a proxy ref is compact; isToolAddressableRef guards the residual raw-data: case. Mutates
@@ -186,8 +111,7 @@ export interface TurnPipelineInput {
186
111
  export interface TurnPipelineResult {
187
112
  content: string;
188
113
  usage?: TokenUsage;
189
- /** Turn error (if any), surfaced in-band for the ACP session/prompt response. The
190
- * turn.error notification is still emitted for streaming UIs. */
114
+ /** Turn error (if any), surfaced in-band for the ACP session/prompt response. */
191
115
  error?: {
192
116
  message: string;
193
117
  code?: string;
@@ -6,10 +6,8 @@
6
6
  * All log/debug output goes to stderr (never pollutes the protocol).
7
7
  *
8
8
  * Usage:
9
- * qlogicagent [--verbose] [--acp]
9
+ * qlogicagent [--verbose]
10
10
  *
11
- * Flags:
12
- * verbose Enable debug logging to stderr
13
- * acp Enable ACP (Agent-Client Protocol) server alongside legacy protocol
11
+ * Flag: `--verbose` enables debug logging to stderr.
14
12
  */
15
13
  export {};
@@ -1,14 +1,10 @@
1
- import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
2
- import { type AcpPermissionRequestParams } from "../protocol/wire/index.js";
1
+ import { type AcpPermissionRequestParams, type AcpPermissionRequestResult } from "../protocol/wire/index.js";
3
2
  import type { ApprovalRequest, ApprovalResponse } from "../runtime/ports/index.js";
4
3
  export interface PermissionApprovalBridgeDeps {
5
4
  getAcpPermissionSession(): {
6
5
  sessionId: string;
7
- requestPermission(params: AcpPermissionRequestParams): Promise<{
8
- optionId?: string;
9
- }>;
6
+ requestPermission(params: AcpPermissionRequestParams): Promise<AcpPermissionRequestResult>;
10
7
  } | undefined;
11
- sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
12
8
  }
13
9
  export declare function requestPermissionApproval(request: ApprovalRequest, deps: PermissionApprovalBridgeDeps): Promise<ApprovalResponse>;
14
10
  export declare function createApprovalResponseFromAcpOption(request: ApprovalRequest, optionId: string | undefined): ApprovalResponse;
@@ -1,9 +1,7 @@
1
1
  import type { HookRegistry } from "../contracts/hooks.js";
2
- import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
3
2
  import type { AcpPermissionRequestParams } from "../protocol/wire/index.js";
4
3
  import type { ToolCatalog } from "../runtime/ports/index.js";
5
4
  import { type SandboxPermissionSnapshot } from "./tool-bootstrap.js";
6
- import type { HostProfileClient } from "../transport/host-profile-client.js";
7
5
  import { type RuntimePermissionChecker, type RuntimePermissionRuleEngine } from "./permission-runtime-service.js";
8
6
  export { createApprovalResponseFromAcpOption } from "./permission-approval-bridge.js";
9
7
  export interface PermissionBootstrapDeps {
@@ -21,21 +19,13 @@ export interface PermissionBootstrapDeps {
21
19
  * The live active tool workdir (where file/exec relative paths resolve). The
22
20
  * cross-workspace classifier compares tool target paths against THIS, not
23
21
  * getActiveProjectRoot — the latter is a (possibly snapshotted) project root
24
- * used for memory/sessions and does not track the per-turn tool workdir.
22
+ * does not track the per-turn tool workdir.
25
23
  */
26
24
  getActiveWorkdir(): string;
27
25
  getAcpPermissionSession(): {
28
26
  sessionId: string;
29
- requestPermission(params: AcpPermissionRequestParams): Promise<{
30
- optionId?: string;
31
- }>;
27
+ requestPermission(params: AcpPermissionRequestParams): Promise<import("../protocol/wire/index.js").AcpPermissionRequestResult>;
32
28
  } | undefined;
33
- sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
34
- resolveHostProfileClient?: () => HostProfileClient | undefined;
35
- sessionPermissionStore?: {
36
- loadAllowedDirectories(sessionId: string, projectRoot: string): string[];
37
- appendAllowedDirectory(sessionId: string, projectRoot: string, pathPrefix: string): Promise<void>;
38
- };
39
29
  /** Existing session engine reused when an Agent is rebuilt for the same session. */
40
30
  existingRuleEngine?: RuntimePermissionRuleEngine;
41
31
  /** AsyncLocal-aware resolver supplied by the pooled stdio host. */
@@ -1,16 +1,14 @@
1
1
  import type { HookRegistry } from "../contracts/hooks.js";
2
2
  import type { RuntimeLogger } from "../runtime/hooks/hook-registry.js";
3
- import type { PathService, ToolCatalog } from "../runtime/ports/index.js";
3
+ import type { ToolCatalog } from "../runtime/ports/index.js";
4
4
  import { PluginLoader } from "../skills/plugins/plugin-loader.js";
5
- export declare const HOST_PLUGIN_REFS_FILE_ENV = "QLOGICAGENT_HOST_PLUGIN_REFS_FILE";
6
5
  export interface PluginBootstrapDeps {
7
6
  config: Record<string, unknown>;
8
7
  hooks: HookRegistry;
9
8
  log: RuntimeLogger;
10
- pathService: PathService;
11
9
  toolCatalog: ToolCatalog;
12
10
  setPluginLoader(loader: PluginLoader): void;
13
11
  }
14
12
  export declare const pluginToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<PluginBootstrapDeps>;
15
13
  export declare function configurePluginBootstrap(deps: PluginBootstrapDeps): void;
16
- export declare function resolvePluginDirsFromConfig(config: Record<string, unknown>, _pathService: PathService, hostRefs?: readonly string[]): string[];
14
+ export declare function resolvePluginDirsFromConfig(config: Record<string, unknown>): string[];
@@ -1,40 +1,19 @@
1
1
  import type { AgentLogger } from "../agent/types.js";
2
2
  import type { HookRegistry } from "../contracts/hooks.js";
3
- import { type MemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
4
3
  import type { BackgroundTaskManager } from "../runtime/infra/background-tasks.js";
5
4
  import type { TaskStore } from "../runtime/infra/task-runtime.js";
6
- import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, MemoryLearningSink, ProjectMemoryStore } from "../runtime/ports/index.js";
7
5
  import type { LLMTransport } from "./provider-core-facade.js";
8
6
  export interface RuntimeHookBootstrapDeps {
9
7
  log: AgentLogger;
10
8
  taskStore: TaskStore;
11
9
  backgroundTasks: BackgroundTaskManager;
12
10
  sessionId: string;
13
- getTurnId(): string;
14
- projectRoot: string;
15
- memdir: ProjectMemoryStore;
16
- getMemdir?: () => ProjectMemoryStore | null;
17
- currentUserId: string;
18
- prefetchState: MemoryPrefetchState;
19
- getLastUserMessage(): string | undefined;
20
- getLastAssistantMessage(): string | undefined;
21
- resolveSmallModelClient(): {
22
- transport: LLMTransport;
23
- apiKey: string;
24
- model: string;
25
- } | null;
26
- scheduleBackgroundMemoryWork(label: string, work: (signal: AbortSignal) => Promise<void>): Promise<boolean>;
27
11
  compressionClient: {
28
12
  transport: LLMTransport;
29
13
  apiKey: string;
30
14
  };
31
- sendNotification?(method: string, params: Record<string, unknown>): void;
32
15
  }
33
16
  export interface RuntimeHookBootstrapResult {
34
17
  hooks: HookRegistry;
35
- memoryHandlerProvider: MemoryHandlerProvider | null;
36
- memoryDreamProvider: MemoryDreamRuntimeProvider | null;
37
- memoryLearningSink: MemoryLearningSink | null;
38
- memoryUserId: string;
39
18
  }
40
19
  export declare function configureRuntimeHookBootstrap(deps: RuntimeHookBootstrapDeps): RuntimeHookBootstrapResult;
@@ -6,30 +6,20 @@
6
6
  * sticky task domain, host-pinned LLM config, and the ACP session _meta supplement.
7
7
  *
8
8
  * Extracted from StdioServer so its runtime-state-container concern is one named
9
- * holder rather than six loose fields on the god-object. It is a plain mutable
10
- * holder (no invariant beyond field cohesion); the server exposes same-named
11
- * get/set accessors that delegate here, so every existing reader AND writer —
12
- * including handlers bound via the RPC host cast (session.create, thread.turn,
13
- * set_config) — keeps working unchanged.
9
+ * holder rather than six loose fields on the server. It is a plain mutable holder used by the standard ACP adapter.
14
10
  */
15
11
  import type { SessionState } from "../runtime/session/session-state.js";
16
- import type { MaterializedSessionProfile, SessionLlmConfig } from "./acp-session-host.js";
12
+ import type { SessionLlmConfig } from "./acp-session-host.js";
17
13
  export declare class SessionContext {
18
- /** Active session id (chatId for desktop; group key pattern for groups). */
14
+ /** Active adapter-native ACP session id. */
19
15
  sessionId: string;
20
16
  /** In-flight turn id. */
21
17
  turnId: string;
22
18
  /** Session cost/state snapshot (null until a session is resolved). */
23
19
  state: SessionState | null;
24
- /** Host-pinned per-session LLM config (session/set_config_option · set_model · /model).
20
+ /** Per-session LLM config selected through standard ACP config or the native /model command.
25
21
  * NEVER wiped by ModelRegistry churn — distinct from the DERIVED ResolvedAgentCache. */
26
22
  llmConfigBySession: Map<string, SessionLlmConfig>;
27
- /** Gateway-materialized profiles are private to their ACP session. */
28
- materializedProfiles: Map<string, MaterializedSessionProfile>;
29
- /** ACP session-level context supplement (_meta from session/new), inherited by every prompt.
30
- * LEGACY per-connection singleton — kept for old-gateway fallback; multiplexed prompts read
31
- * acpMetaBySession by sessionId instead. */
32
- acpMeta: Record<string, unknown> | null;
33
23
  /** Per-session gateway _meta(按 sessionId 存,消除跨会话串扰)。 */
34
24
  acpMetaBySession: Map<string, Record<string, unknown>>;
35
25
  }
@@ -8,15 +8,7 @@ export declare class CliPathService extends DefaultPathService implements PathSe
8
8
  constructor(mediaPersistence: MediaPersistence, toolBootstrap: ToolBootstrap);
9
9
  getActiveProjectRoot(): string;
10
10
  setActiveWorkdir(dir: string): void;
11
- /**
12
- * The directory seeded as the file/exec tools' initial CWD: setActiveWorkdir
13
- * pushes this value into toolBootstrap.setWorkdir → initCwd (the single CWD
14
- * source read via getCwd()). Note this is the SEED, not the live value — an
15
- * in-turn `exec("cd sub")` moves getCwd() without touching this. The permission
16
- * pipeline classifies cross-workspace ops against THIS project-level dir, not
17
- * getActiveProjectRoot() (also used for memory/sessions, may be a stale
18
- * projectStore dir). Falls back to getActiveProjectRoot() before first set.
19
- */
11
+ /** Project root used to seed file/exec tools and permission classification. */
20
12
  getActiveWorkdir(): string;
21
13
  resolveProjectDir(projectId?: string): string | undefined;
22
14
  }
@@ -1,11 +1,9 @@
1
1
  import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
2
- import type { HostRequestService } from "../host-contract/index.js";
3
2
  import { AcpServer, type AcpRequestHandler } from "../transport/acp-server.js";
4
- import { HostRequestClient } from "../transport/host-request-client.js";
5
3
  import type { Transport } from "./transport.js";
4
+ /** Owns one ordinary ACP server connection. */
6
5
  export declare class StdioAcpProtocolCoordinator {
7
6
  private server;
8
- private hostRequestClient;
9
7
  get active(): boolean;
10
8
  init(transport: Transport, handler: AcpRequestHandler, options: {
11
9
  verbose: boolean;
@@ -17,11 +15,6 @@ export declare class StdioAcpProtocolCoordinator {
17
15
  sessionId: string;
18
16
  requestPermission: AcpServer["requestPermission"];
19
17
  } | undefined;
20
- getHostRequestClient(): HostRequestClient | null;
21
- getHostRequestAccess(): {
22
- hostRequest: HostRequestClient;
23
- supportsHostRequestService(service: HostRequestService): boolean;
24
- } | null;
25
- dispose(reason?: string): void;
18
+ dispose(_reason?: string): void;
26
19
  emitUpdate<M extends NotificationMethod>(sessionId: string, method: M, params: NotificationMethodMap[M]): boolean;
27
20
  }
@@ -1,4 +1,3 @@
1
- import type { HostRequestClient } from "../transport/host-request-client.js";
2
1
  import type { AcpPermissionRequestParams } from "../protocol/wire/index.js";
3
2
  import type { CliAcpRequestHandlerHost } from "./cli-acp-request-handler.js";
4
3
  /**
@@ -8,33 +7,23 @@ import type { CliAcpRequestHandlerHost } from "./cli-acp-request-handler.js";
8
7
  * (`this: any`), so members it touches must be forwarded here explicitly;
9
8
  * see TURN_PIPELINE_HOST_MEMBERS for the regression-tested list.
10
9
  */
11
- export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTurn" | "turnDone" | "acpSessionMeta" | "acpSessionMetaBySession" | "currentHooks" | "currentSessionId" | "currentTurnId" | "memoryPrefetchState" | "permissionChecker" | "sessionHistory" | "sessionLlmConfigBySession" | "materializedSessionProfiles" | "sessionState" | "cancelIdleDreamTimer" | "disposeSessionRuntime" | "disposeSessionPermissions" | "disposeSessionMcp" | "runInSessionScope" | "runInExistingSessionScope" | "beginForegroundTurn" | "endForegroundTurn" | "enableIdleDream" | "ensureDefaultProject" | "initializeHostProjectAuthority" | "ensureModelRegistryHydrated" | "getActiveProjectRoot" | "log" | "sendNotification" | "setActiveWorkdir"> & {
10
+ export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTurn" | "turnDone" | "acpSessionMetaBySession" | "currentHooks" | "currentSessionId" | "currentTurnId" | "permissionChecker" | "sessionLlmConfigBySession" | "sessionState" | "disposeSessionPermissions" | "disposeSessionMcp" | "runInSessionScope" | "runInExistingSessionScope" | "beginForegroundTurn" | "endForegroundTurn" | "getActiveProjectRoot" | "log" | "sendNotification" | "setActiveWorkdir"> & {
12
11
  currentModel: string | undefined;
13
- lastAssistantMessageForExtract: string | undefined;
14
- lastUserMessageForAutoExtract: string | undefined;
12
+ loadedDeferredToolNames: Set<string>;
15
13
  mcpReady: Promise<void>;
16
- memdir: unknown;
17
- pendingAskUser: unknown;
18
- projectMemoryStoreFactory: unknown;
19
14
  toolCatalog: unknown;
20
- taskDistillation: unknown;
21
15
  cancelBackgroundTasksForSession(sessionId?: string, parentTurnId?: string): void;
22
16
  beginTurnRequest(): number;
23
17
  isTurnRequestCurrent(generation: number): boolean;
24
18
  getAcpPermissionSession(): {
25
19
  sessionId: string;
26
- requestPermission(params: AcpPermissionRequestParams): Promise<{
27
- optionId?: string;
28
- }>;
20
+ requestPermission(params: AcpPermissionRequestParams): Promise<import("../protocol/wire/index.js").AcpPermissionRequestResult>;
29
21
  } | undefined;
30
- getHostRequestClient(): Pick<HostRequestClient, "request"> | undefined;
31
22
  drainPendingTaskNotifications(sessionId: string): string[];
32
23
  resolveAgent(config: unknown, projectRoot?: string): unknown;
33
24
  resolveClientForPurpose(purpose: unknown): unknown;
34
- scheduleBackgroundMemoryWork(label: string, work: (signal: AbortSignal) => Promise<void>): Promise<boolean>;
35
- sendResponse(id: string | number, result?: unknown, error?: unknown): void;
36
25
  };
37
26
  /** Host members the shared turn pipeline reads/writes — keep in sync with
38
27
  * `grep -oE "this\.[a-zA-Z]+" src/cli/handlers/turn-handler.ts | sort -u`. */
39
- export declare const TURN_PIPELINE_HOST_MEMBERS: readonly ["activeTurn", "turnDone", "beginForegroundTurn", "beginTurnRequest", "currentHooks", "currentModel", "currentTurnId", "isTurnRequestCurrent", "drainPendingTaskNotifications", "endForegroundTurn", "getAcpPermissionSession", "getHostRequestClient", "getActiveProjectRoot", "lastAssistantMessageForExtract", "lastUserMessageForAutoExtract", "log", "mcpReady", "memdir", "pendingAskUser", "permissionChecker", "projectMemoryStoreFactory", "resolveAgent", "resolveClientForPurpose", "scheduleBackgroundMemoryWork", "sendNotification", "sendResponse", "sessionHistory", "sessionState", "setActiveWorkdir", "taskDistillation", "toolCatalog"];
28
+ export declare const TURN_PIPELINE_HOST_MEMBERS: readonly ["activeTurn", "turnDone", "beginForegroundTurn", "beginTurnRequest", "currentHooks", "currentModel", "currentTurnId", "isTurnRequestCurrent", "drainPendingTaskNotifications", "endForegroundTurn", "getAcpPermissionSession", "getActiveProjectRoot", "loadedDeferredToolNames", "log", "mcpReady", "permissionChecker", "resolveAgent", "resolveClientForPurpose", "sendNotification", "sessionState", "setActiveWorkdir", "toolCatalog"];
40
29
  export declare function createStdioAcpRequestHandlerHost(host: StdioAcpRequestHostSource): CliAcpRequestHandlerHost;