@amoree-code/ocean 2.22.0 → 3.0.0

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 (382) hide show
  1. package/README.md +46 -53
  2. package/dist/application/clients/bundles.js +220 -0
  3. package/dist/application/clients/chat-plugin.js +4 -42
  4. package/dist/application/clients/client-detect.js +291 -0
  5. package/dist/application/clients/clients.js +104 -25
  6. package/dist/application/clients/desktop-link.js +40 -0
  7. package/dist/application/clients/desktop-watcher.js +6 -4
  8. package/dist/application/clients/hook-trust.js +106 -0
  9. package/dist/application/clients/hooks.js +7 -1
  10. package/dist/application/clients/mcp-schema-cost.js +74 -0
  11. package/dist/application/clients/native.js +38 -2
  12. package/dist/application/clients/registry.js +51 -9
  13. package/dist/application/clients/status.js +7 -2
  14. package/dist/application/clients/zip.js +44 -0
  15. package/dist/application/gateway/webhook-gateway.js +1 -1
  16. package/dist/application/integrations/charter-copies.js +1 -1
  17. package/dist/application/integrations/engine-entry-repair.js +4 -3
  18. package/dist/application/integrations/skill-auto-sync.js +2 -2
  19. package/dist/application/integrations/skill-filter.js +1 -1
  20. package/dist/application/integrations/skill-router.js +134 -90
  21. package/dist/application/layout/layout-apply.js +1 -1
  22. package/dist/application/layout/workspace-template.js +1 -1
  23. package/dist/application/onboarding/steps.js +121 -30
  24. package/dist/application/profiles/profile-doctor.js +118 -0
  25. package/dist/application/profiles/profile-migration-service.js +208 -0
  26. package/dist/application/profiles/profile-suggestion.js +3 -7
  27. package/dist/application/profiles/profile-upgrade-service.js +98 -86
  28. package/dist/application/pull/history-index.js +1 -1
  29. package/dist/application/pull/project-match.js +3 -3
  30. package/dist/application/pull/pull.js +1 -1
  31. package/dist/application/pull/server-capture.js +92 -9
  32. package/dist/application/scheduler/local-scheduler.js +2 -2
  33. package/dist/application/spend/claude-prices.js +55 -0
  34. package/dist/application/spend/claude-spend.js +365 -0
  35. package/dist/application/uninstall/uninstall.js +25 -3
  36. package/dist/application/upkeep/nightly-upkeep.js +4 -4
  37. package/dist/composition/runtime.js +2 -2
  38. package/dist/infrastructure/desktop/claude-export.js +1 -1
  39. package/dist/infrastructure/desktop/desktop-chat.js +60 -13
  40. package/dist/infrastructure/desktop/indexeddb.js +4 -4
  41. package/dist/infrastructure/desktop/leveldb.js +2 -2
  42. package/dist/infrastructure/filesystem/profile-loader.js +3 -45
  43. package/dist/infrastructure/filesystem/runtime-config-loader.js +1 -1
  44. package/dist/infrastructure/observability/runtime-logger.js +1 -1
  45. package/dist/infrastructure/process/agent-tool-executor.js +3 -3
  46. package/dist/infrastructure/process/process-supervisor.js +1 -1
  47. package/dist/infrastructure/process/service.js +8 -8
  48. package/dist/infrastructure/providers/openai-compatible.js +2 -2
  49. package/dist/infrastructure/providers/provider-invocation.js +1 -1
  50. package/dist/infrastructure/providers/session-facts-completer.js +78 -5
  51. package/dist/interfaces/cli/auth-command.js +2 -2
  52. package/dist/interfaces/cli/brief-command.js +1 -1
  53. package/dist/interfaces/cli/browser-command.js +6 -6
  54. package/dist/interfaces/cli/browser-findings.js +6 -9
  55. package/dist/interfaces/cli/browser-settings.js +10 -10
  56. package/dist/interfaces/cli/capture-command.js +6 -6
  57. package/dist/interfaces/cli/client-test-command.js +3 -3
  58. package/dist/interfaces/cli/clients-command.js +55 -6
  59. package/dist/interfaces/cli/command-aliases.js +56 -0
  60. package/dist/interfaces/cli/command-registry.js +48 -1414
  61. package/dist/interfaces/cli/commands/browser.js +5 -0
  62. package/dist/interfaces/cli/commands/capture.js +19 -0
  63. package/dist/interfaces/cli/commands/catalog.js +9 -0
  64. package/dist/interfaces/cli/commands/client.js +135 -0
  65. package/dist/interfaces/cli/commands/clients.js +33 -0
  66. package/dist/interfaces/cli/commands/connectors.js +14 -0
  67. package/dist/interfaces/cli/commands/context.js +9 -0
  68. package/dist/interfaces/cli/commands/cost.js +15 -0
  69. package/dist/interfaces/cli/commands/daily.js +11 -0
  70. package/dist/interfaces/cli/commands/day.js +25 -0
  71. package/dist/interfaces/cli/commands/dispatch.js +31 -0
  72. package/dist/interfaces/cli/commands/doctor.js +60 -0
  73. package/dist/interfaces/cli/commands/env.js +5 -0
  74. package/dist/interfaces/cli/commands/gateway.js +16 -0
  75. package/dist/interfaces/cli/commands/handoff.js +11 -0
  76. package/dist/interfaces/cli/commands/health.js +17 -0
  77. package/dist/interfaces/cli/commands/hook.js +142 -0
  78. package/dist/interfaces/cli/commands/idea.js +11 -0
  79. package/dist/interfaces/cli/commands/install.js +31 -0
  80. package/dist/interfaces/cli/commands/intent.js +14 -0
  81. package/dist/interfaces/cli/commands/intercept.js +22 -0
  82. package/dist/interfaces/cli/commands/layout.js +11 -0
  83. package/dist/interfaces/cli/commands/lifecycle.js +5 -0
  84. package/dist/interfaces/cli/commands/loop.js +73 -0
  85. package/dist/interfaces/cli/commands/market.js +11 -0
  86. package/dist/interfaces/cli/commands/mcp.js +57 -0
  87. package/dist/interfaces/cli/commands/memory.js +5 -0
  88. package/dist/interfaces/cli/commands/migrate.js +5 -0
  89. package/dist/interfaces/cli/commands/observe.js +11 -0
  90. package/dist/interfaces/cli/commands/obsidian.js +111 -0
  91. package/dist/interfaces/cli/commands/operate.js +7 -0
  92. package/dist/interfaces/cli/commands/policy.js +16 -0
  93. package/dist/interfaces/cli/commands/project.js +207 -0
  94. package/dist/interfaces/cli/commands/repair.js +20 -0
  95. package/dist/interfaces/cli/commands/run.js +52 -0
  96. package/dist/interfaces/cli/commands/schedule.js +58 -0
  97. package/dist/interfaces/cli/commands/service.js +21 -0
  98. package/dist/interfaces/cli/commands/session.js +182 -0
  99. package/dist/interfaces/cli/commands/sessions.js +12 -0
  100. package/dist/interfaces/cli/commands/setup.js +21 -0
  101. package/dist/interfaces/cli/commands/skill.js +159 -0
  102. package/dist/interfaces/cli/commands/tasks.js +10 -0
  103. package/dist/interfaces/cli/commands/update-remove.js +25 -0
  104. package/dist/interfaces/cli/connectors-command.js +150 -0
  105. package/dist/interfaces/cli/context-command.js +39 -3
  106. package/dist/interfaces/cli/cost-command.js +104 -0
  107. package/dist/interfaces/cli/curator-command.js +1 -1
  108. package/dist/interfaces/cli/daily-command.js +7 -1
  109. package/dist/interfaces/cli/desktop-command.js +43 -7
  110. package/dist/interfaces/cli/distill-command.js +7 -2
  111. package/dist/interfaces/cli/express-command.js +1 -1
  112. package/dist/interfaces/cli/failures-command.js +4 -4
  113. package/dist/interfaces/cli/gateway-findings.js +2 -2
  114. package/dist/interfaces/cli/governance-command.js +23 -16
  115. package/dist/interfaces/cli/handoff-command.js +1 -1
  116. package/dist/interfaces/cli/harvest-command.js +2 -2
  117. package/dist/interfaces/cli/help-command.js +53 -169
  118. package/dist/interfaces/cli/hygiene-command.js +1 -1
  119. package/dist/interfaces/cli/idea-command.js +1 -1
  120. package/dist/interfaces/cli/intercept-command.js +8 -7
  121. package/dist/interfaces/cli/interests-command.js +1 -1
  122. package/dist/interfaces/cli/layout-command.js +2 -0
  123. package/dist/interfaces/cli/market-command.js +9 -9
  124. package/dist/interfaces/cli/mcp-gateway-command.js +124 -7
  125. package/dist/interfaces/cli/mcp-probe-command.js +186 -0
  126. package/dist/interfaces/cli/mcp-status-command.js +5 -5
  127. package/dist/interfaces/cli/memory-command.js +41 -7
  128. package/dist/interfaces/cli/migrate-command.js +2 -2
  129. package/dist/interfaces/cli/note-command.js +1 -1
  130. package/dist/interfaces/cli/onboard-command.js +14 -0
  131. package/dist/interfaces/cli/operate-command.js +5 -5
  132. package/dist/interfaces/cli/profiles-command.js +61 -1
  133. package/dist/interfaces/cli/rhythm-command.js +11 -5
  134. package/dist/interfaces/cli/running-server-findings.js +1 -1
  135. package/dist/interfaces/cli/scorecard-command.js +8 -8
  136. package/dist/interfaces/cli/session-facts-command.js +2 -2
  137. package/dist/interfaces/cli/sessions-command.js +145 -0
  138. package/dist/interfaces/cli/setup-command.js +15 -2
  139. package/dist/interfaces/cli/tasks-command.js +63 -13
  140. package/dist/interfaces/cli/telemetry-command.js +4 -4
  141. package/dist/interfaces/cli/uninstall-command.js +1 -1
  142. package/dist/interfaces/cli/week-failures.js +32 -0
  143. package/dist/main.js +12 -0
  144. package/node_modules/@ocean/brain/dist/{infrastructure/brain/brain-index.js → brain-index.js} +2 -2
  145. package/node_modules/@ocean/brain/dist/{brain/brain-markdown.js → brain-markdown.js} +1 -1
  146. package/node_modules/@ocean/brain/dist/{brain/brain-service.js → brain-service.js} +12 -2
  147. package/node_modules/@ocean/brain/dist/memory/brain-dump.js +92 -16
  148. package/node_modules/@ocean/brain/dist/memory/extraction-log.js +125 -0
  149. package/node_modules/@ocean/brain/dist/memory/extraction-retry.js +54 -0
  150. package/node_modules/@ocean/brain/dist/memory/fact-routing.js +44 -1
  151. package/node_modules/@ocean/brain/dist/memory/lesson-activation.js +2 -2
  152. package/node_modules/@ocean/brain/dist/memory/lesson-learning.js +2 -2
  153. package/node_modules/@ocean/brain/dist/memory/lessons.js +1 -1
  154. package/node_modules/@ocean/brain/dist/memory/memory-audit.js +2 -2
  155. package/node_modules/@ocean/brain/dist/memory/memory-harvest.js +1 -1
  156. package/node_modules/@ocean/brain/dist/memory/memory-paths.js +8 -0
  157. package/node_modules/@ocean/brain/dist/memory/memory-review.js +31 -3
  158. package/node_modules/@ocean/brain/dist/memory/memory-trash.js +29 -0
  159. package/node_modules/@ocean/brain/dist/memory/memory-write.js +4 -2
  160. package/node_modules/@ocean/brain/dist/memory/model-narrative.js +2 -2
  161. package/node_modules/@ocean/brain/dist/memory/profile-facts.js +1 -1
  162. package/node_modules/@ocean/brain/dist/memory/routing.json +6 -6
  163. package/node_modules/@ocean/{market/dist/skills → brain/dist/memory}/signal-detection.js +1 -1
  164. package/node_modules/@ocean/brain/dist/{memory → people}/people.js +1 -1
  165. package/node_modules/@ocean/brain/dist/sessions-capture/session-facts.js +625 -0
  166. package/node_modules/@ocean/brain/dist/{memory → sessions-capture}/session-promotion.js +7 -15
  167. package/node_modules/@ocean/brain/dist/{memory → sessions-capture}/session-summary.js +1 -1
  168. package/node_modules/@ocean/brain/dist/sessions-capture/session-triage.js +52 -0
  169. package/node_modules/@ocean/brain/package.json +1 -1
  170. package/node_modules/@ocean/connect/dist/connectors/connector-hub.js +173 -0
  171. package/node_modules/@ocean/{market → connect}/dist/install/default-marketplace.js +6 -2
  172. package/node_modules/@ocean/{market → connect}/dist/install/marketplace-service.js +1 -1
  173. package/node_modules/@ocean/connect/dist/mcp/mcp-gateway.js +987 -0
  174. package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-launch.js +102 -5
  175. package/node_modules/@ocean/{market → connect}/dist/registry/official-registry.js +1 -1
  176. package/node_modules/@ocean/{market → connect}/dist/security/permissions.js +1 -1
  177. package/node_modules/@ocean/{market → connect}/dist/skills/skill-hub.js +104 -6
  178. package/node_modules/@ocean/{market → connect}/package.json +2 -2
  179. package/node_modules/@ocean/context/dist/{context/context-ladder.js → context-ladder.js} +3 -3
  180. package/node_modules/@ocean/context/dist/{context/context-references.js → context-references.js} +5 -4
  181. package/node_modules/@ocean/context/dist/{context/context-cost.js → context-size.js} +6 -6
  182. package/node_modules/@ocean/context/dist/{context/intent-router.js → intent-router.js} +1 -1
  183. package/node_modules/@ocean/context/dist/{context/resource-injection.js → resource-injection.js} +3 -1
  184. package/node_modules/@ocean/context/package.json +1 -1
  185. package/node_modules/@ocean/core/dist/domain/brain/brain-record.js +1 -1
  186. package/node_modules/@ocean/core/dist/domain/capabilities/capability-manifest.js +5 -5
  187. package/node_modules/@ocean/core/dist/domain/connector-entry.js +86 -0
  188. package/node_modules/@ocean/core/dist/domain/context/context.js +1 -1
  189. package/node_modules/@ocean/core/dist/domain/context/project-id.js +8 -2
  190. package/node_modules/@ocean/core/dist/domain/{evidence/evidence.js → evidence.js} +1 -1
  191. package/node_modules/@ocean/core/dist/domain/mcp/memory-contract.js +4 -1
  192. package/node_modules/@ocean/core/dist/domain/ports/brain-index-port.js +1 -1
  193. package/node_modules/@ocean/core/dist/domain/profiles/profile-markdown.js +40 -0
  194. package/node_modules/@ocean/core/dist/domain/profiles/profile-resolution.js +276 -0
  195. package/node_modules/@ocean/core/dist/domain/profiles/profile-selection.js +23 -60
  196. package/node_modules/@ocean/core/dist/domain/profiles/profile-upgrade.js +2 -2
  197. package/node_modules/@ocean/core/dist/domain/profiles/profile.js +66 -6
  198. package/node_modules/@ocean/core/dist/domain/profiles/runtime-config.js +1 -1
  199. package/node_modules/@ocean/core/dist/domain/runs/agent-tools.js +2 -2
  200. package/node_modules/@ocean/core/dist/domain/sessions/session-identity.js +53 -0
  201. package/node_modules/@ocean/core/dist/domain/sessions/session-metadata.js +208 -0
  202. package/node_modules/@ocean/core/dist/domain/{tasks/task-id.js → task-id.js} +2 -2
  203. package/node_modules/@ocean/core/dist/profiles/profile-files.js +57 -0
  204. package/node_modules/@ocean/core/dist/profiles/profile-loader.js +97 -0
  205. package/node_modules/@ocean/core/dist/profiles/project-profile-fill.js +33 -0
  206. package/node_modules/@ocean/core/dist/profiles/session-profile.js +158 -0
  207. package/node_modules/@ocean/core/dist/shared/charter.js +110 -0
  208. package/node_modules/@ocean/core/dist/shared/context-ack.js +1 -1
  209. package/node_modules/@ocean/core/dist/shared/context-triggers.js +67 -0
  210. package/node_modules/@ocean/core/dist/shared/paths.js +6 -6
  211. package/node_modules/@ocean/core/dist/shared/project-legacy.js +232 -0
  212. package/node_modules/@ocean/core/dist/shared/project-manifest.js +308 -0
  213. package/node_modules/@ocean/core/dist/shared/project-names.js +87 -0
  214. package/node_modules/@ocean/core/dist/shared/project-register.js +560 -0
  215. package/node_modules/@ocean/core/dist/shared/project-resolution.js +83 -861
  216. package/node_modules/@ocean/core/dist/shared/repo-signals.js +45 -0
  217. package/node_modules/@ocean/core/dist/shared/task-reference.js +1 -1
  218. package/node_modules/@ocean/core/dist/shared/text-tokens.js +37 -0
  219. package/node_modules/@ocean/core/dist/shared/tool-groups.js +224 -0
  220. package/node_modules/@ocean/core/package.json +4 -1
  221. package/node_modules/@ocean/services/dist/day/day.js +45 -3
  222. package/node_modules/@ocean/services/dist/{distill → day}/distill.js +29 -3
  223. package/node_modules/@ocean/services/dist/{harvest → day}/harvest.js +54 -14
  224. package/node_modules/@ocean/services/dist/{brief → day}/interest-discovery.js +3 -3
  225. package/node_modules/@ocean/services/dist/day/note.js +2 -2
  226. package/node_modules/@ocean/services/dist/{onboarding → day}/onboarding.js +1 -1
  227. package/node_modules/@ocean/services/dist/day/patterns.js +68 -0
  228. package/node_modules/@ocean/services/dist/{curator → health}/curator.js +5 -5
  229. package/node_modules/@ocean/services/dist/{journey → health}/failures.js +7 -5
  230. package/node_modules/@ocean/services/dist/{hygiene → health}/hygiene.js +2 -2
  231. package/node_modules/@ocean/services/dist/{journey → health}/lesson-effect.js +1 -1
  232. package/node_modules/@ocean/services/dist/{scorecard → health}/scorecard.js +3 -3
  233. package/node_modules/@ocean/services/dist/{upkeep → health}/upkeep.js +2 -2
  234. package/node_modules/@ocean/services/dist/{doctor → health}/workspace-doctor.js +57 -17
  235. package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-session.js +1 -1
  236. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/call-ledger.js +3 -0
  237. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/mcp-client.js +19 -3
  238. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/obsidian-server.js +4 -4
  239. package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/ocean-server.js +423 -34
  240. package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/conflict-log.js +1 -1
  241. package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/folder-templates.js +8 -5
  242. package/node_modules/@ocean/services/dist/projects/project-doctor.js +173 -0
  243. package/node_modules/@ocean/services/dist/projects/project-snippet.js +9 -0
  244. package/node_modules/@ocean/services/dist/projects/projects-overview.js +2 -2
  245. package/node_modules/@ocean/services/package.json +1 -1
  246. package/node_modules/@ocean/{loop/dist/loops → work/dist/runs}/guard-runtime.js +3 -3
  247. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/memory-knowledge-operations.js +4 -12
  248. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/operation-contract.js +2 -2
  249. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/project-operations.js +2 -1
  250. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/task-operations.js +4 -4
  251. package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/write-guard.js +1 -1
  252. package/node_modules/@ocean/{loop → work}/dist/runs/prompt-assembly.js +2 -2
  253. package/node_modules/@ocean/{loop → work}/dist/runs/run-agent.js +4 -4
  254. package/node_modules/@ocean/{loop → work}/dist/runs/tool-loop.js +4 -4
  255. package/node_modules/@ocean/work/dist/sessions/hooks/desktop-facts.js +309 -0
  256. package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-end-hook.js +36 -5
  257. package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-facts-hook.js +144 -14
  258. package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-start-hook.js +129 -12
  259. package/node_modules/@ocean/work/dist/sessions/hooks/start-brief.js +110 -0
  260. package/node_modules/@ocean/work/dist/sessions/hooks/unlinked-warning.js +68 -0
  261. package/node_modules/@ocean/{loop → work}/dist/sessions/session-closeout.js +4 -4
  262. package/node_modules/@ocean/{loop → work}/dist/sessions/session-projects.js +13 -3
  263. package/node_modules/@ocean/work/dist/sessions/session-relink.js +300 -0
  264. package/node_modules/@ocean/{loop → work}/dist/sessions/session-retention.js +1 -1
  265. package/node_modules/@ocean/{loop → work}/dist/tasks/list-tasks.js +7 -2
  266. package/node_modules/@ocean/{loop → work}/dist/tasks/renumber-tasks.js +4 -2
  267. package/node_modules/@ocean/{loop → work}/dist/tasks/session-task.js +2 -2
  268. package/node_modules/@ocean/{loop → work}/dist/tasks/sync-task-prs.js +77 -7
  269. package/node_modules/@ocean/work/dist/tasks/task-git.js +63 -0
  270. package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/task-loop.js +4 -4
  271. package/node_modules/@ocean/{loop → work}/dist/tasks/verification-readiness.js +1 -1
  272. package/node_modules/@ocean/{loop → work}/dist/tasks/verify-task.js +1 -1
  273. package/node_modules/@ocean/{loop → work}/package.json +2 -2
  274. package/ocean-marketplace.json +41 -41
  275. package/package.json +12 -11
  276. package/skills/core/daily-harvest/SKILL.md +1 -1
  277. package/skills/core/ocean-memory/SKILL.md +4 -0
  278. package/skills/core/use-browser/SKILL.md +30 -7
  279. package/skills/index.json +1 -1
  280. package/templates/profiles/default.md +44 -0
  281. package/templates/profiles/developer.md +45 -0
  282. package/templates/profiles/reviewer.md +44 -0
  283. package/templates/profiles/strategist.md +44 -0
  284. package/templates/profiles-v3/analysis.md +16 -0
  285. package/templates/profiles-v3/backend.md +16 -0
  286. package/templates/profiles-v3/base.md +57 -0
  287. package/templates/profiles-v3/code-review.md +16 -0
  288. package/templates/profiles-v3/devops.md +16 -0
  289. package/templates/profiles-v3/docs-office.md +16 -0
  290. package/templates/profiles-v3/frontend.md +16 -0
  291. package/templates/profiles-v3/learning.md +16 -0
  292. package/templates/profiles-v3/marketing-ads.md +16 -0
  293. package/templates/profiles-v3/marketing-content-seo.md +16 -0
  294. package/templates/profiles-v3/ocean-ops.md +16 -0
  295. package/templates/profiles-v3/product-strategy.md +16 -0
  296. package/templates/profiles-v3/qa-testing.md +16 -0
  297. package/templates/profiles-v3/security.md +16 -0
  298. package/templates/workspace/MANIFEST.json +1 -0
  299. package/templates/workspace/charter/core.md +22 -90
  300. package/templates/workspace/charter/policies/README.md +7 -1
  301. package/templates/workspace/charter/policies/claude-code-context.md +6 -1
  302. package/templates/workspace/charter/policies/concise-output.md +5 -0
  303. package/templates/workspace/charter/policies/context.md +5 -0
  304. package/templates/workspace/charter/policies/contracts/task.md +2 -2
  305. package/templates/workspace/charter/policies/git.md +5 -0
  306. package/templates/workspace/charter/policies/graph.md +6 -1
  307. package/templates/workspace/charter/policies/knowledge.md +11 -4
  308. package/templates/workspace/charter/policies/layout.md +23 -0
  309. package/templates/workspace/charter/policies/lifecycle.md +5 -0
  310. package/templates/workspace/charter/policies/memory.md +5 -0
  311. package/templates/workspace/charter/policies/minimal-change.md +5 -0
  312. package/templates/workspace/charter/policies/models.md +5 -0
  313. package/templates/workspace/charter/policies/response.md +5 -0
  314. package/templates/workspace/charter/policies/skill-observer.md +12 -0
  315. package/templates/workspace/charter/policies/stack.md +5 -0
  316. package/templates/workspace/charter/policies/task.md +17 -3
  317. package/templates/workspace/charter/policies/verification.md +5 -0
  318. package/node_modules/@ocean/brain/dist/evidence/verification-report.js +0 -13
  319. package/node_modules/@ocean/brain/dist/memory/daily-narrative.js +0 -142
  320. package/node_modules/@ocean/brain/dist/memory/session-facts.js +0 -283
  321. package/node_modules/@ocean/context/dist/context/context-compression.js +0 -66
  322. package/node_modules/@ocean/loop/dist/hooks/desktop-facts.js +0 -174
  323. package/node_modules/@ocean/loop/dist/operations/task-linker.js +0 -40
  324. package/node_modules/@ocean/loop/dist/sessions/session-pointer.js +0 -133
  325. package/node_modules/@ocean/loop/dist/tasks/task-git.js +0 -28
  326. package/node_modules/@ocean/market/dist/mcp/mcp-gateway.js +0 -533
  327. package/templates/profiles/default.json +0 -51
  328. package/templates/profiles/developer.json +0 -51
  329. package/templates/profiles/reviewer.json +0 -51
  330. package/templates/profiles/strategist.json +0 -51
  331. /package/node_modules/@ocean/brain/dist/{brain/brain-eval.js → brain-eval.js} +0 -0
  332. /package/node_modules/@ocean/brain/dist/{brain/brain-reindex.js → brain-reindex.js} +0 -0
  333. /package/node_modules/@ocean/brain/dist/{capture → sessions-capture}/inbox-sync.js +0 -0
  334. /package/node_modules/@ocean/{market → connect}/dist/adapters/mcp-adapter.js +0 -0
  335. /package/node_modules/@ocean/{market → connect}/dist/adapters/owned-directory.js +0 -0
  336. /package/node_modules/@ocean/{market → connect}/dist/adapters/plugin-adapter.js +0 -0
  337. /package/node_modules/@ocean/{market → connect}/dist/adapters/skill-adapter.js +0 -0
  338. /package/node_modules/@ocean/{market → connect}/dist/capability/adapter.js +0 -0
  339. /package/node_modules/@ocean/{market → connect}/dist/capability/catalog.js +0 -0
  340. /package/node_modules/@ocean/{market → connect}/dist/capability/content-digest.js +0 -0
  341. /package/node_modules/@ocean/{market → connect}/dist/capability/registry.js +0 -0
  342. /package/node_modules/@ocean/{market → connect}/dist/install/lock.js +0 -0
  343. /package/node_modules/@ocean/{market → connect}/dist/install/own-server.js +0 -0
  344. /package/node_modules/@ocean/{market → connect}/dist/mcp/chrome-debugging.js +0 -0
  345. /package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-connection.js +0 -0
  346. /package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-runner.js +0 -0
  347. /package/node_modules/@ocean/{market → connect}/dist/security/description-scan.js +0 -0
  348. /package/node_modules/@ocean/{market → connect}/dist/security/secrets.js +0 -0
  349. /package/node_modules/@ocean/{market → connect}/dist/skills/core-skill-sync.js +0 -0
  350. /package/node_modules/@ocean/context/dist/{context/context-packet.js → context-packet.js} +0 -0
  351. /package/node_modules/@ocean/core/dist/domain/{process/process-events.js → process-events.js} +0 -0
  352. /package/node_modules/@ocean/core/dist/domain/{redaction/redaction.js → redaction.js} +0 -0
  353. /package/node_modules/@ocean/services/dist/{brief → day}/brief.js +0 -0
  354. /package/node_modules/@ocean/services/dist/{express → day}/express.js +0 -0
  355. /package/node_modules/@ocean/services/dist/{brief → day}/source-registry.json +0 -0
  356. /package/node_modules/@ocean/services/dist/{journey → health}/telemetry.js +0 -0
  357. /package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-service.js +0 -0
  358. /package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-task-runner.js +0 -0
  359. /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/mcp-session.js +0 -0
  360. /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/server-version.js +0 -0
  361. /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/tool-registry.js +0 -0
  362. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/inbox-promotion.js +0 -0
  363. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-discovery.js +0 -0
  364. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-ingestion.js +0 -0
  365. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-sync.js +0 -0
  366. /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-writer.js +0 -0
  367. /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/operation-scope.js +0 -0
  368. /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/record-io.js +0 -0
  369. /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/record-operations.js +0 -0
  370. /package/node_modules/@ocean/{loop → work}/dist/runs/run-authorization.js +0 -0
  371. /package/node_modules/@ocean/{loop → work}/dist/runs/session-tokens.js +0 -0
  372. /package/node_modules/@ocean/{loop/dist/handoff → work/dist/sessions}/handoff-service.js +0 -0
  373. /package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/lifecycle-hooks.js +0 -0
  374. /package/node_modules/@ocean/{loop/dist/infrastructure/persistence → work/dist/sessions}/session-store.js +0 -0
  375. /package/node_modules/@ocean/{loop/dist/infrastructure/persistence → work/dist/sessions}/session-validator.js +0 -0
  376. /package/node_modules/@ocean/{loop → work}/dist/tasks/archive-tasks.js +0 -0
  377. /package/node_modules/@ocean/{loop → work}/dist/tasks/checkpoint-task.js +0 -0
  378. /package/node_modules/@ocean/{loop → work}/dist/tasks/claim-task.js +0 -0
  379. /package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/iteration-graph.js +0 -0
  380. /package/node_modules/@ocean/{loop → work}/dist/tasks/new-task.js +0 -0
  381. /package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/task-loop-record.js +0 -0
  382. /package/node_modules/@ocean/{loop → work}/dist/tasks/task-verification.js +0 -0
