@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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Free, deterministic triage before any model call (T-329 phase 2). A chat with nothing durable
|
|
2
|
+
// in it — a greeting, one short question, a quick lookup — costs no model call: it gets a
|
|
3
|
+
// one-line record and nothing else. Anything that might hold a fact, a decision or real work goes
|
|
4
|
+
// on to extraction. A wrong "worth it" costs one call; a wrong "trivial" loses what was said, so
|
|
5
|
+
// every rule leans towards extraction.
|
|
6
|
+
// What the user says when they state a fact about themselves, decide, prefer or correct:
|
|
7
|
+
// English and Iraqi Arabic.
|
|
8
|
+
const SIGNAL = /\b(let'?s|i am|i'm|i use|i work|i live|i deploy|i prefer|my|we|our|always|never|every|prefer|don'?t|do not|from now on|remember|decid\w*|instead|wrong|correct\w*|should|must|rule|policy)\b|دائما|دايما|ابد[اً]?|لا تسوي|لا تكتب|خلي|احفظ|تذكر|قررت|غلط|صحح|افضل|أفضل|كل مرة/i;
|
|
9
|
+
// A tool call as desktop-chat.ts writes it ("[tool name: …]"), not its result.
|
|
10
|
+
const TOOL_CALL = /\[tool (?!result:|error:)[^\]:]+[\]:]/g;
|
|
11
|
+
// A file path with an extension: work that touched the project.
|
|
12
|
+
const FILE_PATH = /(?:^|[\s(`'"])(?:[\w.-]+\/)+[\w.-]+\.[a-z]{1,6}\b/gi;
|
|
13
|
+
const MIN_USER_TURNS = 4;
|
|
14
|
+
const MIN_USER_CHARS = 800;
|
|
15
|
+
const MIN_TOOL_CALLS = 3;
|
|
16
|
+
// A long answer is real work even where the transcript keeps no tool steps (Claude Code, Codex).
|
|
17
|
+
const MIN_ASSISTANT_CHARS = 2_000;
|
|
18
|
+
export function triageTurns(turns) {
|
|
19
|
+
const user = turns.filter((turn) => turn.role === "user");
|
|
20
|
+
const assistant = turns.filter((turn) => turn.role === "assistant");
|
|
21
|
+
const userText = user.map((turn) => turn.text).join("\n");
|
|
22
|
+
const allText = turns.map((turn) => turn.text).join("\n");
|
|
23
|
+
const toolCalls = assistant.reduce((count, turn) => count + (turn.text.match(TOOL_CALL)?.length ?? 0), 0);
|
|
24
|
+
const files = new Set(allText.match(FILE_PATH)?.map((m) => m.trim()) ?? [])
|
|
25
|
+
.size;
|
|
26
|
+
const triage = {
|
|
27
|
+
worth: false,
|
|
28
|
+
reasons: [],
|
|
29
|
+
userTurns: user.length,
|
|
30
|
+
userChars: userText.length,
|
|
31
|
+
toolCalls,
|
|
32
|
+
files,
|
|
33
|
+
};
|
|
34
|
+
if (!user.length)
|
|
35
|
+
return triage;
|
|
36
|
+
if (SIGNAL.test(userText))
|
|
37
|
+
triage.reasons.push("stated or decided");
|
|
38
|
+
if (user.length >= MIN_USER_TURNS)
|
|
39
|
+
triage.reasons.push("long exchange");
|
|
40
|
+
if (userText.length >= MIN_USER_CHARS)
|
|
41
|
+
triage.reasons.push("long request");
|
|
42
|
+
if (toolCalls >= MIN_TOOL_CALLS)
|
|
43
|
+
triage.reasons.push("tool work");
|
|
44
|
+
const answered = assistant.reduce((sum, turn) => sum + turn.text.length, 0);
|
|
45
|
+
if (answered >= MIN_ASSISTANT_CHARS)
|
|
46
|
+
triage.reasons.push("long answer");
|
|
47
|
+
if (files)
|
|
48
|
+
triage.reasons.push("files touched");
|
|
49
|
+
triage.worth = triage.reasons.length > 0;
|
|
50
|
+
return triage;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=session-triage.js.map
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { mkdir, readdir, readFile, rm } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { BUILTIN_CONNECTORS, connectorEntrySchema, connectorProblems, } from "@ocean/core/domain/connector-entry.js";
|
|
4
|
+
import { atomicWrite } from "@ocean/core/shared/fs-utils.js";
|
|
5
|
+
export class ConnectorHub {
|
|
6
|
+
dir;
|
|
7
|
+
constructor(dir) {
|
|
8
|
+
this.dir = dir;
|
|
9
|
+
}
|
|
10
|
+
async list() {
|
|
11
|
+
const rows = new Map(BUILTIN_CONNECTORS.map((entry) => [
|
|
12
|
+
entry.id,
|
|
13
|
+
{ ...entry, origin: "built-in" },
|
|
14
|
+
]));
|
|
15
|
+
const invalid = [];
|
|
16
|
+
for (const file of await readdir(this.dir).catch(() => [])) {
|
|
17
|
+
if (!file.endsWith(".json"))
|
|
18
|
+
continue;
|
|
19
|
+
const id = file.slice(0, -5);
|
|
20
|
+
let raw;
|
|
21
|
+
try {
|
|
22
|
+
raw = JSON.parse(await readFile(path.join(this.dir, file), "utf8"));
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
invalid.push({
|
|
26
|
+
id,
|
|
27
|
+
level: "error",
|
|
28
|
+
message: `unreadable: ${error instanceof Error ? error.message : String(error)}`,
|
|
29
|
+
});
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const problems = connectorProblems(raw);
|
|
33
|
+
if (problems.length) {
|
|
34
|
+
invalid.push(...problems.map((message) => ({
|
|
35
|
+
id,
|
|
36
|
+
level: "error",
|
|
37
|
+
message,
|
|
38
|
+
})));
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const entry = connectorEntrySchema.parse(raw);
|
|
42
|
+
if (entry.id !== id) {
|
|
43
|
+
invalid.push({
|
|
44
|
+
id,
|
|
45
|
+
level: "error",
|
|
46
|
+
message: `file name says ${id}, entry says ${entry.id}`,
|
|
47
|
+
});
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
rows.set(entry.id, { ...entry, origin: "live" });
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
rows: [...rows.values()].sort((a, b) => a.id.localeCompare(b.id)),
|
|
54
|
+
invalid,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// Writes a live entry after validation. The caller holds the owner's approval.
|
|
58
|
+
async add(raw) {
|
|
59
|
+
const problems = connectorProblems(raw);
|
|
60
|
+
if (problems.length)
|
|
61
|
+
throw new Error(`connector refused:\n ${problems.join("\n ")}`);
|
|
62
|
+
const entry = connectorEntrySchema.parse(raw);
|
|
63
|
+
await mkdir(this.dir, { recursive: true, mode: 0o700 });
|
|
64
|
+
await atomicWrite(path.join(this.dir, `${entry.id}.json`), `${JSON.stringify(entry, null, 2)}\n`);
|
|
65
|
+
return entry;
|
|
66
|
+
}
|
|
67
|
+
// Removes a live entry. A built-in one cannot be removed, only replaced by a live copy.
|
|
68
|
+
async remove(id) {
|
|
69
|
+
const file = path.join(this.dir, `${id}.json`);
|
|
70
|
+
const exists = await readFile(file).then(() => true, () => false);
|
|
71
|
+
if (exists)
|
|
72
|
+
await rm(file);
|
|
73
|
+
return exists;
|
|
74
|
+
}
|
|
75
|
+
// Every entry valid, token-free and signed in where it says it signs in.
|
|
76
|
+
async doctor(signedIn) {
|
|
77
|
+
const { rows, invalid } = await this.list();
|
|
78
|
+
const findings = [...invalid];
|
|
79
|
+
for (const row of rows) {
|
|
80
|
+
if (row.auth.type === "none") {
|
|
81
|
+
findings.push({
|
|
82
|
+
id: row.id,
|
|
83
|
+
level: "ok",
|
|
84
|
+
message: "no sign-in needed",
|
|
85
|
+
});
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const state = signedIn(row);
|
|
89
|
+
findings.push(state === true
|
|
90
|
+
? { id: row.id, level: "ok", message: `signed in (${row.auth.type})` }
|
|
91
|
+
: state === false
|
|
92
|
+
? {
|
|
93
|
+
id: row.id,
|
|
94
|
+
level: "warn",
|
|
95
|
+
message: `not signed in: ocean connectors auth ${row.id}`,
|
|
96
|
+
}
|
|
97
|
+
: {
|
|
98
|
+
id: row.id,
|
|
99
|
+
level: "warn",
|
|
100
|
+
message: `sign-in not checkable here (${row.auth.provider ?? row.auth.service ?? row.auth.type})`,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return findings;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// A profile uses an entry when the profile's `connectors:` names its id or title, or the entry
|
|
107
|
+
// lists the profile.
|
|
108
|
+
export function connectorsForProfile(rows, profile) {
|
|
109
|
+
const named = new Set(profile.connectors.map((name) => name.toLowerCase()));
|
|
110
|
+
return rows.filter((row) => named.has(row.id) ||
|
|
111
|
+
named.has(row.title.toLowerCase()) ||
|
|
112
|
+
[...named].some((name) => row.title.toLowerCase().startsWith(`${name} `)) ||
|
|
113
|
+
row.profiles.includes(profile.name));
|
|
114
|
+
}
|
|
115
|
+
function scoutTerms(profile, max = 4) {
|
|
116
|
+
const terms = [
|
|
117
|
+
...profile.connectors,
|
|
118
|
+
...profile.triggers.filter((term) => term.length > 3),
|
|
119
|
+
];
|
|
120
|
+
return [...new Set(terms.map((term) => term.toLowerCase()))].slice(0, max);
|
|
121
|
+
}
|
|
122
|
+
export async function scoutProfile(profile, sources) {
|
|
123
|
+
const terms = scoutTerms(profile);
|
|
124
|
+
const have = new Set([...profile.mcp, ...profile.composio, ...profile.connectors].map((name) => name.toLowerCase()));
|
|
125
|
+
const seen = new Map();
|
|
126
|
+
const failures = [];
|
|
127
|
+
for (const [label, source] of Object.entries(sources))
|
|
128
|
+
for (const term of terms) {
|
|
129
|
+
try {
|
|
130
|
+
for (const hit of await source(term)) {
|
|
131
|
+
const key = `${hit.source}:${hit.name}`;
|
|
132
|
+
if (seen.has(key))
|
|
133
|
+
continue;
|
|
134
|
+
const short = hit.name.toLowerCase().split("/").pop() ?? hit.name.toLowerCase();
|
|
135
|
+
seen.set(key, {
|
|
136
|
+
...hit,
|
|
137
|
+
overlaps: have.has(short) || have.has(hit.name.toLowerCase()),
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
failures.push(`${label} "${term}": ${error instanceof Error ? error.message : String(error)}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const score = (c) => (c.official ? 2 : 0) +
|
|
146
|
+
(c.status === "active" ? 1 : 0) -
|
|
147
|
+
(c.overlaps ? 3 : 0);
|
|
148
|
+
return {
|
|
149
|
+
terms,
|
|
150
|
+
candidates: [...seen.values()].sort((a, b) => score(b) - score(a) || a.name.localeCompare(b.name)),
|
|
151
|
+
failures,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export function scoutReport(profile, result, date) {
|
|
155
|
+
const lines = [
|
|
156
|
+
`# Scout — ${profile.name} — ${date}`,
|
|
157
|
+
"",
|
|
158
|
+
`Role: ${profile.description}`,
|
|
159
|
+
`Searched for: ${result.terms.join(", ") || "nothing (no triggers or connectors)"}`,
|
|
160
|
+
"",
|
|
161
|
+
"Nothing was installed. To add one: `ocean connectors add <file.json> --approve`.",
|
|
162
|
+
"",
|
|
163
|
+
"| Source | Name | Official | Status | Already has | Description |",
|
|
164
|
+
"|---|---|---|---|---|---|",
|
|
165
|
+
...result.candidates
|
|
166
|
+
.slice(0, 25)
|
|
167
|
+
.map((c) => `| ${c.source} | ${c.name} | ${c.official ? "yes" : "no"} | ${c.status} | ${c.overlaps ? "yes" : "no"} | ${c.description.replace(/\|/g, "/").slice(0, 120)} |`),
|
|
168
|
+
];
|
|
169
|
+
if (result.failures.length)
|
|
170
|
+
lines.push("", "## Sources that failed", "", ...result.failures.map((f) => `- ${f}`));
|
|
171
|
+
return `${lines.join("\n")}\n`;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=connector-hub.js.map
|
|
@@ -14,17 +14,21 @@ export const marketplacePaths = () => ({
|
|
|
14
14
|
mcpServers: oceanPath(SYSTEM_DIR, "market", "mcp"),
|
|
15
15
|
plugins: oceanPath(SYSTEM_DIR, "market", "plugins"),
|
|
16
16
|
mcpState: oceanPath(SYSTEM_DIR, "market", "state"),
|
|
17
|
+
// Pinned npm copies of installed MCP servers, so a start needs no npx (T-338 P4).
|
|
18
|
+
mcpPackages: oceanPath(SYSTEM_DIR, "market", "packages"),
|
|
19
|
+
// The gateway's cached member listings (T-338 P4).
|
|
20
|
+
gatewayManifests: oceanPath(SYSTEM_DIR, "market", "gateway-manifests"),
|
|
17
21
|
gatewayAccess: oceanPath(SYSTEM_DIR, "market", "gateway-access.json"),
|
|
18
22
|
lock: oceanPath(SYSTEM_DIR, "installed", "ocean.lock"),
|
|
19
23
|
});
|
|
20
24
|
// The owner's own index under bridge/ first (it wins on a name@version clash), then the one the
|
|
21
25
|
// engine ships with its core skills and MCP servers.
|
|
22
|
-
|
|
26
|
+
function defaultIndexFiles() {
|
|
23
27
|
const local = marketplacePaths().index;
|
|
24
28
|
return [...(existsSync(local) ? [local] : []), engineIndexFile()];
|
|
25
29
|
}
|
|
26
30
|
// The built-in kinds. A new kind is one more `register` here (or in any caller), nothing else.
|
|
27
|
-
|
|
31
|
+
function defaultCapabilityRegistry() {
|
|
28
32
|
const paths = marketplacePaths();
|
|
29
33
|
const registry = new CapabilityRegistry();
|
|
30
34
|
registry.register(createSkillAdapter());
|
|
@@ -5,7 +5,7 @@ import { resolveWithin } from "@ocean/core/shared/paths.js";
|
|
|
5
5
|
import { contentDigest } from "../capability/content-digest.js";
|
|
6
6
|
import { scanText } from "../security/description-scan.js";
|
|
7
7
|
import { readLock, writeLock } from "./lock.js";
|
|
8
|
-
|
|
8
|
+
function hasPermissions(manifest) {
|
|
9
9
|
const { filesystem, network, env, exec } = manifest.permissions;
|
|
10
10
|
return [filesystem.read, filesystem.write, network, env, exec].some((list) => list.length > 0);
|
|
11
11
|
}
|