@xopcai/xopc 0.0.418 → 0.0.419

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 (324) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
  3. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  4. package/dist/extensions/telegram/src/inbound-processor.js +2 -2
  5. package/dist/extensions/telegram/src/outbound-sender.js +1 -1
  6. package/dist/extensions/telegram/src/plugin.js +2 -2
  7. package/dist/extensions/telegram/xopc.extension.json +1 -1
  8. package/dist/extensions/weixin/src/api/api.js +2 -2
  9. package/dist/extensions/weixin/src/auth/accounts.js +12 -12
  10. package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
  11. package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
  12. package/dist/gateway/static/root/assets/{index-fKpEKELX.js → index-DS60ZSdQ.js} +1 -1
  13. package/dist/gateway/static/root/index.html +1 -1
  14. package/dist/package.js +1 -1
  15. package/dist/src/agent/agent-manager.js +17 -17
  16. package/dist/src/agent/agent-scope.js +2 -2
  17. package/dist/src/agent/background-review/prompts.js +1 -1
  18. package/dist/src/agent/background-review/run-background-review.js +12 -12
  19. package/dist/src/agent/child-agent-factory.js +2 -2
  20. package/dist/src/agent/coding/repository-instructions.js +1 -1
  21. package/dist/src/agent/context/coordinator.js +2 -2
  22. package/dist/src/agent/context/execution-context.js +4 -4
  23. package/dist/src/agent/context/project-context.js +3 -3
  24. package/dist/src/agent/data-acquisition/service.js +1 -1
  25. package/dist/src/agent/embedded/codemode-extension.js +1 -1
  26. package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
  27. package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
  28. package/dist/src/agent/embedded/run-for-session.js +5 -5
  29. package/dist/src/agent/embedded/run-turn.js +15 -15
  30. package/dist/src/agent/embedded/session-runner.js +4 -4
  31. package/dist/src/agent/embedded/session-tool-result-guard.js +2 -2
  32. package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
  33. package/dist/src/agent/embedded/xopc-tools-bridge.js +1 -1
  34. package/dist/src/agent/external-tools/cliProvider.js +3 -3
  35. package/dist/src/agent/external-tools/composio-provider.js +2 -2
  36. package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
  37. package/dist/src/agent/external-tools/extension-provider.js +1 -1
  38. package/dist/src/agent/external-tools/gateway-tools.js +3 -3
  39. package/dist/src/agent/external-tools/memory-provider.js +1 -1
  40. package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
  41. package/dist/src/agent/image/generation/runtime.js +1 -1
  42. package/dist/src/agent/image/index.js +1 -1
  43. package/dist/src/agent/image/load-image-media.js +1 -1
  44. package/dist/src/agent/inbound/attachment-pipeline.js +3 -3
  45. package/dist/src/agent/inbound/inbound-loop.js +2 -2
  46. package/dist/src/agent/independent-execution.js +1 -1
  47. package/dist/src/agent/index.js +3 -3
  48. package/dist/src/agent/mcp/connection-drafts.js +1 -1
  49. package/dist/src/agent/memory/context-budget.js +1 -1
  50. package/dist/src/agent/memory/context-recovery.js +1 -1
  51. package/dist/src/agent/memory/index.js +1 -1
  52. package/dist/src/agent/orchestration/llm-turn-retry.js +1 -1
  53. package/dist/src/agent/prompt/response-language.js +1 -1
  54. package/dist/src/agent/prompt/service-prompt-builder.js +4 -4
  55. package/dist/src/agent/prompt/system-prompt-params.js +1 -1
  56. package/dist/src/agent/sandbox/exec-policy.js +1 -1
  57. package/dist/src/agent/service/direct-turn-helpers.js +4 -4
  58. package/dist/src/agent/service/process-direct-streaming.js +7 -7
  59. package/dist/src/agent/service/webchat-tts.js +2 -2
  60. package/dist/src/agent/service.js +22 -22
  61. package/dist/src/agent/session/session-config-service.js +2 -2
  62. package/dist/src/agent/session/session-hydrator.js +1 -1
  63. package/dist/src/agent/session/session-inspector.js +1 -1
  64. package/dist/src/agent/skills/filesystem-watcher.js +1 -1
  65. package/dist/src/agent/skills/hub-lock.js +1 -1
  66. package/dist/src/agent/skills/hub-pull.js +2 -2
  67. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
  68. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
  69. package/dist/src/agent/skills/skill-manager.js +1 -1
  70. package/dist/src/agent/skills/skill-sources.js +1 -1
  71. package/dist/src/agent/source-context/index.js +1 -1
  72. package/dist/src/agent/tasks/task-judge-service.js +8 -8
  73. package/dist/src/agent/tools/create-share-tool.js +3 -3
  74. package/dist/src/agent/tools/dataBatch.js +1 -1
  75. package/dist/src/agent/tools/delegate-tool.js +3 -3
  76. package/dist/src/agent/tools/exec-command.js +1 -1
  77. package/dist/src/agent/tools/executor.js +1 -1
  78. package/dist/src/agent/tools/factory.js +18 -18
  79. package/dist/src/agent/tools/fetch-text.js +1 -1
  80. package/dist/src/agent/tools/image-generate-tool.js +3 -3
  81. package/dist/src/agent/tools/index.js +5 -5
  82. package/dist/src/agent/tools/list-dir.js +1 -1
  83. package/dist/src/agent/tools/personal-attention-tool.js +2 -2
  84. package/dist/src/agent/tools/personal-read-tool.js +1 -1
  85. package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
  86. package/dist/src/agent/tools/personal-request-tool.js +4 -4
  87. package/dist/src/agent/tools/personal-result-tool.js +1 -1
  88. package/dist/src/agent/tools/personal-task-tool.js +6 -6
  89. package/dist/src/agent/tools/publish-artifacts.js +2 -2
  90. package/dist/src/agent/tools/read.js +2 -2
  91. package/dist/src/agent/tools/review-workspace.js +1 -1
  92. package/dist/src/agent/tools/send-media.js +1 -1
  93. package/dist/src/agent/tools/session-search-tool.js +1 -1
  94. package/dist/src/agent/tools/skills-tools.js +1 -1
  95. package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
  96. package/dist/src/agent/tools/tts-tool.js +1 -1
  97. package/dist/src/agent/tools/user-context-tool.js +2 -2
  98. package/dist/src/agent/tools/web.js +1 -1
  99. package/dist/src/agent/tools/write.js +2 -2
  100. package/dist/src/agent/tools/xopc-use-tool.js +5 -5
  101. package/dist/src/agent/transcript/index.js +2 -2
  102. package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
  103. package/dist/src/agent-matching/delegation-service.js +1 -1
  104. package/dist/src/ai-assist/text-assist.js +1 -1
  105. package/dist/src/auth/credentials.js +1 -1
  106. package/dist/src/auth/oauth/openai.js +1 -1
  107. package/dist/src/auth/oauth/xopc-cloud.js +1 -1
  108. package/dist/src/auth/profiles/store.js +1 -1
  109. package/dist/src/automations/domain/index.js +1 -1
  110. package/dist/src/automations/draft/automation-draft-service.js +1 -1
  111. package/dist/src/automations/index.js +2 -2
  112. package/dist/src/automations/service/action-executor.js +1 -1
  113. package/dist/src/browser/native-messaging-host.js +1 -1
  114. package/dist/src/browser/providers/browser-ext-install.js +1 -1
  115. package/dist/src/capabilities/store-connector.js +1 -1
  116. package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
  117. package/dist/src/channels/index.js +2 -2
  118. package/dist/src/channels/outbound-sender.js +1 -1
  119. package/dist/src/channels/pairing/allow-from-file.js +9 -9
  120. package/dist/src/channels/pairing/pairing-store.js +6 -6
  121. package/dist/src/chat-commands/agent-edit.js +1 -1
  122. package/dist/src/chat-commands/builtins/config.js +3 -3
  123. package/dist/src/chat-commands/builtins/session.js +1 -1
  124. package/dist/src/chat-commands/builtins/thinking.js +1 -1
  125. package/dist/src/chat-commands/builtins/tts.js +1 -1
  126. package/dist/src/chat-commands/context.js +1 -1
  127. package/dist/src/chat-commands/index.js +3 -3
  128. package/dist/src/cli/commands/agent.js +8 -8
  129. package/dist/src/cli/commands/config.js +1 -1
  130. package/dist/src/cli/commands/connectors.js +1 -1
  131. package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
  132. package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
  133. package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
  134. package/dist/src/cli/commands/extension-dev.js +1 -1
  135. package/dist/src/cli/commands/extension.js +2 -2
  136. package/dist/src/cli/commands/image.js +1 -1
  137. package/dist/src/cli/commands/init.js +1 -1
  138. package/dist/src/cli/commands/mcp.js +2 -2
  139. package/dist/src/cli/commands/models.js +2 -2
  140. package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
  141. package/dist/src/cli/commands/onboard.js +1 -1
  142. package/dist/src/cli/commands/project.js +1 -1
  143. package/dist/src/cli/commands/skills.js +2 -2
  144. package/dist/src/cli/commands/tunnel.js +4 -4
  145. package/dist/src/cli/extension-cli-register.js +6 -6
  146. package/dist/src/cli/utils/gateway-client.js +1 -1
  147. package/dist/src/cli/utils/init-workspace-core.js +2 -2
  148. package/dist/src/cli/utils/session.js +1 -1
  149. package/dist/src/computer/flows.js +1 -1
  150. package/dist/src/computer/model-adapter.js +1 -1
  151. package/dist/src/computer/runtime.js +3 -3
  152. package/dist/src/config/index.js +4 -4
  153. package/dist/src/config/loader.js +1 -1
  154. package/dist/src/config/models-json.js +1 -1
  155. package/dist/src/connectors/cli/authorization.js +1 -1
  156. package/dist/src/connectors/composio-sessions.js +1 -1
  157. package/dist/src/connectors/composio.js +1 -1
  158. package/dist/src/connectors/connected-source-ingestion.js +3 -3
  159. package/dist/src/connectors/connected-source-understanding.js +5 -5
  160. package/dist/src/connectors/connection-recovery-service.js +4 -4
  161. package/dist/src/connectors/content-enrichment.js +1 -1
  162. package/dist/src/connectors/health.js +1 -1
  163. package/dist/src/discussions/live-worker.js +1 -1
  164. package/dist/src/discussions/sealer.js +1 -1
  165. package/dist/src/endpoint-tools/index.js +1 -1
  166. package/dist/src/endpoint-tools/runtime.js +2 -2
  167. package/dist/src/extensions/activation-context.js +3 -3
  168. package/dist/src/extensions/agent-plugins/auth.js +1 -1
  169. package/dist/src/extensions/agent-plugins/skill-catalog.js +2 -2
  170. package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
  171. package/dist/src/extensions/api.js +3 -3
  172. package/dist/src/extensions/bundled-extension-activation.js +1 -1
  173. package/dist/src/extensions/index.js +3 -3
  174. package/dist/src/extensions/loader.js +2 -2
  175. package/dist/src/extensions/lockfile.js +1 -1
  176. package/dist/src/extensions/sdk/index.js +1 -1
  177. package/dist/src/extensions/sdk/media.js +1 -1
  178. package/dist/src/gateway/agents-admin.js +1 -1
  179. package/dist/src/gateway/device-routes.js +2 -2
  180. package/dist/src/gateway/file-path-classifier.js +1 -1
  181. package/dist/src/gateway/global-defaults-admin.js +1 -1
  182. package/dist/src/gateway/hono/app.js +3 -3
  183. package/dist/src/gateway/hono/lib/config-payload.js +3 -3
  184. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  185. package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
  186. package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
  187. package/dist/src/gateway/hono/routes/context-sources.js +1 -1
  188. package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
  189. package/dist/src/gateway/hono/routes/home.js +1 -1
  190. package/dist/src/gateway/hono/routes/mcp.js +1 -1
  191. package/dist/src/gateway/hono/routes/memory-learning.js +3 -3
  192. package/dist/src/gateway/hono/routes/models.js +4 -4
  193. package/dist/src/gateway/hono/routes/notes.js +1 -1
  194. package/dist/src/gateway/hono/routes/phone-dependencies.js +1 -1
  195. package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
  196. package/dist/src/gateway/hono/routes/phone.js +2 -2
  197. package/dist/src/gateway/hono/routes/projects.js +4 -4
  198. package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
  199. package/dist/src/gateway/hono/routes/session-command-handler.js +2 -2
  200. package/dist/src/gateway/hono/routes/session-input-handler.js +5 -5
  201. package/dist/src/gateway/hono/routes/sessions.js +3 -3
  202. package/dist/src/gateway/hono/routes/shares.js +2 -2
  203. package/dist/src/gateway/hono/routes/side-chats.js +1 -1
  204. package/dist/src/gateway/hono/routes/site-shares.js +1 -1
  205. package/dist/src/gateway/hono/routes/tasks.js +1 -1
  206. package/dist/src/gateway/hono/routes/user-model.js +7 -7
  207. package/dist/src/gateway/hono/routes/voice.js +7 -7
  208. package/dist/src/gateway/lock.js +11 -11
  209. package/dist/src/gateway/media-access.js +1 -1
  210. package/dist/src/gateway/mobile-privacy.js +2 -2
  211. package/dist/src/gateway/ports.js +6 -6
  212. package/dist/src/gateway/provider-model-setup.js +1 -1
  213. package/dist/src/gateway/server.js +1 -1
  214. package/dist/src/gateway/service/agent-runner.js +3 -3
  215. package/dist/src/gateway/service/config-coordinator.js +2 -2
  216. package/dist/src/gateway/service/marketplace-service.js +2 -2
  217. package/dist/src/gateway/service/run-gateway-agent.js +4 -4
  218. package/dist/src/gateway/service/session-command-service.js +2 -2
  219. package/dist/src/gateway/service.js +44 -44
  220. package/dist/src/gateway/session-context-summary.js +4 -4
  221. package/dist/src/gateway/workspace-editor-path.js +2 -2
  222. package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
  223. package/dist/src/home-intelligence/generator.js +2 -2
  224. package/dist/src/imports/inventory.js +2 -2
  225. package/dist/src/imports/productImport.js +1 -1
  226. package/dist/src/imports/runtime.js +1 -1
  227. package/dist/src/infra/gateway-processes.js +2 -2
  228. package/dist/src/infra/path-env.js +3 -3
  229. package/dist/src/infra/update-global.js +9 -9
  230. package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
  231. package/dist/src/knowledge/index.js +1 -1
  232. package/dist/src/knowledge-memory/repository.js +1 -1
  233. package/dist/src/knowledge-memory/usage-policy.js +1 -1
  234. package/dist/src/local-apps/service.js +2 -2
  235. package/dist/src/mcp/gateway-http-client.js +1 -1
  236. package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
  237. package/dist/src/memory-learning/source-learning.js +5 -5
  238. package/dist/src/memory-learning/task-receipts.js +1 -1
  239. package/dist/src/notes/agent-context.js +4 -4
  240. package/dist/src/notes/index.js +1 -1
  241. package/dist/src/notes/service.js +3 -3
  242. package/dist/src/personal-agent/capability-service.js +2 -2
  243. package/dist/src/personal-agent/proactivity/routes.js +1 -1
  244. package/dist/src/personal-agent/proactivity/service.js +7 -7
  245. package/dist/src/personal-agent/prompt-context.js +7 -7
  246. package/dist/src/personal-agent/prompts.js +1 -1
  247. package/dist/src/personal-agent/reply-composer.js +10 -10
  248. package/dist/src/personal-agent/request-delivery.js +2 -2
  249. package/dist/src/personal-agent/request-service.js +8 -8
  250. package/dist/src/personal-agent/result-reader.js +1 -1
  251. package/dist/src/personal-agent/service.js +1 -1
  252. package/dist/src/personal-agent/task-cancel.js +1 -1
  253. package/dist/src/phone/repository.js +1 -1
  254. package/dist/src/phone/runtime.js +4 -4
  255. package/dist/src/projects/index.js +1 -1
  256. package/dist/src/projects/project-agent-suggestion.js +1 -1
  257. package/dist/src/projects/project-service.js +1 -1
  258. package/dist/src/projects/project-skill-service.js +2 -2
  259. package/dist/src/projects/workspace.js +1 -1
  260. package/dist/src/providers/model-reference-auditor.js +1 -1
  261. package/dist/src/realtime/runtime.js +1 -1
  262. package/dist/src/remote-access/exposure-manager.js +1 -1
  263. package/dist/src/routing/agent-session-key.js +1 -1
  264. package/dist/src/runtime-tools/phone-dependencies.js +2 -2
  265. package/dist/src/session/index.js +2 -2
  266. package/dist/src/session/init-session-turn.js +1 -1
  267. package/dist/src/session/resolve-session.js +1 -1
  268. package/dist/src/session/store.js +5 -5
  269. package/dist/src/session/thinking-resolve.js +1 -1
  270. package/dist/src/share/hosted-session-share.js +2 -2
  271. package/dist/src/share/session-share-service.js +1 -1
  272. package/dist/src/share/share-store.js +1 -1
  273. package/dist/src/share/share-thumbnail.js +1 -1
  274. package/dist/src/share/site-share-store.js +1 -1
  275. package/dist/src/storage/sqlite/connection.js +9 -9
  276. package/dist/src/tasks/capabilities/read.js +2 -2
  277. package/dist/src/tasks/capabilities/write.js +1 -1
  278. package/dist/src/tasks/home-query-service.js +1 -1
  279. package/dist/src/tasks/index.js +4 -4
  280. package/dist/src/tasks/task-allocation-service.js +6 -6
  281. package/dist/src/tasks/task-application-service.js +6 -6
  282. package/dist/src/tasks/task-collaboration-delivery.js +1 -1
  283. package/dist/src/tasks/task-context-assembler.js +2 -2
  284. package/dist/src/tasks/task-contract-planner.js +1 -1
  285. package/dist/src/tasks/task-handoff-service.js +1 -1
  286. package/dist/src/tasks/task-handoff.js +5 -5
  287. package/dist/src/tasks/task-main-update-decision-service.js +3 -3
  288. package/dist/src/tasks/task-model-call.js +1 -1
  289. package/dist/src/tasks/task-research-result.js +4 -4
  290. package/dist/src/tasks/task-result-delivery-repository.js +1 -1
  291. package/dist/src/tasks/task-result-delivery-service.js +2 -2
  292. package/dist/src/tasks/task-run-coordinator.js +4 -4
  293. package/dist/src/tasks/task-run-dispatcher.js +1 -1
  294. package/dist/src/tui/backends/embedded-backend.js +11 -11
  295. package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
  296. package/dist/src/tui/extension-host/load-extensions.js +2 -2
  297. package/dist/src/tui/tui-commands.js +5 -5
  298. package/dist/src/tui/tui-picker-overlay.js +1 -1
  299. package/dist/src/tui/tui-skills-autocomplete.js +1 -1
  300. package/dist/src/tui/tui-startup-resources.js +4 -4
  301. package/dist/src/tui/tui.js +4 -4
  302. package/dist/src/tunnel/gateway-lifecycle.js +1 -1
  303. package/dist/src/user-context/access-policy.js +2 -2
  304. package/dist/src/user-model/bootstrap.js +1 -1
  305. package/dist/src/user-model/capture/executor.js +1 -1
  306. package/dist/src/user-model/index.js +2 -2
  307. package/dist/src/user-model/usage-policy.js +1 -1
  308. package/dist/src/voice/realtime/memory-context.js +5 -5
  309. package/dist/src/voice/realtime/omniRoute.js +1 -1
  310. package/dist/src/voice/realtime/runtime.js +4 -4
  311. package/dist/src/voice/stt/index.js +2 -2
  312. package/dist/src/voice/stt/preflight.js +1 -1
  313. package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
  314. package/dist/src/voice/stt/providers/bailian-plan-transcription.js +1 -1
  315. package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
  316. package/dist/src/voice/stt/transcribe-core.js +1 -1
  317. package/dist/src/voice/tts/index.js +3 -3
  318. package/dist/src/voice/tts/merge-config.js +1 -1
  319. package/dist/src/voice/tts/payload.js +1 -1
  320. package/dist/src/voice/tts/providers/bailian-plan-speech.js +1 -1
  321. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
  322. package/dist/src/voice/tts/speak-core.js +1 -1
  323. package/dist/src/work-discovery/service.js +7 -7
  324. package/package.json +1 -1