@@ -0,0 +1,106 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { defaultClientEnv, planClients, } from "./clients.js";
4
+ import { oceanHookEvent } from "./hooks.js";
5
+ const snake = (event) => event.replace(/[A-Z]/g, (letter, at) => `${at ? "_" : ""}${letter.toLowerCase()}`);
6
+ async function readText(file) {
7
+ try {
8
+ return await readFile(file, "utf8");
9
+ }
10
+ catch (error) {
11
+ if (error.code === "ENOENT")
12
+ return "";
13
+ throw error;
14
+ }
15
+ }
16
+ // A TOML basic or literal string's value.
17
+ const tomlString = (quoted) => quoted.startsWith("'")
18
+ ? quoted.slice(1, -1)
19
+ : quoted.slice(1, -1).replace(/\\(["\\])/g, "$1");
20
+ const KEY = String.raw `("(?:[^"\\]|\\.)*"|'[^']*')`;
21
+ // The hook keys config.toml holds a trusted_hash for, in either shape Codex accepts:
22
+ // `[hooks.state."<key>"]` tables, or `"<key>" = { trusted_hash = … }` under `[hooks.state]`.
23
+ export function trustedHookKeys(configToml) {
24
+ const trusted = new Set();
25
+ const table = new RegExp(String.raw `^\[\s*hooks\.state\.${KEY}\s*\]$`);
26
+ const inline = new RegExp(String.raw `^${KEY}\s*=\s*\{[^}]*\btrusted_hash\s*=\s*["']sha256:`);
27
+ let section = "";
28
+ let key;
29
+ for (const raw of configToml.split(/\r?\n/)) {
30
+ const line = raw.trim();
31
+ if (line.startsWith("[")) {
32
+ const match = table.exec(line);
33
+ key = match ? tomlString(match[1]) : undefined;
34
+ section = match ? "" : line.replace(/\s+/g, "");
35
+ continue;
36
+ }
37
+ if (key && /^trusted_hash\s*=\s*["']sha256:/.test(line))
38
+ trusted.add(key);
39
+ if (section === "[hooks.state]") {
40
+ const match = inline.exec(line);
41
+ if (match)
42
+ trusted.add(tomlString(match[1]));
43
+ }
44
+ }
45
+ return trusted;
46
+ }
47
+ // Every Ocean hook in Codex's hooks.json, with the trust key Codex gives it.
48
+ export function codexHookTrust(hooksJson, configToml, hooksFile) {
49
+ let root;
50
+ try {
51
+ root = JSON.parse(hooksJson);
52
+ }
53
+ catch {
54
+ return [];
55
+ }
56
+ const events = root?.hooks;
57
+ if (!events || typeof events !== "object")
58
+ return [];
59
+ const trusted = trustedHookKeys(configToml);
60
+ const found = [];
61
+ for (const [name, groups] of Object.entries(events)) {
62
+ if (!Array.isArray(groups))
63
+ continue;
64
+ groups.forEach((group, groupIndex) => {
65
+ const hooks = group?.hooks;
66
+ if (!Array.isArray(hooks))
67
+ return;
68
+ hooks.forEach((hook, hookIndex) => {
69
+ const event = oceanHookEvent(hook?.command);
70
+ if (!event)
71
+ return;
72
+ const key = `${hooksFile}:${snake(name)}:${groupIndex}:${hookIndex}`;
73
+ found.push({ client: "codex", event, key, trusted: trusted.has(key) });
74
+ });
75
+ });
76
+ }
77
+ return found;
78
+ }
79
+ const FIX = 'open Codex and choose "Trust all and continue" when it asks "Hooks need review", or trust it under /hooks. Ocean does not trust hooks for you';
80
+ // `ocean doctor`: one finding per installed client that has a per-hook trust step.
81
+ export async function hookTrustFindings(env = defaultClientEnv()) {
82
+ const installed = (await planClients(env)).some((plan) => plan.installed && plan.client === "codex");
83
+ if (!installed)
84
+ return [];
85
+ const hooksFile = path.join(env.home, ".codex", "hooks.json");
86
+ const hooks = codexHookTrust(await readText(hooksFile), await readText(path.join(env.home, ".codex", "config.toml")), hooksFile);
87
+ if (!hooks.length)
88
+ return [];
89
+ const untrusted = hooks.filter((hook) => !hook.trusted);
90
+ if (!untrusted.length)
91
+ return [
92
+ {
93
+ code: "HOOK_TRUST",
94
+ severity: "OK",
95
+ message: `codex: Ocean's ${hooks.map((hook) => hook.event).join(", ")} hooks are trusted`,
96
+ fixable: false,
97
+ },
98
+ ];
99
+ return untrusted.map((hook) => ({
100
+ code: "HOOK_UNTRUSTED",
101
+ severity: "WARN",
102
+ message: `codex: Ocean's ${hook.event} hook is not trusted, so Codex never runs it${hook.event === "SessionEnd" ? " and its sessions are not recorded" : ""} — ${FIX}`,
103
+ fixable: false,
104
+ }));
105
+ }
106
+ //# sourceMappingURL=hook-trust.js.map
@@ -28,7 +28,13 @@ const EVENTS = {
28
28
  pattern: /\bhook prompt\b/,
29
29
  },
30
30
  };
31
- export const HOOK_ADAPTERS = [
31
+ // The Ocean hook event a command runs, if it is an Ocean hook at all (read by hook-trust.ts).
32
+ export function oceanHookEvent(command) {
33
+ if (typeof command !== "string")
34
+ return undefined;
35
+ return Object.keys(EVENTS).find((event) => EVENTS[event].pattern.test(command));
36
+ }
37
+ const HOOK_ADAPTERS = [
32
38
  {
33
39
  client: "claude-code",
34
40
  hookClient: "claude",
@@ -0,0 +1,74 @@
1
+ import { spawn } from "node:child_process";
2
+ // One stdio server's tools/list, or null when it does not answer in time.
3
+ export function listToolBytes(command, cwd, timeoutMs = 15_000) {
4
+ return new Promise((resolve) => {
5
+ let child;
6
+ try {
7
+ child = spawn(command[0], command.slice(1), {
8
+ cwd,
9
+ stdio: ["pipe", "pipe", "ignore"],
10
+ });
11
+ }
12
+ catch {
13
+ resolve(null);
14
+ return;
15
+ }
16
+ let buffer = "";
17
+ let settled = false;
18
+ const finish = (value) => {
19
+ if (settled)
20
+ return;
21
+ settled = true;
22
+ clearTimeout(timer);
23
+ child.kill();
24
+ resolve(value);
25
+ };
26
+ const timer = setTimeout(() => finish(null), timeoutMs);
27
+ child.on("error", () => finish(null));
28
+ child.on("exit", () => finish(null));
29
+ child.stdout?.setEncoding("utf8");
30
+ child.stdout?.on("data", (chunk) => {
31
+ buffer += chunk;
32
+ let newline = buffer.indexOf("\n");
33
+ while (newline >= 0) {
34
+ const line = buffer.slice(0, newline);
35
+ buffer = buffer.slice(newline + 1);
36
+ newline = buffer.indexOf("\n");
37
+ let message;
38
+ try {
39
+ message = JSON.parse(line);
40
+ }
41
+ catch {
42
+ continue;
43
+ }
44
+ if (message.id !== 2)
45
+ continue;
46
+ const tools = Array.isArray(message.result?.tools)
47
+ ? message.result.tools
48
+ : [];
49
+ finish({
50
+ bytes: tools.reduce((total, tool) => total + Buffer.byteLength(JSON.stringify(tool)), 0),
51
+ tools: tools.length,
52
+ });
53
+ }
54
+ });
55
+ const send = (id, method, params = {}) => child.stdin?.write(`${JSON.stringify({ jsonrpc: "2.0", id, method, params })}\n`);
56
+ child.stdin?.on("error", () => finish(null));
57
+ send(1, "initialize", {
58
+ protocolVersion: "2025-06-18",
59
+ capabilities: {},
60
+ clientInfo: { name: "ocean-context-cost", version: "0" },
61
+ });
62
+ child.stdin?.write(`${JSON.stringify({ jsonrpc: "2.0", method: "notifications/initialized" })}\n`);
63
+ send(2, "tools/list");
64
+ });
65
+ }
66
+ // `ocean mcp serve` and the gateway, as a client in `cwd` launches them.
67
+ export async function measureMcpSchemas(cwd, oceanCommand, gatewayArgs) {
68
+ const [ocean, gateway] = await Promise.all([
69
+ listToolBytes([...oceanCommand, "mcp", "serve"], cwd),
70
+ listToolBytes([...oceanCommand, ...gatewayArgs], cwd),
71
+ ]);
72
+ return { ocean, gateway };
73
+ }
74
+ //# sourceMappingURL=mcp-schema-cost.js.map
@@ -4,7 +4,8 @@ import { isDeepStrictEqual } from "node:util";
4
4
  import { stagingDir } from "@ocean/brain/memory/memory-paths.js";
5
5
  import { defaultClientEnv, edit, newBatch, planClients, readJournal, } from "./clients.js";
6
6
  import { canonicalJson, ManualEdit } from "./editors.js";
7
- export const NATIVE_ADAPTERS = [
7
+ import { XCODE_AGENTS } from "./registry.js";
8
+ const NATIVE_ADAPTERS = [
8
9
  {
9
10
  client: "claude-code",
10
11
  kind: "json-set",
@@ -40,6 +41,29 @@ export const NATIVE_ADAPTERS = [
40
41
  section: "memory",
41
42
  values: { memory_enabled: false, user_profile_enabled: false },
42
43
  },
44
+ // Xcode's agents are the same CLIs reading their own config homes (T-328 P6): the Claude
45
+ // Agent's memory goes to Claude Code's staging folder, which the harvest already reads.
46
+ {
47
+ client: "xcode-claude",
48
+ kind: "json-set",
49
+ file: `${XCODE_AGENTS}/ClaudeAgentConfig/settings.json`,
50
+ key: ["autoMemoryDirectory"],
51
+ value: () => stagingDir("claude-code"),
52
+ },
53
+ {
54
+ client: "xcode-codex",
55
+ kind: "toml",
56
+ file: `${XCODE_AGENTS}/codex/config.toml`,
57
+ section: "memories",
58
+ values: { generate_memories: false, use_memories: false },
59
+ },
60
+ {
61
+ client: "xcode-gemini",
62
+ kind: "json-add",
63
+ file: `${XCODE_AGENTS}/gemini/settings.json`,
64
+ key: ["tools", "exclude"],
65
+ value: () => "save_memory",
66
+ },
43
67
  {
44
68
  client: "claude-desktop",
45
69
  kind: "capture",
@@ -48,7 +72,19 @@ export const NATIVE_ADAPTERS = [
48
72
  {
49
73
  client: "cursor",
50
74
  kind: "uncaptured",
51
- text: "left on: Cursor keeps its Memories in the app, where Ocean cannot read them; its chats are indexed by `ocean pull`",
75
+ text: "left on: Cursor's Memories (no settings page since 2.1) live on its servers; its sessions reach Ocean through the session hooks",
76
+ },
77
+ {
78
+ // Two stores (code.visualstudio.com/docs/agents/run/memory, checked T-328 P6): Copilot
79
+ // Memory on GitHub's servers, and the local memory tool, whose files the docs do not place.
80
+ client: "vscode",
81
+ kind: "uncaptured",
82
+ text: "left on: Copilot Memory lives on GitHub's servers and the local /memories tool in VS Code's storage, neither readable by Ocean",
83
+ },
84
+ {
85
+ client: "warp",
86
+ kind: "uncaptured",
87
+ text: "left on: Warp's rules and agent memory sync through Warp Drive, on Warp's servers",
52
88
  },
53
89
  {
54
90
  client: "chatgpt",
@@ -14,6 +14,8 @@ const opencodeEditor = jsonEditor(["mcp"], (value) => ({
14
14
  args: command.slice(1),
15
15
  };
16
16
  });
17
+ // Home-relative folder holding each Xcode agent's own config (T-328 P6).
18
+ export const XCODE_AGENTS = "Library/Developer/Xcode/CodingAssistant";
17
19
  export const CLIENT_ADAPTERS = [
18
20
  {
19
21
  id: "claude-code",
@@ -114,7 +116,7 @@ export const CLIENT_ADAPTERS = [
114
116
  file: "Library/Application Support/Code/User/mcp.json",
115
117
  editor: jsonEditor(["servers"], (value) => ({ type: "stdio", ...value })),
116
118
  },
117
- nativeMemory: "unknown",
119
+ nativeMemory: "uncaptured",
118
120
  },
119
121
  {
120
122
  id: "hermes",
@@ -175,23 +177,63 @@ export const CLIENT_ADAPTERS = [
175
177
  fallback: "`ocean pull` captures its conversations and memory from the browsers' caches",
176
178
  },
177
179
  {
180
+ // Warp's agents read file-based MCP servers from `~/.warp/.mcp.json` (docs.warp.dev,
181
+ // agents/capabilities/mcp, checked T-328 P6); it reads ~/.claude.json too, but only with
182
+ // third-party auto-spawn on, which is off by default — so Ocean writes Warp's own file.
178
183
  id: "warp",
179
184
  label: "Warp",
180
- // Unsupported until its MCP support is verified (T-307), not left as an open question.
181
- tier: "unsupported",
185
+ tier: "supported",
182
186
  detect: { apps: ["Warp.app"], paths: [".warp"] },
183
- nativeMemory: "unknown",
184
- reason: "MCP support not verified",
185
- fallback: "use Ocean from a supported client or the `ocean` CLI",
187
+ config: { file: ".warp/.mcp.json", editor: jsonEditor(["mcpServers"]) },
188
+ nativeMemory: "uncaptured",
186
189
  },
187
190
  {
191
+ // Xcode's own chat cannot load an MCP server; its agents (Xcode 26.3+) can, each from its
192
+ // own folder under CodingAssistant (rows below), so this row only accounts for the app.
188
193
  id: "xcode",
189
194
  label: "Xcode",
190
195
  tier: "unsupported",
191
196
  detect: { apps: ["Xcode.app"] },
192
- nativeMemory: "unknown",
193
- reason: "AI/MCP support not verified",
194
- fallback: "use Ocean from a supported client or the `ocean` CLI",
197
+ nativeMemory: "none",
198
+ reason: "its built-in chat cannot load an MCP server; Xcode's Claude Agent, Codex and Gemini agents connect from their own config folders",
199
+ fallback: "enable an agent in Xcode → Settings → Intelligence, then `ocean clients apply`",
200
+ },
201
+ // Xcode's agents read only `~/Library/Developer/Xcode/CodingAssistant/<agent>` (Apple,
202
+ // "Extending and customizing agents"), never the CLI's own config, so each is a client of its
203
+ // own, found once Xcode has created its folder. Each folder stands in for that CLI's config
204
+ // home (CLAUDE_CONFIG_DIR, CODEX_HOME, ~/.gemini). Not yet run on a Mac with an agent enabled.
205
+ {
206
+ id: "xcode-claude",
207
+ label: "Xcode Claude Agent",
208
+ tier: "supported",
209
+ detect: { paths: [`${XCODE_AGENTS}/ClaudeAgentConfig`] },
210
+ config: {
211
+ file: `${XCODE_AGENTS}/ClaudeAgentConfig/.claude.json`,
212
+ editor: jsonEditor(["mcpServers"]),
213
+ },
214
+ nativeMemory: "redirect-staging",
215
+ },
216
+ {
217
+ id: "xcode-codex",
218
+ label: "Xcode Codex",
219
+ tier: "supported",
220
+ detect: { paths: [`${XCODE_AGENTS}/codex`] },
221
+ config: {
222
+ file: `${XCODE_AGENTS}/codex/config.toml`,
223
+ editor: tomlEditor("mcp_servers"),
224
+ },
225
+ nativeMemory: "disable",
226
+ },
227
+ {
228
+ id: "xcode-gemini",
229
+ label: "Xcode Gemini",
230
+ tier: "supported",
231
+ detect: { paths: [`${XCODE_AGENTS}/gemini`] },
232
+ config: {
233
+ file: `${XCODE_AGENTS}/gemini/settings.json`,
234
+ editor: jsonEditor(["mcpServers"]),
235
+ },
236
+ nativeMemory: "disable",
195
237
  },
196
238
  ];
197
239
  // Clients whose only trace in Ocean is their MCP connection: no CLI to intercept and no session
@@ -17,12 +17,17 @@ function connectedOf(plan) {
17
17
  return "no";
18
18
  return "partial";
19
19
  }
20
- function capturedOf(plan, native) {
20
+ // A client whose own memory is out of reach still counts as partly captured when its session
21
+ // end hook is wired, since every session then reaches Ocean (T-328 P6, Cursor).
22
+ function capturedOf(plan, native, hooks) {
21
23
  if (native) {
22
24
  if (["current", "capture", "harvest"].includes(native.status))
23
25
  return "yes";
24
26
  if (native.status === "manual")
25
27
  return "partial";
28
+ const sessionsHooked = hooks.some((hook) => hook.event === "SessionEnd" && hook.status === "current");
29
+ if (native.status === "uncaptured" && sessionsHooked)
30
+ return "partial";
26
31
  return "no";
27
32
  }
28
33
  if (plan.nativeMemory === "none")
@@ -111,7 +116,7 @@ export function buildClientStatus(input) {
111
116
  triggered = plan.tier === "supported" ? "no" : "n/a";
112
117
  }
113
118
  const native = input.native.find((item) => item.client === plan.client);
114
- const captured = capturedOf(plan, native);
119
+ const captured = capturedOf(plan, native, hooks);
115
120
  if (native?.status === "uncaptured" && native.reason)
116
121
  notes.push(native.reason);
117
122
  const watcher = input.watcher.find((item) => item.client === plan.client);
@@ -0,0 +1,44 @@
1
+ import { crc32 } from "node:zlib";
2
+ // A zip of the given files, each stored (method 0), not deflated: Ocean's bundles are small and
3
+ // every unzipper reads method 0. Names ending in "/" are folder entries. Claude's skill upload,
4
+ // plugin upload and Desktop Extension (.mcpb) all take this shape.
5
+ export function storedZip(entries) {
6
+ const local = [];
7
+ const central = [];
8
+ let offset = 0;
9
+ for (const [name, data] of entries) {
10
+ const file = Buffer.from(name, "utf8");
11
+ const crc = crc32(data);
12
+ const head = Buffer.alloc(30);
13
+ head.writeUInt32LE(0x04034b50, 0);
14
+ head.writeUInt16LE(20, 4); // version needed
15
+ head.writeUInt16LE(0x0800, 6); // UTF-8 names
16
+ head.writeUInt32LE(crc, 14);
17
+ head.writeUInt32LE(data.length, 18);
18
+ head.writeUInt32LE(data.length, 22);
19
+ head.writeUInt16LE(file.length, 26);
20
+ const dir = Buffer.alloc(46);
21
+ dir.writeUInt32LE(0x02014b50, 0);
22
+ dir.writeUInt16LE(20, 4);
23
+ dir.writeUInt16LE(20, 6);
24
+ dir.writeUInt16LE(0x0800, 8);
25
+ dir.writeUInt32LE(crc, 16);
26
+ dir.writeUInt32LE(data.length, 20);
27
+ dir.writeUInt32LE(data.length, 24);
28
+ dir.writeUInt16LE(file.length, 28);
29
+ dir.writeUInt32LE(name.endsWith("/") ? 0x10 : 0, 38);
30
+ dir.writeUInt32LE(offset, 42);
31
+ local.push(head, file, data);
32
+ central.push(dir, file);
33
+ offset += head.length + file.length + data.length;
34
+ }
35
+ const centralSize = central.reduce((sum, part) => sum + part.length, 0);
36
+ const end = Buffer.alloc(22);
37
+ end.writeUInt32LE(0x06054b50, 0);
38
+ end.writeUInt16LE(entries.length, 8);
39
+ end.writeUInt16LE(entries.length, 10);
40
+ end.writeUInt32LE(centralSize, 12);
41
+ end.writeUInt32LE(offset, 16);
42
+ return Buffer.concat([...local, ...central, end]);
43
+ }
44
+ //# sourceMappingURL=zip.js.map
@@ -1,7 +1,7 @@
1
1
  import { timingSafeEqual } from "node:crypto";
2
2
  import { createServer, } from "node:http";
3
3
  import { actionFingerprint } from "@ocean/core/domain/mcp/mcp-contract.js";
4
- import { runAgent } from "@ocean/loop/runs/run-agent.js";
4
+ import { runAgent } from "@ocean/work/runs/run-agent.js";
5
5
  function sameSecret(expected, actual) {
6
6
  if (actual === undefined)
7
7
  return false;
@@ -10,7 +10,7 @@ import { CHARTER_DIR, oceanPath } from "@ocean/core/shared/paths.js";
10
10
  const BEGIN = "<!-- ai-sync:generated -->";
11
11
  const END = "<!-- ai-sync:end -->";
12
12
  // Relative to HOME.
13
- export const CHARTER_COPIES = [
13
+ const CHARTER_COPIES = [
14
14
  { client: "codex", file: ".codex/AGENTS.md" },
15
15
  { client: "gemini", file: ".gemini/GEMINI.md" },
16
16
  ];
@@ -5,14 +5,15 @@ import path from "node:path";
5
5
  import { atomicWrite } from "@ocean/core/shared/fs-utils.js";
6
6
  import { liveEngineEntry, oceanPath, repoRoot, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
7
7
  // Client configs that may launch Ocean by an absolute path into the kernel (an MCP server entry).
8
- // When the engine's entry moved (packages/core → packages/harness), an entry written earlier kept
8
+ // When the engine's entry moved (packages/core → packages/harness → packages/cli), an entry written earlier kept
9
9
  // the old path and the client's Ocean server failed to start without a word (T-293). Only the
10
10
  // engine entry's former locations are rewritten, and only while they no longer exist — another
11
11
  // kernel package's server that is merely not built yet is never touched; the files are otherwise
12
12
  // left byte for byte. The release build's entry (T-294, removed in T-306) is repointed to the
13
13
  // checkout even while it still exists, so no client keeps running a release.
14
- // Where the engine's `dist/main.js` lived before it moved to packages/harness.
15
- const FORMER_ENGINE_PACKAGES = ["core"];
14
+ // Where the engine's `dist/main.js` lived before it moved to packages/cli
15
+ // (`core` first, then `harness`, renamed in T-343).
16
+ const FORMER_ENGINE_PACKAGES = ["core", "harness"];
16
17
  const CLIENT_CONFIGS = [
17
18
  ".gemini/settings.json",
18
19
  ".hermes/config.yaml",
@@ -1,5 +1,5 @@
1
- import { syncCoreSkills } from "@ocean/market/skills/core-skill-sync.js";
2
- import { copyClientSkills, retireCoreFromHub, } from "@ocean/market/skills/skill-hub.js";
1
+ import { syncCoreSkills } from "@ocean/connect/skills/core-skill-sync.js";
2
+ import { copyClientSkills, retireCoreFromHub, } from "@ocean/connect/skills/skill-hub.js";
3
3
  import { buildSkillIndex } from "./skill-router.js";
4
4
  // Keeps every client's skills current with no command run: the session-start sync and
5
5
  // `ocean market install|update` call it. Hub skills (installed from the market or made there)
@@ -1,7 +1,7 @@
1
1
  import { mkdir, readdir, readFile } from "node:fs/promises";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import { claudeHiddenSkills, readHermesDisabled, } from "@ocean/context/context/context-cost.js";
4
+ import { claudeHiddenSkills, readHermesDisabled, } from "@ocean/context/context-size.js";
5
5
  import { atomicWrite } from "@ocean/core/shared/fs-utils.js";
6
6
  import { oceanPath, SYSTEM_DIR } from "@ocean/core/shared/paths.js";
7
7
  // The owner hides skills from Claude's model with `skillOverrides` (`off`,