@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,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* auth-list-cache — in-process TTL cache for `olam auth list --remote` results.
|
|
3
|
-
*
|
|
4
|
-
* Phase B (cloud-only-vault) Decision D5 caches remote `auth list` results for
|
|
5
|
-
* 30 seconds in-memory (NOT persisted to disk). The cache keeps interactive
|
|
6
|
-
* runs cheap and lets driver scripts (e.g. `olam doctor` probes that fan out
|
|
7
|
-
* to `auth list` for credential health) avoid hammering the cloud DO.
|
|
8
|
-
*
|
|
9
|
-
* Two-tier read model: `getCachedAuthList` returns a FRESH entry (within TTL),
|
|
10
|
-
* `getStaleAuthList` returns the most recent entry regardless of age — the
|
|
11
|
-
* latter is the offline fallback used when a fresh fetch fails. The command
|
|
12
|
-
* action surfaces staleness to the operator via a `(stale)` annotation +
|
|
13
|
-
* footer warning.
|
|
14
|
-
*
|
|
15
|
-
* Key shape: callers compose a key from (baseUrl, identityHint). A single
|
|
16
|
-
* Map keyed by that string keeps multiple auth-worker targets isolated (an
|
|
17
|
-
* operator running `auth list --remote A` then `--remote B` shouldn't see
|
|
18
|
-
* A's results for B).
|
|
19
|
-
*
|
|
20
|
-
* Not persisted: this cache lives only as long as the CLI process. Phase D
|
|
21
|
-
* may extend to a file-based cache if operator runs frequent short-lived
|
|
22
|
-
* `olam auth list` invocations and pays a real RTT cost — but the in-process
|
|
23
|
-
* model is simpler + correct for the most common cases (interactive use,
|
|
24
|
-
* tight-loop script invocations within a single CLI process).
|
|
25
|
-
*
|
|
26
|
-
* Concurrency: single-threaded JS; no locking needed. Read returns the
|
|
27
|
-
* snapshot at-call-time.
|
|
28
|
-
*/
|
|
29
|
-
/** TTL in milliseconds — 30 seconds per Decision D5. */
|
|
30
|
-
export const AUTH_LIST_CACHE_TTL_MS = 30_000;
|
|
31
|
-
const cache = new Map();
|
|
32
|
-
/**
|
|
33
|
-
* Return the cached entry for `key` when it's within the TTL window.
|
|
34
|
-
* Returns `null` when the entry is missing OR stale. `now` is injectable
|
|
35
|
-
* for deterministic tests; production callers omit it.
|
|
36
|
-
*/
|
|
37
|
-
export function getCachedAuthList(key, now = Date.now()) {
|
|
38
|
-
const entry = cache.get(key);
|
|
39
|
-
if (!entry)
|
|
40
|
-
return null;
|
|
41
|
-
if (now - entry.fetchedAt > AUTH_LIST_CACHE_TTL_MS)
|
|
42
|
-
return null;
|
|
43
|
-
return { result: entry.result, fetchedAt: entry.fetchedAt };
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Return the cached entry for `key` regardless of age. Used as the
|
|
47
|
-
* offline fallback when a fresh fetch fails. Returns `null` when the
|
|
48
|
-
* cache has never seen this key.
|
|
49
|
-
*/
|
|
50
|
-
export function getStaleAuthList(key) {
|
|
51
|
-
const entry = cache.get(key);
|
|
52
|
-
if (!entry)
|
|
53
|
-
return null;
|
|
54
|
-
return { result: entry.result, fetchedAt: entry.fetchedAt };
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Insert / replace the cached entry for `key`. `now` is injectable for tests.
|
|
58
|
-
*/
|
|
59
|
-
export function setCachedAuthList(key, result, now = Date.now()) {
|
|
60
|
-
cache.set(key, { result, fetchedAt: now });
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Invalidate the entry for `key`. When `key` is omitted, clear the entire
|
|
64
|
-
* cache. Callers use this after a mutation that the next `list` MUST reflect
|
|
65
|
-
* (e.g. an explicit `auth login` succeeded against the same baseUrl) — though
|
|
66
|
-
* for B4 (narrowed) such mutations live on the local backend so callers will
|
|
67
|
-
* mostly leave the cache to expire naturally.
|
|
68
|
-
*/
|
|
69
|
-
export function invalidateAuthListCache(key) {
|
|
70
|
-
if (key === undefined) {
|
|
71
|
-
cache.clear();
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
cache.delete(key);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Test-only: wipes the module-level cache. Production code MUST NOT call
|
|
78
|
-
* this. Tests that share the module across describe blocks call it in a
|
|
79
|
-
* `beforeEach` to keep the cache deterministic.
|
|
80
|
-
*/
|
|
81
|
-
export function _resetAuthListCacheForTests() {
|
|
82
|
-
cache.clear();
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=auth-list-cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-list-cache.js","sourceRoot":"","sources":["../../src/lib/auth-list-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,wDAAwD;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAO7C,MAAM,KAAK,GAA4B,IAAI,GAAG,EAAE,CAAC;AAEjD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,MAAc,IAAI,CAAC,GAAG,EAAE;IAExB,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,GAAG,sBAAsB;QAAE,OAAO,IAAI,CAAC;IAChE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAW,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,GAAW;IAEX,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAW,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,MAAS,EACT,MAAc,IAAI,CAAC,GAAG,EAAE;IAExB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAY;IAClD,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,OAAO;IACT,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B;IACzC,KAAK,CAAC,KAAK,EAAE,CAAC;AAChB,CAAC"}
|
package/dist/lib/auth-list.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* auth-list — testable orchestration for `olam auth list` and `auth list --json`.
|
|
3
|
-
*
|
|
4
|
-
* Phase B (cloud-only-vault) Decision D5: `olam auth list` defaults to the
|
|
5
|
-
* cloud auth-worker (cf. B1 / B2). This module:
|
|
6
|
-
*
|
|
7
|
-
* 1. Resolves the backend via B1's `requireBackend`.
|
|
8
|
-
* 2. Resolves the remote URL via the same precedence used by `auth login`
|
|
9
|
-
* (explicit `--remote <url>` > env > file > hard-coded fallback).
|
|
10
|
-
* 3. Consults the in-process TTL cache (30 s per D5) when backend='remote'
|
|
11
|
-
* and `--no-cache` was NOT passed.
|
|
12
|
-
* 4. Falls back to the stale cache when a fresh fetch fails (offline UX).
|
|
13
|
-
* 5. Routes to `AuthClient.status()` on the local backend.
|
|
14
|
-
*
|
|
15
|
-
* The Commander.js action handler in `packages/cli/src/commands/auth.ts`
|
|
16
|
-
* binds the IO touchpoints (cache helpers, fetch, AuthClient) via the
|
|
17
|
-
* `AuthListDeps` struct and consumes the structured `AuthListResult` to
|
|
18
|
-
* render the table or JSON output.
|
|
19
|
-
*
|
|
20
|
-
* Coupling note: the result object holds the raw remote payload (when
|
|
21
|
-
* backend='remote') OR the AuthAccountSummary[] (when backend='local'). The
|
|
22
|
-
* caller picks the right renderer (`renderAuthListJson` for local-JSON,
|
|
23
|
-
* `renderRemoteAuthListJson` for remote-JSON, or a text table for either).
|
|
24
|
-
* This keeps the IO + presentation concerns out of this module while still
|
|
25
|
-
* giving the action a single decision-tree entrypoint.
|
|
26
|
-
*/
|
|
27
|
-
import { AUTH_LIST_CACHE_TTL_MS } from './auth-list-cache.js';
|
|
28
|
-
import type { AccountEntry } from './auth-remote.js';
|
|
29
|
-
import type { AuthAccountSummary } from '@olam/core/src/auth/types.js';
|
|
30
|
-
/** Options parsed from Commander for `olam auth list` and `auth list --json`. */
|
|
31
|
-
export interface AuthListOptions {
|
|
32
|
-
readonly local?: boolean;
|
|
33
|
-
readonly remote?: boolean | string;
|
|
34
|
-
/** When true, bypass the 30 s TTL cache and force a fresh fetch. */
|
|
35
|
-
readonly noCache?: boolean;
|
|
36
|
-
/** Renders the result as JSON instead of the text table. */
|
|
37
|
-
readonly json?: boolean;
|
|
38
|
-
/** CF_Authorization cookie value (manual paste from DevTools). */
|
|
39
|
-
readonly cookie?: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Outcome of the remote path: the raw `AccountEntry[]` (post-`remoteListAccounts`
|
|
43
|
-
* normalisation) along with staleness metadata.
|
|
44
|
-
*/
|
|
45
|
-
export interface RemoteListResult {
|
|
46
|
-
readonly mode: 'remote';
|
|
47
|
-
readonly baseUrl: string;
|
|
48
|
-
readonly accounts: ReadonlyArray<AccountEntry>;
|
|
49
|
-
/**
|
|
50
|
-
* True iff the result came from the stale-cache fallback path (a fresh
|
|
51
|
-
* fetch was attempted AND failed). The caller surfaces a `(stale)`
|
|
52
|
-
* annotation + warning footer in this case.
|
|
53
|
-
*/
|
|
54
|
-
readonly stale: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Epoch ms when the payload was originally fetched. Equal to "now" on a
|
|
57
|
-
* fresh fetch / cache hit; older when stale.
|
|
58
|
-
*/
|
|
59
|
-
readonly fetchedAt: number;
|
|
60
|
-
/** Optional error message from the failed fresh fetch (stale path only). */
|
|
61
|
-
readonly fetchError?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface LocalListResult {
|
|
64
|
-
readonly mode: 'local';
|
|
65
|
-
readonly reachable: boolean;
|
|
66
|
-
readonly accounts: ReadonlyArray<AuthAccountSummary>;
|
|
67
|
-
}
|
|
68
|
-
export interface AuthListError {
|
|
69
|
-
readonly mode: 'error';
|
|
70
|
-
readonly exitCode: 1;
|
|
71
|
-
readonly message: string;
|
|
72
|
-
}
|
|
73
|
-
export type AuthListResult = RemoteListResult | LocalListResult | AuthListError;
|
|
74
|
-
/**
|
|
75
|
-
* Injection seam — every IO touchpoint is funnelled through this struct so
|
|
76
|
-
* unit tests assert on orchestration without real HTTP, filesystem reads,
|
|
77
|
-
* or AuthClient round-trips.
|
|
78
|
-
*/
|
|
79
|
-
export interface AuthListDeps {
|
|
80
|
-
readonly readEnv?: (key: string) => string | undefined;
|
|
81
|
-
readonly readAuthWorkerUrlFile?: () => string | null;
|
|
82
|
-
/** Fresh fetch against the remote. Returns the `AccountEntry[]`. */
|
|
83
|
-
readonly fetchRemoteAccounts: (baseUrl: string, cookie?: string) => Promise<ReadonlyArray<AccountEntry>>;
|
|
84
|
-
/** Local backend status — usually `() => new AuthClient().status()`. */
|
|
85
|
-
readonly fetchLocalStatus: () => Promise<{
|
|
86
|
-
reachable: boolean;
|
|
87
|
-
accounts: readonly AuthAccountSummary[];
|
|
88
|
-
}>;
|
|
89
|
-
readonly stderr?: NodeJS.WritableStream;
|
|
90
|
-
/** Test injection for cache TTL semantics; defaults to Date.now(). */
|
|
91
|
-
readonly now?: () => number;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Compose the cache key for a (baseUrl, cookie) pair. The cookie value is
|
|
95
|
-
* included because two operators on the same host (sharing the CLI process,
|
|
96
|
-
* unlikely but possible in CI) may target the same baseUrl with different
|
|
97
|
-
* identities — caching across that boundary would leak one operator's
|
|
98
|
-
* accounts to the other.
|
|
99
|
-
*/
|
|
100
|
-
export declare function authListCacheKey(baseUrl: string, cookie?: string): string;
|
|
101
|
-
/**
|
|
102
|
-
* Run the `olam auth list` decision tree. Tests inject `fetchRemoteAccounts`
|
|
103
|
-
* and `fetchLocalStatus` to capture orchestration.
|
|
104
|
-
*/
|
|
105
|
-
export declare function runAuthList(opts: AuthListOptions, deps: AuthListDeps): Promise<AuthListResult>;
|
|
106
|
-
export { AUTH_LIST_CACHE_TTL_MS };
|
|
107
|
-
//# sourceMappingURL=auth-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-list.d.ts","sourceRoot":"","sources":["../../src/lib/auth-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AASH,OAAO,EAIL,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,iFAAi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,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrD,oEAAoE;IACpE,QAAQ,CAAC,mBAAmB,EAAE,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,KACZ,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1C,wEAAwE;IACxE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,OAAO,CAAC;QACvC,SAAS,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;KACzC,CAAC,CAAC;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IACxC,sEAAsE;IACtE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,cAAc,CAAC,CA6EzB;AAID,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
package/dist/lib/auth-list.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* auth-list — testable orchestration for `olam auth list` and `auth list --json`.
|
|
3
|
-
*
|
|
4
|
-
* Phase B (cloud-only-vault) Decision D5: `olam auth list` defaults to the
|
|
5
|
-
* cloud auth-worker (cf. B1 / B2). This module:
|
|
6
|
-
*
|
|
7
|
-
* 1. Resolves the backend via B1's `requireBackend`.
|
|
8
|
-
* 2. Resolves the remote URL via the same precedence used by `auth login`
|
|
9
|
-
* (explicit `--remote <url>` > env > file > hard-coded fallback).
|
|
10
|
-
* 3. Consults the in-process TTL cache (30 s per D5) when backend='remote'
|
|
11
|
-
* and `--no-cache` was NOT passed.
|
|
12
|
-
* 4. Falls back to the stale cache when a fresh fetch fails (offline UX).
|
|
13
|
-
* 5. Routes to `AuthClient.status()` on the local backend.
|
|
14
|
-
*
|
|
15
|
-
* The Commander.js action handler in `packages/cli/src/commands/auth.ts`
|
|
16
|
-
* binds the IO touchpoints (cache helpers, fetch, AuthClient) via the
|
|
17
|
-
* `AuthListDeps` struct and consumes the structured `AuthListResult` to
|
|
18
|
-
* render the table or JSON output.
|
|
19
|
-
*
|
|
20
|
-
* Coupling note: the result object holds the raw remote payload (when
|
|
21
|
-
* backend='remote') OR the AuthAccountSummary[] (when backend='local'). The
|
|
22
|
-
* caller picks the right renderer (`renderAuthListJson` for local-JSON,
|
|
23
|
-
* `renderRemoteAuthListJson` for remote-JSON, or a text table for either).
|
|
24
|
-
* This keeps the IO + presentation concerns out of this module while still
|
|
25
|
-
* giving the action a single decision-tree entrypoint.
|
|
26
|
-
*/
|
|
27
|
-
import { resolveRemoteUrl } from './auth-login.js';
|
|
28
|
-
import { requireBackend, emitDeprecationWarning, ConflictingBackendFlags, } from './auth-backend.js';
|
|
29
|
-
import { getCachedAuthList, setCachedAuthList, getStaleAuthList, AUTH_LIST_CACHE_TTL_MS, } from './auth-list-cache.js';
|
|
30
|
-
/**
|
|
31
|
-
* Compose the cache key for a (baseUrl, cookie) pair. The cookie value is
|
|
32
|
-
* included because two operators on the same host (sharing the CLI process,
|
|
33
|
-
* unlikely but possible in CI) may target the same baseUrl with different
|
|
34
|
-
* identities — caching across that boundary would leak one operator's
|
|
35
|
-
* accounts to the other.
|
|
36
|
-
*/
|
|
37
|
-
export function authListCacheKey(baseUrl, cookie) {
|
|
38
|
-
const normalisedBase = baseUrl.replace(/\/+$/, '');
|
|
39
|
-
return cookie ? `${normalisedBase}|${cookie}` : normalisedBase;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Run the `olam auth list` decision tree. Tests inject `fetchRemoteAccounts`
|
|
43
|
-
* and `fetchLocalStatus` to capture orchestration.
|
|
44
|
-
*/
|
|
45
|
-
export async function runAuthList(opts, deps) {
|
|
46
|
-
const stderr = deps.stderr ?? process.stderr;
|
|
47
|
-
const now = deps.now ?? Date.now;
|
|
48
|
-
// (1) Backend resolution.
|
|
49
|
-
let resolution;
|
|
50
|
-
try {
|
|
51
|
-
resolution = requireBackend({ local: opts.local, remote: opts.remote });
|
|
52
|
-
}
|
|
53
|
-
catch (err) {
|
|
54
|
-
if (err instanceof ConflictingBackendFlags) {
|
|
55
|
-
return { mode: 'error', exitCode: 1, message: err.message };
|
|
56
|
-
}
|
|
57
|
-
throw err;
|
|
58
|
-
}
|
|
59
|
-
// (2) Local opt-out.
|
|
60
|
-
if (resolution.backend === 'local') {
|
|
61
|
-
if (resolution.emitDeprecationWarning) {
|
|
62
|
-
emitDeprecationWarning(stderr);
|
|
63
|
-
}
|
|
64
|
-
const status = await deps.fetchLocalStatus();
|
|
65
|
-
return { mode: 'local', reachable: status.reachable, accounts: status.accounts };
|
|
66
|
-
}
|
|
67
|
-
// (3) Remote default path.
|
|
68
|
-
const baseUrl = resolveRemoteUrl(resolution, {
|
|
69
|
-
readEnv: deps.readEnv,
|
|
70
|
-
readAuthWorkerUrlFile: deps.readAuthWorkerUrlFile,
|
|
71
|
-
});
|
|
72
|
-
const cacheKey = authListCacheKey(baseUrl, opts.cookie);
|
|
73
|
-
// (3a) Cache hit (unless --no-cache).
|
|
74
|
-
if (opts.noCache !== true) {
|
|
75
|
-
const hit = getCachedAuthList(cacheKey, now());
|
|
76
|
-
if (hit) {
|
|
77
|
-
return {
|
|
78
|
-
mode: 'remote',
|
|
79
|
-
baseUrl,
|
|
80
|
-
accounts: hit.result,
|
|
81
|
-
stale: false,
|
|
82
|
-
fetchedAt: hit.fetchedAt,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// (3b) Fresh fetch attempt.
|
|
87
|
-
try {
|
|
88
|
-
const accounts = await deps.fetchRemoteAccounts(baseUrl, opts.cookie);
|
|
89
|
-
setCachedAuthList(cacheKey, accounts, now());
|
|
90
|
-
return {
|
|
91
|
-
mode: 'remote',
|
|
92
|
-
baseUrl,
|
|
93
|
-
accounts,
|
|
94
|
-
stale: false,
|
|
95
|
-
fetchedAt: now(),
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
100
|
-
// (3c) Stale fallback when offline / fetch failed.
|
|
101
|
-
const stale = getStaleAuthList(cacheKey);
|
|
102
|
-
if (stale) {
|
|
103
|
-
return {
|
|
104
|
-
mode: 'remote',
|
|
105
|
-
baseUrl,
|
|
106
|
-
accounts: stale.result,
|
|
107
|
-
stale: true,
|
|
108
|
-
fetchedAt: stale.fetchedAt,
|
|
109
|
-
fetchError: message,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
// (3d) No cache, no fresh — surface error.
|
|
113
|
-
return {
|
|
114
|
-
mode: 'error',
|
|
115
|
-
exitCode: 1,
|
|
116
|
-
message: `Failed to list remote accounts (${baseUrl}): ${message}`,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
// Re-export the TTL constant so callers can reference it without importing
|
|
121
|
-
// the cache module directly.
|
|
122
|
-
export { AUTH_LIST_CACHE_TTL_MS };
|
|
123
|
-
//# sourceMappingURL=auth-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-list.js","sourceRoot":"","sources":["../../src/lib/auth-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sB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C;QACtE,IAAI,KAAK,EAAE,CAAC;YACV,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO;gBACP,QAAQ,EAAE,KAAK,CAAC,MAAM;gBACtB,KAAK,EAAE,IAAI;gBACX,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,UAAU,EAAE,OAAO;aACpB,CAAC;QACJ,CAAC;QACD,2CAA2C;QAC3C,OAAO;YACL,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,mCAAmC,OAAO,MAAM,OAAO,EAAE;SACnE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,2EAA2E;AAC3E,6BAA6B;AAC7B,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
package/dist/lib/auth-login.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* auth-login — testable extraction of the `olam auth login` action body.
|
|
3
|
-
*
|
|
4
|
-
* The Commander action callback in `packages/cli/src/commands/auth.ts` is too
|
|
5
|
-
* deeply coupled to live IO (browser opener, readline prompts, AuthClient
|
|
6
|
-
* against 127.0.0.1:9999, remote OAuth start) for direct unit-test mocking.
|
|
7
|
-
* B2 splits the decision logic out into `runAuthLogin`, which:
|
|
8
|
-
*
|
|
9
|
-
* - Resolves the backend via B1's `requireBackend`.
|
|
10
|
-
* - Emits the deprecation warning when --local is the explicit opt-out.
|
|
11
|
-
* - Asks the interactive confirm prompt before flipping to remote (skips
|
|
12
|
-
* on non-TTY for CI safety; --yes also bypasses).
|
|
13
|
-
* - Delegates the actual flow (remote URL print / local PKCE) to injected
|
|
14
|
-
* functions, so tests can assert on the orchestration without spawning
|
|
15
|
-
* real OAuth round-trips.
|
|
16
|
-
*
|
|
17
|
-
* Resolution of the default remote URL:
|
|
18
|
-
*
|
|
19
|
-
* 1. `--remote <url>` explicit string form (`resolution.explicitRemoteUrl`).
|
|
20
|
-
* 2. `OLAM_AUTH_WORKER_URL` env var.
|
|
21
|
-
* 3. `~/.olam/auth-worker-url` file (trimmed; one URL per file).
|
|
22
|
-
* 4. Hard-coded fallback `https://auth-worker.kaluga.co`.
|
|
23
|
-
*
|
|
24
|
-
* Step (4) matches the canonical Olam zone documented in
|
|
25
|
-
* `docs/plans/cloud-only-vault/phase-b-tasks.md` B2 acceptance criteria.
|
|
26
|
-
* Operators with a private deployment override via (2) or (3).
|
|
27
|
-
*/
|
|
28
|
-
import { type BackendResolution } from './auth-backend.js';
|
|
29
|
-
/** Canonical fallback when no other URL source is configured. */
|
|
30
|
-
export declare const DEFAULT_AUTH_WORKER_URL = "https://auth-worker.kaluga.co";
|
|
31
|
-
/**
|
|
32
|
-
* Options parsed from Commander for `olam auth login`. Mirrors the option
|
|
33
|
-
* declarations in `auth.ts`; new in B2 are `--local` and `--yes`.
|
|
34
|
-
*/
|
|
35
|
-
export interface AuthLoginOptions {
|
|
36
|
-
readonly local?: boolean;
|
|
37
|
-
readonly remote?: boolean | string;
|
|
38
|
-
readonly label?: string;
|
|
39
|
-
readonly printUrl?: boolean;
|
|
40
|
-
readonly serviceToken?: string;
|
|
41
|
-
/** Skip the first-time interactive confirm prompt. */
|
|
42
|
-
readonly yes?: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Injection seam — every IO touchpoint is funneled through this struct so the
|
|
46
|
-
* unit tests can assert on orchestration without real OAuth round-trips,
|
|
47
|
-
* filesystem writes, or stdin reads.
|
|
48
|
-
*/
|
|
49
|
-
export interface AuthLoginDeps {
|
|
50
|
-
/** Reads the OLAM_AUTH_WORKER_URL env var. Defaults to `process.env`. */
|
|
51
|
-
readonly readEnv?: (key: string) => string | undefined;
|
|
52
|
-
/** Reads the home-config file `~/.olam/auth-worker-url`. */
|
|
53
|
-
readonly readAuthWorkerUrlFile?: () => string | null;
|
|
54
|
-
/** True when stdin is a TTY (interactive prompt is meaningful). */
|
|
55
|
-
readonly isTty?: () => boolean;
|
|
56
|
-
/** Returns `'y'` / `'n'` (case-insensitive) — the operator's answer. */
|
|
57
|
-
readonly promptConfirm?: (question: string) => Promise<string>;
|
|
58
|
-
/** Runs the remote OAuth-URL print flow against the resolved URL. */
|
|
59
|
-
readonly executeRemoteLogin: (baseUrl: string, opts: AuthLoginOptions) => Promise<void>;
|
|
60
|
-
/** Runs the legacy local PKCE flow against the auth-service container. */
|
|
61
|
-
readonly executeLocalLogin: (opts: AuthLoginOptions) => Promise<void>;
|
|
62
|
-
/** Where deprecation + confirm warnings are written. Defaults to process.stderr. */
|
|
63
|
-
readonly stderr?: NodeJS.WritableStream;
|
|
64
|
-
/** Where success / banner messages are written. Defaults to process.stdout. */
|
|
65
|
-
readonly stdout?: NodeJS.WritableStream;
|
|
66
|
-
}
|
|
67
|
-
/** Result of `runAuthLogin` — drives the action's `process.exitCode`. */
|
|
68
|
-
export interface AuthLoginResult {
|
|
69
|
-
readonly exitCode: 0 | 1;
|
|
70
|
-
/** Surfaced for tests; not used by the action. */
|
|
71
|
-
readonly backend?: 'local' | 'remote';
|
|
72
|
-
/** Surfaced for tests; URL the remote flow was dispatched to. */
|
|
73
|
-
readonly resolvedRemoteUrl?: string;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Resolve the remote auth-worker URL the login flow should target. Pure
|
|
77
|
-
* function modulo the injected `readEnv` + `readAuthWorkerUrlFile`.
|
|
78
|
-
*/
|
|
79
|
-
export declare function resolveRemoteUrl(resolution: BackendResolution, deps: Pick<AuthLoginDeps, 'readEnv' | 'readAuthWorkerUrlFile'>): string;
|
|
80
|
-
/**
|
|
81
|
-
* Run the `olam auth login` decision tree. Tests inject `executeRemoteLogin`
|
|
82
|
-
* and `executeLocalLogin` to capture the orchestration without firing real
|
|
83
|
-
* OAuth.
|
|
84
|
-
*
|
|
85
|
-
* Decision tree (high-level):
|
|
86
|
-
*
|
|
87
|
-
* 1. requireBackend(opts) — throws ConflictingBackendFlags on dual-flag.
|
|
88
|
-
* 2. backend = 'local' → optional deprecation warning + local PKCE flow.
|
|
89
|
-
* 3. backend = 'remote' → resolve URL → optional confirm prompt → remote flow.
|
|
90
|
-
*/
|
|
91
|
-
export declare function runAuthLogin(opts: AuthLoginOptions, deps: AuthLoginDeps): Promise<AuthLoginResult>;
|
|
92
|
-
//# sourceMappingURL=auth-login.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-login.d.ts","sourceRoot":"","sources":["../../src/lib/auth-login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAE3B,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,kCAAkC,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,sDAAsD;IACtD,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD,4DAA4D;IAC5D,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrD,mEAAmE;IACnE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/D,qEAAqE;IACrE,QAAQ,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxF,0EAA0E;IAC1E,QAAQ,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,oFAAoF;IACpF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IACxC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CACzC;AAED,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IACzB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACtC,iEAAiE;IACjE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC;AAkBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,iBAAiB,EAC7B,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,uBAAuB,CAAC,GAC7D,MAAM,CAYR;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,gBAAgB,EACtB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,eAAe,CAAC,CAuD1B"}
|
package/dist/lib/auth-login.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* auth-login — testable extraction of the `olam auth login` action body.
|
|
3
|
-
*
|
|
4
|
-
* The Commander action callback in `packages/cli/src/commands/auth.ts` is too
|
|
5
|
-
* deeply coupled to live IO (browser opener, readline prompts, AuthClient
|
|
6
|
-
* against 127.0.0.1:9999, remote OAuth start) for direct unit-test mocking.
|
|
7
|
-
* B2 splits the decision logic out into `runAuthLogin`, which:
|
|
8
|
-
*
|
|
9
|
-
* - Resolves the backend via B1's `requireBackend`.
|
|
10
|
-
* - Emits the deprecation warning when --local is the explicit opt-out.
|
|
11
|
-
* - Asks the interactive confirm prompt before flipping to remote (skips
|
|
12
|
-
* on non-TTY for CI safety; --yes also bypasses).
|
|
13
|
-
* - Delegates the actual flow (remote URL print / local PKCE) to injected
|
|
14
|
-
* functions, so tests can assert on the orchestration without spawning
|
|
15
|
-
* real OAuth round-trips.
|
|
16
|
-
*
|
|
17
|
-
* Resolution of the default remote URL:
|
|
18
|
-
*
|
|
19
|
-
* 1. `--remote <url>` explicit string form (`resolution.explicitRemoteUrl`).
|
|
20
|
-
* 2. `OLAM_AUTH_WORKER_URL` env var.
|
|
21
|
-
* 3. `~/.olam/auth-worker-url` file (trimmed; one URL per file).
|
|
22
|
-
* 4. Hard-coded fallback `https://auth-worker.kaluga.co`.
|
|
23
|
-
*
|
|
24
|
-
* Step (4) matches the canonical Olam zone documented in
|
|
25
|
-
* `docs/plans/cloud-only-vault/phase-b-tasks.md` B2 acceptance criteria.
|
|
26
|
-
* Operators with a private deployment override via (2) or (3).
|
|
27
|
-
*/
|
|
28
|
-
import * as fs from 'node:fs';
|
|
29
|
-
import * as os from 'node:os';
|
|
30
|
-
import * as path from 'node:path';
|
|
31
|
-
import { requireBackend, emitDeprecationWarning, ConflictingBackendFlags, } from './auth-backend.js';
|
|
32
|
-
/** Canonical fallback when no other URL source is configured. */
|
|
33
|
-
export const DEFAULT_AUTH_WORKER_URL = 'https://auth-worker.kaluga.co';
|
|
34
|
-
// ── Defaults for the deps that touch real IO ────────────────────────────────
|
|
35
|
-
function defaultReadAuthWorkerUrlFile() {
|
|
36
|
-
try {
|
|
37
|
-
const file = path.join(os.homedir(), '.olam', 'auth-worker-url');
|
|
38
|
-
const content = fs.readFileSync(file, 'utf-8').trim();
|
|
39
|
-
return content.length > 0 ? content : null;
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function defaultIsTty() {
|
|
46
|
-
return Boolean(process.stdin.isTTY);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Resolve the remote auth-worker URL the login flow should target. Pure
|
|
50
|
-
* function modulo the injected `readEnv` + `readAuthWorkerUrlFile`.
|
|
51
|
-
*/
|
|
52
|
-
export function resolveRemoteUrl(resolution, deps) {
|
|
53
|
-
if (resolution.explicitRemoteUrl)
|
|
54
|
-
return resolution.explicitRemoteUrl;
|
|
55
|
-
const readEnv = deps.readEnv ?? ((k) => process.env[k]);
|
|
56
|
-
const fromEnv = readEnv('OLAM_AUTH_WORKER_URL');
|
|
57
|
-
if (fromEnv && fromEnv.length > 0)
|
|
58
|
-
return fromEnv;
|
|
59
|
-
const readFile = deps.readAuthWorkerUrlFile ?? defaultReadAuthWorkerUrlFile;
|
|
60
|
-
const fromFile = readFile();
|
|
61
|
-
if (fromFile && fromFile.length > 0)
|
|
62
|
-
return fromFile;
|
|
63
|
-
return DEFAULT_AUTH_WORKER_URL;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Run the `olam auth login` decision tree. Tests inject `executeRemoteLogin`
|
|
67
|
-
* and `executeLocalLogin` to capture the orchestration without firing real
|
|
68
|
-
* OAuth.
|
|
69
|
-
*
|
|
70
|
-
* Decision tree (high-level):
|
|
71
|
-
*
|
|
72
|
-
* 1. requireBackend(opts) — throws ConflictingBackendFlags on dual-flag.
|
|
73
|
-
* 2. backend = 'local' → optional deprecation warning + local PKCE flow.
|
|
74
|
-
* 3. backend = 'remote' → resolve URL → optional confirm prompt → remote flow.
|
|
75
|
-
*/
|
|
76
|
-
export async function runAuthLogin(opts, deps) {
|
|
77
|
-
const stderr = deps.stderr ?? process.stderr;
|
|
78
|
-
const stdout = deps.stdout ?? process.stdout;
|
|
79
|
-
// (1) Backend resolution.
|
|
80
|
-
let resolution;
|
|
81
|
-
try {
|
|
82
|
-
resolution = requireBackend({ local: opts.local, remote: opts.remote });
|
|
83
|
-
}
|
|
84
|
-
catch (err) {
|
|
85
|
-
if (err instanceof ConflictingBackendFlags) {
|
|
86
|
-
stderr.write(`error: ${err.message}\n`);
|
|
87
|
-
return { exitCode: 1 };
|
|
88
|
-
}
|
|
89
|
-
throw err;
|
|
90
|
-
}
|
|
91
|
-
// (2) Local opt-out path.
|
|
92
|
-
if (resolution.backend === 'local') {
|
|
93
|
-
if (resolution.emitDeprecationWarning) {
|
|
94
|
-
emitDeprecationWarning(stderr);
|
|
95
|
-
}
|
|
96
|
-
await deps.executeLocalLogin(opts);
|
|
97
|
-
return { exitCode: 0, backend: 'local' };
|
|
98
|
-
}
|
|
99
|
-
// (3) Remote default path.
|
|
100
|
-
const remoteUrl = resolveRemoteUrl(resolution, deps);
|
|
101
|
-
const isTty = (deps.isTty ?? defaultIsTty)();
|
|
102
|
-
// First-time confirm prompt — only when interactive AND --yes not passed
|
|
103
|
-
// AND no explicit URL was on the CLI (an explicit URL means the operator
|
|
104
|
-
// already knows where they're going).
|
|
105
|
-
const needsConfirm = isTty && opts.yes !== true && resolution.explicitRemoteUrl === undefined;
|
|
106
|
-
if (needsConfirm) {
|
|
107
|
-
const prompt = deps.promptConfirm;
|
|
108
|
-
if (prompt) {
|
|
109
|
-
const ans = (await prompt(`About to log into cloud auth-worker (${remoteUrl}). Continue? [Y/n] `))
|
|
110
|
-
.trim()
|
|
111
|
-
.toLowerCase();
|
|
112
|
-
if (ans === 'n' || ans === 'no') {
|
|
113
|
-
stderr.write('Cancelled by operator. Pass --local to opt out, or --yes to skip this prompt.\n');
|
|
114
|
-
return { exitCode: 1 };
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
// If no promptConfirm injected we assume the caller doesn't want a
|
|
118
|
-
// confirm (the action handler always wires one in production).
|
|
119
|
-
}
|
|
120
|
-
stdout.write(`Logging into cloud auth-worker at ${remoteUrl} ...\n`);
|
|
121
|
-
await deps.executeRemoteLogin(remoteUrl, opts);
|
|
122
|
-
return { exitCode: 0, backend: 'remote', resolvedRemoteUrl: remoteUrl };
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=auth-login.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-login.js","sourceRoot":"","sources":["../../src/lib/auth-login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,mBAAmB,CAAC;AAE3B,iEAAiE;AACjE,MAAM,CAAC,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAiDvE,+EAA+E;AAE/E,SAAS,4BAA4B;IACnC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACjE,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QACtD,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAA6B,EAC7B,IAA8D;IAE9D,IAAI,UAAU,CAAC,iBAAiB;QAAE,OAAO,UAAU,CAAC,iBAAiB,CAAC;IAEtE,MAAM,OAAO,GAAG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AC1E,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* auth-mutator-backend — backend resolver for `olam auth refresh / disable /
|
|
3
|
-
* enable` under B4 (narrowed scope).
|
|
4
|
-
*
|
|
5
|
-
* Phase A6 architecturally ruled out adding `/v1/credentials/*` mutators to
|
|
6
|
-
* the cloud DO. As a result, refresh / disable / enable currently have ONE
|
|
7
|
-
* valid backend (local). This helper exists so the three subcommand handlers
|
|
8
|
-
* share identical flag-parsing + identical "remote-unsupported" exit
|
|
9
|
-
* semantics:
|
|
10
|
-
*
|
|
11
|
-
* - default (no flag) → proceed (local)
|
|
12
|
-
* - --local → proceed (local) — no deprecation warning emitted; warning the
|
|
13
|
-
* operator against the only working backend would be hostile until OQ7
|
|
14
|
-
* ships a cloud-side equivalent.
|
|
15
|
-
* - --remote (any form) → exit code 2 + structured message pointing to OQ7
|
|
16
|
-
* - --local --remote → exit code 1 (ConflictingBackendFlags semantic)
|
|
17
|
-
*
|
|
18
|
-
* Exit code 2 is the marker callers parse to distinguish "this subcommand
|
|
19
|
-
* has no cloud equivalent yet" from a generic local failure (exit 1).
|
|
20
|
-
* Wrapping scripts can branch on it to either fall back to --local or
|
|
21
|
-
* surface a clear "this needs OQ7" message.
|
|
22
|
-
*
|
|
23
|
-
* The message body uses a `%s` placeholder for the subcommand name so the
|
|
24
|
-
* three callers share one string.
|
|
25
|
-
*/
|
|
26
|
-
/** Discriminant for the mutator-backend resolution outcome. */
|
|
27
|
-
export type MutatorBackendOutcome = {
|
|
28
|
-
readonly outcome: 'proceed-local';
|
|
29
|
-
} | {
|
|
30
|
-
readonly outcome: 'conflict';
|
|
31
|
-
readonly message: string;
|
|
32
|
-
} | {
|
|
33
|
-
readonly outcome: 'remote-unsupported';
|
|
34
|
-
readonly message: string;
|
|
35
|
-
readonly exitCode: 2;
|
|
36
|
-
};
|
|
37
|
-
/** Parsed CLI flags for a mutator subcommand. */
|
|
38
|
-
export interface MutatorBackendArgs {
|
|
39
|
-
readonly local?: boolean;
|
|
40
|
-
readonly remote?: boolean | string;
|
|
41
|
-
}
|
|
42
|
-
/** Structured message body for the remote-unsupported path. */
|
|
43
|
-
export declare const REMOTE_MUTATOR_UNSUPPORTED_MESSAGE_TEMPLATE: string;
|
|
44
|
-
/**
|
|
45
|
-
* Render the remote-unsupported message for a specific subcommand.
|
|
46
|
-
*/
|
|
47
|
-
export declare function renderRemoteUnsupportedMessage(subcommand: string): string;
|
|
48
|
-
/**
|
|
49
|
-
* Resolve which path a mutator subcommand should take given the operator's
|
|
50
|
-
* flags. Pure function — caller is responsible for printing the message +
|
|
51
|
-
* setting the process.exitCode.
|
|
52
|
-
*/
|
|
53
|
-
export declare function resolveMutatorBackend(subcommand: string, args: MutatorBackendArgs): MutatorBackendOutcome;
|
|
54
|
-
//# sourceMappingURL=auth-mutator-backend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-mutator-backend.d.ts","sourceRoot":"","sources":["../../src/lib/auth-mutator-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GACrC;IAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;CAAE,CAAC;AAE/F,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACpC;AAED,+DAA+D;AAC/D,eAAO,MAAM,2CAA2C,QAKT,CAAC;AAEhD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,kBAAkB,GACvB,qBAAqB,CAoBvB"}
|