@xopcai/xopc 0.0.419 → 0.0.420

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-DS60ZSdQ.js → index-UCOlAnf-.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 +42 -42
  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
@@ -1,5 +1,5 @@
1
1
  import path, { relative, resolve } from "node:path";
2
- import fsSync from "node:fs";
2
+ import fs from "node:fs";
3
3
  //#region src/gateway/workspace-editor-path.ts
4
4
  /** Resolve a workspace-relative POSIX path safely (no `..`, stays under root). */
5
5
  function resolveWorkspaceSafePath(workspaceRoot, rel) {
@@ -20,7 +20,7 @@ function isPathUnderWorkspace(workspaceRoot, absPath) {
20
20
  function normalizeComparablePath(input) {
21
21
  let resolved = resolve(input);
22
22
  try {
23
- resolved = fsSync.realpathSync.native(resolved);
23
+ resolved = fs.realpathSync.native(resolved);
24
24
  } catch {}
25
25
  return process.platform === "win32" ? resolved.toLowerCase() : resolved;
26
26
  }
@@ -7,8 +7,8 @@ import { init_model_policy, isComputerModel, isDedicatedComputerProfile } from "
7
7
  import { voiceSupportsMode } from "../../packages/realtime-protocol/src/voice-catalog.js";
8
8
  import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
9
9
  import { getModelCatalogStore, init_model_catalog_store } from "../providers/model-catalog-store.js";
10
- import { compareCatalogModels } from "../providers/model-catalog-ranking.js";
11
10
  import { phoneModelProfile } from "../phone/model-adapter.js";
11
+ import { compareCatalogModels } from "../providers/model-catalog-ranking.js";
12
12
  import { prepareUpdateGlobalDefaults } from "./global-defaults-admin.js";
13
13
  //#region src/gateway/xopc-cloud-capability-setup.ts
14
14
  init_voice();
@@ -1,8 +1,8 @@
1
1
  import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
2
+ import { resolveModelSelector } from "../config/agent-model-intents.js";
2
3
  import { init_providers, resolveModel } from "../providers/index.js";
3
- import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
4
4
  import { completeWithResolvedCredentials, isLocalModelBaseUrl } from "../providers/model-call.js";
5
- import { resolveModelSelector } from "../config/agent-model-intents.js";
5
+ import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
6
6
  import { z } from "zod";
7
7
  //#region src/home-intelligence/generator.ts
8
8
  init_agent_scope();
@@ -1,8 +1,8 @@
1
- import { ProjectService } from "../projects/project-service.js";
2
1
  import { init_paths, resolveSkillsDir } from "../config/paths.js";
3
- import { resolveWorkspaceSkillsDir } from "../agent/skills/workspace-skills-dir.js";
4
2
  import { listKnowledgeItems } from "../knowledge-memory/repository.js";
5
3
  import "../knowledge-memory/index.js";
4
+ import { ProjectService } from "../projects/project-service.js";
5
+ import { resolveWorkspaceSkillsDir } from "../agent/skills/workspace-skills-dir.js";
6
6
  import { ImportError } from "./types.js";
7
7
  import { digest } from "./files.js";
8
8
  import { canonicalTarget } from "./planner.js";
@@ -1,7 +1,7 @@
1
1
  import { resolveStateDir } from "../config/paths-state.js";
2
2
  import { init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
3
- import { ProjectService } from "../projects/project-service.js";
4
3
  import { init_paths } from "../config/paths.js";
4
+ import { ProjectService } from "../projects/project-service.js";
5
5
  import { ImportError } from "./types.js";
6
6
  import { digest, fileHash, readRegularFile, readTree } from "./files.js";
7
7
  import { importContextDocument } from "./contextImport.js";
@@ -1,6 +1,6 @@
1
1
  import { resolveStateDir } from "../config/paths-state.js";
2
- import { ProjectService } from "../projects/project-service.js";
3
2
  import { init_paths, resolveBundledSkillsDir, resolveSkillsDir } from "../config/paths.js";
3
+ import { ProjectService } from "../projects/project-service.js";
4
4
  import { resolveWorkspaceSkillsDir } from "../agent/skills/workspace-skills-dir.js";
5
5
  import { loadSkills } from "../agent/skills/index.js";
6
6
  import { ProjectTrustStore } from "../project-trust/trust-store.js";
@@ -1,11 +1,11 @@
1
1
  import { listPortListeners } from "../gateway/ports.js";
2
2
  import { isGatewayArgv, parseProcCmdline } from "./gateway-process-argv.js";
3
- import fsSync from "node:fs";
3
+ import fs from "node:fs";
4
4
  import { spawnSync } from "node:child_process";
5
5
  //#region src/infra/gateway-processes.ts
6
6
  function readGatewayProcessArgsSync(pid) {
7
7
  if (process.platform === "linux") try {
8
- return parseProcCmdline(fsSync.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
8
+ return parseProcCmdline(fs.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
9
9
  } catch {
10
10
  return null;
11
11
  }
@@ -1,7 +1,7 @@
1
1
  import { resolveBrewPathDirs } from "./brew.js";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import fsSync from "node:fs";
4
+ import fs from "node:fs";
5
5
  //#region src/infra/path-env.ts
6
6
  function isTruthyEnvValue(value) {
7
7
  if (!value) return false;
@@ -10,7 +10,7 @@ function isTruthyEnvValue(value) {
10
10
  }
11
11
  function isExecutable(filePath) {
12
12
  try {
13
- fsSync.accessSync(filePath, fsSync.constants.X_OK);
13
+ fs.accessSync(filePath, fs.constants.X_OK);
14
14
  return true;
15
15
  } catch {
16
16
  return false;
@@ -18,7 +18,7 @@ function isExecutable(filePath) {
18
18
  }
19
19
  function isDirectory(dirPath) {
20
20
  try {
21
- return fsSync.statSync(dirPath).isDirectory();
21
+ return fs.statSync(dirPath).isDirectory();
22
22
  } catch {
23
23
  return false;
24
24
  }
@@ -4,8 +4,8 @@ import { readPackageVersion } from "./package-json.js";
4
4
  import { createDefaultCommandRunner } from "./run-command.js";
5
5
  import { verifyInstalledGatewayRuntime } from "./package-runtime-check.js";
6
6
  import path from "node:path";
7
- import fsSync from "node:fs";
8
- import fs from "node:fs/promises";
7
+ import fs from "node:fs";
8
+ import fs$1 from "node:fs/promises";
9
9
  //#region src/infra/update-global.ts
10
10
  const XOPC_PACKAGE_NAME = "@xopcai/xopc";
11
11
  const GLOBAL_RENAME_PREFIX = ".";
@@ -19,7 +19,7 @@ const NPM_GLOBAL_INSTALL_OMIT_OPTIONAL_FLAGS = ["--omit=optional", ...NPM_GLOBAL
19
19
  const GLOBAL_DETECT_TIMEOUT_MS = 15e3;
20
20
  async function pathExists(targetPath) {
21
21
  try {
22
- await fs.access(targetPath);
22
+ await fs$1.access(targetPath);
23
23
  return true;
24
24
  } catch {
25
25
  return false;
@@ -27,7 +27,7 @@ async function pathExists(targetPath) {
27
27
  }
28
28
  async function tryRealpath(targetPath) {
29
29
  try {
30
- return await fs.realpath(targetPath);
30
+ return await fs$1.realpath(targetPath);
31
31
  } catch {
32
32
  return path.resolve(targetPath);
33
33
  }
@@ -50,14 +50,14 @@ function resolvePreferredNpmCommand(pkgRoot) {
50
50
  const prefix = inferNpmPrefixFromPackageRoot(pkgRoot);
51
51
  if (!prefix) return null;
52
52
  const candidate = process.platform === "win32" ? path.join(prefix, "npm.cmd") : path.join(prefix, "bin", "npm");
53
- return fsSync.existsSync(candidate) ? candidate : null;
53
+ return fs.existsSync(candidate) ? candidate : null;
54
54
  }
55
55
  function resolveNpmFromExecPath() {
56
56
  const execPath = process.execPath?.trim();
57
57
  if (!execPath) return null;
58
58
  const binDir = path.dirname(execPath);
59
59
  const candidate = process.platform === "win32" ? path.join(binDir, "npm.cmd") : path.join(binDir, "npm");
60
- return fsSync.existsSync(candidate) ? candidate : null;
60
+ return fs.existsSync(candidate) ? candidate : null;
61
61
  }
62
62
  function resolvePreferredGlobalManagerCommand(manager, pkgRoot) {
63
63
  if (manager !== "npm") return manager;
@@ -206,7 +206,7 @@ async function cleanupGlobalRenameDirs(params) {
206
206
  const prefix = `${GLOBAL_RENAME_PREFIX}${name}-`;
207
207
  let entries = [];
208
208
  try {
209
- entries = await fs.readdir(root);
209
+ entries = await fs$1.readdir(root);
210
210
  } catch {
211
211
  return { removed };
212
212
  }
@@ -214,8 +214,8 @@ async function cleanupGlobalRenameDirs(params) {
214
214
  if (!entry.startsWith(prefix)) continue;
215
215
  const target = path.join(root, entry);
216
216
  try {
217
- if (!(await fs.lstat(target)).isDirectory()) continue;
218
- await fs.rm(target, {
217
+ if (!(await fs$1.lstat(target)).isDirectory()) continue;
218
+ await fs$1.rm(target, {
219
219
  recursive: true,
220
220
  force: true
221
221
  });
@@ -7,9 +7,9 @@ import { claimKnowledgeSourceItems, completeKnowledgeSourceItemSynthesis, pruneB
7
7
  import "../storage/sqlite/index.js";
8
8
  import { clearMemoryAudit } from "../user-context/memory-suppression.js";
9
9
  import { getActiveUnderstandingConsent } from "../user-context/sources/consent-repository.js";
10
- import { consentFilteredText } from "../user-context/sources/consent-fields.js";
11
10
  import { listKnowledgeItems, transitionKnowledgeStatus, writeKnowledgeItem } from "../knowledge-memory/repository.js";
12
11
  import "../knowledge-memory/index.js";
12
+ import { consentFilteredText } from "../user-context/sources/consent-fields.js";
13
13
  import { randomUUID } from "node:crypto";
14
14
  //#region src/knowledge/connected-knowledge-pipeline.ts
15
15
  init_transaction();
@@ -1,5 +1,5 @@
1
- import { KnowledgeIngestionService, SqliteKnowledgeSourceStateStore } from "./ingestion-service.js";
2
1
  import { ConnectedKnowledgePipeline } from "./connected-knowledge-pipeline.js";
2
+ import { KnowledgeIngestionService, SqliteKnowledgeSourceStateStore } from "./ingestion-service.js";
3
3
  import { startConnectedKnowledgeCoordinator } from "./coordinator.js";
4
4
  import { LocalFolderKnowledgeSourceAdapter } from "./local-folder-adapter.js";
5
5
  export { ConnectedKnowledgePipeline, KnowledgeIngestionService, LocalFolderKnowledgeSourceAdapter, SqliteKnowledgeSourceStateStore, startConnectedKnowledgeCoordinator };
@@ -1,8 +1,8 @@
1
1
  import { init_search_text, memorySearchQuery } from "./search-text.js";
2
2
  import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
3
3
  import { validateScope } from "../user-model/domain.js";
4
- import { clearMemoryAudit, isMemorySuppressed, memoryFingerprint, restoreMemory, suppressMemory } from "../user-context/memory-suppression.js";
5
4
  import { inferMemorySensitivity } from "../agent/memory/sensitivity.js";
5
+ import { clearMemoryAudit, isMemorySuppressed, memoryFingerprint, restoreMemory, suppressMemory } from "../user-context/memory-suppression.js";
6
6
  import { canUseKnowledge, knowledgeContentSources } from "./usage-policy.js";
7
7
  import { randomUUID } from "node:crypto";
8
8
  //#region src/knowledge-memory/repository.ts
@@ -1,8 +1,8 @@
1
1
  import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
2
2
  import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
3
3
  import { init_session_repository } from "../storage/sqlite/session-repository.js";
4
- import { getUnderstandingConsent } from "../user-context/sources/consent-repository.js";
5
4
  import { isOwnerIdentity } from "../user-context/identity-bindings.js";
5
+ import { getUnderstandingConsent } from "../user-context/sources/consent-repository.js";
6
6
  //#region src/knowledge-memory/usage-policy.ts
7
7
  init_transaction();
8
8
  init_session_repository();
@@ -6,10 +6,10 @@ import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "
6
6
  import { ExtensionCapabilityBindingsSchema, extensionCapabilityPermissions } from "../../packages/gateway-contract/src/extension-capabilities.js";
7
7
  import { init_src } from "../../packages/gateway-contract/src/index.js";
8
8
  import { CapabilityError } from "../capabilities/runtime/errors.js";
9
- import { slugifyProjectName } from "../projects/project-store.js";
10
- import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
11
9
  import { init_paths, resolveExtensionsDir } from "../config/paths.js";
10
+ import { slugifyProjectName } from "../projects/project-store.js";
12
11
  import { LocalAppStore } from "./store.js";
12
+ import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
13
13
  import { validateLocalAppCapabilityContracts } from "./capabilities/contracts.js";
14
14
  import { buildLocalAppFixGuidance } from "./fix-guidance.js";
15
15
  import { readLocalAppAcceptanceConfig } from "./acceptance.js";
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { CapabilityErrorCodeSchema } from "../../packages/gateway-contract/src/capabilities.js";
4
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
- import { loadConfig } from "../config/loader.js";
6
5
  import { resolveGatewayLocalClientHost } from "../config/gateway-bind.js";
6
+ import { loadConfig } from "../config/loader.js";
7
7
  import { createGatewayCredential, gatewayCredentialAuthorization } from "../gateway/credential.js";
8
8
  import { fetch } from "undici";
9
9
  //#region src/mcp/gateway-http-client.ts
@@ -1,6 +1,6 @@
1
+ import { registerMediaUnderstandingProvider } from "./registry.js";
1
2
  import { normalizeBaseUrl, postMultipartRequest } from "../media-shared/http/provider-http.js";
2
3
  import "../media-shared/http/index.js";
3
- import { registerMediaUnderstandingProvider } from "./registry.js";
4
4
  import path from "node:path";
5
5
  //#region src/media-understanding/openai-compatible-audio.ts
6
6
  /**
@@ -2,16 +2,16 @@ import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
4
  import { claimContextExtractionRun, finishContextExtractionRun } from "../storage/sqlite/context-extraction-repository.js";
5
- import { getActiveUnderstandingConsent, getUnderstandingConsent } from "../user-context/sources/consent-repository.js";
6
5
  import { init_config, resolveKnowledgeReadPolicy } from "../user-context/config.js";
6
+ import { learningPolicyHash } from "./repository.js";
7
+ import { getActiveUnderstandingConsent, getUnderstandingConsent } from "../user-context/sources/consent-repository.js";
8
+ import { resolveModelSelector } from "../config/agent-model-intents.js";
7
9
  import { init_providers, resolveModel } from "../providers/index.js";
8
10
  import { completeWithResolvedCredentials } from "../providers/model-call.js";
9
- import { getWorkspacePath } from "../config/workspace-path-helpers.js";
10
- import { resolveModelSelector } from "../config/agent-model-intents.js";
11
+ import { isLoopbackModel } from "../providers/local-model.js";
11
12
  import { ConnectedKnowledgePipeline } from "../knowledge/connected-knowledge-pipeline.js";
13
+ import { getWorkspacePath } from "../config/workspace-path-helpers.js";
12
14
  import { extractionInputHash } from "../user-context/extraction/registry.js";
13
- import { learningPolicyHash } from "./repository.js";
14
- import { isLoopbackModel } from "../providers/local-model.js";
15
15
  import { WorkCandidateSchema } from "./work-candidate.js";
16
16
  import { applyWorkCandidates } from "./work-capture.js";
17
17
  import { randomUUID } from "node:crypto";
@@ -2,10 +2,10 @@ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "
2
2
  import { createContextEvidence } from "../storage/sqlite/context-evidence-repository.js";
3
3
  import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
4
4
  import { init_session_repository } from "../storage/sqlite/session-repository.js";
5
+ import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
5
6
  import { inferMemorySensitivity } from "../agent/memory/sensitivity.js";
6
7
  import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
7
8
  import "../knowledge-memory/index.js";
8
- import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
9
9
  import { createHash } from "node:crypto";
10
10
  //#region src/memory-learning/task-receipts.ts
11
11
  init_session_repository();
@@ -1,12 +1,12 @@
1
1
  import { getNoteAgentContextRecord, upsertNoteAgentContextRecord } from "../storage/sqlite/note-agent-context-repository.js";
2
2
  import "../storage/sqlite/index.js";
3
- import { isSTTAvailable } from "../voice/stt/availability.js";
4
- import { transcribe } from "../voice/stt/transcribe-core.js";
5
- import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
6
- import "../voice/stt/index.js";
7
3
  import { extractDocumentText } from "../document-understanding/extract.js";
8
4
  import { resolveImageModelConfigForTool } from "../agent/image/tool-model-config.js";
9
5
  import { describeImagesWithFallback } from "../agent/image/understanding/runtime.js";
6
+ import { transcribe } from "../voice/stt/transcribe-core.js";
7
+ import { isSTTAvailable } from "../voice/stt/availability.js";
8
+ import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
9
+ import "../voice/stt/index.js";
10
10
  import { extname } from "node:path";
11
11
  import { readFile } from "node:fs/promises";
12
12
  //#region src/notes/agent-context.ts
@@ -1,5 +1,5 @@
1
+ import { buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
1
2
  import { resolveNoteMediaDir, resolveNotesDir } from "./paths.js";
2
3
  import { NotesStore } from "./store.js";
3
- import { buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
4
4
  import { NotesService } from "./service.js";
5
5
  export { NotesService, NotesStore, buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact, resolveNoteMediaDir, resolveNotesDir };
@@ -6,13 +6,13 @@ import { buildNoteAttachmentRef } from "./attachment-ref.js";
6
6
  import { parseNoteMarkdown } from "./note-markdown.js";
7
7
  import { listNoteProjectSummaries } from "../storage/sqlite/notes-repository.js";
8
8
  import { changedFieldsFromPatch, emitActivity, previewText, systemActivityActor, systemActivitySource } from "../activity/emitter.js";
9
- import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
10
- import { revokeNoteShareRecords } from "../share/note-share-revocation.js";
11
- import { NotesStore } from "./store.js";
12
9
  import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
13
10
  import { completeWithResolvedCredentials } from "../providers/model-call.js";
11
+ import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
14
12
  import { partitionAttachmentsByReference } from "./note-attachment-sync.js";
15
13
  import { buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
14
+ import { revokeNoteShareRecords } from "../share/note-share-revocation.js";
15
+ import { NotesStore } from "./store.js";
16
16
  import { createHash, randomUUID } from "node:crypto";
17
17
  //#region src/notes/service.ts
18
18
  init_providers();
@@ -1,10 +1,10 @@
1
1
  import { getConnectorInstallation, init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
2
2
  import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
3
+ import { isPersonalConversation } from "./repository.js";
3
4
  import { canAccessConnectorAccount, currentAccountConnections } from "../connectors/account-access.js";
4
5
  import { connectorPrincipalForSession } from "../connectors/principal.js";
5
- import { isPersonalConversation } from "./repository.js";
6
- import { assessSpecialist } from "../agent-matching/service.js";
7
6
  import { connectionCandidates, resolveConnectionCandidate } from "../connectors/connection-candidates.js";
7
+ import { assessSpecialist } from "../agent-matching/service.js";
8
8
  //#region src/personal-agent/capability-service.ts
9
9
  init_repository();
10
10
  init_connector_repository();
@@ -1,7 +1,7 @@
1
1
  import { PersonalFeedbackSchema, PersonalProactivitySettingsSchema, PersonalStrategyRollbackSchema } from "../../../packages/gateway-contract/src/personal-proactivity.js";
2
2
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
3
- import { getPersonalAgent } from "../repository.js";
4
3
  import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
4
+ import { getPersonalAgent } from "../repository.js";
5
5
  import { getProactivitySettings, listInterestCandidates, patchAttention, patchProactivitySettings, provenanceDetail, recordFeedback, rollbackStrategy, strategyState } from "./repository.js";
6
6
  import { z } from "zod";
7
7
  //#region src/personal-agent/proactivity/routes.ts
@@ -6,16 +6,16 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../../storage/sqlite/session-instance-repository.js";
7
7
  import { appendTranscriptEntry } from "../../storage/sqlite/transcript-repository.js";
8
8
  import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
9
- import { emitSessionTranscriptUpdate } from "../../session/transcript-events.js";
10
- import { getPersonalAgent } from "../repository.js";
11
- import { DurableState } from "../../storage/sqlite/durable-state.js";
9
+ import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
12
10
  import { init_providers, resolveModel } from "../../providers/index.js";
13
- import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
14
11
  import { completeWithResolvedCredentials } from "../../providers/model-call.js";
15
- import { personalConversationState } from "../conversation-state.js";
16
- import { PERSONAL_PERSONA_GUIDANCE } from "../persona.js";
17
- import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
12
+ import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
13
+ import { getPersonalAgent } from "../repository.js";
14
+ import { emitSessionTranscriptUpdate } from "../../session/transcript-events.js";
15
+ import { DurableState } from "../../storage/sqlite/durable-state.js";
18
16
  import { enqueueDue, enqueueWakeup, getAttention, getAttentionSources, getProactivitySettings, isQuiet, listAttention, localDay, preparationStrategy, recordFeedback, reserveModelCall, saveAttention, sourceFingerprint, userText } from "./repository.js";
17
+ import { PERSONAL_PERSONA_GUIDANCE } from "../persona.js";
18
+ import { personalConversationState } from "../conversation-state.js";
19
19
  import { randomUUID } from "node:crypto";
20
20
  import { z } from "zod";
21
21
  //#region src/personal-agent/proactivity/service.ts
@@ -1,16 +1,16 @@
1
1
  import { isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
2
2
  import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
3
3
  import "../storage/sqlite/index.js";
4
+ import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
5
+ import { isKnowledgeCurrent, knowledgeItemAllowed, listKnowledgeItems } from "../knowledge-memory/repository.js";
6
+ import "../knowledge-memory/index.js";
4
7
  import { getActiveAssertionForSlot } from "../user-model/repository.js";
5
- import { isPersonalConversation } from "./repository.js";
6
- import { listPersonalResults } from "./result-reader.js";
7
- import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
8
+ import { getProjectForSession } from "../projects/workspace.js";
8
9
  import { canUseAssertion } from "../user-model/usage-policy.js";
9
10
  import "../user-model/index.js";
10
- import { getProjectForSession } from "../projects/workspace.js";
11
- import { isKnowledgeCurrent, knowledgeItemAllowed, listKnowledgeItems } from "../knowledge-memory/repository.js";
12
- import "../knowledge-memory/index.js";
13
- import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
11
+ import { isPersonalConversation } from "./repository.js";
12
+ import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
13
+ import { listPersonalResults } from "./result-reader.js";
14
14
  //#region src/personal-agent/prompt-context.ts
15
15
  const clip = (value, limit) => value && (value.length > limit ? `${value.slice(0, limit - 1)}…` : value);
16
16
  /** Keep complete JSON records and identifiers, even when the snapshot is incomplete. */
@@ -1,7 +1,7 @@
1
1
  import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
2
- import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
3
2
  import { PERSONAL_EMOTIONAL_STYLE_RULE, PERSONAL_IDENTITY_CONTINUITY_RULE } from "./persona.js";
4
3
  import { PERSONAL_COMMUNICATION_RULES, PERSONAL_RELIABILITY_RULES } from "./communication.js";
4
+ import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
5
5
  //#region src/personal-agent/prompts.ts
6
6
  const DELEGATION_RULES = [
7
7
  "Answer directly when your capabilities suffice. Otherwise call personal_task(command=\"submit\") with a short objective. For a self-contained current request send {command:\"submit\", objective:\"short outcome\", useOriginalRequest:true}; command is required. With this mode, the host copies its entire stored text, including exact constraints. Preserve sourceRefs and explicitly requested Agent/Skills. Use a concise complete description instead when earlier conversation must be synthesized. Submit before reading materials. The background Task Router selects and starts the executor. After the tool succeeds, reply only with a short confirmation such as \"Submitted; I will report the result here.\" in the conversation language, then finish. Do not restate any task details, files, requirements or acceptance criteria, and do not wait for the worker. Remain available for conversation.",
@@ -10,23 +10,23 @@ import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sql
10
10
  import { getSessionConfig } from "../storage/sqlite/config-repository.js";
11
11
  import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
12
12
  import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
13
- import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
13
+ import { init_providers, resolveModel } from "../providers/index.js";
14
+ import { completeWithResolvedCredentials } from "../providers/model-call.js";
15
+ import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
14
16
  import { getPersonalAgentByConversation } from "./repository.js";
15
- import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
17
+ import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
16
18
  import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
17
- import { TaskCriterionReviewRepository } from "../tasks/task-criterion-review-repository.js";
19
+ import { loadProfileBootstrapFiles } from "../agent/bootstrap/load-bootstrap-files.js";
20
+ import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
18
21
  import { hasPersonalResultFileLinks, sanitizePersonalResultFileLinks } from "./result-file-links.js";
19
22
  import { taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
20
- import { init_providers, resolveModel } from "../providers/index.js";
21
- import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
22
- import { completeWithResolvedCredentials } from "../providers/model-call.js";
23
- import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
24
- import { recordPersonalPerformance } from "./performance.js";
25
23
  import "../tasks/task-research-result.js";
24
+ import { recordPersonalPerformance } from "./performance.js";
25
+ import { PERSONAL_DEFAULT_STYLE_RULES } from "./default-style.js";
26
+ import { PERSONAL_PERSONA_GUIDANCE } from "./persona.js";
26
27
  import { PERSONAL_REPLY_EXAMPLES, PERSONAL_REPLY_STYLE_RULES } from "./reply-style.js";
28
+ import { TaskCriterionReviewRepository } from "../tasks/task-criterion-review-repository.js";
27
29
  import { personalConversationState } from "./conversation-state.js";
28
- import { PERSONAL_PERSONA_GUIDANCE } from "./persona.js";
29
- import { loadProfileBootstrapFiles } from "../agent/bootstrap/load-bootstrap-files.js";
30
30
  import { randomUUID } from "node:crypto";
31
31
  import { z } from "zod";
32
32
  //#region src/personal-agent/reply-composer.ts
@@ -7,11 +7,11 @@ import { init_session_instance_repository, readCurrentTranscriptId } from "../st
7
7
  import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
8
8
  import { getPersonalRequest, init_request_repository, updatePersonalRequest } from "./request-repository.js";
9
9
  import { appendTranscriptEntry, loadLlmMessagesForSession } from "../storage/sqlite/transcript-repository.js";
10
- import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
11
10
  import { getPersonalAgentByConversation } from "./repository.js";
11
+ import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
12
12
  import { warmPersonalResult } from "./result-reader.js";
13
- import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
14
13
  import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
14
+ import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
15
15
  import { PersonalRequestResultSchema, renderPersonalRequestResult } from "./request-result.js";
16
16
  import { enqueuePersonalReply } from "./reply-composer.js";
17
17
  //#region src/personal-agent/request-delivery.ts
@@ -12,21 +12,21 @@ import { getConnectorAccount, init_connector_account_repository } from "../stora
12
12
  import { getConnectorConnection, getConnectorInstallation, init_connector_repository, listConnectorConnections } from "../storage/sqlite/connector-repository.js";
13
13
  import { cancelConnectionObjective, init_connection_wait_repository, publishConnectionWait, requireSessionConnection } from "../storage/sqlite/connection-wait-repository.js";
14
14
  import { getUserProfileSnapshot } from "../user-model/profile.js";
15
+ import { isPersonalConversation } from "./repository.js";
15
16
  import { resolveTaskLocale } from "../tasks/task-language.js";
16
17
  import { canAccessConnectorAccount } from "../connectors/account-access.js";
17
18
  import { connectorPrincipalForSession } from "../connectors/principal.js";
18
- import { isPersonalConversation } from "./repository.js";
19
- import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
20
- import { TaskApplicationService } from "../tasks/task-application-service.js";
21
- import { AgentSelectionRepository, selectionRequestHash } from "../agent-matching/selection-repository.js";
22
- import { assessSpecialist } from "../agent-matching/service.js";
23
- import { assertSpecialistEligible } from "../agent-matching/delegation-service.js";
24
19
  import { resolveConnectionCandidate } from "../connectors/connection-candidates.js";
20
+ import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
25
21
  import { defineTaskContract } from "../tasks/task-contract-definition.js";
26
- import { personalCapabilities } from "./capability-service.js";
22
+ import { abortEmbeddedRun } from "../agent/embedded/runs.js";
27
23
  import { PERSONAL_WORKER_RESULT_GUIDANCE } from "./communication.js";
28
24
  import { resolveResponseLanguageForSession } from "../agent/prompt/response-language.js";
29
- import { abortEmbeddedRun } from "../agent/embedded/runs.js";
25
+ import { TaskApplicationService } from "../tasks/task-application-service.js";
26
+ import { assessSpecialist } from "../agent-matching/service.js";
27
+ import { personalCapabilities } from "./capability-service.js";
28
+ import { AgentSelectionRepository, selectionRequestHash } from "../agent-matching/selection-repository.js";
29
+ import { assertSpecialistEligible } from "../agent-matching/delegation-service.js";
30
30
  import { createHash, randomUUID } from "node:crypto";
31
31
  //#region src/personal-agent/request-service.ts
32
32
  init_src();
@@ -7,10 +7,10 @@ import { init_session_instance_repository, readCurrentTranscriptId } from "../st
7
7
  import { init_request_repository, personalRequestForTask } from "./request-repository.js";
8
8
  import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
9
9
  import { getConnectorConnection, getConnectorInstallation, init_connector_repository } from "../storage/sqlite/connector-repository.js";
10
+ import { isPersonalConversation } from "./repository.js";
10
11
  import { canAccessConnectorAccount } from "../connectors/account-access.js";
11
12
  import { connectorPrincipalForSession } from "../connectors/principal.js";
12
13
  import { resolveMediaReference } from "../media/media-reference.js";
13
- import { isPersonalConversation } from "./repository.js";
14
14
  import { createRequire } from "node:module";
15
15
  import { existsSync } from "node:fs";
16
16
  import { fileURLToPath } from "node:url";
@@ -4,8 +4,8 @@ import { setSessionConfig } from "../storage/sqlite/config-repository.js";
4
4
  import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
5
5
  import { AgentCatalogService } from "../agent-catalog/service.js";
6
6
  import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
7
- import { getPersonalAgent, personalAgentId } from "./repository.js";
8
7
  import { getAvailableModels, init_providers } from "../providers/index.js";
8
+ import { getPersonalAgent, personalAgentId } from "./repository.js";
9
9
  import { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES } from "./policy.js";
10
10
  import { getModelThinking } from "../providers/model-thinking.js";
11
11
  import { personalInstructions } from "./prompts.js";
@@ -6,8 +6,8 @@ import { TaskRepository, init_task_repository } from "../tasks/task-repository.j
6
6
  import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
7
7
  import { TaskAllocationRepository } from "../tasks/task-allocation-repository.js";
8
8
  import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
9
- import { TaskApplicationService } from "../tasks/task-application-service.js";
10
9
  import { abortEmbeddedRun, getEmbeddedRunByConversationId } from "../agent/embedded/runs.js";
10
+ import { TaskApplicationService } from "../tasks/task-application-service.js";
11
11
  //#region src/personal-agent/task-cancel.ts
12
12
  init_transaction();
13
13
  init_task_repository();
@@ -1,6 +1,6 @@
1
1
  import { PhoneDeviceSchema, PhoneError, init_contracts } from "./contracts.js";
2
- import { DurableState } from "../storage/sqlite/durable-state.js";
3
2
  import { normalizePhoneAppAccess } from "./app-access.js";
3
+ import { DurableState } from "../storage/sqlite/durable-state.js";
4
4
  import { randomUUID } from "node:crypto";
5
5
  //#region src/phone/repository.ts
6
6
  init_contracts();
@@ -3,10 +3,6 @@ import { init_logger } from "../utils/logger.js";
3
3
  import { MOCK_PHONE_MODEL, PhoneError, PhoneInputSchema, init_contracts } from "./contracts.js";
4
4
  import { resolveEffectiveAgentConfigForAgent } from "../config/agent-profile.js";
5
5
  import { phoneAllowsApp, phoneAppAccess } from "./app-access.js";
6
- import { advancePhonePlan, buildPhonePlan, createPhonePlanState } from "./planning.js";
7
- import { canDispatchPhoneAction, observationSignature, phoneCompletionSatisfied } from "./reliability.js";
8
- import { groundPhoneCoordinateAction, resolvePhoneSemanticAction } from "./semantic-controls.js";
9
- import { createPhoneModel, isAboutScreen } from "./model-adapter.js";
10
6
  import { nativePhoneOutput, updatePhoneFeedback } from "./task-feedback.js";
11
7
  import { PhoneFrameCache, PhoneOperationBudget } from "./live-state.js";
12
8
  import { PhoneInteractiveSession } from "./interactive-session.js";
@@ -14,6 +10,10 @@ import { LocalScrcpyProvider } from "./scrcpy.js";
14
10
  import { AdbPhoneDriver, resolveAdbPath } from "./adb-driver.js";
15
11
  import { CloudPhones } from "./cloud-phones.js";
16
12
  import { WirelessPhones } from "./wireless.js";
13
+ import { advancePhonePlan, buildPhonePlan, createPhonePlanState } from "./planning.js";
14
+ import { canDispatchPhoneAction, observationSignature, phoneCompletionSatisfied } from "./reliability.js";
15
+ import { groundPhoneCoordinateAction, resolvePhoneSemanticAction } from "./semantic-controls.js";
16
+ import { createPhoneModel, isAboutScreen } from "./model-adapter.js";
17
17
  import { PhoneRepository } from "./repository.js";
18
18
  import { confirmPhoneFocusRecovery, phoneBackRecovery, phoneUnfocusedTypingHint, preparePhoneFocusRecovery } from "./recovery.js";
19
19
  import { createPhoneNumericEntry, nextPhoneNumericEntry } from "./numeric-entry.js";
@@ -1,4 +1,5 @@
1
1
  import { ProjectStore, slugifyProjectName } from "./project-store.js";
2
+ import { getProjectForSession, getProjectWorkspacePathForSession, resolveProjectWorkspacePath } from "./workspace.js";
2
3
  import { ProjectWorkspaceConflictError, ProjectWorkspaceMissingError, canonicalWorkspacePath, ensureWorkspaceDirectory, inferProjectNameFromWorkspaceRoot, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, resolveWorkspaceProjectRoot, workspaceDirectoryExists } from "./workspace-project.js";
3
4
  import { inferProjectExecutionMode, inferProjectKind } from "./project-kind.js";
4
5
  import { bindSessionToProject, bindSessionsToProject, listProjectConversationIds, moveSessionToProject, unbindSessionFromProject } from "./session-bind.js";
@@ -9,5 +10,4 @@ import { CODING_PROJECT_AGENT_ID, inferSuggestedProjectDefaultAgentId, suggestPr
9
10
  import { buildProjectLoopOverview } from "./project-loop.js";
10
11
  import { bindAutomationToProject } from "./automation-bind.js";
11
12
  import { bindKnowledgeItemToProject } from "./knowledge-bind.js";
12
- import { getProjectForSession, getProjectWorkspacePathForSession, resolveProjectWorkspacePath } from "./workspace.js";
13
13
  export { CODING_PROJECT_AGENT_ID, ProjectDeletionBlockedError, ProjectService, ProjectSkillError, ProjectSkillService, ProjectStore, ProjectWorkspaceConflictError, ProjectWorkspaceInUseError, ProjectWorkspaceInvalidError, ProjectWorkspaceMissingError, bindAutomationToProject, bindKnowledgeItemToProject, bindSessionToProject, bindSessionsToProject, buildProjectLoopOverview, canonicalWorkspacePath, ensureWorkspaceDirectory, getProjectForSession, getProjectWorkspacePathForSession, inferProjectExecutionMode, inferProjectKind, inferProjectNameFromWorkspaceRoot, inferSuggestedProjectDefaultAgentId, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, isValidProjectAgentId, listProjectConversationIds, moveSessionToProject, normalizeProjectAgentId, resolveProjectAgentId, resolveProjectWorkspacePath, resolveWorkspaceProjectRoot, slugifyProjectName, suggestProjectDefaultAgentId, unbindSessionFromProject, workspaceDirectoryExists };
@@ -1,5 +1,5 @@
1
- import { inferProjectKind } from "./project-kind.js";
2
1
  import { agentExists, init_resolve_route } from "../routing/resolve-route.js";
2
+ import { inferProjectKind } from "./project-kind.js";
3
3
  //#region src/projects/project-agent-suggestion.ts
4
4
  init_resolve_route();
5
5
  const CODING_PROJECT_AGENT_ID = "coder";