@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.
- package/README.md +46 -53
- package/dist/application/clients/bundles.js +220 -0
- package/dist/application/clients/chat-plugin.js +4 -42
- package/dist/application/clients/client-detect.js +291 -0
- package/dist/application/clients/clients.js +104 -25
- package/dist/application/clients/desktop-link.js +40 -0
- package/dist/application/clients/desktop-watcher.js +6 -4
- package/dist/application/clients/hook-trust.js +106 -0
- package/dist/application/clients/hooks.js +7 -1
- package/dist/application/clients/mcp-schema-cost.js +74 -0
- package/dist/application/clients/native.js +38 -2
- package/dist/application/clients/registry.js +51 -9
- package/dist/application/clients/status.js +7 -2
- package/dist/application/clients/zip.js +44 -0
- package/dist/application/gateway/webhook-gateway.js +1 -1
- package/dist/application/integrations/charter-copies.js +1 -1
- package/dist/application/integrations/engine-entry-repair.js +4 -3
- package/dist/application/integrations/skill-auto-sync.js +2 -2
- package/dist/application/integrations/skill-filter.js +1 -1
- package/dist/application/integrations/skill-router.js +134 -90
- package/dist/application/layout/layout-apply.js +1 -1
- package/dist/application/layout/workspace-template.js +1 -1
- package/dist/application/onboarding/steps.js +121 -30
- package/dist/application/profiles/profile-doctor.js +118 -0
- package/dist/application/profiles/profile-migration-service.js +208 -0
- package/dist/application/profiles/profile-suggestion.js +3 -7
- package/dist/application/profiles/profile-upgrade-service.js +98 -86
- package/dist/application/pull/history-index.js +1 -1
- package/dist/application/pull/project-match.js +3 -3
- package/dist/application/pull/pull.js +1 -1
- package/dist/application/pull/server-capture.js +92 -9
- package/dist/application/scheduler/local-scheduler.js +2 -2
- package/dist/application/spend/claude-prices.js +55 -0
- package/dist/application/spend/claude-spend.js +365 -0
- package/dist/application/uninstall/uninstall.js +25 -3
- package/dist/application/upkeep/nightly-upkeep.js +4 -4
- package/dist/composition/runtime.js +2 -2
- package/dist/infrastructure/desktop/claude-export.js +1 -1
- package/dist/infrastructure/desktop/desktop-chat.js +60 -13
- package/dist/infrastructure/desktop/indexeddb.js +4 -4
- package/dist/infrastructure/desktop/leveldb.js +2 -2
- package/dist/infrastructure/filesystem/profile-loader.js +3 -45
- package/dist/infrastructure/filesystem/runtime-config-loader.js +1 -1
- package/dist/infrastructure/observability/runtime-logger.js +1 -1
- package/dist/infrastructure/process/agent-tool-executor.js +3 -3
- package/dist/infrastructure/process/process-supervisor.js +1 -1
- package/dist/infrastructure/process/service.js +8 -8
- package/dist/infrastructure/providers/openai-compatible.js +2 -2
- package/dist/infrastructure/providers/provider-invocation.js +1 -1
- package/dist/infrastructure/providers/session-facts-completer.js +78 -5
- package/dist/interfaces/cli/auth-command.js +2 -2
- package/dist/interfaces/cli/brief-command.js +1 -1
- package/dist/interfaces/cli/browser-command.js +6 -6
- package/dist/interfaces/cli/browser-findings.js +6 -9
- package/dist/interfaces/cli/browser-settings.js +10 -10
- package/dist/interfaces/cli/capture-command.js +6 -6
- package/dist/interfaces/cli/client-test-command.js +3 -3
- package/dist/interfaces/cli/clients-command.js +55 -6
- package/dist/interfaces/cli/command-aliases.js +56 -0
- package/dist/interfaces/cli/command-registry.js +48 -1414
- package/dist/interfaces/cli/commands/browser.js +5 -0
- package/dist/interfaces/cli/commands/capture.js +19 -0
- package/dist/interfaces/cli/commands/catalog.js +9 -0
- package/dist/interfaces/cli/commands/client.js +135 -0
- package/dist/interfaces/cli/commands/clients.js +33 -0
- package/dist/interfaces/cli/commands/connectors.js +14 -0
- package/dist/interfaces/cli/commands/context.js +9 -0
- package/dist/interfaces/cli/commands/cost.js +15 -0
- package/dist/interfaces/cli/commands/daily.js +11 -0
- package/dist/interfaces/cli/commands/day.js +25 -0
- package/dist/interfaces/cli/commands/dispatch.js +31 -0
- package/dist/interfaces/cli/commands/doctor.js +60 -0
- package/dist/interfaces/cli/commands/env.js +5 -0
- package/dist/interfaces/cli/commands/gateway.js +16 -0
- package/dist/interfaces/cli/commands/handoff.js +11 -0
- package/dist/interfaces/cli/commands/health.js +17 -0
- package/dist/interfaces/cli/commands/hook.js +142 -0
- package/dist/interfaces/cli/commands/idea.js +11 -0
- package/dist/interfaces/cli/commands/install.js +31 -0
- package/dist/interfaces/cli/commands/intent.js +14 -0
- package/dist/interfaces/cli/commands/intercept.js +22 -0
- package/dist/interfaces/cli/commands/layout.js +11 -0
- package/dist/interfaces/cli/commands/lifecycle.js +5 -0
- package/dist/interfaces/cli/commands/loop.js +73 -0
- package/dist/interfaces/cli/commands/market.js +11 -0
- package/dist/interfaces/cli/commands/mcp.js +57 -0
- package/dist/interfaces/cli/commands/memory.js +5 -0
- package/dist/interfaces/cli/commands/migrate.js +5 -0
- package/dist/interfaces/cli/commands/observe.js +11 -0
- package/dist/interfaces/cli/commands/obsidian.js +111 -0
- package/dist/interfaces/cli/commands/operate.js +7 -0
- package/dist/interfaces/cli/commands/policy.js +16 -0
- package/dist/interfaces/cli/commands/project.js +207 -0
- package/dist/interfaces/cli/commands/repair.js +20 -0
- package/dist/interfaces/cli/commands/run.js +52 -0
- package/dist/interfaces/cli/commands/schedule.js +58 -0
- package/dist/interfaces/cli/commands/service.js +21 -0
- package/dist/interfaces/cli/commands/session.js +182 -0
- package/dist/interfaces/cli/commands/sessions.js +12 -0
- package/dist/interfaces/cli/commands/setup.js +21 -0
- package/dist/interfaces/cli/commands/skill.js +159 -0
- package/dist/interfaces/cli/commands/tasks.js +10 -0
- package/dist/interfaces/cli/commands/update-remove.js +25 -0
- package/dist/interfaces/cli/connectors-command.js +150 -0
- package/dist/interfaces/cli/context-command.js +39 -3
- package/dist/interfaces/cli/cost-command.js +104 -0
- package/dist/interfaces/cli/curator-command.js +1 -1
- package/dist/interfaces/cli/daily-command.js +7 -1
- package/dist/interfaces/cli/desktop-command.js +43 -7
- package/dist/interfaces/cli/distill-command.js +7 -2
- package/dist/interfaces/cli/express-command.js +1 -1
- package/dist/interfaces/cli/failures-command.js +4 -4
- package/dist/interfaces/cli/gateway-findings.js +2 -2
- package/dist/interfaces/cli/governance-command.js +23 -16
- package/dist/interfaces/cli/handoff-command.js +1 -1
- package/dist/interfaces/cli/harvest-command.js +2 -2
- package/dist/interfaces/cli/help-command.js +53 -169
- package/dist/interfaces/cli/hygiene-command.js +1 -1
- package/dist/interfaces/cli/idea-command.js +1 -1
- package/dist/interfaces/cli/intercept-command.js +8 -7
- package/dist/interfaces/cli/interests-command.js +1 -1
- package/dist/interfaces/cli/layout-command.js +2 -0
- package/dist/interfaces/cli/market-command.js +9 -9
- package/dist/interfaces/cli/mcp-gateway-command.js +124 -7
- package/dist/interfaces/cli/mcp-probe-command.js +186 -0
- package/dist/interfaces/cli/mcp-status-command.js +5 -5
- package/dist/interfaces/cli/memory-command.js +41 -7
- package/dist/interfaces/cli/migrate-command.js +2 -2
- package/dist/interfaces/cli/note-command.js +1 -1
- package/dist/interfaces/cli/onboard-command.js +14 -0
- package/dist/interfaces/cli/operate-command.js +5 -5
- package/dist/interfaces/cli/profiles-command.js +61 -1
- package/dist/interfaces/cli/rhythm-command.js +11 -5
- package/dist/interfaces/cli/running-server-findings.js +1 -1
- package/dist/interfaces/cli/scorecard-command.js +8 -8
- package/dist/interfaces/cli/session-facts-command.js +2 -2
- package/dist/interfaces/cli/sessions-command.js +145 -0
- package/dist/interfaces/cli/setup-command.js +15 -2
- package/dist/interfaces/cli/tasks-command.js +63 -13
- package/dist/interfaces/cli/telemetry-command.js +4 -4
- package/dist/interfaces/cli/uninstall-command.js +1 -1
- package/dist/interfaces/cli/week-failures.js +32 -0
- package/dist/main.js +12 -0
- package/node_modules/@ocean/brain/dist/{infrastructure/brain/brain-index.js → brain-index.js} +2 -2
- package/node_modules/@ocean/brain/dist/{brain/brain-markdown.js → brain-markdown.js} +1 -1
- package/node_modules/@ocean/brain/dist/{brain/brain-service.js → brain-service.js} +12 -2
- package/node_modules/@ocean/brain/dist/memory/brain-dump.js +92 -16
- package/node_modules/@ocean/brain/dist/memory/extraction-log.js +125 -0
- package/node_modules/@ocean/brain/dist/memory/extraction-retry.js +54 -0
- package/node_modules/@ocean/brain/dist/memory/fact-routing.js +44 -1
- package/node_modules/@ocean/brain/dist/memory/lesson-activation.js +2 -2
- package/node_modules/@ocean/brain/dist/memory/lesson-learning.js +2 -2
- package/node_modules/@ocean/brain/dist/memory/lessons.js +1 -1
- package/node_modules/@ocean/brain/dist/memory/memory-audit.js +2 -2
- package/node_modules/@ocean/brain/dist/memory/memory-harvest.js +1 -1
- package/node_modules/@ocean/brain/dist/memory/memory-paths.js +8 -0
- package/node_modules/@ocean/brain/dist/memory/memory-review.js +31 -3
- package/node_modules/@ocean/brain/dist/memory/memory-trash.js +29 -0
- package/node_modules/@ocean/brain/dist/memory/memory-write.js +4 -2
- package/node_modules/@ocean/brain/dist/memory/model-narrative.js +2 -2
- package/node_modules/@ocean/brain/dist/memory/profile-facts.js +1 -1
- package/node_modules/@ocean/brain/dist/memory/routing.json +6 -6
- package/node_modules/@ocean/{market/dist/skills → brain/dist/memory}/signal-detection.js +1 -1
- package/node_modules/@ocean/brain/dist/{memory → people}/people.js +1 -1
- package/node_modules/@ocean/brain/dist/sessions-capture/session-facts.js +625 -0
- package/node_modules/@ocean/brain/dist/{memory → sessions-capture}/session-promotion.js +7 -15
- package/node_modules/@ocean/brain/dist/{memory → sessions-capture}/session-summary.js +1 -1
- package/node_modules/@ocean/brain/dist/sessions-capture/session-triage.js +52 -0
- package/node_modules/@ocean/brain/package.json +1 -1
- package/node_modules/@ocean/connect/dist/connectors/connector-hub.js +173 -0
- package/node_modules/@ocean/{market → connect}/dist/install/default-marketplace.js +6 -2
- package/node_modules/@ocean/{market → connect}/dist/install/marketplace-service.js +1 -1
- package/node_modules/@ocean/connect/dist/mcp/mcp-gateway.js +987 -0
- package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-launch.js +102 -5
- package/node_modules/@ocean/{market → connect}/dist/registry/official-registry.js +1 -1
- package/node_modules/@ocean/{market → connect}/dist/security/permissions.js +1 -1
- package/node_modules/@ocean/{market → connect}/dist/skills/skill-hub.js +104 -6
- package/node_modules/@ocean/{market → connect}/package.json +2 -2
- package/node_modules/@ocean/context/dist/{context/context-ladder.js → context-ladder.js} +3 -3
- package/node_modules/@ocean/context/dist/{context/context-references.js → context-references.js} +5 -4
- package/node_modules/@ocean/context/dist/{context/context-cost.js → context-size.js} +6 -6
- package/node_modules/@ocean/context/dist/{context/intent-router.js → intent-router.js} +1 -1
- package/node_modules/@ocean/context/dist/{context/resource-injection.js → resource-injection.js} +3 -1
- package/node_modules/@ocean/context/package.json +1 -1
- package/node_modules/@ocean/core/dist/domain/brain/brain-record.js +1 -1
- package/node_modules/@ocean/core/dist/domain/capabilities/capability-manifest.js +5 -5
- package/node_modules/@ocean/core/dist/domain/connector-entry.js +86 -0
- package/node_modules/@ocean/core/dist/domain/context/context.js +1 -1
- package/node_modules/@ocean/core/dist/domain/context/project-id.js +8 -2
- package/node_modules/@ocean/core/dist/domain/{evidence/evidence.js → evidence.js} +1 -1
- package/node_modules/@ocean/core/dist/domain/mcp/memory-contract.js +4 -1
- package/node_modules/@ocean/core/dist/domain/ports/brain-index-port.js +1 -1
- package/node_modules/@ocean/core/dist/domain/profiles/profile-markdown.js +40 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-resolution.js +276 -0
- package/node_modules/@ocean/core/dist/domain/profiles/profile-selection.js +23 -60
- package/node_modules/@ocean/core/dist/domain/profiles/profile-upgrade.js +2 -2
- package/node_modules/@ocean/core/dist/domain/profiles/profile.js +66 -6
- package/node_modules/@ocean/core/dist/domain/profiles/runtime-config.js +1 -1
- package/node_modules/@ocean/core/dist/domain/runs/agent-tools.js +2 -2
- package/node_modules/@ocean/core/dist/domain/sessions/session-identity.js +53 -0
- package/node_modules/@ocean/core/dist/domain/sessions/session-metadata.js +208 -0
- package/node_modules/@ocean/core/dist/domain/{tasks/task-id.js → task-id.js} +2 -2
- package/node_modules/@ocean/core/dist/profiles/profile-files.js +57 -0
- package/node_modules/@ocean/core/dist/profiles/profile-loader.js +97 -0
- package/node_modules/@ocean/core/dist/profiles/project-profile-fill.js +33 -0
- package/node_modules/@ocean/core/dist/profiles/session-profile.js +158 -0
- package/node_modules/@ocean/core/dist/shared/charter.js +110 -0
- package/node_modules/@ocean/core/dist/shared/context-ack.js +1 -1
- package/node_modules/@ocean/core/dist/shared/context-triggers.js +67 -0
- package/node_modules/@ocean/core/dist/shared/paths.js +6 -6
- package/node_modules/@ocean/core/dist/shared/project-legacy.js +232 -0
- package/node_modules/@ocean/core/dist/shared/project-manifest.js +308 -0
- package/node_modules/@ocean/core/dist/shared/project-names.js +87 -0
- package/node_modules/@ocean/core/dist/shared/project-register.js +560 -0
- package/node_modules/@ocean/core/dist/shared/project-resolution.js +83 -861
- package/node_modules/@ocean/core/dist/shared/repo-signals.js +45 -0
- package/node_modules/@ocean/core/dist/shared/task-reference.js +1 -1
- package/node_modules/@ocean/core/dist/shared/text-tokens.js +37 -0
- package/node_modules/@ocean/core/dist/shared/tool-groups.js +224 -0
- package/node_modules/@ocean/core/package.json +4 -1
- package/node_modules/@ocean/services/dist/day/day.js +45 -3
- package/node_modules/@ocean/services/dist/{distill → day}/distill.js +29 -3
- package/node_modules/@ocean/services/dist/{harvest → day}/harvest.js +54 -14
- package/node_modules/@ocean/services/dist/{brief → day}/interest-discovery.js +3 -3
- package/node_modules/@ocean/services/dist/day/note.js +2 -2
- package/node_modules/@ocean/services/dist/{onboarding → day}/onboarding.js +1 -1
- package/node_modules/@ocean/services/dist/day/patterns.js +68 -0
- package/node_modules/@ocean/services/dist/{curator → health}/curator.js +5 -5
- package/node_modules/@ocean/services/dist/{journey → health}/failures.js +7 -5
- package/node_modules/@ocean/services/dist/{hygiene → health}/hygiene.js +2 -2
- package/node_modules/@ocean/services/dist/{journey → health}/lesson-effect.js +1 -1
- package/node_modules/@ocean/services/dist/{scorecard → health}/scorecard.js +3 -3
- package/node_modules/@ocean/services/dist/{upkeep → health}/upkeep.js +2 -2
- package/node_modules/@ocean/services/dist/{doctor → health}/workspace-doctor.js +57 -17
- package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-session.js +1 -1
- package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/call-ledger.js +3 -0
- package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/mcp-client.js +19 -3
- package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/obsidian-server.js +4 -4
- package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/ocean-server.js +423 -34
- package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/conflict-log.js +1 -1
- package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/folder-templates.js +8 -5
- package/node_modules/@ocean/services/dist/projects/project-doctor.js +173 -0
- package/node_modules/@ocean/services/dist/projects/project-snippet.js +9 -0
- package/node_modules/@ocean/services/dist/projects/projects-overview.js +2 -2
- package/node_modules/@ocean/services/package.json +1 -1
- package/node_modules/@ocean/{loop/dist/loops → work/dist/runs}/guard-runtime.js +3 -3
- package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/memory-knowledge-operations.js +4 -12
- package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/operation-contract.js +2 -2
- package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/project-operations.js +2 -1
- package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/task-operations.js +4 -4
- package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/write-guard.js +1 -1
- package/node_modules/@ocean/{loop → work}/dist/runs/prompt-assembly.js +2 -2
- package/node_modules/@ocean/{loop → work}/dist/runs/run-agent.js +4 -4
- package/node_modules/@ocean/{loop → work}/dist/runs/tool-loop.js +4 -4
- package/node_modules/@ocean/work/dist/sessions/hooks/desktop-facts.js +309 -0
- package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-end-hook.js +36 -5
- package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-facts-hook.js +144 -14
- package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/session-start-hook.js +129 -12
- package/node_modules/@ocean/work/dist/sessions/hooks/start-brief.js +110 -0
- package/node_modules/@ocean/work/dist/sessions/hooks/unlinked-warning.js +68 -0
- package/node_modules/@ocean/{loop → work}/dist/sessions/session-closeout.js +4 -4
- package/node_modules/@ocean/{loop → work}/dist/sessions/session-projects.js +13 -3
- package/node_modules/@ocean/work/dist/sessions/session-relink.js +300 -0
- package/node_modules/@ocean/{loop → work}/dist/sessions/session-retention.js +1 -1
- package/node_modules/@ocean/{loop → work}/dist/tasks/list-tasks.js +7 -2
- package/node_modules/@ocean/{loop → work}/dist/tasks/renumber-tasks.js +4 -2
- package/node_modules/@ocean/{loop → work}/dist/tasks/session-task.js +2 -2
- package/node_modules/@ocean/{loop → work}/dist/tasks/sync-task-prs.js +77 -7
- package/node_modules/@ocean/work/dist/tasks/task-git.js +63 -0
- package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/task-loop.js +4 -4
- package/node_modules/@ocean/{loop → work}/dist/tasks/verification-readiness.js +1 -1
- package/node_modules/@ocean/{loop → work}/dist/tasks/verify-task.js +1 -1
- package/node_modules/@ocean/{loop → work}/package.json +2 -2
- package/ocean-marketplace.json +41 -41
- package/package.json +12 -11
- package/skills/core/daily-harvest/SKILL.md +1 -1
- package/skills/core/ocean-memory/SKILL.md +4 -0
- package/skills/core/use-browser/SKILL.md +30 -7
- package/skills/index.json +1 -1
- package/templates/profiles/default.md +44 -0
- package/templates/profiles/developer.md +45 -0
- package/templates/profiles/reviewer.md +44 -0
- package/templates/profiles/strategist.md +44 -0
- package/templates/profiles-v3/analysis.md +16 -0
- package/templates/profiles-v3/backend.md +16 -0
- package/templates/profiles-v3/base.md +57 -0
- package/templates/profiles-v3/code-review.md +16 -0
- package/templates/profiles-v3/devops.md +16 -0
- package/templates/profiles-v3/docs-office.md +16 -0
- package/templates/profiles-v3/frontend.md +16 -0
- package/templates/profiles-v3/learning.md +16 -0
- package/templates/profiles-v3/marketing-ads.md +16 -0
- package/templates/profiles-v3/marketing-content-seo.md +16 -0
- package/templates/profiles-v3/ocean-ops.md +16 -0
- package/templates/profiles-v3/product-strategy.md +16 -0
- package/templates/profiles-v3/qa-testing.md +16 -0
- package/templates/profiles-v3/security.md +16 -0
- package/templates/workspace/MANIFEST.json +1 -0
- package/templates/workspace/charter/core.md +22 -90
- package/templates/workspace/charter/policies/README.md +7 -1
- package/templates/workspace/charter/policies/claude-code-context.md +6 -1
- package/templates/workspace/charter/policies/concise-output.md +5 -0
- package/templates/workspace/charter/policies/context.md +5 -0
- package/templates/workspace/charter/policies/contracts/task.md +2 -2
- package/templates/workspace/charter/policies/git.md +5 -0
- package/templates/workspace/charter/policies/graph.md +6 -1
- package/templates/workspace/charter/policies/knowledge.md +11 -4
- package/templates/workspace/charter/policies/layout.md +23 -0
- package/templates/workspace/charter/policies/lifecycle.md +5 -0
- package/templates/workspace/charter/policies/memory.md +5 -0
- package/templates/workspace/charter/policies/minimal-change.md +5 -0
- package/templates/workspace/charter/policies/models.md +5 -0
- package/templates/workspace/charter/policies/response.md +5 -0
- package/templates/workspace/charter/policies/skill-observer.md +12 -0
- package/templates/workspace/charter/policies/stack.md +5 -0
- package/templates/workspace/charter/policies/task.md +17 -3
- package/templates/workspace/charter/policies/verification.md +5 -0
- package/node_modules/@ocean/brain/dist/evidence/verification-report.js +0 -13
- package/node_modules/@ocean/brain/dist/memory/daily-narrative.js +0 -142
- package/node_modules/@ocean/brain/dist/memory/session-facts.js +0 -283
- package/node_modules/@ocean/context/dist/context/context-compression.js +0 -66
- package/node_modules/@ocean/loop/dist/hooks/desktop-facts.js +0 -174
- package/node_modules/@ocean/loop/dist/operations/task-linker.js +0 -40
- package/node_modules/@ocean/loop/dist/sessions/session-pointer.js +0 -133
- package/node_modules/@ocean/loop/dist/tasks/task-git.js +0 -28
- package/node_modules/@ocean/market/dist/mcp/mcp-gateway.js +0 -533
- package/templates/profiles/default.json +0 -51
- package/templates/profiles/developer.json +0 -51
- package/templates/profiles/reviewer.json +0 -51
- package/templates/profiles/strategist.json +0 -51
- /package/node_modules/@ocean/brain/dist/{brain/brain-eval.js → brain-eval.js} +0 -0
- /package/node_modules/@ocean/brain/dist/{brain/brain-reindex.js → brain-reindex.js} +0 -0
- /package/node_modules/@ocean/brain/dist/{capture → sessions-capture}/inbox-sync.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/adapters/mcp-adapter.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/adapters/owned-directory.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/adapters/plugin-adapter.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/adapters/skill-adapter.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/capability/adapter.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/capability/catalog.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/capability/content-digest.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/capability/registry.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/install/lock.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/install/own-server.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/mcp/chrome-debugging.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-connection.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/mcp/mcp-runner.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/security/description-scan.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/security/secrets.js +0 -0
- /package/node_modules/@ocean/{market → connect}/dist/skills/core-skill-sync.js +0 -0
- /package/node_modules/@ocean/context/dist/{context/context-packet.js → context-packet.js} +0 -0
- /package/node_modules/@ocean/core/dist/domain/{process/process-events.js → process-events.js} +0 -0
- /package/node_modules/@ocean/core/dist/domain/{redaction/redaction.js → redaction.js} +0 -0
- /package/node_modules/@ocean/services/dist/{brief → day}/brief.js +0 -0
- /package/node_modules/@ocean/services/dist/{express → day}/express.js +0 -0
- /package/node_modules/@ocean/services/dist/{brief → day}/source-registry.json +0 -0
- /package/node_modules/@ocean/services/dist/{journey → health}/telemetry.js +0 -0
- /package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-service.js +0 -0
- /package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-task-runner.js +0 -0
- /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/mcp-session.js +0 -0
- /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/server-version.js +0 -0
- /package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/tool-registry.js +0 -0
- /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/inbox-promotion.js +0 -0
- /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-discovery.js +0 -0
- /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-ingestion.js +0 -0
- /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-sync.js +0 -0
- /package/node_modules/@ocean/services/dist/{obsidian → integrations/obsidian}/vault-writer.js +0 -0
- /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/operation-scope.js +0 -0
- /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/record-io.js +0 -0
- /package/node_modules/@ocean/{loop/dist → work/dist/runs}/operations/record-operations.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/runs/run-authorization.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/runs/session-tokens.js +0 -0
- /package/node_modules/@ocean/{loop/dist/handoff → work/dist/sessions}/handoff-service.js +0 -0
- /package/node_modules/@ocean/{loop/dist → work/dist/sessions}/hooks/lifecycle-hooks.js +0 -0
- /package/node_modules/@ocean/{loop/dist/infrastructure/persistence → work/dist/sessions}/session-store.js +0 -0
- /package/node_modules/@ocean/{loop/dist/infrastructure/persistence → work/dist/sessions}/session-validator.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/tasks/archive-tasks.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/tasks/checkpoint-task.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/tasks/claim-task.js +0 -0
- /package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/iteration-graph.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/tasks/new-task.js +0 -0
- /package/node_modules/@ocean/{loop/dist/loops → work/dist/tasks}/task-loop-record.js +0 -0
- /package/node_modules/@ocean/{loop → work}/dist/tasks/task-verification.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { factTarget } from "@ocean/brain/memory/fact-routing.js";
|
|
2
2
|
import { proposeMemory } from "@ocean/brain/memory/memory-write.js";
|
|
3
3
|
import { MemoryContractError } from "@ocean/core/domain/mcp/memory-contract.js";
|
|
4
|
-
import { proposeInterests, topicProposal, } from "
|
|
4
|
+
import { proposeInterests, topicProposal, } from "./interest-discovery.js";
|
|
5
5
|
// Onboarding for any user (T-314): the `interests` step of `ocean onboard` asks three questions
|
|
6
6
|
// (the identity step already asks the role). The answers are the user's own words, but they still
|
|
7
7
|
// go to review like every other proposal: goals as a fact candidate, stack and topics as interest
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// The weekly digest's "## Patterns" (T-329 phase 5): counts, not prose — where the week went
|
|
2
|
+
// (project, client), how it ended (status), what kept coming back (tasks, failures) and what it
|
|
3
|
+
// left open. Deterministic: no model reads anything here. A record's metadata block (T-334)
|
|
4
|
+
// is read where it has one; a record written before it falls back to its body.
|
|
5
|
+
const TOP = 5;
|
|
6
|
+
function tally(values) {
|
|
7
|
+
const counts = new Map();
|
|
8
|
+
for (const value of values)
|
|
9
|
+
counts.set(value, (counts.get(value) ?? 0) + 1);
|
|
10
|
+
return [...counts].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]));
|
|
11
|
+
}
|
|
12
|
+
const joined = (entries) => entries
|
|
13
|
+
.slice(0, TOP)
|
|
14
|
+
.map(([name, count]) => `${name} ${count}`)
|
|
15
|
+
.join(" · ") +
|
|
16
|
+
(entries.length > TOP ? ` · +${entries.length - TOP} more` : "");
|
|
17
|
+
export function weeklyPatterns(sessions, failures = []) {
|
|
18
|
+
if (!sessions.length)
|
|
19
|
+
return [];
|
|
20
|
+
const total = sessions.length;
|
|
21
|
+
const lines = [
|
|
22
|
+
`- Projects: ${joined(tally(sessions.map((item) => item.project || "none")))}`,
|
|
23
|
+
`- Clients: ${joined(tally(sessions.map((item) => item.provider || "unknown")))}`,
|
|
24
|
+
`- Status: ${joined(tally(sessions.map((item) => item.status || "unknown")))}`,
|
|
25
|
+
];
|
|
26
|
+
const untitled = sessions.filter((item) => item.untitled).length;
|
|
27
|
+
if (untitled)
|
|
28
|
+
lines.push(`- Untitled: ${untitled} of ${total} (${Math.round((untitled / total) * 100)}%)`);
|
|
29
|
+
// A task counts once per session that names it; only one named in two or more is a pattern.
|
|
30
|
+
// A record with a metadata block names its task in `task`; an older one, somewhere in its body.
|
|
31
|
+
const tasks = tally(sessions.flatMap((item) => item.meta?.projectHow
|
|
32
|
+
? item.meta.task
|
|
33
|
+
? [item.meta.task]
|
|
34
|
+
: []
|
|
35
|
+
: [...new Set(item.text.match(/\bT-\d{1,4}\b/g) ?? [])])).filter(([, count]) => count >= 2);
|
|
36
|
+
if (tasks.length)
|
|
37
|
+
lines.push(`- Tasks across sessions: ${joined(tasks)}`);
|
|
38
|
+
const decided = tally(sessions.flatMap((item) => item.meta?.projectHow ? [item.meta.projectHow] : []));
|
|
39
|
+
if (decided.length)
|
|
40
|
+
lines.push(`- Project decided by: ${joined(decided)}`);
|
|
41
|
+
// Hours per project, from each record's own span.
|
|
42
|
+
const minutes = new Map();
|
|
43
|
+
for (const item of sessions)
|
|
44
|
+
if (item.meta?.durationMin)
|
|
45
|
+
minutes.set(item.project || "none", (minutes.get(item.project || "none") ?? 0) + item.meta.durationMin);
|
|
46
|
+
if (minutes.size)
|
|
47
|
+
lines.push(`- Hours: ${[...minutes]
|
|
48
|
+
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
|
|
49
|
+
.slice(0, TOP)
|
|
50
|
+
.map(([name, total]) => `${name} ${(total / 60).toFixed(1)}`)
|
|
51
|
+
.join(" · ")}${minutes.size > TOP ? ` · +${minutes.size - TOP} more` : ""}`);
|
|
52
|
+
const tools = new Map();
|
|
53
|
+
for (const item of sessions)
|
|
54
|
+
for (const [name, count] of Object.entries(item.meta?.activity?.tools ?? {}))
|
|
55
|
+
tools.set(name, (tools.get(name) ?? 0) + count);
|
|
56
|
+
if (tools.size)
|
|
57
|
+
lines.push(`- Tools: ${joined([...tools].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])))}`);
|
|
58
|
+
const repeated = failures
|
|
59
|
+
.filter((item) => item.sessions >= 2)
|
|
60
|
+
.sort((a, b) => b.sessions - a.sessions || a.label.localeCompare(b.label));
|
|
61
|
+
if (repeated.length)
|
|
62
|
+
lines.push(`- Repeated failures: ${joined(repeated.map((item) => [item.label, item.sessions]))}`);
|
|
63
|
+
const open = sessions.filter((item) => /\n## Next\n\n\s*\S/.test(item.text)).length;
|
|
64
|
+
if (open)
|
|
65
|
+
lines.push(`- Left a next step: ${open} of ${total}`);
|
|
66
|
+
return lines;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=patterns.js.map
|
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { appendAudit, sha256 } from "@ocean/brain/memory/memory-audit.js";
|
|
4
4
|
import { atomicWrite, parseFrontmatter } from "@ocean/core/shared/fs-utils.js";
|
|
5
5
|
import { KNOWLEDGE_DIR, oceanPath, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
|
|
6
|
-
import { setFrontmatterFields } from "@ocean/
|
|
6
|
+
import { setFrontmatterFields } from "@ocean/work/tasks/task-verification.js";
|
|
7
7
|
// The curator (T-322, Hermes pattern): a lesson or skill not used for 30 days is marked `stale`,
|
|
8
8
|
// for 90 days `archived`; one not reviewed for 90 days is marked `stale` too (forge F8). Every
|
|
9
9
|
// change is reversible with `review`, which stamps `last_reviewed` and restores the status it had.
|
|
@@ -12,9 +12,9 @@ import { setFrontmatterFields } from "@ocean/loop/tasks/task-verification.js";
|
|
|
12
12
|
//
|
|
13
13
|
// No client records a use yet (T-323), so an item's clock starts the first night the curator
|
|
14
14
|
// sees it (bridge/state/curator.json): missing data is never read as "unused".
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const STALE_DAYS = 30;
|
|
16
|
+
const ARCHIVE_DAYS = 90;
|
|
17
|
+
const REVIEW_DAYS = 90;
|
|
18
18
|
const DAY_MS = 86_400_000;
|
|
19
19
|
const USE_FIELDS = [
|
|
20
20
|
"last_used",
|
|
@@ -32,7 +32,7 @@ const latest = (days) => days
|
|
|
32
32
|
.filter((day) => day !== null)
|
|
33
33
|
.sort()
|
|
34
34
|
.at(-1) ?? null;
|
|
35
|
-
|
|
35
|
+
async function listCurated() {
|
|
36
36
|
const items = [];
|
|
37
37
|
const lessons = lessonsDir();
|
|
38
38
|
for (const [dir, archived] of [
|
|
@@ -4,14 +4,14 @@ import { setLessonStatus } from "@ocean/brain/memory/lessons.js";
|
|
|
4
4
|
import { atomicWrite, parseFrontmatter, withFileLock, } from "@ocean/core/shared/fs-utils.js";
|
|
5
5
|
import { localDate } from "@ocean/core/shared/local-date.js";
|
|
6
6
|
import { KNOWLEDGE_DIR, oceanPath } from "@ocean/core/shared/paths.js";
|
|
7
|
-
// Failure records (T-323): one markdown file per failure signature in 05-knowledge/
|
|
7
|
+
// Failure records (T-323): one markdown file per failure signature in 05-knowledge/lessons/.
|
|
8
8
|
// A record states the mechanism, not the symptom, and carries a closed status
|
|
9
9
|
// open → fix-landing → absorbed → superseded-by <id>
|
|
10
10
|
// changed only by code, one field per update, with a line appended to its status log; the
|
|
11
11
|
// body above that log is never rewritten. A guardrail ladder (lesson → doctor → test) says
|
|
12
12
|
// how the failure is guarded: when an absorbed signature comes back, telemetry proposes
|
|
13
13
|
// climbing one rung and the owner approves with `ocean failures climb`.
|
|
14
|
-
|
|
14
|
+
const RUNGS = ["lesson", "doctor", "test"];
|
|
15
15
|
// F4: absorb with the cheapest mechanism first, in this order.
|
|
16
16
|
export const ABSORB_MECHANISMS = [
|
|
17
17
|
"doctor",
|
|
@@ -20,7 +20,7 @@ export const ABSORB_MECHANISMS = [
|
|
|
20
20
|
"skill-edit",
|
|
21
21
|
"new-skill",
|
|
22
22
|
];
|
|
23
|
-
|
|
23
|
+
class FailureRecordError extends Error {
|
|
24
24
|
}
|
|
25
25
|
const ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,80}$/;
|
|
26
26
|
const SIGNATURE_PATTERN = /^[a-z]+\/[A-Za-z_]+\/[0-9a-f]{8}$/;
|
|
@@ -30,7 +30,8 @@ const NEXT = {
|
|
|
30
30
|
// Back to open only by climbing the ladder.
|
|
31
31
|
absorbed: [],
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
// Failure records live among the lessons (T-329 phase 4), told apart by their signature.
|
|
34
|
+
export const failuresDir = () => oceanPath(KNOWLEDGE_DIR, "lessons");
|
|
34
35
|
const failureFile = (id) => path.join(failuresDir(), `${id}.md`);
|
|
35
36
|
function parse(source) {
|
|
36
37
|
const fields = parseFrontmatter(source);
|
|
@@ -62,7 +63,7 @@ function parse(source) {
|
|
|
62
63
|
updated: fields.updated ?? "",
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
+
async function _readFailure(id) {
|
|
66
67
|
if (!ID_PATTERN.test(id))
|
|
67
68
|
throw new FailureRecordError(`Invalid id: ${id}`);
|
|
68
69
|
const source = await readFile(failureFile(id), "utf8").catch(() => null);
|
|
@@ -98,6 +99,7 @@ export async function openFailure(input, now = new Date()) {
|
|
|
98
99
|
if (await readFile(file, "utf8").catch(() => null))
|
|
99
100
|
throw new FailureRecordError(`Failure ${input.id} already exists`);
|
|
100
101
|
const head = [
|
|
102
|
+
"kind: failure",
|
|
101
103
|
`id: ${input.id}`,
|
|
102
104
|
"type: failure",
|
|
103
105
|
`title: ${JSON.stringify(input.title)}`,
|
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { appendAudit, readAudit, sha256, } from "@ocean/brain/memory/memory-audit.js";
|
|
4
4
|
import { atomicWrite, parseFrontmatter } from "@ocean/core/shared/fs-utils.js";
|
|
5
5
|
import { KNOWLEDGE_DIR, oceanPath, PERSONAL_DIR, PROJECTS_DIR, REPORTS_DIR, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
|
|
6
|
-
import { setFrontmatterFields } from "@ocean/
|
|
6
|
+
import { setFrontmatterFields } from "@ocean/work/tasks/task-verification.js";
|
|
7
7
|
const SKIP_HOSTS = /^(localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\]|example\.(com|org|net)|[^/]*\.(local|test|example|invalid))$/i;
|
|
8
8
|
const PLACEHOLDER = /[<>*{}$|]|\.\.\./;
|
|
9
9
|
// An absolute path is a claim only under a real filesystem root; `/auth/refresh` is an API route.
|
|
@@ -194,7 +194,7 @@ export async function writeHygieneReport(month, text) {
|
|
|
194
194
|
}
|
|
195
195
|
// --- Drift (F6) -----------------------------------------------------------------------------
|
|
196
196
|
const snapshotFile = () => oceanPath(SYSTEM_DIR, "state", "record-hashes.json");
|
|
197
|
-
|
|
197
|
+
const driftFile = () => oceanPath(SYSTEM_DIR, "state", "drift.json");
|
|
198
198
|
export async function checkDrift(options) {
|
|
199
199
|
const now = (options.now ?? new Date()).toISOString();
|
|
200
200
|
const root = oceanPath();
|
|
@@ -7,7 +7,7 @@ import { failureSignature } from "./telemetry.js";
|
|
|
7
7
|
// A lesson that does no better on either, with enough sessions on both sides, is proposed for
|
|
8
8
|
// retirement; nothing is retired without the owner.
|
|
9
9
|
// `skill_auto_activated` is the same event under its name before T-323.
|
|
10
|
-
|
|
10
|
+
const LESSON_APPLIED_TYPES = new Set([
|
|
11
11
|
"lesson_applied",
|
|
12
12
|
"skill_auto_activated",
|
|
13
13
|
]);
|
|
@@ -2,8 +2,8 @@ import { mkdir, readdir, readFile } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { atomicWrite, parseFrontmatter } from "@ocean/core/shared/fs-utils.js";
|
|
4
4
|
import { KNOWLEDGE_DIR, listProjectDirs, oceanPath, REPORTS_DIR, SYSTEM_DIR, } from "@ocean/core/shared/paths.js";
|
|
5
|
-
import { sessionTokens } from "@ocean/
|
|
6
|
-
import { RECURRENCE_WINDOW_DAYS
|
|
5
|
+
import { sessionTokens } from "@ocean/work/runs/session-tokens.js";
|
|
6
|
+
import { RECURRENCE_WINDOW_DAYS } from "./failures.js";
|
|
7
7
|
// Moved to the loop package (T-322) so run guards can count tokens; re-exported for callers.
|
|
8
8
|
export { sessionTokens };
|
|
9
9
|
const percent = (n, of) => of ? `${Math.round((n / of) * 1000) / 10}%` : "n/a";
|
|
@@ -158,7 +158,7 @@ export function failuresRows(failures) {
|
|
|
158
158
|
value: `${zero} of ${failures.length}`,
|
|
159
159
|
n: zero,
|
|
160
160
|
of: failures.length,
|
|
161
|
-
source: "05-knowledge/
|
|
161
|
+
source: "05-knowledge/lessons failure records + session signatures",
|
|
162
162
|
},
|
|
163
163
|
...failures.map((entry) => ({
|
|
164
164
|
id: `failure:${entry.id}`,
|
|
@@ -2,7 +2,7 @@ import { mkdir, readdir, readFile } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { atomicWrite } from "@ocean/core/shared/fs-utils.js";
|
|
4
4
|
import { oceanPath, REPORTS_DIR } from "@ocean/core/shared/paths.js";
|
|
5
|
-
import { scorecardFile } from "
|
|
5
|
+
import { scorecardFile } from "./scorecard.js";
|
|
6
6
|
const tokens = (n) => n.toLocaleString("en-US");
|
|
7
7
|
const lastLine = (text) => text.trim().split(/\r?\n/).filter(Boolean).at(-1)?.slice(0, 200) ?? "";
|
|
8
8
|
export async function runUpkeepJobs(jobs, run, clock = Date.now) {
|
|
@@ -86,7 +86,7 @@ export async function previousScorecard(date) {
|
|
|
86
86
|
.at(-1);
|
|
87
87
|
return earlier ? readFile(path.join(dir, earlier), "utf8") : null;
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
const digestFile = (date) => oceanPath(REPORTS_DIR, "digest", `${date}.md`);
|
|
90
90
|
export function renderDigest(input) {
|
|
91
91
|
const failed = input.results.filter((result) => !result.ok);
|
|
92
92
|
const cell = (text) => text.replace(/\|/g, "\\|");
|
|
@@ -6,8 +6,11 @@ import { promisify } from "node:util";
|
|
|
6
6
|
import { inTypeLocation } from "@ocean/brain/memory/fact-routing.js";
|
|
7
7
|
import { doctorMemoryIndexes, syncMemoryIndexes, } from "@ocean/brain/memory/index-sync.js";
|
|
8
8
|
import { memorySettings } from "@ocean/brain/memory/memory-audit.js";
|
|
9
|
+
import { listProfileEntries, profileCollisions, } from "@ocean/core/profiles/profile-files.js";
|
|
9
10
|
import { BRAIN_RECORD_DIRS, CHARTER_DIR, enginePath, INBOX_DIR, LEGACY_NOTES_DIR, NOTES_DIR, oceanEnv, oceanPath, POLICIES_DIR, PROJECTS_DIR, projectDir, repoPath, SYSTEM_DIR, workspaceTasksRoot, } from "@ocean/core/shared/paths.js";
|
|
10
|
-
import {
|
|
11
|
+
import { listProjectManifests, scanProjectManifests, UNCATEGORIZED, } from "@ocean/core/shared/project-manifest.js";
|
|
12
|
+
import { ensureProjectLayout, PROJECT_ROOT_ENTRIES, } from "@ocean/core/shared/project-register.js";
|
|
13
|
+
import { projectDoctor } from "../projects/project-doctor.js";
|
|
11
14
|
const execFile = promisify(execFileCallback);
|
|
12
15
|
// The notes root is inside 02-personal (not a record dir of its own) but still checked here.
|
|
13
16
|
const roots = [...BRAIN_RECORD_DIRS, NOTES_DIR, PROJECTS_DIR, SYSTEM_DIR];
|
|
@@ -367,6 +370,35 @@ async function checkClaudeProjects() {
|
|
|
367
370
|
]
|
|
368
371
|
: [];
|
|
369
372
|
}
|
|
373
|
+
// Project names that drifted apart (T-332): the count here, each warning and its fix in
|
|
374
|
+
// `ocean project doctor`.
|
|
375
|
+
async function checkProjectNames() {
|
|
376
|
+
const warnings = await projectDoctor().catch(() => null);
|
|
377
|
+
if (!warnings)
|
|
378
|
+
return [
|
|
379
|
+
{
|
|
380
|
+
code: "PROJECT_NAMES_UNCHECKED",
|
|
381
|
+
severity: "WARN",
|
|
382
|
+
message: "project names could not be checked",
|
|
383
|
+
fixable: false,
|
|
384
|
+
},
|
|
385
|
+
];
|
|
386
|
+
return [
|
|
387
|
+
warnings.length
|
|
388
|
+
? {
|
|
389
|
+
code: "PROJECT_NAMES",
|
|
390
|
+
severity: "WARN",
|
|
391
|
+
message: `${warnings.length} project name warning(s) — run \`ocean project doctor\` for each fix`,
|
|
392
|
+
fixable: false,
|
|
393
|
+
}
|
|
394
|
+
: {
|
|
395
|
+
code: "PROJECT_NAMES_OK",
|
|
396
|
+
severity: "OK",
|
|
397
|
+
message: "every project name is linked and unified",
|
|
398
|
+
fixable: false,
|
|
399
|
+
},
|
|
400
|
+
];
|
|
401
|
+
}
|
|
370
402
|
// A project lives in its category folder (T-311): one still flat under 04-projects or waiting
|
|
371
403
|
// in uncategorized/ is reported until `ocean project move` files it, and one id in two category
|
|
372
404
|
// folders is an error, since only the first is read.
|
|
@@ -550,26 +582,33 @@ async function checkProfileAuthority() {
|
|
|
550
582
|
fixable: false,
|
|
551
583
|
},
|
|
552
584
|
];
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
585
|
+
const entries = await listProfileEntries(root);
|
|
586
|
+
const legacy = entries
|
|
587
|
+
.filter((entry) => entry.format === "directory")
|
|
588
|
+
.map((entry) => entry.name);
|
|
589
|
+
const collisions = profileCollisions(entries);
|
|
590
|
+
const findings = [];
|
|
591
|
+
if (collisions.length)
|
|
592
|
+
findings.push({
|
|
593
|
+
code: "PROFILE_COLLISION",
|
|
594
|
+
severity: "FAIL",
|
|
595
|
+
message: `profiles exist in more than one form (keep one): ${collisions.join(", ")}`,
|
|
596
|
+
fixable: false,
|
|
597
|
+
});
|
|
598
|
+
if (legacy.length)
|
|
599
|
+
findings.push({
|
|
600
|
+
code: "PROFILE_AUTHORITY_DRIFT",
|
|
601
|
+
severity: "WARN",
|
|
602
|
+
message: `legacy profile directories remain active: ${legacy.join(", ")}`,
|
|
603
|
+
fixable: false,
|
|
604
|
+
});
|
|
605
|
+
return findings.length
|
|
606
|
+
? findings
|
|
568
607
|
: [
|
|
569
608
|
{
|
|
570
609
|
code: "PROFILE_AUTHORITY_CANONICAL",
|
|
571
610
|
severity: "OK",
|
|
572
|
-
message: "profiles use canonical root-level JSON authority",
|
|
611
|
+
message: "profiles use canonical root-level Markdown or JSON authority",
|
|
573
612
|
fixable: false,
|
|
574
613
|
},
|
|
575
614
|
];
|
|
@@ -690,6 +729,7 @@ async function scanWorkspace(wrapperManager) {
|
|
|
690
729
|
...(await checkProjectLayout()),
|
|
691
730
|
...(await checkClaudeProjects()),
|
|
692
731
|
...(await checkProjectCategories()),
|
|
732
|
+
...(await checkProjectNames()),
|
|
693
733
|
...(await checkProfileAuthority()),
|
|
694
734
|
];
|
|
695
735
|
}
|
package/node_modules/@ocean/services/dist/{browser → integrations/browser}/browser-session.js
RENAMED
|
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { mkdir } from "node:fs/promises";
|
|
3
3
|
import { validateSessionEntryContract } from "@ocean/core/domain/sessions/entry-contract.js";
|
|
4
4
|
import { oceanPath, oceanRoot, SYSTEM_DIR } from "@ocean/core/shared/paths.js";
|
|
5
|
-
import { sessionProjectId } from "@ocean/
|
|
5
|
+
import { sessionProjectId } from "@ocean/work/sessions/session-projects.js";
|
|
6
6
|
function safeProfileKey(value) {
|
|
7
7
|
const key = value.trim();
|
|
8
8
|
if (!key ||
|
package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/call-ledger.js
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { appendFile, mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { SELF_CHECK_CLIENT } from "@ocean/core/domain/mcp/memory-contract.js";
|
|
3
4
|
import { withFileLock } from "@ocean/core/shared/fs-utils.js";
|
|
4
5
|
import { oceanPath, SYSTEM_DIR } from "@ocean/core/shared/paths.js";
|
|
5
6
|
import { serverVersion } from "./server-version.js";
|
|
@@ -89,6 +90,8 @@ export function pruneLedgerText(text, now = new Date()) {
|
|
|
89
90
|
let prunedThisProcess = false;
|
|
90
91
|
// Never throws: a ledger problem must not fail the tool call it records.
|
|
91
92
|
export async function recordMcpCall(client, tool, ok, now = new Date()) {
|
|
93
|
+
if (client === SELF_CHECK_CLIENT)
|
|
94
|
+
return;
|
|
92
95
|
const file = callLedgerFile();
|
|
93
96
|
try {
|
|
94
97
|
await mkdir(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
@@ -44,7 +44,7 @@ export class McpClient {
|
|
|
44
44
|
this.child.once("close", () => this.failPending(new Error("MCP server stopped")));
|
|
45
45
|
const initialized = (await this.request("initialize", {
|
|
46
46
|
protocolVersion: "2025-06-18",
|
|
47
|
-
capabilities: {},
|
|
47
|
+
capabilities: this.options.roots ? { roots: { listChanged: false } } : {},
|
|
48
48
|
clientInfo: { name: "ocean", version: "0.3.2" },
|
|
49
49
|
}));
|
|
50
50
|
const capabilities = initialized?.capabilities;
|
|
@@ -152,10 +152,26 @@ export class McpClient {
|
|
|
152
152
|
catch {
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
|
-
if (response.id === undefined)
|
|
155
|
+
if (response.id === undefined) {
|
|
156
|
+
if (typeof response.method === "string")
|
|
157
|
+
this.options.onNotification?.(response.method);
|
|
156
158
|
continue;
|
|
157
|
-
|
|
159
|
+
}
|
|
160
|
+
// A request from the server: answer `ping` and (when offered) `roots/list`, decline the rest.
|
|
158
161
|
if (response.method !== undefined) {
|
|
162
|
+
const roots = this.options.roots;
|
|
163
|
+
if (response.method === "roots/list" && roots) {
|
|
164
|
+
const id = response.id;
|
|
165
|
+
void roots().then((list) => this.send({ jsonrpc: "2.0", id, result: { roots: list } }), (error) => this.send({
|
|
166
|
+
jsonrpc: "2.0",
|
|
167
|
+
id,
|
|
168
|
+
error: {
|
|
169
|
+
code: -32603,
|
|
170
|
+
message: error instanceof Error ? error.message : String(error),
|
|
171
|
+
},
|
|
172
|
+
}));
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
159
175
|
this.send(response.method === "ping"
|
|
160
176
|
? { jsonrpc: "2.0", id: response.id, result: {} }
|
|
161
177
|
: {
|
package/node_modules/@ocean/services/dist/{infrastructure → integrations}/mcp/obsidian-server.js
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { readdir, readFile } from "node:fs/promises";
|
|
2
2
|
import { actionFingerprint, mcpApprovalSchema, } from "@ocean/core/domain/mcp/mcp-contract.js";
|
|
3
3
|
import { oceanPath, SYSTEM_DIR } from "@ocean/core/shared/paths.js";
|
|
4
|
-
import { listInboxCandidates, promoteInboxNote, } from "
|
|
5
|
-
import { discoverObsidianVault, loadObsidianConnection, validateObsidianVault, } from "
|
|
6
|
-
import { syncObsidianVault } from "
|
|
7
|
-
import { resolveObsidianNotePath, writeObsidianNote, } from "
|
|
4
|
+
import { listInboxCandidates, promoteInboxNote, } from "../obsidian/inbox-promotion.js";
|
|
5
|
+
import { discoverObsidianVault, loadObsidianConnection, validateObsidianVault, } from "../obsidian/vault-discovery.js";
|
|
6
|
+
import { syncObsidianVault } from "../obsidian/vault-sync.js";
|
|
7
|
+
import { resolveObsidianNotePath, writeObsidianNote, } from "../obsidian/vault-writer.js";
|
|
8
8
|
import { serverVersion } from "./server-version.js";
|
|
9
9
|
import { McpToolRegistry } from "./tool-registry.js";
|
|
10
10
|
const tools = new McpToolRegistry([
|