@pleri/olam-cli 0.1.201 → 0.1.205
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 +102 -169
- package/dist/agent-stream/agent-sdk-to-chunks.js +1 -1
- package/dist/agent-stream/driver-runner.js +73 -7
- package/dist/agent-stream/host-driver-launch.js +14 -1
- package/dist/agent-stream/prototype-gen-launch.js +113 -0
- package/dist/agent-stream/question-broker-bridge.js +335 -0
- package/dist/agent-stream/sdk-env-merge.demo.js +35 -0
- package/dist/agent-stream/sdk-env-merge.js +98 -0
- package/dist/image-digests.json +8 -8
- package/dist/index.js +9533 -6258
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +24721 -12934
- package/hermes-bundle/version.json +1 -1
- package/hooks/__tests__/_loader.py +26 -0
- package/hooks/__tests__/prompts.py +63 -0
- package/hooks/__tests__/test_classify_bench.py +94 -0
- package/hooks/__tests__/test_classify_pins.py +78 -0
- package/hooks/model-router.py +17 -4
- package/host-cp/k8s/manifests/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +1 -1
- package/host-cp/src/op-side-longpoll.mjs +212 -0
- package/host-cp/src/plan-chat-proxy-headers.mjs +53 -0
- package/host-cp/src/plan-chat-service.mjs +100 -0
- package/host-cp/src/plan-orchestrator.mjs +100 -6
- package/host-cp/src/server.mjs +607 -45
- package/memory-hooks/agentmemory-classify-queue.mjs +363 -0
- package/memory-hooks/agentmemory-recall-trigger.mjs +233 -0
- package/memory-hooks/agentmemory-reflect-cite.mjs +332 -0
- package/memory-hooks/agentmemory-session-recall.js +332 -0
- package/memory-hooks/recall-log.mjs +185 -0
- package/package.json +9 -4
- package/dist/ask/checkout.d.ts +0 -19
- package/dist/ask/checkout.d.ts.map +0 -1
- package/dist/ask/checkout.js +0 -40
- package/dist/ask/checkout.js.map +0 -1
- package/dist/ask/knowledge-pack-builder.d.ts +0 -72
- package/dist/ask/knowledge-pack-builder.d.ts.map +0 -1
- package/dist/ask/knowledge-pack-builder.js +0 -96
- package/dist/ask/knowledge-pack-builder.js.map +0 -1
- package/dist/ask/knowledge-pack.generated.d.ts +0 -8
- package/dist/ask/knowledge-pack.generated.d.ts.map +0 -1
- package/dist/ask/knowledge-pack.generated.js +0 -2362
- package/dist/ask/knowledge-pack.generated.js.map +0 -1
- package/dist/ask/one-shot.d.ts +0 -21
- package/dist/ask/one-shot.d.ts.map +0 -1
- package/dist/ask/one-shot.js +0 -50
- package/dist/ask/one-shot.js.map +0 -1
- package/dist/ask/repl.d.ts +0 -30
- package/dist/ask/repl.d.ts.map +0 -1
- package/dist/ask/repl.js +0 -109
- package/dist/ask/repl.js.map +0 -1
- package/dist/ask/sdk-client.d.ts +0 -87
- package/dist/ask/sdk-client.d.ts.map +0 -1
- package/dist/ask/sdk-client.js +0 -118
- package/dist/ask/sdk-client.js.map +0 -1
- package/dist/ask/system-prompt.d.ts +0 -30
- package/dist/ask/system-prompt.d.ts.map +0 -1
- package/dist/ask/system-prompt.js +0 -31
- package/dist/ask/system-prompt.js.map +0 -1
- package/dist/cli-version.d.ts +0 -16
- package/dist/cli-version.d.ts.map +0 -1
- package/dist/cli-version.js +0 -39
- package/dist/cli-version.js.map +0 -1
- package/dist/commands/ask.d.ts +0 -27
- package/dist/commands/ask.d.ts.map +0 -1
- package/dist/commands/ask.js +0 -63
- package/dist/commands/ask.js.map +0 -1
- package/dist/commands/auth-list-json.d.ts +0 -87
- package/dist/commands/auth-list-json.d.ts.map +0 -1
- package/dist/commands/auth-list-json.js +0 -71
- package/dist/commands/auth-list-json.js.map +0 -1
- package/dist/commands/auth-migrate.d.ts +0 -212
- package/dist/commands/auth-migrate.d.ts.map +0 -1
- package/dist/commands/auth-migrate.js +0 -465
- package/dist/commands/auth-migrate.js.map +0 -1
- package/dist/commands/auth-status.d.ts +0 -51
- package/dist/commands/auth-status.d.ts.map +0 -1
- package/dist/commands/auth-status.js +0 -250
- package/dist/commands/auth-status.js.map +0 -1
- package/dist/commands/auth-upgrade.d.ts +0 -88
- package/dist/commands/auth-upgrade.d.ts.map +0 -1
- package/dist/commands/auth-upgrade.js +0 -431
- package/dist/commands/auth-upgrade.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -31
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -784
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/begin.d.ts +0 -27
- package/dist/commands/begin.d.ts.map +0 -1
- package/dist/commands/begin.js +0 -45
- package/dist/commands/begin.js.map +0 -1
- package/dist/commands/bootstrap.d.ts +0 -111
- package/dist/commands/bootstrap.d.ts.map +0 -1
- package/dist/commands/bootstrap.js +0 -485
- package/dist/commands/bootstrap.js.map +0 -1
- package/dist/commands/clean.d.ts +0 -41
- package/dist/commands/clean.d.ts.map +0 -1
- package/dist/commands/clean.js +0 -382
- package/dist/commands/clean.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -30
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -50
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -146
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/create.d.ts +0 -8
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -775
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/crystallize.d.ts +0 -18
- package/dist/commands/crystallize.d.ts.map +0 -1
- package/dist/commands/crystallize.js +0 -123
- package/dist/commands/crystallize.js.map +0 -1
- package/dist/commands/destroy.d.ts +0 -59
- package/dist/commands/destroy.d.ts.map +0 -1
- package/dist/commands/destroy.js +0 -148
- package/dist/commands/destroy.js.map +0 -1
- package/dist/commands/diagnose.d.ts +0 -36
- package/dist/commands/diagnose.d.ts.map +0 -1
- package/dist/commands/diagnose.js +0 -177
- package/dist/commands/diagnose.js.map +0 -1
- package/dist/commands/dispatch-resolve.d.ts +0 -54
- package/dist/commands/dispatch-resolve.d.ts.map +0 -1
- package/dist/commands/dispatch-resolve.js +0 -105
- package/dist/commands/dispatch-resolve.js.map +0 -1
- package/dist/commands/dispatch.d.ts +0 -18
- package/dist/commands/dispatch.d.ts.map +0 -1
- package/dist/commands/dispatch.js +0 -159
- package/dist/commands/dispatch.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -258
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -1073
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/enter.d.ts +0 -63
- package/dist/commands/enter.d.ts.map +0 -1
- package/dist/commands/enter.js +0 -230
- package/dist/commands/enter.js.map +0 -1
- package/dist/commands/flywheel/check-persona-skeleton.d.ts +0 -35
- package/dist/commands/flywheel/check-persona-skeleton.d.ts.map +0 -1
- package/dist/commands/flywheel/check-persona-skeleton.js +0 -151
- package/dist/commands/flywheel/check-persona-skeleton.js.map +0 -1
- package/dist/commands/flywheel/diversity-check.d.ts +0 -17
- package/dist/commands/flywheel/diversity-check.d.ts.map +0 -1
- package/dist/commands/flywheel/diversity-check.js +0 -64
- package/dist/commands/flywheel/diversity-check.js.map +0 -1
- package/dist/commands/flywheel/emit-breadcrumb.d.ts +0 -20
- package/dist/commands/flywheel/emit-breadcrumb.d.ts.map +0 -1
- package/dist/commands/flywheel/emit-breadcrumb.js +0 -137
- package/dist/commands/flywheel/emit-breadcrumb.js.map +0 -1
- package/dist/commands/flywheel/index.d.ts +0 -27
- package/dist/commands/flywheel/index.d.ts.map +0 -1
- package/dist/commands/flywheel/index.js +0 -54
- package/dist/commands/flywheel/index.js.map +0 -1
- package/dist/commands/flywheel/install-sessionstart-hook.d.ts +0 -64
- package/dist/commands/flywheel/install-sessionstart-hook.d.ts.map +0 -1
- package/dist/commands/flywheel/install-sessionstart-hook.js +0 -197
- package/dist/commands/flywheel/install-sessionstart-hook.js.map +0 -1
- package/dist/commands/flywheel/install-shims.d.ts +0 -41
- package/dist/commands/flywheel/install-shims.d.ts.map +0 -1
- package/dist/commands/flywheel/install-shims.js +0 -126
- package/dist/commands/flywheel/install-shims.js.map +0 -1
- package/dist/commands/flywheel/k10-measure.d.ts +0 -17
- package/dist/commands/flywheel/k10-measure.d.ts.map +0 -1
- package/dist/commands/flywheel/k10-measure.js +0 -63
- package/dist/commands/flywheel/k10-measure.js.map +0 -1
- package/dist/commands/flywheel/k5-score.d.ts +0 -14
- package/dist/commands/flywheel/k5-score.d.ts.map +0 -1
- package/dist/commands/flywheel/k5-score.js +0 -59
- package/dist/commands/flywheel/k5-score.js.map +0 -1
- package/dist/commands/flywheel/k5-validate.d.ts +0 -46
- package/dist/commands/flywheel/k5-validate.d.ts.map +0 -1
- package/dist/commands/flywheel/k5-validate.js +0 -246
- package/dist/commands/flywheel/k5-validate.js.map +0 -1
- package/dist/commands/flywheel/migrate-overlays.d.ts +0 -116
- package/dist/commands/flywheel/migrate-overlays.d.ts.map +0 -1
- package/dist/commands/flywheel/migrate-overlays.js +0 -792
- package/dist/commands/flywheel/migrate-overlays.js.map +0 -1
- package/dist/commands/flywheel/ping.d.ts +0 -21
- package/dist/commands/flywheel/ping.d.ts.map +0 -1
- package/dist/commands/flywheel/ping.js +0 -79
- package/dist/commands/flywheel/ping.js.map +0 -1
- package/dist/commands/flywheel/sanitize-persona-output.d.ts +0 -38
- package/dist/commands/flywheel/sanitize-persona-output.d.ts.map +0 -1
- package/dist/commands/flywheel/sanitize-persona-output.js +0 -102
- package/dist/commands/flywheel/sanitize-persona-output.js.map +0 -1
- package/dist/commands/flywheel/session-start.d.ts +0 -26
- package/dist/commands/flywheel/session-start.d.ts.map +0 -1
- package/dist/commands/flywheel/session-start.js +0 -119
- package/dist/commands/flywheel/session-start.js.map +0 -1
- package/dist/commands/hermes-kg-hook.d.ts +0 -36
- package/dist/commands/hermes-kg-hook.d.ts.map +0 -1
- package/dist/commands/hermes-kg-hook.js +0 -80
- package/dist/commands/hermes-kg-hook.js.map +0 -1
- package/dist/commands/hermes.d.ts +0 -46
- package/dist/commands/hermes.d.ts.map +0 -1
- package/dist/commands/hermes.js +0 -320
- package/dist/commands/hermes.js.map +0 -1
- package/dist/commands/host-cp.d.ts +0 -216
- package/dist/commands/host-cp.d.ts.map +0 -1
- package/dist/commands/host-cp.js +0 -913
- package/dist/commands/host-cp.js.map +0 -1
- package/dist/commands/implode.d.ts +0 -86
- package/dist/commands/implode.d.ts.map +0 -1
- package/dist/commands/implode.js +0 -468
- package/dist/commands/implode.js.map +0 -1
- package/dist/commands/init.d.ts +0 -86
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -357
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/install.d.ts +0 -22
- package/dist/commands/install.d.ts.map +0 -1
- package/dist/commands/install.js +0 -203
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/keys-list-json.d.ts +0 -55
- package/dist/commands/keys-list-json.d.ts.map +0 -1
- package/dist/commands/keys-list-json.js +0 -54
- package/dist/commands/keys-list-json.js.map +0 -1
- package/dist/commands/keys.d.ts +0 -26
- package/dist/commands/keys.d.ts.map +0 -1
- package/dist/commands/keys.js +0 -157
- package/dist/commands/keys.js.map +0 -1
- package/dist/commands/kg-build.d.ts +0 -80
- package/dist/commands/kg-build.d.ts.map +0 -1
- package/dist/commands/kg-build.js +0 -282
- package/dist/commands/kg-build.js.map +0 -1
- package/dist/commands/kg-classify.d.ts +0 -30
- package/dist/commands/kg-classify.d.ts.map +0 -1
- package/dist/commands/kg-classify.js +0 -88
- package/dist/commands/kg-classify.js.map +0 -1
- package/dist/commands/kg-doctor.d.ts +0 -76
- package/dist/commands/kg-doctor.d.ts.map +0 -1
- package/dist/commands/kg-doctor.js +0 -262
- package/dist/commands/kg-doctor.js.map +0 -1
- package/dist/commands/kg-install-hook.d.ts +0 -20
- package/dist/commands/kg-install-hook.d.ts.map +0 -1
- package/dist/commands/kg-install-hook.js +0 -208
- package/dist/commands/kg-install-hook.js.map +0 -1
- package/dist/commands/kg-mirror.d.ts +0 -72
- package/dist/commands/kg-mirror.d.ts.map +0 -1
- package/dist/commands/kg-mirror.js +0 -397
- package/dist/commands/kg-mirror.js.map +0 -1
- package/dist/commands/kg-savings.d.ts +0 -20
- package/dist/commands/kg-savings.d.ts.map +0 -1
- package/dist/commands/kg-savings.js +0 -77
- package/dist/commands/kg-savings.js.map +0 -1
- package/dist/commands/kg-service-container.d.ts +0 -68
- package/dist/commands/kg-service-container.d.ts.map +0 -1
- package/dist/commands/kg-service-container.js +0 -191
- package/dist/commands/kg-service-container.js.map +0 -1
- package/dist/commands/kg-status.d.ts +0 -59
- package/dist/commands/kg-status.d.ts.map +0 -1
- package/dist/commands/kg-status.js +0 -344
- package/dist/commands/kg-status.js.map +0 -1
- package/dist/commands/kg-uninstall-hook.d.ts +0 -12
- package/dist/commands/kg-uninstall-hook.d.ts.map +0 -1
- package/dist/commands/kg-uninstall-hook.js +0 -121
- package/dist/commands/kg-uninstall-hook.js.map +0 -1
- package/dist/commands/kg-watch.d.ts +0 -49
- package/dist/commands/kg-watch.d.ts.map +0 -1
- package/dist/commands/kg-watch.js +0 -172
- package/dist/commands/kg-watch.js.map +0 -1
- package/dist/commands/lanes-list-json.d.ts +0 -69
- package/dist/commands/lanes-list-json.d.ts.map +0 -1
- package/dist/commands/lanes-list-json.js +0 -42
- package/dist/commands/lanes-list-json.js.map +0 -1
- package/dist/commands/lanes.d.ts +0 -18
- package/dist/commands/lanes.d.ts.map +0 -1
- package/dist/commands/lanes.js +0 -133
- package/dist/commands/lanes.js.map +0 -1
- package/dist/commands/list.d.ts +0 -33
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -87
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -52
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -180
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/mcp/add.d.ts +0 -9
- package/dist/commands/mcp/add.d.ts.map +0 -1
- package/dist/commands/mcp/add.js +0 -87
- package/dist/commands/mcp/add.js.map +0 -1
- package/dist/commands/mcp/client.d.ts +0 -60
- package/dist/commands/mcp/client.d.ts.map +0 -1
- package/dist/commands/mcp/client.js +0 -70
- package/dist/commands/mcp/client.js.map +0 -1
- package/dist/commands/mcp/complete.d.ts +0 -36
- package/dist/commands/mcp/complete.d.ts.map +0 -1
- package/dist/commands/mcp/complete.js +0 -66
- package/dist/commands/mcp/complete.js.map +0 -1
- package/dist/commands/mcp/import-discovery.d.ts +0 -25
- package/dist/commands/mcp/import-discovery.d.ts.map +0 -1
- package/dist/commands/mcp/import-discovery.js +0 -135
- package/dist/commands/mcp/import-discovery.js.map +0 -1
- package/dist/commands/mcp/import-validate.d.ts +0 -15
- package/dist/commands/mcp/import-validate.d.ts.map +0 -1
- package/dist/commands/mcp/import-validate.js +0 -55
- package/dist/commands/mcp/import-validate.js.map +0 -1
- package/dist/commands/mcp/import.d.ts +0 -12
- package/dist/commands/mcp/import.d.ts.map +0 -1
- package/dist/commands/mcp/import.js +0 -126
- package/dist/commands/mcp/import.js.map +0 -1
- package/dist/commands/mcp/index.d.ts +0 -14
- package/dist/commands/mcp/index.d.ts.map +0 -1
- package/dist/commands/mcp/index.js +0 -39
- package/dist/commands/mcp/index.js.map +0 -1
- package/dist/commands/mcp/install-shared.d.ts +0 -24
- package/dist/commands/mcp/install-shared.d.ts.map +0 -1
- package/dist/commands/mcp/install-shared.js +0 -42
- package/dist/commands/mcp/install-shared.js.map +0 -1
- package/dist/commands/mcp/install.d.ts +0 -20
- package/dist/commands/mcp/install.d.ts.map +0 -1
- package/dist/commands/mcp/install.js +0 -59
- package/dist/commands/mcp/install.js.map +0 -1
- package/dist/commands/mcp/list.d.ts +0 -6
- package/dist/commands/mcp/list.d.ts.map +0 -1
- package/dist/commands/mcp/list.js +0 -56
- package/dist/commands/mcp/list.js.map +0 -1
- package/dist/commands/mcp/login.d.ts +0 -6
- package/dist/commands/mcp/login.d.ts.map +0 -1
- package/dist/commands/mcp/login.js +0 -38
- package/dist/commands/mcp/login.js.map +0 -1
- package/dist/commands/mcp/remove.d.ts +0 -6
- package/dist/commands/mcp/remove.d.ts.map +0 -1
- package/dist/commands/mcp/remove.js +0 -21
- package/dist/commands/mcp/remove.js.map +0 -1
- package/dist/commands/mcp/revoke.d.ts +0 -11
- package/dist/commands/mcp/revoke.d.ts.map +0 -1
- package/dist/commands/mcp/revoke.js +0 -51
- package/dist/commands/mcp/revoke.js.map +0 -1
- package/dist/commands/mcp/serve.d.ts +0 -23
- package/dist/commands/mcp/serve.d.ts.map +0 -1
- package/dist/commands/mcp/serve.js +0 -55
- package/dist/commands/mcp/serve.js.map +0 -1
- package/dist/commands/mcp/status.d.ts +0 -6
- package/dist/commands/mcp/status.d.ts.map +0 -1
- package/dist/commands/mcp/status.js +0 -57
- package/dist/commands/mcp/status.js.map +0 -1
- package/dist/commands/mcp/uninstall.d.ts +0 -20
- package/dist/commands/mcp/uninstall.d.ts.map +0 -1
- package/dist/commands/mcp/uninstall.js +0 -60
- package/dist/commands/mcp/uninstall.js.map +0 -1
- package/dist/commands/memory/_paths.d.ts +0 -25
- package/dist/commands/memory/_paths.d.ts.map +0 -1
- package/dist/commands/memory/_paths.js +0 -57
- package/dist/commands/memory/_paths.js.map +0 -1
- package/dist/commands/memory/bridge.d.ts +0 -57
- package/dist/commands/memory/bridge.d.ts.map +0 -1
- package/dist/commands/memory/bridge.js +0 -152
- package/dist/commands/memory/bridge.js.map +0 -1
- package/dist/commands/memory/index.d.ts +0 -20
- package/dist/commands/memory/index.d.ts.map +0 -1
- package/dist/commands/memory/index.js +0 -47
- package/dist/commands/memory/index.js.map +0 -1
- package/dist/commands/memory/install-hooks.d.ts +0 -22
- package/dist/commands/memory/install-hooks.d.ts.map +0 -1
- package/dist/commands/memory/install-hooks.js +0 -156
- package/dist/commands/memory/install-hooks.js.map +0 -1
- package/dist/commands/memory/install.d.ts +0 -57
- package/dist/commands/memory/install.d.ts.map +0 -1
- package/dist/commands/memory/install.js +0 -114
- package/dist/commands/memory/install.js.map +0 -1
- package/dist/commands/memory/logs.d.ts +0 -19
- package/dist/commands/memory/logs.d.ts.map +0 -1
- package/dist/commands/memory/logs.js +0 -50
- package/dist/commands/memory/logs.js.map +0 -1
- package/dist/commands/memory/mode.d.ts +0 -47
- package/dist/commands/memory/mode.d.ts.map +0 -1
- package/dist/commands/memory/mode.js +0 -185
- package/dist/commands/memory/mode.js.map +0 -1
- package/dist/commands/memory/reclassify.d.ts +0 -56
- package/dist/commands/memory/reclassify.d.ts.map +0 -1
- package/dist/commands/memory/reclassify.js +0 -177
- package/dist/commands/memory/reclassify.js.map +0 -1
- package/dist/commands/memory/secret.d.ts +0 -16
- package/dist/commands/memory/secret.d.ts.map +0 -1
- package/dist/commands/memory/secret.js +0 -80
- package/dist/commands/memory/secret.js.map +0 -1
- package/dist/commands/memory/start.d.ts +0 -25
- package/dist/commands/memory/start.d.ts.map +0 -1
- package/dist/commands/memory/start.js +0 -83
- package/dist/commands/memory/start.js.map +0 -1
- package/dist/commands/memory/stats.d.ts +0 -69
- package/dist/commands/memory/stats.d.ts.map +0 -1
- package/dist/commands/memory/stats.js +0 -164
- package/dist/commands/memory/stats.js.map +0 -1
- package/dist/commands/memory/status.d.ts +0 -45
- package/dist/commands/memory/status.d.ts.map +0 -1
- package/dist/commands/memory/status.js +0 -134
- package/dist/commands/memory/status.js.map +0 -1
- package/dist/commands/memory/stop.d.ts +0 -13
- package/dist/commands/memory/stop.d.ts.map +0 -1
- package/dist/commands/memory/stop.js +0 -52
- package/dist/commands/memory/stop.js.map +0 -1
- package/dist/commands/memory/uninstall.d.ts +0 -19
- package/dist/commands/memory/uninstall.d.ts.map +0 -1
- package/dist/commands/memory/uninstall.js +0 -60
- package/dist/commands/memory/uninstall.js.map +0 -1
- package/dist/commands/memory-service-container.d.ts +0 -130
- package/dist/commands/memory-service-container.d.ts.map +0 -1
- package/dist/commands/memory-service-container.js +0 -251
- package/dist/commands/memory-service-container.js.map +0 -1
- package/dist/commands/observe.d.ts +0 -9
- package/dist/commands/observe.d.ts.map +0 -1
- package/dist/commands/observe.js +0 -42
- package/dist/commands/observe.js.map +0 -1
- package/dist/commands/plans-list-json.d.ts +0 -77
- package/dist/commands/plans-list-json.d.ts.map +0 -1
- package/dist/commands/plans-list-json.js +0 -61
- package/dist/commands/plans-list-json.js.map +0 -1
- package/dist/commands/plans.d.ts +0 -3
- package/dist/commands/plans.d.ts.map +0 -1
- package/dist/commands/plans.js +0 -221
- package/dist/commands/plans.js.map +0 -1
- package/dist/commands/policy-check.d.ts +0 -14
- package/dist/commands/policy-check.d.ts.map +0 -1
- package/dist/commands/policy-check.js +0 -76
- package/dist/commands/policy-check.js.map +0 -1
- package/dist/commands/pr.d.ts +0 -17
- package/dist/commands/pr.d.ts.map +0 -1
- package/dist/commands/pr.js +0 -148
- package/dist/commands/pr.js.map +0 -1
- package/dist/commands/ps.d.ts +0 -57
- package/dist/commands/ps.d.ts.map +0 -1
- package/dist/commands/ps.js +0 -202
- package/dist/commands/ps.js.map +0 -1
- package/dist/commands/refresh-helpers.d.ts +0 -25
- package/dist/commands/refresh-helpers.d.ts.map +0 -1
- package/dist/commands/refresh-helpers.js +0 -56
- package/dist/commands/refresh-helpers.js.map +0 -1
- package/dist/commands/refresh.d.ts +0 -23
- package/dist/commands/refresh.d.ts.map +0 -1
- package/dist/commands/refresh.js +0 -237
- package/dist/commands/refresh.js.map +0 -1
- package/dist/commands/rekey.d.ts +0 -84
- package/dist/commands/rekey.d.ts.map +0 -1
- package/dist/commands/rekey.js +0 -209
- package/dist/commands/rekey.js.map +0 -1
- package/dist/commands/repos-list-json.d.ts +0 -58
- package/dist/commands/repos-list-json.d.ts.map +0 -1
- package/dist/commands/repos-list-json.js +0 -45
- package/dist/commands/repos-list-json.js.map +0 -1
- package/dist/commands/repos.d.ts +0 -11
- package/dist/commands/repos.d.ts.map +0 -1
- package/dist/commands/repos.js +0 -102
- package/dist/commands/repos.js.map +0 -1
- package/dist/commands/restart.d.ts +0 -18
- package/dist/commands/restart.d.ts.map +0 -1
- package/dist/commands/restart.js +0 -113
- package/dist/commands/restart.js.map +0 -1
- package/dist/commands/resume.d.ts +0 -63
- package/dist/commands/resume.d.ts.map +0 -1
- package/dist/commands/resume.js +0 -174
- package/dist/commands/resume.js.map +0 -1
- package/dist/commands/runbooks.d.ts +0 -45
- package/dist/commands/runbooks.d.ts.map +0 -1
- package/dist/commands/runbooks.js +0 -313
- package/dist/commands/runbooks.js.map +0 -1
- package/dist/commands/seed.d.ts +0 -27
- package/dist/commands/seed.d.ts.map +0 -1
- package/dist/commands/seed.js +0 -303
- package/dist/commands/seed.js.map +0 -1
- package/dist/commands/services-tls.d.ts +0 -120
- package/dist/commands/services-tls.d.ts.map +0 -1
- package/dist/commands/services-tls.js +0 -489
- package/dist/commands/services-tls.js.map +0 -1
- package/dist/commands/services.d.ts +0 -218
- package/dist/commands/services.d.ts.map +0 -1
- package/dist/commands/services.js +0 -830
- package/dist/commands/services.js.map +0 -1
- package/dist/commands/setup-linux-gate.d.ts +0 -26
- package/dist/commands/setup-linux-gate.d.ts.map +0 -1
- package/dist/commands/setup-linux-gate.js +0 -40
- package/dist/commands/setup-linux-gate.js.map +0 -1
- package/dist/commands/setup-metrics.d.ts +0 -26
- package/dist/commands/setup-metrics.d.ts.map +0 -1
- package/dist/commands/setup-metrics.js +0 -56
- package/dist/commands/setup-metrics.js.map +0 -1
- package/dist/commands/setup-phase-5a-skill-source.d.ts +0 -84
- package/dist/commands/setup-phase-5a-skill-source.d.ts.map +0 -1
- package/dist/commands/setup-phase-5a-skill-source.js +0 -259
- package/dist/commands/setup-phase-5a-skill-source.js.map +0 -1
- package/dist/commands/setup-phase-5b-project-sweep.d.ts +0 -38
- package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +0 -1
- package/dist/commands/setup-phase-5b-project-sweep.js +0 -175
- package/dist/commands/setup-phase-5b-project-sweep.js.map +0 -1
- package/dist/commands/setup-phase-8-kg-hook.d.ts +0 -48
- package/dist/commands/setup-phase-8-kg-hook.d.ts.map +0 -1
- package/dist/commands/setup-phase-8-kg-hook.js +0 -93
- package/dist/commands/setup-phase-8-kg-hook.js.map +0 -1
- package/dist/commands/setup-phase-9-memory-bridge.d.ts +0 -36
- package/dist/commands/setup-phase-9-memory-bridge.d.ts.map +0 -1
- package/dist/commands/setup-phase-9-memory-bridge.js +0 -59
- package/dist/commands/setup-phase-9-memory-bridge.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -231
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -1374
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/skills-100x.d.ts +0 -34
- package/dist/commands/skills-100x.d.ts.map +0 -1
- package/dist/commands/skills-100x.js +0 -405
- package/dist/commands/skills-100x.js.map +0 -1
- package/dist/commands/skills-doctor.d.ts +0 -14
- package/dist/commands/skills-doctor.d.ts.map +0 -1
- package/dist/commands/skills-doctor.js +0 -126
- package/dist/commands/skills-doctor.js.map +0 -1
- package/dist/commands/skills-hook.d.ts +0 -19
- package/dist/commands/skills-hook.d.ts.map +0 -1
- package/dist/commands/skills-hook.js +0 -99
- package/dist/commands/skills-hook.js.map +0 -1
- package/dist/commands/skills-install-model-router.d.ts +0 -20
- package/dist/commands/skills-install-model-router.d.ts.map +0 -1
- package/dist/commands/skills-install-model-router.js +0 -55
- package/dist/commands/skills-install-model-router.js.map +0 -1
- package/dist/commands/skills-migrate-back.d.ts +0 -21
- package/dist/commands/skills-migrate-back.d.ts.map +0 -1
- package/dist/commands/skills-migrate-back.js +0 -222
- package/dist/commands/skills-migrate-back.js.map +0 -1
- package/dist/commands/skills-migrate-hooks-back.d.ts +0 -19
- package/dist/commands/skills-migrate-hooks-back.d.ts.map +0 -1
- package/dist/commands/skills-migrate-hooks-back.js +0 -83
- package/dist/commands/skills-migrate-hooks-back.js.map +0 -1
- package/dist/commands/skills-migrate-hooks.d.ts +0 -40
- package/dist/commands/skills-migrate-hooks.d.ts.map +0 -1
- package/dist/commands/skills-migrate-hooks.js +0 -178
- package/dist/commands/skills-migrate-hooks.js.map +0 -1
- package/dist/commands/skills-migrate.d.ts +0 -33
- package/dist/commands/skills-migrate.d.ts.map +0 -1
- package/dist/commands/skills-migrate.js +0 -216
- package/dist/commands/skills-migrate.js.map +0 -1
- package/dist/commands/skills-onboard.d.ts +0 -26
- package/dist/commands/skills-onboard.d.ts.map +0 -1
- package/dist/commands/skills-onboard.js +0 -230
- package/dist/commands/skills-onboard.js.map +0 -1
- package/dist/commands/skills-shadow-backups.d.ts +0 -15
- package/dist/commands/skills-shadow-backups.d.ts.map +0 -1
- package/dist/commands/skills-shadow-backups.js +0 -132
- package/dist/commands/skills-shadow-backups.js.map +0 -1
- package/dist/commands/skills-source.d.ts +0 -61
- package/dist/commands/skills-source.d.ts.map +0 -1
- package/dist/commands/skills-source.js +0 -895
- package/dist/commands/skills-source.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -59
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -461
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/status.d.ts +0 -65
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -249
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/stop.d.ts +0 -10
- package/dist/commands/stop.d.ts.map +0 -1
- package/dist/commands/stop.js +0 -17
- package/dist/commands/stop.js.map +0 -1
- package/dist/commands/substrate-audit-log.d.ts +0 -51
- package/dist/commands/substrate-audit-log.d.ts.map +0 -1
- package/dist/commands/substrate-audit-log.js +0 -161
- package/dist/commands/substrate-audit-log.js.map +0 -1
- package/dist/commands/substrate.d.ts +0 -87
- package/dist/commands/substrate.d.ts.map +0 -1
- package/dist/commands/substrate.js +0 -194
- package/dist/commands/substrate.js.map +0 -1
- package/dist/commands/update.d.ts +0 -89
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -331
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/upgrade-history.d.ts +0 -15
- package/dist/commands/upgrade-history.d.ts.map +0 -1
- package/dist/commands/upgrade-history.js +0 -34
- package/dist/commands/upgrade-history.js.map +0 -1
- package/dist/commands/upgrade-lock.d.ts +0 -93
- package/dist/commands/upgrade-lock.d.ts.map +0 -1
- package/dist/commands/upgrade-lock.js +0 -225
- package/dist/commands/upgrade-lock.js.map +0 -1
- package/dist/commands/upgrade-log.d.ts +0 -86
- package/dist/commands/upgrade-log.d.ts.map +0 -1
- package/dist/commands/upgrade-log.js +0 -146
- package/dist/commands/upgrade-log.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -445
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -1718
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/workspace-list-json.d.ts +0 -73
- package/dist/commands/workspace-list-json.d.ts.map +0 -1
- package/dist/commands/workspace-list-json.js +0 -59
- package/dist/commands/workspace-list-json.js.map +0 -1
- package/dist/commands/workspace.d.ts +0 -23
- package/dist/commands/workspace.d.ts.map +0 -1
- package/dist/commands/workspace.js +0 -203
- package/dist/commands/workspace.js.map +0 -1
- package/dist/commands/world-snapshot.d.ts +0 -32
- package/dist/commands/world-snapshot.d.ts.map +0 -1
- package/dist/commands/world-snapshot.js +0 -531
- package/dist/commands/world-snapshot.js.map +0 -1
- package/dist/commands/world-upgrade.d.ts +0 -33
- package/dist/commands/world-upgrade.d.ts.map +0 -1
- package/dist/commands/world-upgrade.js +0 -82
- package/dist/commands/world-upgrade.js.map +0 -1
- package/dist/commands/world.d.ts +0 -12
- package/dist/commands/world.d.ts.map +0 -1
- package/dist/commands/world.js +0 -18
- package/dist/commands/world.js.map +0 -1
- package/dist/commands/worldspec/compile.d.ts +0 -20
- package/dist/commands/worldspec/compile.d.ts.map +0 -1
- package/dist/commands/worldspec/compile.js +0 -130
- package/dist/commands/worldspec/compile.js.map +0 -1
- package/dist/commands/worldspec/index.d.ts +0 -12
- package/dist/commands/worldspec/index.d.ts.map +0 -1
- package/dist/commands/worldspec/index.js +0 -23
- package/dist/commands/worldspec/index.js.map +0 -1
- package/dist/commands/worldspec/init.d.ts +0 -15
- package/dist/commands/worldspec/init.d.ts.map +0 -1
- package/dist/commands/worldspec/init.js +0 -166
- package/dist/commands/worldspec/init.js.map +0 -1
- package/dist/commands/worldspec/schema.d.ts +0 -11
- package/dist/commands/worldspec/schema.d.ts.map +0 -1
- package/dist/commands/worldspec/schema.js +0 -55
- package/dist/commands/worldspec/schema.js.map +0 -1
- package/dist/commands/worldspec/validate.d.ts +0 -15
- package/dist/commands/worldspec/validate.d.ts.map +0 -1
- package/dist/commands/worldspec/validate.js +0 -66
- package/dist/commands/worldspec/validate.js.map +0 -1
- package/dist/commands/yolo.d.ts +0 -95
- package/dist/commands/yolo.d.ts.map +0 -1
- package/dist/commands/yolo.js +0 -377
- package/dist/commands/yolo.js.map +0 -1
- package/dist/context.d.ts +0 -30
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -56
- package/dist/context.js.map +0 -1
- package/dist/docker-host.d.ts +0 -18
- package/dist/docker-host.d.ts.map +0 -1
- package/dist/docker-host.js +0 -17
- package/dist/docker-host.js.map +0 -1
- package/dist/exit-codes.d.ts +0 -67
- package/dist/exit-codes.d.ts.map +0 -1
- package/dist/exit-codes.js +0 -67
- package/dist/exit-codes.js.map +0 -1
- package/dist/from-manifest.d.ts +0 -53
- package/dist/from-manifest.d.ts.map +0 -1
- package/dist/from-manifest.js +0 -95
- package/dist/from-manifest.js.map +0 -1
- package/dist/image-presence.d.ts +0 -40
- package/dist/image-presence.d.ts.map +0 -1
- package/dist/image-presence.js +0 -39
- package/dist/image-presence.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/install-root.d.ts +0 -74
- package/dist/install-root.d.ts.map +0 -1
- package/dist/install-root.js +0 -98
- package/dist/install-root.js.map +0 -1
- package/dist/lib/anthropic-base-url-file.d.ts +0 -37
- package/dist/lib/anthropic-base-url-file.d.ts.map +0 -1
- package/dist/lib/anthropic-base-url-file.js +0 -46
- package/dist/lib/anthropic-base-url-file.js.map +0 -1
- package/dist/lib/auth-backend.d.ts +0 -168
- package/dist/lib/auth-backend.d.ts.map +0 -1
- package/dist/lib/auth-backend.js +0 -172
- package/dist/lib/auth-backend.js.map +0 -1
- package/dist/lib/auth-list-cache.d.ts +0 -67
- package/dist/lib/auth-list-cache.d.ts.map +0 -1
- package/dist/lib/auth-list-cache.js +0 -84
- package/dist/lib/auth-list-cache.js.map +0 -1
- package/dist/lib/auth-list.d.ts +0 -107
- package/dist/lib/auth-list.d.ts.map +0 -1
- package/dist/lib/auth-list.js +0 -123
- package/dist/lib/auth-list.js.map +0 -1
- package/dist/lib/auth-login.d.ts +0 -92
- package/dist/lib/auth-login.d.ts.map +0 -1
- package/dist/lib/auth-login.js +0 -124
- package/dist/lib/auth-login.js.map +0 -1
- package/dist/lib/auth-mutator-backend.d.ts +0 -54
- package/dist/lib/auth-mutator-backend.d.ts.map +0 -1
- package/dist/lib/auth-mutator-backend.js +0 -62
- package/dist/lib/auth-mutator-backend.js.map +0 -1
- package/dist/lib/auth-refresh-kubernetes.d.ts +0 -65
- package/dist/lib/auth-refresh-kubernetes.d.ts.map +0 -1
- package/dist/lib/auth-refresh-kubernetes.js +0 -125
- package/dist/lib/auth-refresh-kubernetes.js.map +0 -1
- package/dist/lib/auth-remote.d.ts +0 -172
- package/dist/lib/auth-remote.d.ts.map +0 -1
- package/dist/lib/auth-remote.js +0 -394
- package/dist/lib/auth-remote.js.map +0 -1
- package/dist/lib/bootstrap-kubernetes.d.ts +0 -164
- package/dist/lib/bootstrap-kubernetes.d.ts.map +0 -1
- package/dist/lib/bootstrap-kubernetes.js +0 -1002
- package/dist/lib/bootstrap-kubernetes.js.map +0 -1
- package/dist/lib/build-if-stale.d.ts +0 -33
- package/dist/lib/build-if-stale.d.ts.map +0 -1
- package/dist/lib/build-if-stale.js +0 -156
- package/dist/lib/build-if-stale.js.map +0 -1
- package/dist/lib/bundle-freshness.d.ts +0 -57
- package/dist/lib/bundle-freshness.d.ts.map +0 -1
- package/dist/lib/bundle-freshness.js +0 -223
- package/dist/lib/bundle-freshness.js.map +0 -1
- package/dist/lib/bundle-source.d.ts +0 -52
- package/dist/lib/bundle-source.d.ts.map +0 -1
- package/dist/lib/bundle-source.js +0 -83
- package/dist/lib/bundle-source.js.map +0 -1
- package/dist/lib/cf-access-token.d.ts +0 -32
- package/dist/lib/cf-access-token.d.ts.map +0 -1
- package/dist/lib/cf-access-token.js +0 -51
- package/dist/lib/cf-access-token.js.map +0 -1
- package/dist/lib/completion-generator.d.ts +0 -107
- package/dist/lib/completion-generator.d.ts.map +0 -1
- package/dist/lib/completion-generator.js +0 -226
- package/dist/lib/completion-generator.js.map +0 -1
- package/dist/lib/config.d.ts +0 -114
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js +0 -246
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/flywheel-probes.d.ts +0 -58
- package/dist/lib/flywheel-probes.d.ts.map +0 -1
- package/dist/lib/flywheel-probes.js +0 -163
- package/dist/lib/flywheel-probes.js.map +0 -1
- package/dist/lib/health-probes.d.ts +0 -267
- package/dist/lib/health-probes.d.ts.map +0 -1
- package/dist/lib/health-probes.js +0 -933
- package/dist/lib/health-probes.js.map +0 -1
- package/dist/lib/help-groups.d.ts +0 -36
- package/dist/lib/help-groups.d.ts.map +0 -1
- package/dist/lib/help-groups.js +0 -124
- package/dist/lib/help-groups.js.map +0 -1
- package/dist/lib/host-side-proxy.d.ts +0 -67
- package/dist/lib/host-side-proxy.d.ts.map +0 -1
- package/dist/lib/host-side-proxy.js +0 -177
- package/dist/lib/host-side-proxy.js.map +0 -1
- package/dist/lib/instrumentation.d.ts +0 -85
- package/dist/lib/instrumentation.d.ts.map +0 -1
- package/dist/lib/instrumentation.js +0 -104
- package/dist/lib/instrumentation.js.map +0 -1
- package/dist/lib/k8s-bootstrap.d.ts +0 -126
- package/dist/lib/k8s-bootstrap.d.ts.map +0 -1
- package/dist/lib/k8s-bootstrap.js +0 -218
- package/dist/lib/k8s-bootstrap.js.map +0 -1
- package/dist/lib/k8s-context-discovery.d.ts +0 -80
- package/dist/lib/k8s-context-discovery.d.ts.map +0 -1
- package/dist/lib/k8s-context-discovery.js +0 -102
- package/dist/lib/k8s-context-discovery.js.map +0 -1
- package/dist/lib/k8s-secret-render.d.ts +0 -141
- package/dist/lib/k8s-secret-render.d.ts.map +0 -1
- package/dist/lib/k8s-secret-render.js +0 -318
- package/dist/lib/k8s-secret-render.js.map +0 -1
- package/dist/lib/kg-caps.d.ts +0 -19
- package/dist/lib/kg-caps.d.ts.map +0 -1
- package/dist/lib/kg-caps.js +0 -19
- package/dist/lib/kg-caps.js.map +0 -1
- package/dist/lib/kubectl-context.d.ts +0 -87
- package/dist/lib/kubectl-context.d.ts.map +0 -1
- package/dist/lib/kubectl-context.js +0 -105
- package/dist/lib/kubectl-context.js.map +0 -1
- package/dist/lib/kubectl-wrap.d.ts +0 -65
- package/dist/lib/kubectl-wrap.d.ts.map +0 -1
- package/dist/lib/kubectl-wrap.js +0 -135
- package/dist/lib/kubectl-wrap.js.map +0 -1
- package/dist/lib/manifest-refresh.d.ts +0 -136
- package/dist/lib/manifest-refresh.d.ts.map +0 -1
- package/dist/lib/manifest-refresh.js +0 -298
- package/dist/lib/manifest-refresh.js.map +0 -1
- package/dist/lib/memory-host-process-migration.d.ts +0 -56
- package/dist/lib/memory-host-process-migration.d.ts.map +0 -1
- package/dist/lib/memory-host-process-migration.js +0 -156
- package/dist/lib/memory-host-process-migration.js.map +0 -1
- package/dist/lib/memory-secret.d.ts +0 -83
- package/dist/lib/memory-secret.d.ts.map +0 -1
- package/dist/lib/memory-secret.js +0 -147
- package/dist/lib/memory-secret.js.map +0 -1
- package/dist/lib/peripheral-registry.d.ts +0 -53
- package/dist/lib/peripheral-registry.d.ts.map +0 -1
- package/dist/lib/peripheral-registry.js +0 -73
- package/dist/lib/peripheral-registry.js.map +0 -1
- package/dist/lib/plans-client.d.ts +0 -69
- package/dist/lib/plans-client.d.ts.map +0 -1
- package/dist/lib/plans-client.js +0 -140
- package/dist/lib/plans-client.js.map +0 -1
- package/dist/lib/port-forward.d.ts +0 -168
- package/dist/lib/port-forward.d.ts.map +0 -1
- package/dist/lib/port-forward.js +0 -393
- package/dist/lib/port-forward.js.map +0 -1
- package/dist/lib/shell-rc.d.ts +0 -90
- package/dist/lib/shell-rc.d.ts.map +0 -1
- package/dist/lib/shell-rc.js +0 -91
- package/dist/lib/shell-rc.js.map +0 -1
- package/dist/lib/shim-generator.d.ts +0 -51
- package/dist/lib/shim-generator.d.ts.map +0 -1
- package/dist/lib/shim-generator.js +0 -88
- package/dist/lib/shim-generator.js.map +0 -1
- package/dist/lib/skills-apply-overlays.d.ts +0 -35
- package/dist/lib/skills-apply-overlays.d.ts.map +0 -1
- package/dist/lib/skills-apply-overlays.js +0 -243
- package/dist/lib/skills-apply-overlays.js.map +0 -1
- package/dist/lib/symlink-reconcile.d.ts +0 -32
- package/dist/lib/symlink-reconcile.d.ts.map +0 -1
- package/dist/lib/symlink-reconcile.js +0 -80
- package/dist/lib/symlink-reconcile.js.map +0 -1
- package/dist/lib/upgrade-check.d.ts +0 -60
- package/dist/lib/upgrade-check.d.ts.map +0 -1
- package/dist/lib/upgrade-check.js +0 -169
- package/dist/lib/upgrade-check.js.map +0 -1
- package/dist/lib/upgrade-kubernetes.d.ts +0 -193
- package/dist/lib/upgrade-kubernetes.d.ts.map +0 -1
- package/dist/lib/upgrade-kubernetes.js +0 -1014
- package/dist/lib/upgrade-kubernetes.js.map +0 -1
- package/dist/lib/world-mcp-register.d.ts +0 -98
- package/dist/lib/world-mcp-register.d.ts.map +0 -1
- package/dist/lib/world-mcp-register.js +0 -117
- package/dist/lib/world-mcp-register.js.map +0 -1
- package/dist/output.d.ts +0 -10
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -31
- package/dist/output.js.map +0 -1
- package/dist/pleri-config.d.ts +0 -22
- package/dist/pleri-config.d.ts.map +0 -1
- package/dist/pleri-config.js +0 -42
- package/dist/pleri-config.js.map +0 -1
- package/dist/protocol-version.d.ts +0 -79
- package/dist/protocol-version.d.ts.map +0 -1
- package/dist/protocol-version.js +0 -133
- package/dist/protocol-version.js.map +0 -1
- package/dist/registry-allowlist.d.ts +0 -47
- package/dist/registry-allowlist.d.ts.map +0 -1
- package/dist/registry-allowlist.js +0 -67
- package/dist/registry-allowlist.js.map +0 -1
- package/dist/spawn/home-override.d.ts +0 -82
- package/dist/spawn/home-override.d.ts.map +0 -1
- package/dist/spawn/home-override.js +0 -107
- package/dist/spawn/home-override.js.map +0 -1
- package/host-cp/src/linear-sync.mjs +0 -43
|
@@ -1,895 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* olam skills source — manage registered skill sources.
|
|
3
|
-
*
|
|
4
|
-
* olam skills source list
|
|
5
|
-
* olam skills source add --name <n> --git-url <url> [--branch <b>]
|
|
6
|
-
* olam skills source remove <id>
|
|
7
|
-
* olam skills source pull <id>
|
|
8
|
-
* olam skills source show <id>
|
|
9
|
-
*/
|
|
10
|
-
import * as readline from 'node:readline';
|
|
11
|
-
import pc from 'picocolors';
|
|
12
|
-
import { listSkillSources, getSkillSource, getSkillSourceByName, addSkillSource, removeSkillSource, reorderSkillSource, updateSkillSource, cloneSkillSource, pullSkillSource, removeSkillSourceClone, skillSourceClonePath, appendTrustAudit, redactUrl, installSkillsHookToFile, isSkillsHookInstalled, skillsHookSettingsPathFor, syncSkills, readSourceConfig, resolveEffectivePrefix, } from '@olam/core/src/skill-sources/index.js';
|
|
13
|
-
import { printError, printSuccess, printInfo, printHeader } from '../output.js';
|
|
14
|
-
import { refreshShims } from './flywheel/install-shims.js';
|
|
15
|
-
function asMessage(err) {
|
|
16
|
-
return err instanceof Error ? err.message : String(err);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Capability-class trust gate (C4 / T6 mitigation). Registering a source
|
|
20
|
-
* grants symlink-into-`~/.claude/` permission; auditable + gated:
|
|
21
|
-
* - `--trust` → grant (audit: method=flag)
|
|
22
|
-
* - non-TTY + no flag → refuse (audit: action=auto-rejected)
|
|
23
|
-
* - TTY + no flag → prompt; ack → grant, cancel → refuse
|
|
24
|
-
*
|
|
25
|
-
* Injectable `promptFn` lets tests skip readline by passing a function that
|
|
26
|
-
* returns 'y' / 'n'. Production code uses the readline-based default.
|
|
27
|
-
*/
|
|
28
|
-
async function decideTrust(opts) {
|
|
29
|
-
if (opts.trustFlag) {
|
|
30
|
-
return { granted: true, method: 'flag' };
|
|
31
|
-
}
|
|
32
|
-
if (!opts.isTTY) {
|
|
33
|
-
return {
|
|
34
|
-
granted: false,
|
|
35
|
-
method: 'auto-reject-tty',
|
|
36
|
-
reason: 'non-interactive context (no TTY) requires explicit `--trust` flag. ' +
|
|
37
|
-
'Adding a skill source grants it permission to symlink into ~/.claude/ — ' +
|
|
38
|
-
'pass `--trust` to acknowledge, or re-run interactively.',
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
const fn = opts.promptFn ?? (() => defaultTrustPrompt(opts.gitUrl));
|
|
42
|
-
const answer = (await fn()).trim();
|
|
43
|
-
// Default-Y: empty string (just Enter) OR y/yes → granted.
|
|
44
|
-
// Only an explicit n/no denies. Any other gibberish also grants
|
|
45
|
-
// (operator pressed Enter or typed something affirmative-ish).
|
|
46
|
-
const denied = /^n(o)?$/i.test(answer);
|
|
47
|
-
return { granted: !denied, method: 'interactive' };
|
|
48
|
-
}
|
|
49
|
-
function defaultTrustPrompt(gitUrl) {
|
|
50
|
-
return new Promise((resolve) => {
|
|
51
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
52
|
-
process.stdout.write(`${pc.yellow('Trust gate:')} register "${gitUrl}" as a skill source?\n` +
|
|
53
|
-
' This grants the source permission to symlink artifacts into\n' +
|
|
54
|
-
' ~/.claude/ on every `olam skills sync`.\n' +
|
|
55
|
-
`Trust this source? ${pc.dim('[Y/n] ')}`);
|
|
56
|
-
rl.question('', (a) => {
|
|
57
|
-
rl.close();
|
|
58
|
-
resolve(a);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function defaultSourcePrefixPrompt(input) {
|
|
63
|
-
return new Promise((resolve) => {
|
|
64
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
65
|
-
const cfg = input.newConfig;
|
|
66
|
-
const prefixLabel = cfg.prefix !== undefined ? `'${cfg.prefix}:'` : '(no prefix)';
|
|
67
|
-
const scopeLabel = cfg.prefixScope !== undefined && cfg.prefixScope.length > 0
|
|
68
|
-
? ` (scope: ${cfg.prefixScope.join(',')})`
|
|
69
|
-
: '';
|
|
70
|
-
process.stdout.write(`\n${pc.cyan('Source-config:')} ${input.sourceName} suggests prefix ${pc.bold(prefixLabel)}${scopeLabel}.\n` +
|
|
71
|
-
`Adopt for this host? ${pc.dim('[Y/n] ')}`);
|
|
72
|
-
rl.question('', (a) => {
|
|
73
|
-
rl.close();
|
|
74
|
-
resolve(!/^n(o)?$/i.test(a.trim()));
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function defaultPostAddPrompt(input) {
|
|
79
|
-
return new Promise((resolve) => {
|
|
80
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
81
|
-
process.stdout.write(`\n${pc.bold('Sync now?')} ${pc.dim('[Y/n] ')}`);
|
|
82
|
-
rl.question('', (syncAnswer) => {
|
|
83
|
-
const sync = !/^n(o)?$/i.test(syncAnswer.trim());
|
|
84
|
-
if (input.hookAlreadyInstalled) {
|
|
85
|
-
rl.close();
|
|
86
|
-
resolve({ syncNow: sync, installHook: false });
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
process.stdout.write(`${pc.bold('Install SessionStart hook so future sessions auto-sync?')} ${pc.dim('[Y/n] ')}`);
|
|
90
|
-
rl.question('', (hookAnswer) => {
|
|
91
|
-
rl.close();
|
|
92
|
-
const installHook = !/^n(o)?$/i.test(hookAnswer.trim());
|
|
93
|
-
resolve({ syncNow: sync, installHook });
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Parse a comma-separated prefix-scope string like "skill", "agent", or "skill,agent".
|
|
100
|
-
* Returns the parsed array, or null if any token is invalid.
|
|
101
|
-
*/
|
|
102
|
-
function parsePrefixScope(raw) {
|
|
103
|
-
const tokens = raw.split(',').map((t) => t.trim()).filter((t) => t.length > 0);
|
|
104
|
-
if (tokens.length === 0)
|
|
105
|
-
return [];
|
|
106
|
-
const valid = new Set(['skill', 'agent']);
|
|
107
|
-
for (const t of tokens) {
|
|
108
|
-
if (!valid.has(t))
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
// De-dup while preserving order.
|
|
112
|
-
return [...new Set(tokens)];
|
|
113
|
-
}
|
|
114
|
-
export function registerSkillsSource(program) {
|
|
115
|
-
const skills = program.command('skills').description('Manage skill sources and synchronization');
|
|
116
|
-
const source = skills.command('source').description('Manage registered skill sources');
|
|
117
|
-
source
|
|
118
|
-
.command('list')
|
|
119
|
-
.description('List all registered skill sources')
|
|
120
|
-
.option('--json', 'Emit a machine-readable JSON array instead of the human table')
|
|
121
|
-
.action((opts) => {
|
|
122
|
-
const all = listSkillSources();
|
|
123
|
-
// --json: stable, scriptable contract. Always an array (empty when no
|
|
124
|
-
// sources). Computes the effective-prefix view per source so consumers
|
|
125
|
-
// don't have to re-implement the operator+source merge.
|
|
126
|
-
if (opts.json === true) {
|
|
127
|
-
const payload = all.map((s, i) => {
|
|
128
|
-
const clonePath = skillSourceClonePath(s.id);
|
|
129
|
-
let srcCfg;
|
|
130
|
-
try {
|
|
131
|
-
srcCfg = readSourceConfig(clonePath);
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
srcCfg = undefined;
|
|
135
|
-
}
|
|
136
|
-
const eff = resolveEffectivePrefix(s, srcCfg);
|
|
137
|
-
return {
|
|
138
|
-
ordinal: i + 1,
|
|
139
|
-
id: s.id,
|
|
140
|
-
name: s.name,
|
|
141
|
-
gitUrl: s.gitUrl,
|
|
142
|
-
branch: s.branch,
|
|
143
|
-
addedAt: s.addedAt,
|
|
144
|
-
lastPulledSha: s.lastPulledSha ?? null,
|
|
145
|
-
clonePath,
|
|
146
|
-
prefix: s.prefix ?? null,
|
|
147
|
-
prefixScope: s.prefixScope ? [...s.prefixScope] : null,
|
|
148
|
-
prefixTarget: s.prefixTarget ? [...s.prefixTarget] : null,
|
|
149
|
-
effective: {
|
|
150
|
-
prefix: eff.prefix ?? null,
|
|
151
|
-
prefixScope: eff.prefixScope ? [...eff.prefixScope] : null,
|
|
152
|
-
prefixTarget: eff.prefixTarget ? [...eff.prefixTarget] : null,
|
|
153
|
-
origin: eff.origin,
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
});
|
|
157
|
-
console.log(JSON.stringify(payload, null, 2));
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (all.length === 0) {
|
|
161
|
-
console.log(pc.dim('0 skill source(s) registered. Add one with: olam skills source add --name <n> --git-url <url>'));
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
printHeader(`${all.length} skill source(s)`);
|
|
165
|
-
// Show scope column when any source has a non-default prefixScope.
|
|
166
|
-
const DEFAULT_SCOPE_REPR = 'skill,agent';
|
|
167
|
-
const showScopeCol = all.some((s) => s.prefixScope !== undefined && s.prefixScope.slice().sort().join(',') !== 'agent,skill');
|
|
168
|
-
// A8 (ADR-021): compute per-source effective-prefix origin AT LIST TIME.
|
|
169
|
-
// Read-only — does NOT run a sync, does NOT mutate state. Origin column
|
|
170
|
-
// is shown only when at least one source ships a source-config (keeps
|
|
171
|
-
// default output unchanged for operators not using the feature).
|
|
172
|
-
const sourceConfigs = all.map((s) => {
|
|
173
|
-
const clonePath = skillSourceClonePath(s.id);
|
|
174
|
-
// Quiet read: pass undefined sourceId so malformed-warnings don't
|
|
175
|
-
// spam `list` output (the warning fires on sync where it's actionable).
|
|
176
|
-
try {
|
|
177
|
-
return readSourceConfig(clonePath);
|
|
178
|
-
}
|
|
179
|
-
catch {
|
|
180
|
-
return undefined;
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
const showOriginCol = sourceConfigs.some((c) => c !== undefined);
|
|
184
|
-
// Ordinal prefix exposes the multi-source precedence order
|
|
185
|
-
// (first-registered wins). Mutate via `olam skills source reorder`.
|
|
186
|
-
for (let i = 0; i < all.length; i += 1) {
|
|
187
|
-
const s = all[i];
|
|
188
|
-
const when = new Date(s.addedAt).toISOString().slice(0, 10);
|
|
189
|
-
const sha = s.lastPulledSha ? s.lastPulledSha.slice(0, 8) : pc.dim('(unpulled)');
|
|
190
|
-
const ord = pc.dim(`[${i + 1}]`);
|
|
191
|
-
const prefixCol = s.prefix ? pc.cyan(s.prefix.padEnd(12)) : pc.dim('—'.padEnd(12));
|
|
192
|
-
const scopeDisplay = s.prefixScope !== undefined ? s.prefixScope.join(',') : DEFAULT_SCOPE_REPR;
|
|
193
|
-
const scopeCol = showScopeCol ? ` ${pc.yellow(scopeDisplay.padEnd(12))}` : '';
|
|
194
|
-
let originCol = '';
|
|
195
|
-
if (showOriginCol) {
|
|
196
|
-
const eff = resolveEffectivePrefix(s, sourceConfigs[i]);
|
|
197
|
-
const tag = eff.origin === 'operator'
|
|
198
|
-
? pc.dim('(operator)')
|
|
199
|
-
: eff.origin === 'source'
|
|
200
|
-
? pc.dim('(source)')
|
|
201
|
-
: '';
|
|
202
|
-
originCol = ` ${tag.padEnd(10)}`;
|
|
203
|
-
}
|
|
204
|
-
console.log(` ${ord} ${pc.bold(s.id.padEnd(14))} ${s.name.padEnd(24)} ${s.branch.padEnd(12)} ${sha.padEnd(12)} ${prefixCol}${originCol}${scopeCol} ${pc.dim(when)} ${pc.dim(s.gitUrl)}`);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
source
|
|
208
|
-
.command('add')
|
|
209
|
-
.description('Register and clone a skill source (T6 capability-class: requires --trust OR interactive ack)')
|
|
210
|
-
.requiredOption('--name <name>', 'Display name (lowercase, digits, dash)')
|
|
211
|
-
.requiredOption('--git-url <url>', 'git URL (https://, git@, ssh://, file://, or absolute path)')
|
|
212
|
-
.option('--branch <branch>', 'Branch to track', 'main')
|
|
213
|
-
.option('--prefix <prefix>', 'Deploy prefix: skills+agents from this source deploy as <prefix>:<canonical-name> (e.g. "atl", "pln"). Must match /^[a-z0-9][a-z0-9_-]{0,38}$/')
|
|
214
|
-
.option('--prefix-scope <scope>', 'Comma-separated list of artifact kinds to rename when prefix is set. Valid values: skill, agent. Default: skill,agent. E.g. "--prefix-scope=skill" to rename only skills.')
|
|
215
|
-
.option('--trust', 'Acknowledge that registering grants symlink-into-~/.claude permission (skips interactive picker)')
|
|
216
|
-
.option('--auto-accept-source-prefix', "ADR-021: when the source ships shared/source-config.yaml with a prefix suggestion, adopt it silently (no prompt). Useful for CI / scripted onboarding.")
|
|
217
|
-
.option('--accept-source-prefix-changes', 'ADR-021: forwarded to the post-add sync (if --sync-now) — accept future source-prefix CHANGES silently.')
|
|
218
|
-
// Post-add follow-up flags. In TTY context the operator is prompted;
|
|
219
|
-
// these flags let scripts override or skip the prompt non-interactively.
|
|
220
|
-
.option('--sync-now', 'Run `olam skills sync` immediately after add (skips interactive prompt)')
|
|
221
|
-
.option('--no-sync-now', 'Skip the post-add sync (skips interactive prompt)')
|
|
222
|
-
.option('--install-hook', 'Install the SessionStart hook after add (skips interactive prompt)')
|
|
223
|
-
.option('--no-install-hook', 'Skip installing the SessionStart hook (skips interactive prompt)')
|
|
224
|
-
.option('--hook-scope <scope>', 'When installing the hook (post-add): project (<cwd>/.claude) or user (~/.claude)', 'project')
|
|
225
|
-
.action(async (opts) => {
|
|
226
|
-
// Validate --prefix early before any I/O (regex: same shape as schema).
|
|
227
|
-
const PREFIX_PATTERN = /^[a-z0-9][a-z0-9_-]{0,38}$/;
|
|
228
|
-
if (opts.prefix !== undefined && !PREFIX_PATTERN.test(opts.prefix)) {
|
|
229
|
-
printError(`prefix must match /^[a-z0-9][a-z0-9_-]{0,38}$/ — got "${opts.prefix}"`);
|
|
230
|
-
process.exitCode = 1;
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
// Validate --prefix-scope early.
|
|
234
|
-
let parsedPrefixScope;
|
|
235
|
-
if (opts.prefixScope !== undefined) {
|
|
236
|
-
const parsed = parsePrefixScope(opts.prefixScope);
|
|
237
|
-
if (parsed === null) {
|
|
238
|
-
printError(`--prefix-scope must be a comma-separated list of "skill" and/or "agent" — got "${opts.prefixScope}"`);
|
|
239
|
-
process.exitCode = 1;
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
parsedPrefixScope = parsed;
|
|
243
|
-
}
|
|
244
|
-
// T6 / C4 — capability-class trust gate. Audits every decision.
|
|
245
|
-
const isTTY = Boolean(process.stdout.isTTY);
|
|
246
|
-
const testPromptFn = globalThis.__olamTestTrustPrompt;
|
|
247
|
-
let decision;
|
|
248
|
-
try {
|
|
249
|
-
decision = await decideTrust({
|
|
250
|
-
trustFlag: opts.trust === true,
|
|
251
|
-
gitUrl: opts.gitUrl,
|
|
252
|
-
isTTY,
|
|
253
|
-
promptFn: testPromptFn,
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
catch (err) {
|
|
257
|
-
printError(`trust gate errored: ${asMessage(err)}`);
|
|
258
|
-
process.exitCode = 1;
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
if (!decision.granted) {
|
|
262
|
-
try {
|
|
263
|
-
appendTrustAudit({
|
|
264
|
-
gitUrl: redactUrl(opts.gitUrl),
|
|
265
|
-
action: decision.method === 'auto-reject-tty' ? 'auto-rejected' : 'rejected',
|
|
266
|
-
trustMethod: decision.method,
|
|
267
|
-
...(decision.reason ? { note: decision.reason } : {}),
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
catch {
|
|
271
|
-
// audit-log failure must not block the user-facing error path
|
|
272
|
-
}
|
|
273
|
-
printError(decision.reason ?? 'trust gate declined; skill source NOT added');
|
|
274
|
-
process.exitCode = 1;
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
let entry;
|
|
278
|
-
try {
|
|
279
|
-
// `trustMethod` is required at the store layer — CP3 trust-coverage
|
|
280
|
-
// fix. addSkillSource() writes the 'added' audit entry internally;
|
|
281
|
-
// CLI no longer duplicates the audit append on success.
|
|
282
|
-
entry = addSkillSource({
|
|
283
|
-
name: opts.name,
|
|
284
|
-
gitUrl: opts.gitUrl,
|
|
285
|
-
branch: opts.branch,
|
|
286
|
-
trustMethod: decision.method,
|
|
287
|
-
});
|
|
288
|
-
// Apply --prefix / --prefix-scope if provided.
|
|
289
|
-
if (opts.prefix !== undefined || parsedPrefixScope !== undefined) {
|
|
290
|
-
updateSkillSource(entry.id, {
|
|
291
|
-
...(opts.prefix !== undefined ? { prefix: opts.prefix } : {}),
|
|
292
|
-
...(parsedPrefixScope !== undefined ? { prefixScope: parsedPrefixScope } : {}),
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
catch (err) {
|
|
297
|
-
try {
|
|
298
|
-
appendTrustAudit({
|
|
299
|
-
gitUrl: redactUrl(opts.gitUrl),
|
|
300
|
-
action: 'failed',
|
|
301
|
-
trustMethod: decision.method,
|
|
302
|
-
note: `addSkillSource: ${asMessage(err)}`,
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
catch {
|
|
306
|
-
// best-effort
|
|
307
|
-
}
|
|
308
|
-
printError(asMessage(err));
|
|
309
|
-
process.exitCode = 1;
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
try {
|
|
313
|
-
const result = cloneSkillSource({
|
|
314
|
-
gitUrl: entry.gitUrl,
|
|
315
|
-
branch: entry.branch,
|
|
316
|
-
id: entry.id,
|
|
317
|
-
});
|
|
318
|
-
updateSkillSource(entry.id, { lastPulledSha: result.headSha });
|
|
319
|
-
// 'added' audit entry already written by addSkillSource() itself.
|
|
320
|
-
printSuccess(`registered skill source "${entry.name}" (${entry.id}) at ${result.clonePath} @ ${result.headSha.slice(0, 8)}`);
|
|
321
|
-
}
|
|
322
|
-
catch (err) {
|
|
323
|
-
// Roll back the state-store entry so add stays atomic
|
|
324
|
-
try {
|
|
325
|
-
removeSkillSource(entry.id);
|
|
326
|
-
}
|
|
327
|
-
catch {
|
|
328
|
-
// best-effort rollback
|
|
329
|
-
}
|
|
330
|
-
try {
|
|
331
|
-
appendTrustAudit({
|
|
332
|
-
gitUrl: redactUrl(entry.gitUrl),
|
|
333
|
-
action: 'failed',
|
|
334
|
-
trustMethod: decision.method,
|
|
335
|
-
sourceId: entry.id,
|
|
336
|
-
note: `clone: ${asMessage(err)}`,
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
catch {
|
|
340
|
-
// best-effort
|
|
341
|
-
}
|
|
342
|
-
printError(asMessage(err));
|
|
343
|
-
process.exitCode = 1;
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
// -------------------------------------------------------------
|
|
347
|
-
// ADR-021 source-config prefix gate (A6). Fires after clone +
|
|
348
|
-
// before the post-add picker. Only when:
|
|
349
|
-
// - source ships shared/source-config.yaml that parses cleanly
|
|
350
|
-
// - source-config has at least one prefix field set
|
|
351
|
-
// - operator did NOT pass --prefix (explicit operator intent wins)
|
|
352
|
-
// Persists lastSeenSourcePrefix on BOTH accept and reject so the
|
|
353
|
-
// sync-time gate doesn't re-prompt for the same content. Rejection
|
|
354
|
-
// is silent — operator gets canonical names from this source.
|
|
355
|
-
// -------------------------------------------------------------
|
|
356
|
-
if (opts.prefix === undefined) {
|
|
357
|
-
const clonePath = skillSourceClonePath(entry.id);
|
|
358
|
-
const srcCfg = readSourceConfig(clonePath, entry.id);
|
|
359
|
-
const hasPrefixField = srcCfg !== undefined &&
|
|
360
|
-
(srcCfg.prefix !== undefined ||
|
|
361
|
-
(srcCfg.prefixScope !== undefined && srcCfg.prefixScope.length > 0));
|
|
362
|
-
if (srcCfg !== undefined && hasPrefixField) {
|
|
363
|
-
const testSrcPrefixPrompt = globalThis.__olamTestSourcePrefixPrompt;
|
|
364
|
-
const sourceConfigIsTTY = Boolean(process.stdout.isTTY) || testSrcPrefixPrompt !== undefined;
|
|
365
|
-
let consented = false;
|
|
366
|
-
let method;
|
|
367
|
-
if (opts.autoAcceptSourcePrefix === true) {
|
|
368
|
-
consented = true;
|
|
369
|
-
method = 'flag';
|
|
370
|
-
}
|
|
371
|
-
else if (sourceConfigIsTTY) {
|
|
372
|
-
try {
|
|
373
|
-
const promptFn = testSrcPrefixPrompt ?? defaultSourcePrefixPrompt;
|
|
374
|
-
consented = await promptFn({ sourceName: entry.name, newConfig: srcCfg });
|
|
375
|
-
method = 'interactive';
|
|
376
|
-
}
|
|
377
|
-
catch (err) {
|
|
378
|
-
printError(`source-prefix prompt errored: ${asMessage(err)}`);
|
|
379
|
-
consented = false;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
// else: non-TTY without flag → silent skip; let sync-time gate handle.
|
|
383
|
-
if (consented) {
|
|
384
|
-
try {
|
|
385
|
-
updateSkillSource(entry.id, {
|
|
386
|
-
...(srcCfg.prefix !== undefined ? { prefix: srcCfg.prefix } : {}),
|
|
387
|
-
...(srcCfg.prefixScope !== undefined ? { prefixScope: srcCfg.prefixScope } : {}),
|
|
388
|
-
lastSeenSourcePrefix: srcCfg,
|
|
389
|
-
});
|
|
390
|
-
appendTrustAudit({
|
|
391
|
-
gitUrl: 'internal:source-prefix-adopted',
|
|
392
|
-
action: 'source-prefix-adopted',
|
|
393
|
-
trustMethod: method ?? 'flag',
|
|
394
|
-
sourceId: entry.id,
|
|
395
|
-
note: `snapshot=${JSON.stringify(srcCfg)}`,
|
|
396
|
-
});
|
|
397
|
-
printInfo('source-config', `adopted prefix '${srcCfg.prefix ?? '(none)'}'${srcCfg.prefixScope ? ` scope=${srcCfg.prefixScope.join(',')}` : ''} from ${entry.name}`);
|
|
398
|
-
}
|
|
399
|
-
catch (err) {
|
|
400
|
-
printError(`source-prefix adopt failed: ${asMessage(err)}`);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
else if (method === 'interactive') {
|
|
404
|
-
// TTY reject: persist snapshot only so sync gate stays quiet
|
|
405
|
-
// until source-config CHANGES. Audit-log records the decline.
|
|
406
|
-
try {
|
|
407
|
-
updateSkillSource(entry.id, { lastSeenSourcePrefix: srcCfg });
|
|
408
|
-
appendTrustAudit({
|
|
409
|
-
gitUrl: 'internal:source-prefix-adopted',
|
|
410
|
-
action: 'rejected',
|
|
411
|
-
trustMethod: 'interactive',
|
|
412
|
-
sourceId: entry.id,
|
|
413
|
-
note: `declined-snapshot=${JSON.stringify(srcCfg)}`,
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
catch {
|
|
417
|
-
// best-effort
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
// -------------------------------------------------------------
|
|
423
|
-
// Post-add follow-ups (#4): offer sync + hook install to the
|
|
424
|
-
// operator. Flag-driven in scripts; prompt-driven in TTY.
|
|
425
|
-
// -------------------------------------------------------------
|
|
426
|
-
const hookScope = opts.hookScope === 'user' ? 'user' : 'project';
|
|
427
|
-
const hookFilePath = skillsHookSettingsPathFor(hookScope);
|
|
428
|
-
const hookAlreadyInstalled = isSkillsHookInstalled(hookFilePath);
|
|
429
|
-
const flagSyncSet = opts.syncNow !== undefined;
|
|
430
|
-
const flagHookSet = opts.installHook !== undefined;
|
|
431
|
-
const decideOutcome = async () => {
|
|
432
|
-
// Explicit flags always win, even in TTY: scripts that pass
|
|
433
|
-
// `--sync-now` shouldn't unexpectedly hit an interactive prompt
|
|
434
|
-
// when run from a terminal.
|
|
435
|
-
if (flagSyncSet && (flagHookSet || hookAlreadyInstalled)) {
|
|
436
|
-
return {
|
|
437
|
-
syncNow: opts.syncNow === true,
|
|
438
|
-
installHook: hookAlreadyInstalled ? false : opts.installHook === true,
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
if (!process.stdout.isTTY) {
|
|
442
|
-
// Non-interactive: use whichever flags are set, default false
|
|
443
|
-
// for the rest. Preserves the pre-#4 silent behavior.
|
|
444
|
-
return {
|
|
445
|
-
syncNow: opts.syncNow === true,
|
|
446
|
-
installHook: hookAlreadyInstalled ? false : opts.installHook === true,
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
const testPostAddPrompt = globalThis
|
|
450
|
-
.__olamTestPostAddPrompt;
|
|
451
|
-
const promptFn = testPostAddPrompt ?? defaultPostAddPrompt;
|
|
452
|
-
const fromPrompt = await promptFn({ hookAlreadyInstalled });
|
|
453
|
-
// Flag-overrides on top of the prompt's defaults (a script using
|
|
454
|
-
// --sync-now in a TTY still wants that to stick).
|
|
455
|
-
return {
|
|
456
|
-
syncNow: flagSyncSet ? opts.syncNow === true : fromPrompt.syncNow,
|
|
457
|
-
installHook: hookAlreadyInstalled
|
|
458
|
-
? false
|
|
459
|
-
: flagHookSet
|
|
460
|
-
? opts.installHook === true
|
|
461
|
-
: fromPrompt.installHook,
|
|
462
|
-
};
|
|
463
|
-
};
|
|
464
|
-
let outcome;
|
|
465
|
-
try {
|
|
466
|
-
outcome = await decideOutcome();
|
|
467
|
-
}
|
|
468
|
-
catch (err) {
|
|
469
|
-
printError(`post-add picker errored: ${asMessage(err)}`);
|
|
470
|
-
process.exitCode = 1;
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
// Print a one-line ack BEFORE any long-running output so the operator
|
|
474
|
-
// knows the prompts are done and work is starting. Without this, the
|
|
475
|
-
// sync output scrolls the prompt off-screen and looks like a hang.
|
|
476
|
-
if (process.stdout.isTTY || Boolean(globalThis.__olamTestPostAddPrompt)) {
|
|
477
|
-
const parts = [];
|
|
478
|
-
if (outcome.syncNow)
|
|
479
|
-
parts.push('sync');
|
|
480
|
-
if (outcome.installHook)
|
|
481
|
-
parts.push('hook install');
|
|
482
|
-
if (parts.length > 0) {
|
|
483
|
-
printInfo('post-add', `Will run: ${parts.join(' + ')}.`);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
if (outcome.installHook) {
|
|
487
|
-
try {
|
|
488
|
-
const hookResult = installSkillsHookToFile(hookFilePath);
|
|
489
|
-
switch (hookResult.status) {
|
|
490
|
-
case 'installed':
|
|
491
|
-
printInfo('hook', `installed (${hookScope} scope) at ${hookFilePath}`);
|
|
492
|
-
if (hookResult.backupPath)
|
|
493
|
-
printInfo('backup', hookResult.backupPath);
|
|
494
|
-
break;
|
|
495
|
-
case 'already-present':
|
|
496
|
-
printInfo('hook', `already installed at ${hookFilePath}`);
|
|
497
|
-
break;
|
|
498
|
-
case 'no-op':
|
|
499
|
-
printInfo('hook', `no change at ${hookFilePath}`);
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
catch (err) {
|
|
504
|
-
// Hook install failure must NOT roll back the source — the
|
|
505
|
-
// source registration is still valid + useful. Surface a
|
|
506
|
-
// warning + audit row instead.
|
|
507
|
-
printError(`install-hook failed: ${asMessage(err)}`);
|
|
508
|
-
try {
|
|
509
|
-
appendTrustAudit({
|
|
510
|
-
gitUrl: redactUrl(entry.gitUrl),
|
|
511
|
-
action: 'failed',
|
|
512
|
-
trustMethod: decision.method,
|
|
513
|
-
sourceId: entry.id,
|
|
514
|
-
note: `post-add install-hook: ${asMessage(err)}`,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
catch {
|
|
518
|
-
// best-effort
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
if (outcome.syncNow) {
|
|
523
|
-
try {
|
|
524
|
-
const summary = await syncSkills({
|
|
525
|
-
autoAcceptSourcePrefix: opts.autoAcceptSourcePrefix === true,
|
|
526
|
-
acceptSourcePrefixChanges: opts.acceptSourcePrefixChanges === true,
|
|
527
|
-
});
|
|
528
|
-
printInfo('sync', `${summary.artifactCount} artifact(s) deployed`);
|
|
529
|
-
}
|
|
530
|
-
catch (err) {
|
|
531
|
-
printError(`sync failed: ${asMessage(err)}`);
|
|
532
|
-
try {
|
|
533
|
-
appendTrustAudit({
|
|
534
|
-
gitUrl: redactUrl(entry.gitUrl),
|
|
535
|
-
action: 'failed',
|
|
536
|
-
trustMethod: decision.method,
|
|
537
|
-
sourceId: entry.id,
|
|
538
|
-
note: `post-add sync: ${asMessage(err)}`,
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
catch {
|
|
542
|
-
// best-effort
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
// Audit the picker outcome ONLY when the picker actually ran (TTY
|
|
547
|
-
// context) or when post-add flags were explicitly set. Skipping
|
|
548
|
-
// the row in non-TTY + no-flag context preserves the pre-Phase-D
|
|
549
|
-
// single-row-per-add invariant existing audit tests rely on. When
|
|
550
|
-
// emitted, the row carries `action: 'added'` (passthrough-extended
|
|
551
|
-
// with a post-add note) so audit:trust-coverage stays satisfied
|
|
552
|
-
// even if a future caller checks counts beyond first match.
|
|
553
|
-
const pickerRan = flagSyncSet || flagHookSet || Boolean(process.stdout.isTTY);
|
|
554
|
-
if (pickerRan) {
|
|
555
|
-
try {
|
|
556
|
-
const syncNote = outcome.syncNow ? 'yes' : 'no';
|
|
557
|
-
const hookNote = hookAlreadyInstalled
|
|
558
|
-
? 'already-installed'
|
|
559
|
-
: outcome.installHook
|
|
560
|
-
? 'yes'
|
|
561
|
-
: 'no';
|
|
562
|
-
appendTrustAudit({
|
|
563
|
-
gitUrl: redactUrl(entry.gitUrl),
|
|
564
|
-
action: 'added',
|
|
565
|
-
trustMethod: decision.method,
|
|
566
|
-
sourceId: entry.id,
|
|
567
|
-
note: `post-add: sync=${syncNote} hook=${hookNote}`,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
catch {
|
|
571
|
-
// best-effort
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
});
|
|
575
|
-
source
|
|
576
|
-
.command('remove')
|
|
577
|
-
.description('Remove a registered skill source (deletes its clone)')
|
|
578
|
-
.argument('<id>', 'Skill source id (from "olam skills source list")')
|
|
579
|
-
.action((id) => {
|
|
580
|
-
try {
|
|
581
|
-
removeSkillSourceClone(id);
|
|
582
|
-
removeSkillSource(id);
|
|
583
|
-
printSuccess(`removed skill source "${id}"`);
|
|
584
|
-
}
|
|
585
|
-
catch (err) {
|
|
586
|
-
printError(asMessage(err));
|
|
587
|
-
process.exitCode = 1;
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
source
|
|
591
|
-
.command('pull')
|
|
592
|
-
.description('Fetch + reset the clone to upstream HEAD')
|
|
593
|
-
.argument('<id>', 'Skill source id')
|
|
594
|
-
.action((id) => {
|
|
595
|
-
try {
|
|
596
|
-
const entry = getSkillSource(id);
|
|
597
|
-
if (!entry) {
|
|
598
|
-
printError(`skill source "${id}" is not registered`);
|
|
599
|
-
process.exitCode = 1;
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
const result = pullSkillSource({
|
|
603
|
-
gitUrl: entry.gitUrl,
|
|
604
|
-
branch: entry.branch,
|
|
605
|
-
id: entry.id,
|
|
606
|
-
});
|
|
607
|
-
updateSkillSource(entry.id, { lastPulledSha: result.headSha });
|
|
608
|
-
printSuccess(`pulled "${entry.name}" → ${result.headSha.slice(0, 8)}`);
|
|
609
|
-
// B2 — closes K1 OQ20: refresh ~/.claude/scripts/<shim-target> after
|
|
610
|
-
// every pull. syncSkills already owns the ~/.claude/scripts/ write
|
|
611
|
-
// access; layering the flywheel-shim refresh here keeps the contract
|
|
612
|
-
// close to the path-touch that necessitates it (atlas-toolbox pull
|
|
613
|
-
// could have changed shipped scripts).
|
|
614
|
-
const shimSummary = refreshShims({});
|
|
615
|
-
if (shimSummary.written + shimSummary.overwritten > 0) {
|
|
616
|
-
printInfo('flywheel shims refreshed', `${shimSummary.written} written, ${shimSummary.overwritten} overwritten, ${shimSummary.unchanged} unchanged${shimSummary.preserved > 0 ? `, ${shimSummary.preserved} PRESERVED (operator action needed — run \`olam flywheel install-shims --force\`)` : ''}`);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
catch (err) {
|
|
620
|
-
printError(asMessage(err));
|
|
621
|
-
process.exitCode = 1;
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
source
|
|
625
|
-
.command('reorder')
|
|
626
|
-
.description('Move a registered source to a new ordinal (1-indexed; mutates precedence)')
|
|
627
|
-
.argument('<id>', 'Skill source id (from "olam skills source list")')
|
|
628
|
-
.argument('<position>', 'New 1-indexed ordinal (1 = first / highest precedence)')
|
|
629
|
-
.action((id, positionRaw) => {
|
|
630
|
-
const position = Number.parseInt(positionRaw, 10);
|
|
631
|
-
if (!Number.isInteger(position)) {
|
|
632
|
-
printError(`position must be an integer (got "${positionRaw}")`);
|
|
633
|
-
process.exitCode = 1;
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
try {
|
|
637
|
-
const next = reorderSkillSource(id, position);
|
|
638
|
-
const idx = next.findIndex((s) => s.id === id);
|
|
639
|
-
printSuccess(`reordered "${id}" → position ${idx + 1} of ${next.length}`);
|
|
640
|
-
}
|
|
641
|
-
catch (err) {
|
|
642
|
-
printError(asMessage(err));
|
|
643
|
-
process.exitCode = 1;
|
|
644
|
-
}
|
|
645
|
-
});
|
|
646
|
-
source
|
|
647
|
-
.command('show')
|
|
648
|
-
.description('Show details for a single skill source (lookup by id OR name)')
|
|
649
|
-
.argument('<idOrName>', 'Skill source id or display name')
|
|
650
|
-
.option('--json', 'Emit a machine-readable JSON object instead of the four human sections')
|
|
651
|
-
.action((idOrName, opts) => {
|
|
652
|
-
// A9 (ADR-021): lookup tries id first, then name. Preserves existing
|
|
653
|
-
// `show <id>` behavior while adding `show <name>` per ADR-021.
|
|
654
|
-
const entry = getSkillSource(idOrName) ?? getSkillSourceByName(idOrName);
|
|
655
|
-
if (!entry) {
|
|
656
|
-
printError(`skill source "${idOrName}" is not registered. Run \`olam skills source list\` to see registered sources.`);
|
|
657
|
-
process.exitCode = 1;
|
|
658
|
-
return;
|
|
659
|
-
}
|
|
660
|
-
const when = new Date(entry.addedAt).toISOString();
|
|
661
|
-
const clonePath = skillSourceClonePath(entry.id);
|
|
662
|
-
// --json: same four logical sections, nested as one object. Mirrors the
|
|
663
|
-
// human render below so consumers and operators see identical data.
|
|
664
|
-
if (opts.json === true) {
|
|
665
|
-
let srcCfg;
|
|
666
|
-
try {
|
|
667
|
-
srcCfg = readSourceConfig(clonePath, entry.id);
|
|
668
|
-
}
|
|
669
|
-
catch {
|
|
670
|
-
srcCfg = undefined;
|
|
671
|
-
}
|
|
672
|
-
const effJson = resolveEffectivePrefix(entry, srcCfg);
|
|
673
|
-
const payload = {
|
|
674
|
-
registered: {
|
|
675
|
-
id: entry.id,
|
|
676
|
-
name: entry.name,
|
|
677
|
-
gitUrl: entry.gitUrl,
|
|
678
|
-
branch: entry.branch,
|
|
679
|
-
addedAt: entry.addedAt,
|
|
680
|
-
lastPulledSha: entry.lastPulledSha ?? null,
|
|
681
|
-
clonePath,
|
|
682
|
-
},
|
|
683
|
-
sourceConfig: srcCfg === undefined
|
|
684
|
-
? null
|
|
685
|
-
: {
|
|
686
|
-
prefix: srcCfg.prefix ?? null,
|
|
687
|
-
prefixScope: srcCfg.prefixScope ? [...srcCfg.prefixScope] : null,
|
|
688
|
-
prefixTarget: srcCfg.prefixTarget ? [...srcCfg.prefixTarget] : null,
|
|
689
|
-
},
|
|
690
|
-
operator: {
|
|
691
|
-
prefix: entry.prefix ?? null,
|
|
692
|
-
prefixScope: entry.prefixScope ? [...entry.prefixScope] : null,
|
|
693
|
-
prefixTarget: entry.prefixTarget ? [...entry.prefixTarget] : null,
|
|
694
|
-
lastSeenSourcePrefix: entry.lastSeenSourcePrefix ?? null,
|
|
695
|
-
},
|
|
696
|
-
effective: {
|
|
697
|
-
prefix: effJson.prefix ?? null,
|
|
698
|
-
prefixScope: effJson.prefixScope ? [...effJson.prefixScope] : null,
|
|
699
|
-
prefixTarget: effJson.prefixTarget ? [...effJson.prefixTarget] : null,
|
|
700
|
-
origin: effJson.origin,
|
|
701
|
-
},
|
|
702
|
-
};
|
|
703
|
-
console.log(JSON.stringify(payload, null, 2));
|
|
704
|
-
return;
|
|
705
|
-
}
|
|
706
|
-
// Section 1: registered (operator-config) fields.
|
|
707
|
-
console.log(pc.bold('▸ registered'));
|
|
708
|
-
console.log(` ${pc.bold('id:')} ${entry.id}`);
|
|
709
|
-
console.log(` ${pc.bold('name:')} ${entry.name}`);
|
|
710
|
-
console.log(` ${pc.bold('gitUrl:')} ${entry.gitUrl}`);
|
|
711
|
-
console.log(` ${pc.bold('branch:')} ${entry.branch}`);
|
|
712
|
-
console.log(` ${pc.bold('addedAt:')} ${when}`);
|
|
713
|
-
console.log(` ${pc.bold('lastPulledSha:')} ${entry.lastPulledSha ?? pc.dim('(unpulled)')}`);
|
|
714
|
-
console.log(` ${pc.bold('clonePath:')} ${clonePath}`);
|
|
715
|
-
// Section 2: source-config snapshot (from <clone>/shared/source-config.yaml).
|
|
716
|
-
let sourceConfig;
|
|
717
|
-
try {
|
|
718
|
-
sourceConfig = readSourceConfig(clonePath, entry.id);
|
|
719
|
-
}
|
|
720
|
-
catch {
|
|
721
|
-
sourceConfig = undefined;
|
|
722
|
-
}
|
|
723
|
-
console.log(pc.bold('▸ source-config (from clone)'));
|
|
724
|
-
if (sourceConfig === undefined) {
|
|
725
|
-
console.log(` ${pc.dim('(no shared/source-config.yaml in clone)')}`);
|
|
726
|
-
}
|
|
727
|
-
else {
|
|
728
|
-
console.log(` ${pc.bold('prefix:')} ${sourceConfig.prefix ?? pc.dim('—')}`);
|
|
729
|
-
console.log(` ${pc.bold('prefixScope:')} ${sourceConfig.prefixScope?.join(',') ?? pc.dim('—')}`);
|
|
730
|
-
console.log(` ${pc.bold('prefixTarget:')} ${sourceConfig.prefixTarget?.join(' ') ?? pc.dim('—')}`);
|
|
731
|
-
}
|
|
732
|
-
// Section 3: operator overrides (from ~/.olam/config.json skillSources[]).
|
|
733
|
-
console.log(pc.bold('▸ operator overrides'));
|
|
734
|
-
console.log(` ${pc.bold('prefix:')} ${entry.prefix ?? pc.dim('—')}`);
|
|
735
|
-
console.log(` ${pc.bold('prefixScope:')} ${entry.prefixScope?.join(',') ?? pc.dim('—')}`);
|
|
736
|
-
console.log(` ${pc.bold('prefixTarget:')} ${entry.prefixTarget?.join(' ') ?? pc.dim('—')}`);
|
|
737
|
-
console.log(` ${pc.bold('lastSeen:')} ${entry.lastSeenSourcePrefix ? JSON.stringify(entry.lastSeenSourcePrefix) : pc.dim('—')}`);
|
|
738
|
-
// Section 4: effective (merged) — what this source actually deploys as.
|
|
739
|
-
const eff = resolveEffectivePrefix(entry, sourceConfig);
|
|
740
|
-
console.log(pc.bold(`▸ effective ${pc.dim(`(origin: ${eff.origin})`)}`));
|
|
741
|
-
console.log(` ${pc.bold('prefix:')} ${eff.prefix ?? pc.dim('—')}`);
|
|
742
|
-
console.log(` ${pc.bold('prefixScope:')} ${eff.prefixScope?.join(',') ?? pc.dim('—')}`);
|
|
743
|
-
console.log(` ${pc.bold('prefixTarget:')} ${eff.prefixTarget?.join(' ') ?? pc.dim('—')}`);
|
|
744
|
-
});
|
|
745
|
-
// Phase A skill-prefix-rules: set-prefix / unset-prefix subcommands.
|
|
746
|
-
source
|
|
747
|
-
.command('set-prefix')
|
|
748
|
-
.description('Set the deploy prefix for a registered skill source (skills+agents deploy as <prefix>:<canonical-name>)')
|
|
749
|
-
.argument('<name>', 'Display name of the skill source (from "olam skills source list")')
|
|
750
|
-
.argument('<prefix>', 'Prefix value (must match /^[a-z0-9][a-z0-9_-]{0,38}$/)')
|
|
751
|
-
.action((name, prefix) => {
|
|
752
|
-
const entry = getSkillSourceByName(name);
|
|
753
|
-
if (entry === null) {
|
|
754
|
-
printError(`skill source "${name}" is not registered. Run "olam skills source list" to see registered sources.`);
|
|
755
|
-
process.exitCode = 1;
|
|
756
|
-
return;
|
|
757
|
-
}
|
|
758
|
-
try {
|
|
759
|
-
updateSkillSource(entry.id, { prefix });
|
|
760
|
-
printSuccess(`set prefix "${prefix}" on source "${name}" (${entry.id})`);
|
|
761
|
-
}
|
|
762
|
-
catch (err) {
|
|
763
|
-
printError(asMessage(err));
|
|
764
|
-
process.exitCode = 1;
|
|
765
|
-
}
|
|
766
|
-
});
|
|
767
|
-
source
|
|
768
|
-
.command('unset-prefix')
|
|
769
|
-
.description('Remove the deploy prefix from a registered skill source (reverts to canonical deploy names)')
|
|
770
|
-
.argument('<name>', 'Display name of the skill source (from "olam skills source list")')
|
|
771
|
-
.action((name) => {
|
|
772
|
-
const entry = getSkillSourceByName(name);
|
|
773
|
-
if (entry === null) {
|
|
774
|
-
printError(`skill source "${name}" is not registered. Run "olam skills source list" to see registered sources.`);
|
|
775
|
-
process.exitCode = 1;
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
try {
|
|
779
|
-
updateSkillSource(entry.id, { prefix: null });
|
|
780
|
-
printSuccess(`unset prefix on source "${name}" (${entry.id})`);
|
|
781
|
-
}
|
|
782
|
-
catch (err) {
|
|
783
|
-
printError(asMessage(err));
|
|
784
|
-
process.exitCode = 1;
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
// Phase A+: set-prefix-scope / unset-prefix-scope subcommands.
|
|
788
|
-
source
|
|
789
|
-
.command('set-prefix-scope')
|
|
790
|
-
.description('Set which artifact kinds are renamed by the prefix (comma-separated: skill, agent, or skill,agent)')
|
|
791
|
-
.argument('<name>', 'Display name of the skill source (from "olam skills source list")')
|
|
792
|
-
.argument('<scope>', 'Comma-separated artifact kinds: "skill", "agent", or "skill,agent". Empty string = no renaming.')
|
|
793
|
-
.action((name, scopeRaw) => {
|
|
794
|
-
const entry = getSkillSourceByName(name);
|
|
795
|
-
if (entry === null) {
|
|
796
|
-
printError(`skill source "${name}" is not registered. Run "olam skills source list" to see registered sources.`);
|
|
797
|
-
process.exitCode = 1;
|
|
798
|
-
return;
|
|
799
|
-
}
|
|
800
|
-
const parsed = parsePrefixScope(scopeRaw);
|
|
801
|
-
if (parsed === null) {
|
|
802
|
-
printError(`scope must be a comma-separated list of "skill" and/or "agent" — got "${scopeRaw}"`);
|
|
803
|
-
process.exitCode = 1;
|
|
804
|
-
return;
|
|
805
|
-
}
|
|
806
|
-
try {
|
|
807
|
-
updateSkillSource(entry.id, { prefixScope: parsed });
|
|
808
|
-
const display = parsed.length === 0 ? '(none — prefix disabled)' : parsed.join(',');
|
|
809
|
-
printSuccess(`set prefix-scope "${display}" on source "${name}" (${entry.id})`);
|
|
810
|
-
}
|
|
811
|
-
catch (err) {
|
|
812
|
-
printError(asMessage(err));
|
|
813
|
-
process.exitCode = 1;
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
source
|
|
817
|
-
.command('unset-prefix-scope')
|
|
818
|
-
.description('Remove the prefix-scope override from a registered skill source (reverts to default: both skill and agent are renamed)')
|
|
819
|
-
.argument('<name>', 'Display name of the skill source (from "olam skills source list")')
|
|
820
|
-
.action((name) => {
|
|
821
|
-
const entry = getSkillSourceByName(name);
|
|
822
|
-
if (entry === null) {
|
|
823
|
-
printError(`skill source "${name}" is not registered. Run "olam skills source list" to see registered sources.`);
|
|
824
|
-
process.exitCode = 1;
|
|
825
|
-
return;
|
|
826
|
-
}
|
|
827
|
-
try {
|
|
828
|
-
updateSkillSource(entry.id, { prefixScope: null });
|
|
829
|
-
printSuccess(`unset prefix-scope on source "${name}" (${entry.id}) — reverted to default (skill,agent)`);
|
|
830
|
-
}
|
|
831
|
-
catch (err) {
|
|
832
|
-
printError(asMessage(err));
|
|
833
|
-
process.exitCode = 1;
|
|
834
|
-
}
|
|
835
|
-
});
|
|
836
|
-
// ADR-022: set-prefix-target / unset-prefix-target subcommands.
|
|
837
|
-
source
|
|
838
|
-
.command('set-prefix-target')
|
|
839
|
-
.description('Restrict prefix renaming to canonical names matching the given glob patterns (only * wildcard supported). ' +
|
|
840
|
-
'E.g. "10x:*" renames only skills whose canonical name starts with "10x:". ' +
|
|
841
|
-
'Pass multiple patterns as separate arguments.')
|
|
842
|
-
.argument('<name>', 'Display name of the skill source (from "olam skills source list")')
|
|
843
|
-
.argument('<patterns...>', 'One or more glob patterns (e.g. "10x:*" "atl:*" "plan-*")')
|
|
844
|
-
.action((name, patterns) => {
|
|
845
|
-
const entry = getSkillSourceByName(name);
|
|
846
|
-
if (entry === null) {
|
|
847
|
-
printError(`skill source "${name}" is not registered. Run "olam skills source list" to see registered sources.`);
|
|
848
|
-
process.exitCode = 1;
|
|
849
|
-
return;
|
|
850
|
-
}
|
|
851
|
-
// Validate: all patterns must be non-empty strings.
|
|
852
|
-
for (const p of patterns) {
|
|
853
|
-
if (p.length === 0) {
|
|
854
|
-
printError('prefixTarget patterns must be non-empty strings');
|
|
855
|
-
process.exitCode = 1;
|
|
856
|
-
return;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
if (patterns.length === 0) {
|
|
860
|
-
printError('at least one pattern is required — use "unset-prefix-target" to revert to match-all');
|
|
861
|
-
process.exitCode = 1;
|
|
862
|
-
return;
|
|
863
|
-
}
|
|
864
|
-
try {
|
|
865
|
-
updateSkillSource(entry.id, { prefixTarget: patterns });
|
|
866
|
-
const display = patterns.map((p) => `"${p}"`).join(' ');
|
|
867
|
-
printSuccess(`set prefix-target ${display} on source "${name}" (${entry.id})`);
|
|
868
|
-
}
|
|
869
|
-
catch (err) {
|
|
870
|
-
printError(asMessage(err));
|
|
871
|
-
process.exitCode = 1;
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
source
|
|
875
|
-
.command('unset-prefix-target')
|
|
876
|
-
.description('Remove the prefix-target override from a registered skill source (reverts to default: all canonical names are renamed)')
|
|
877
|
-
.argument('<name>', 'Display name of the skill source (from "olam skills source list")')
|
|
878
|
-
.action((name) => {
|
|
879
|
-
const entry = getSkillSourceByName(name);
|
|
880
|
-
if (entry === null) {
|
|
881
|
-
printError(`skill source "${name}" is not registered. Run "olam skills source list" to see registered sources.`);
|
|
882
|
-
process.exitCode = 1;
|
|
883
|
-
return;
|
|
884
|
-
}
|
|
885
|
-
try {
|
|
886
|
-
updateSkillSource(entry.id, { prefixTarget: null });
|
|
887
|
-
printSuccess(`unset prefix-target on source "${name}" (${entry.id}) — reverted to default (match all)`);
|
|
888
|
-
}
|
|
889
|
-
catch (err) {
|
|
890
|
-
printError(asMessage(err));
|
|
891
|
-
process.exitCode = 1;
|
|
892
|
-
}
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
//# sourceMappingURL=skills-source.js.map
|