@@ -9,25 +9,32 @@ import { patchSessionMetadata } from "../../storage/sqlite/session-repository.js
9
9
  import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/session-task-plan-repository.js";
10
10
  import "../../storage/sqlite/index.js";
11
11
  import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
12
- import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
12
+ import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
13
+ import { skillEnvironmentId } from "../skills/installer.js";
13
14
  import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
14
- import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
15
15
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
16
- import { PERSONAL_REQUEST_TOOL_IDS, TASK_EXECUTION_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
16
+ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
17
+ import "../../../packages/browser-control-contract/src/index.js";
18
+ import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
19
+ import { checkBrowserReadiness } from "../../browser/readiness.js";
20
+ import "../../browser/index.js";
21
+ import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
22
+ import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
23
+ import { ComputerRuntime } from "../../computer/runtime.js";
24
+ import { wrapToolsWithProtection } from "./executor.js";
25
+ import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
17
26
  import { getPhoneRuntime, phoneExecutionContext } from "../../phone/runtime.js";
27
+ import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
28
+ import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
29
+ import { createDataBatchTool } from "./dataBatch.js";
30
+ import { markCodemodeCoreRead } from "./codemode-permissions.js";
31
+ import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
32
+ import { PERSONAL_REQUEST_TOOL_IDS, TASK_EXECUTION_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
18
33
  import { createPhoneUseTool } from "./phone-use-tool.js";
19
34
  import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
20
35
  import { createPersonalAttentionTool } from "./personal-attention-tool.js";
21
36
  import { withCoreToolExposure } from "./toolExposure.js";
22
- import { markCodemodeCoreRead } from "./codemode-permissions.js";
23
- import "../../../packages/browser-control-contract/src/index.js";
24
- import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
25
- import { wrapToolsWithProtection } from "./executor.js";
26
- import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
27
37
  import { createReadFileTool } from "./read.js";
28
- import { createDataBatchTool } from "./dataBatch.js";
29
- import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
30
- import { skillEnvironmentId } from "../skills/installer.js";
31
38
  import { createWriteFileTool } from "./write.js";
32
39
  import { createListDirTool } from "./list-dir.js";
33
40
  import { createPublishArtifactsTool } from "./publish-artifacts.js";
@@ -51,11 +58,6 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
51
58
  import { createSessionStatusTool } from "./session-status-tool.js";
52
59
  import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
53
60
  import { createClarifyTool } from "./clarify-tool.js";
54
- import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
55
- import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
56
- import { checkBrowserReadiness } from "../../browser/readiness.js";
57
- import "../../browser/index.js";
58
- import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
59
61
  import { createDelegateTool } from "./delegate-tool.js";
60
62
  import { createAutomationTool } from "./automation-tool.js";
61
63
  import { createBrowserAutomationTool } from "./browser-automation-tool.js";
@@ -79,12 +81,10 @@ import { withPersonalPerformance } from "./personal-performance.js";
79
81
  import { createPersonalRequestTools } from "./personal-request-tool.js";
80
82
  import { createPersonalRequestConnectionTool, createPersonalRequestResultTool } from "./personal-request-result-tool.js";
81
83
  import { createBrowserUseTool } from "./browser/tool/browser-use-tool.js";
82
- import { ComputerRuntime } from "../../computer/runtime.js";
83
84
  import { createComputerUseTool } from "./computer-use-tool.js";
84
85
  import { createReviewWorkspaceTool } from "./review-workspace.js";
85
86
  import { createLanguageDiagnosticsTool } from "./language-diagnostics.js";
86
87
  import { createNoninteractiveToolPolicy } from "./noninteractive-tool-policy.js";
87
- import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
88
88
  import { createTextToSpeechTool } from "./tts-tool.js";
89
89
  import { getAgentCapabilityToolNames } from "../capabilities/registry.js";
90
90
  import "../capabilities/index.js";
@@ -1,6 +1,6 @@
1
1
  import { checkUrlSafety, checkWebsiteBlocklist } from "./url-safety.js";
2
- import { lookup } from "node:dns";
3
2
  import { Agent, fetch } from "undici";
3
+ import { lookup } from "node:dns";
4
4
  //#region src/agent/tools/fetch-text.ts
5
5
  /** Validate each redirect and the address actually used for the connection. */
6
6
  async function fetchPublicText(input, blocklist, signal) {
@@ -1,12 +1,12 @@
1
1
  import { getAgentDefaultImageGenerationModelConfig, init_schema } from "../../config/schema.js";
2
- import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
3
2
  import { imageAssetFromDataUrl, imageFileExtensionForMimeType, mimeTypeFromFileName, parseImageDataUrl, sniffImageMimeType } from "../image/generation/image-assets.js";
4
- import { persistToolMedia } from "./tool-media.js";
3
+ import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
5
4
  import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
6
5
  import "../../capabilities/readiness/index.js";
7
6
  import { applyImageGenerationModelConfigDefaults } from "../image/image-helpers.js";
7
+ import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
8
+ import { persistToolMedia } from "./tool-media.js";
8
9
  import { isFailoverError } from "../failover-error.js";
9
- import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
10
10
  import { generateImage, listImageGenerationProvidersSummary } from "../image/generation/runtime.js";
11
11
  import path from "node:path";
12
12
  import { randomBytes } from "node:crypto";
@@ -1,8 +1,12 @@
1
+ import { assertBrowserUrlAllowed } from "../../browser/url-policy.js";
2
+ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
3
+ import "../../browser/index.js";
1
4
  import { DEFAULT_TOOL_METADATA, getToolMetadata } from "./metadata.js";
2
5
  import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
6
+ import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
7
+ import { createDataBatchTool } from "./dataBatch.js";
3
8
  import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, GREP_MAX_LINE_LENGTH, formatSize, truncateHead, truncateLine, truncateTail } from "./truncate.js";
4
9
  import { createReadFileTool } from "./read.js";
5
- import { createDataBatchTool } from "./dataBatch.js";
6
10
  import { createWriteFileTool, writeFileTool } from "./write.js";
7
11
  import { createListDirTool, listDirTool } from "./list-dir.js";
8
12
  import { createPublishArtifactsTool } from "./publish-artifacts.js";
@@ -27,10 +31,6 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
27
31
  import { createSessionStatusTool } from "./session-status-tool.js";
28
32
  import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
29
33
  import { createClarifyTool } from "./clarify-tool.js";
30
- import { assertBrowserUrlAllowed } from "../../browser/url-policy.js";
31
- import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
32
- import "../../browser/index.js";
33
- import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
34
34
  import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
35
35
  import { createAutomationTool } from "./automation-tool.js";
36
36
  import { createBrowserAutomationTool } from "./browser-automation-tool.js";
@@ -1,5 +1,5 @@
1
- import { checkedFilePath } from "../sandbox/fileAccess.js";
2
1
  import { resolvePathUnderWorkspace } from "./tool-paths.js";
2
+ import { checkedFilePath } from "../sandbox/fileAccess.js";
3
3
  import { readdir } from "fs/promises";
4
4
  import { Type } from "@sinclair/typebox";
5
5
  //#region src/agent/tools/list-dir.ts
@@ -1,10 +1,10 @@
1
1
  import { getSqliteDatabase, init_transaction } from "../../storage/sqlite/transaction.js";
2
2
  import { init_session_instance_repository, readCurrentTranscriptId } from "../../storage/sqlite/session-instance-repository.js";
3
- import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
4
3
  import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
5
- import { boundedPersonalResult } from "./personal-result-budget.js";
4
+ import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
6
5
  import { parseLocalCheckTime } from "../../personal-agent/proactivity/follow-up-request.js";
7
6
  import { applyThreadFeedback, getAttention, getProactivitySettings, listAttention, listInterestCandidates, patchAttention, patchProactivitySettings, rollbackStrategy, saveAttention, strategyState, userText } from "../../personal-agent/proactivity/repository.js";
7
+ import { boundedPersonalResult } from "./personal-result-budget.js";
8
8
  import { Type } from "@sinclair/typebox";
9
9
  //#region src/agent/tools/personal-attention-tool.ts
10
10
  init_transaction();
@@ -1,7 +1,7 @@
1
1
  import { CapabilityDispatcher } from "../../capabilities/runtime/dispatcher.js";
2
2
  import { isPersonalConversation } from "../../personal-agent/repository.js";
3
- import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
4
3
  import { getEmbeddedExecutionSession } from "../embedded/execution-context.js";
4
+ import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
5
5
  import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
6
6
  import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
7
7
  import { registerAutomationReadCapabilities } from "../../automations/capabilities/read.js";
@@ -1,10 +1,10 @@
1
1
  import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
2
  import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
3
3
  import { init_request_repository, personalRequestForExecution } from "../../personal-agent/request-repository.js";
4
- import { assertPersonalRequestAccountAccess } from "../../personal-agent/request-access.js";
5
4
  import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
6
5
  import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
7
6
  import { PersonalRequestResultSchema } from "../../personal-agent/request-result.js";
7
+ import { assertPersonalRequestAccountAccess } from "../../personal-agent/request-access.js";
8
8
  import { Type } from "@sinclair/typebox";
9
9
  //#region src/agent/tools/personal-request-result-tool.ts
10
10
  init_transaction();
@@ -5,13 +5,13 @@ import { getPersonalRequest, init_request_repository, listPersonalRequests, upda
5
5
  import { getActiveConnectionWait, init_connection_wait_repository, reviseCurrentConnectionObjective, updateConnectionWait } from "../../storage/sqlite/connection-wait-repository.js";
6
6
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
7
7
  import { init_session_repository } from "../../storage/sqlite/session-repository.js";
8
- import { isPersonalConversation } from "../../personal-agent/repository.js";
9
8
  import { TaskAllocationRepository } from "../../tasks/task-allocation-repository.js";
10
- import { boundedPersonalResult } from "./personal-result-budget.js";
11
- import { personalCapabilities } from "../../personal-agent/capability-service.js";
9
+ import { isPersonalConversation } from "../../personal-agent/repository.js";
12
10
  import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
13
- import { createPersonalTaskTool } from "./personal-task-tool.js";
11
+ import { personalCapabilities } from "../../personal-agent/capability-service.js";
14
12
  import { assertPersonalRequestTimeRange, cancelPersonalRequest, personalRequestSnapshot, publishPersonalRequest, stopPersonalRequestExecution, submitPersonalRequest } from "../../personal-agent/request-service.js";
13
+ import { boundedPersonalResult } from "./personal-result-budget.js";
14
+ import { createPersonalTaskTool } from "./personal-task-tool.js";
15
15
  import { Type } from "@sinclair/typebox";
16
16
  //#region src/agent/tools/personal-request-tool.ts
17
17
  init_session_input_repository();
@@ -1,7 +1,7 @@
1
1
  import { isPersonalConversation } from "../../personal-agent/repository.js";
2
2
  import { readPersonalResult, retryPersonalResultDelivery } from "../../personal-agent/result-reader.js";
3
- import "./local-read-budget.js";
4
3
  import { waitForPersonalResult } from "../../personal-agent/result-read-continuations.js";
4
+ import "./local-read-budget.js";
5
5
  import { Type } from "@sinclair/typebox";
6
6
  //#region src/agent/tools/personal-result-tool.ts
7
7
  const schema = Type.Object({
@@ -6,20 +6,20 @@ import { TaskRepository, init_task_repository } from "../../tasks/task-repositor
6
6
  import { getPersonalRequest, init_request_repository } from "../../personal-agent/request-repository.js";
7
7
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
8
8
  import "../../storage/sqlite/index.js";
9
- import { isPersonalConversation } from "../../personal-agent/repository.js";
10
9
  import { TaskAllocationRepository } from "../../tasks/task-allocation-repository.js";
11
10
  import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
11
+ import { isPersonalConversation } from "../../personal-agent/repository.js";
12
12
  import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
13
- import { boundedPersonalResult } from "./personal-result-budget.js";
14
- import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
15
- import { PERSONAL_WORKER_RESULT_GUIDANCE } from "../../personal-agent/communication.js";
16
13
  import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
14
+ import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
17
15
  import { TaskApplicationService } from "../../tasks/task-application-service.js";
16
+ import { AgentSelectionRepository, selectionRequestHash } from "../../agent-matching/selection-repository.js";
18
17
  import { getAvailablePersonalAgentTools, personalAgentModelAvailability } from "../../personal-agent/specialist-capabilities.js";
19
18
  import { assessSpecialist, matchSpecialists } from "../../agent-matching/service.js";
20
- import { createXopcUseTool } from "./xopc-use-tool.js";
21
- import { AgentSelectionRepository, selectionRequestHash } from "../../agent-matching/selection-repository.js";
22
19
  import { assertSpecialistEligible, createSelectedTask } from "../../agent-matching/delegation-service.js";
20
+ import { PERSONAL_WORKER_RESULT_GUIDANCE } from "../../personal-agent/communication.js";
21
+ import { boundedPersonalResult } from "./personal-result-budget.js";
22
+ import { createXopcUseTool } from "./xopc-use-tool.js";
23
23
  import { cancelPersonalTask } from "../../personal-agent/task-cancel.js";
24
24
  import { randomUUID } from "node:crypto";
25
25
  import { Type } from "@sinclair/typebox";
@@ -1,9 +1,9 @@
1
1
  import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
2
2
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
3
+ import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
4
+ import { resolvePathUnderWorkspace } from "./tool-paths.js";
3
5
  import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
4
6
  import { readWorkspaceFile } from "../sandbox/fileAccess.js";
5
- import { resolvePathUnderWorkspace } from "./tool-paths.js";
6
- import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
7
7
  import { persistToolMedia } from "./tool-media.js";
8
8
  import { basename, isAbsolute, relative, sep } from "node:path";
9
9
  import { Type } from "@sinclair/typebox";
@@ -1,8 +1,8 @@
1
+ import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
1
2
  import { checkedFilePath, readWorkspaceFileAsync } from "../sandbox/fileAccess.js";
2
- import { dataScheduler } from "../data-acquisition/scheduler.js";
3
3
  import { checkFileSafety } from "../prompt/safety.js";
4
+ import { dataScheduler } from "../data-acquisition/scheduler.js";
4
5
  import { formatSize, truncateHead } from "./truncate.js";
5
- import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
6
6
  import { stat } from "fs/promises";
7
7
  import { Type } from "@sinclair/typebox";
8
8
  //#region src/agent/tools/read.ts
@@ -1,5 +1,5 @@
1
- import { readWorkspaceRevision } from "../coding/workspace-revision.js";
2
1
  import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
2
+ import { readWorkspaceRevision } from "../coding/workspace-revision.js";
3
3
  import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
4
4
  import { checkedFilePath, readWorkspaceFile } from "../sandbox/fileAccess.js";
5
5
  import { resolve } from "node:path";
@@ -1,9 +1,9 @@
1
1
  import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
2
2
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
3
3
  import { MEDIA_MAX_BYTES } from "../../media/store.js";
4
+ import { resolvePathUnderWorkspace } from "./tool-paths.js";
4
5
  import { readWorkspaceFile } from "../sandbox/fileAccess.js";
5
6
  import { checkFileSafety } from "../prompt/safety.js";
6
- import { resolvePathUnderWorkspace } from "./tool-paths.js";
7
7
  import { persistToolMedia } from "./tool-media.js";
8
8
  import { basename } from "node:path";
9
9
  import { Type } from "@sinclair/typebox";
@@ -3,8 +3,8 @@ import { init_logger } from "../../utils/logger.js";
3
3
  import { init_fts, sessionSearchTerms } from "../../storage/sqlite/fts.js";
4
4
  import { init_providers, resolveModel } from "../../providers/index.js";
5
5
  import { completeWithResolvedCredentials } from "../../providers/model-call.js";
6
- import { FORGOTTEN_HISTORY_EXCERPT, forgottenHistoryEntries, projectUnadmittedForgottenFields } from "../../memory-learning/forgotten-history.js";
7
6
  import { readAgentMessageContent } from "../memory/agent-message-access.js";
7
+ import { FORGOTTEN_HISTORY_EXCERPT, forgottenHistoryEntries, projectUnadmittedForgottenFields } from "../../memory-learning/forgotten-history.js";
8
8
  import "./local-read-budget.js";
9
9
  import { Type } from "@sinclair/typebox";
10
10
  //#region src/agent/tools/session-search-tool.ts
@@ -1,7 +1,7 @@
1
1
  import { resolveStateDir } from "../../config/paths-state.js";
2
2
  import { init_paths } from "../../config/paths.js";
3
- import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
4
3
  import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
4
+ import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
5
5
  import { resolveSkillReadablePath } from "../skills/skill-view-path.js";
6
6
  import { readFileSync, statSync } from "fs";
7
7
  import { Type } from "@sinclair/typebox";
@@ -6,11 +6,11 @@ import { init_request_repository, personalRequestForExecution } from "../../pers
6
6
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
7
7
  import { init_session_repository } from "../../storage/sqlite/session-repository.js";
8
8
  import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
9
+ import { assertTaskHandoffAccess, assertTaskHandoffExecutorAccess, getTaskHandoff, materializeTaskHandoffFile, readTaskHandoffSource } from "../../tasks/task-handoff.js";
10
+ import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
9
11
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
10
12
  import { getEmbeddedExecutionSession } from "../embedded/execution-context.js";
11
- import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
12
13
  import { taskResearchEvidence } from "../../tasks/task-research-result.js";
13
- import { assertTaskHandoffAccess, assertTaskHandoffExecutorAccess, getTaskHandoff, materializeTaskHandoffFile, readTaskHandoffSource } from "../../tasks/task-handoff.js";
14
14
  import { createXopcUseTool } from "./xopc-use-tool.js";
15
15
  import { Type } from "@sinclair/typebox";
16
16
  //#region src/agent/tools/task-collaboration-tool.ts
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { speak } from "../../voice/tts/speak-core.js";
4
3
  import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
5
4
  import { getChannelOutputFormat } from "../../voice/tts/service.js";
5
+ import { speak } from "../../voice/tts/speak-core.js";
6
6
  import { compressAudio } from "../../voice/tts/audio.js";
7
7
  import { persistOutboundTtsAudio } from "../../channels/attachments/outbound-tts-persist.js";
8
8
  import { Type } from "@sinclair/typebox";
@@ -1,9 +1,9 @@
1
- import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
2
1
  import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
3
2
  import { canUseAssertion } from "../../user-model/usage-policy.js";
4
3
  import "../../user-model/index.js";
5
- import "./local-read-budget.js";
6
4
  import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
5
+ import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
6
+ import "./local-read-budget.js";
7
7
  import { Type } from "@sinclair/typebox";
8
8
  //#region src/agent/tools/user-context-tool.ts
9
9
  const SearchSchema = Type.Object({
@@ -1,7 +1,7 @@
1
+ import { sanitizeSearchInfo } from "./search/search-info.js";
1
2
  import { SearchError, classifySearchError, searchFailureInfo } from "./search/errors.js";
2
3
  import { SearchProviderRegistry } from "./search/registry.js";
3
4
  import { resolveWebSearchConfig } from "./search/resolve-config.js";
4
- import { sanitizeSearchInfo } from "./search/search-info.js";
5
5
  import { fetchPublicText } from "./fetch-text.js";
6
6
  import { Type } from "@sinclair/typebox";
7
7
  //#region src/agent/tools/web.ts
@@ -1,9 +1,9 @@
1
1
  import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
2
2
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
3
+ import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
4
+ import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
3
5
  import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
4
6
  import { checkFileSafety } from "../prompt/safety.js";
5
- import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
6
- import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
7
7
  import { basename, relative, sep } from "path";
8
8
  import { realpath } from "fs/promises";
9
9
  import { Type } from "@sinclair/typebox";
@@ -13,21 +13,21 @@ import "../../storage/sqlite/index.js";
13
13
  import "../../activity/index.js";
14
14
  import { CapabilityError } from "../../capabilities/runtime/errors.js";
15
15
  import "../../capabilities/runtime/dispatcher.js";
16
- import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
17
16
  import { hasUnlocalizedTaskText, resolveTaskLocale } from "../../tasks/task-language.js";
18
17
  import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
19
18
  import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
20
- import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
21
- import { getEmbeddedExecutionRunId } from "../embedded/execution-context.js";
19
+ import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
22
20
  import { resolveProjectAgentId } from "../../projects/project-agent.js";
23
21
  import "../../projects/index.js";
22
+ import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
24
23
  import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
24
+ import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
25
+ import { TaskApplicationService } from "../../tasks/task-application-service.js";
26
+ import { getEmbeddedExecutionRunId } from "../embedded/execution-context.js";
25
27
  import { defineTaskContract } from "../../tasks/task-contract-definition.js";
26
28
  import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
27
29
  import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
28
30
  import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
29
- import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
30
- import { TaskApplicationService } from "../../tasks/task-application-service.js";
31
31
  import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
32
32
  import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
33
33
  import { createProductDispatcher } from "../../capabilities/runtime/product.js";
@@ -1,7 +1,7 @@
1
- import { resolveTranscriptPolicy } from "./transcript-policy.js";
2
- import { dropThinkingBlocks } from "./thinking.js";
3
1
  import { extractToolCallsFromAssistant, extractToolResultId, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
4
2
  import { makeMissingToolResult, repairToolUseResultPairing, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
3
+ import { resolveTranscriptPolicy } from "./transcript-policy.js";
4
+ import { dropThinkingBlocks } from "./thinking.js";
5
5
  import { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, resolvePolicyForModel, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence } from "./transcript-hygiene.js";
6
6
  import { stripToolMessages } from "./strip-tool-messages.js";
7
7
  export { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, dropThinkingBlocks, extractToolCallsFromAssistant, extractToolResultId, makeMissingToolResult, repairToolUseResultPairing, resolvePolicyForModel, resolveTranscriptPolicy, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolMessages, stripToolResultDetails, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence };
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { resolveTranscriptPolicy } from "./transcript-policy.js";
4
- import { dropThinkingBlocks } from "./thinking.js";
5
3
  import { sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
6
4
  import { sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
5
+ import { resolveTranscriptPolicy } from "./transcript-policy.js";
6
+ import { dropThinkingBlocks } from "./thinking.js";
7
7
  //#region src/agent/transcript/transcript-hygiene.ts
8
8
  init_logger();
9
9
  const log = createLogger("transcript-hygiene");
@@ -4,8 +4,8 @@ import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "
4
4
  import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
5
5
  import { TaskReadModelProjector } from "../tasks/task-read-model-projector.js";
6
6
  import { TaskApplicationService } from "../tasks/task-application-service.js";
7
- import { assessSpecialist } from "./service.js";
8
7
  import { AgentSelectionRepository, selectionRequestHash } from "./selection-repository.js";
8
+ import { assessSpecialist } from "./service.js";
9
9
  //#region src/agent-matching/delegation-service.ts
10
10
  init_logger();
11
11
  init_transaction();
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
4
- import { createResolvedModelStream, isLocalModelBaseUrl, resolveModelCallApiKey } from "../providers/model-call.js";
5
4
  import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
5
+ import { createResolvedModelStream, isLocalModelBaseUrl, resolveModelCallApiKey } from "../providers/model-call.js";
6
6
  //#region src/ai-assist/text-assist.ts
7
7
  init_providers();
8
8
  init_logger();
@@ -1,8 +1,8 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { createLogger } from "../utils/logger/index.js";
3
3
  import { init_logger } from "../utils/logger.js";
4
- import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
5
4
  import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
5
+ import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
6
6
  import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
7
7
  import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
8
8
  import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
@@ -1,6 +1,6 @@
1
1
  import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
2
- import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
3
2
  import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
3
+ import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
4
4
  import { init_oauth_provider_lock, withOAuthProviderLock } from "../oauth-provider-lock.js";
5
5
  import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
6
6
  import { join } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
2
- import { generatePKCE, init_pkce } from "./pkce.js";
3
2
  import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
3
+ import { generatePKCE, init_pkce } from "./pkce.js";
4
4
  import { hostname } from "node:os";
5
5
  import { randomBytes } from "node:crypto";
6
6
  import http from "node:http";
@@ -1,5 +1,5 @@
1
- import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
2
1
  import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
2
+ import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
3
3
  import path from "node:path";
4
4
  import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
5
5
  //#region src/auth/profiles/store.ts
@@ -1,4 +1,4 @@
1
1
  import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./validation.js";
2
- import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
3
2
  import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./defaults.js";
3
+ import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
4
4
  export { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds, timerDelayUntil };
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
3
  import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
4
- import { resolveModelSelector } from "../../config/agent-model-intents.js";
5
4
  import { getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
6
5
  import { completeWithResolvedCredentials } from "../../providers/model-call.js";
6
+ import { resolveModelSelector } from "../../config/agent-model-intents.js";
7
7
  import { buildAutomationDraftPrompt, buildAutomationDraftRepairPrompt, buildAutomationRunRepairPrompt, buildAutomationRunRepairRetryPrompt } from "./automation-draft-prompt.js";
8
8
  import { buildAutomationDraftResponse, parseGeneratedAutomationDraft, parseGeneratedAutomationRepairDraft } from "./automation-draft-validator.js";
9
9
  //#region src/automations/draft/automation-draft-service.ts
@@ -1,8 +1,9 @@
1
1
  import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./domain/validation.js";
2
2
  import { listBusinessEventDefinitions, registerBusinessEvent, validateCatalogedBusinessEvent } from "./events/event-catalog.js";
3
3
  import { automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, skipAutomationEventDelivery } from "./events/event-repository.js";
4
- import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
5
4
  import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./domain/defaults.js";
5
+ import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
6
+ import "./domain/index.js";
6
7
  import { AutomationActionExecutor } from "./service/action-executor.js";
7
8
  import { AutomationEventDispatcher } from "./events/event-dispatcher.js";
8
9
  import "./events/index.js";
@@ -10,6 +11,5 @@ import { resolveAutomationWebhookSecret } from "./webhook-secrets.js";
10
11
  import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "./delivery/delivery-router.js";
11
12
  import "./delivery/index.js";
12
13
  import { AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationService } from "./service/automation-service.js";
13
- import "./domain/index.js";
14
14
  import "./service/index.js";
15
15
  export { AutomationActionExecutor, AutomationActionSchema, AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationDeliveryPolicySchema, AutomationDeliveryRouter, AutomationEventDispatcher, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationService, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, getAutomationResultDeliveryMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, listAutomationResultDeliveries, listBusinessEventDefinitions, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, registerBusinessEvent, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, resolveAutomationTimeoutSeconds, resolveAutomationWebhookSecret, retryAutomationResultDelivery, skipAutomationEventDelivery, timerDelayUntil, validateCatalogedBusinessEvent };
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
3
  import { normalizeAgentId } from "../../agent-catalog/id.js";
4
4
  import { init_agent_scope } from "../../agent/agent-scope.js";
5
- import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
6
5
  import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
6
+ import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
7
7
  import { resolveAutomationTimeoutSeconds } from "../domain/defaults.js";
8
8
  //#region src/automations/service/action-executor.ts
9
9
  init_model_usage();
@@ -3,9 +3,9 @@ import { browserPairingInvitationPayloadSchema, formatBrowserPairingInvitation }
3
3
  import { init_src } from "../../packages/gateway-contract/src/index.js";
4
4
  import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity } from "../storage/sqlite/gateway-identity-repository.js";
5
5
  import { createDevicePairingSetup } from "../storage/sqlite/device-pairing-repository.js";
6
- import { loadConfig } from "../config/loader.js";
7
6
  import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
8
7
  import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "./extension-identity.js";
8
+ import { loadConfig } from "../config/loader.js";
9
9
  import os from "node:os";
10
10
  //#region src/browser/native-messaging-host.ts
11
11
  init_src();
@@ -2,8 +2,8 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
2
2
  import { resolveStateDir } from "../../config/paths-state.js";
3
3
  import { createLogger } from "../../utils/logger/index.js";
4
4
  import { init_logger } from "../../utils/logger.js";
5
- import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
6
5
  import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
6
+ import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
7
7
  import { assertCacheDir } from "../cache-dir-policy.js";
8
8
  import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "../extension-identity.js";
9
9
  import "../native-messaging-host.js";
@@ -1,9 +1,9 @@
1
+ import { downloadConnectorStoreZipBuffer, fetchStoreConnectorPackageDetail, listConnectorPackages, resolveSkillsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
1
2
  import { getCliAdapter } from "../connectors/cli/adapterRegistry.js";
2
3
  import { assertStoreConnectorAvailable, isExcludedStoreConnector } from "../connectors/excluded-connectors.js";
3
4
  import { validEndpointDomain } from "../connectors/endpoint-policy.js";
4
5
  import { listConnectorInstances } from "../connectors/instances.js";
5
6
  import { installConnectorDefinition } from "../connectors/install.js";
6
- import { downloadConnectorStoreZipBuffer, fetchStoreConnectorPackageDetail, listConnectorPackages, resolveSkillsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
7
7
  import { createHash } from "node:crypto";
8
8
  import AdmZip from "adm-zip";
9
9
  import { isIP } from "node:net";
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
4
- import { transcribe } from "../../voice/stt/transcribe-core.js";
5
3
  import { isSTTAvailable } from "../../voice/stt/availability.js";
4
+ import { transcribe } from "../../voice/stt/transcribe-core.js";
6
5
  import "../../voice/stt/index.js";
6
+ import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
7
7
  //#region src/channels/attachments/voice-stt-webchat.ts
8
8
  init_logger();
9
9
  const STT_MAX_BYTES = 25 * 1024 * 1024;