@owlmeans/viable-sdk 0.1.18-rc.8 → 0.1.18
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 +29 -11
- package/agent-meta/manifest.json +16 -0
- package/agent-meta/skills/viable-sdk/SKILL.md +1033 -0
- package/build/api/collect/types.d.ts +30 -0
- package/build/api/collect/types.d.ts.map +1 -0
- package/build/api/collect/types.js +2 -0
- package/build/api/collect/types.js.map +1 -0
- package/build/api/collect.d.ts +14 -0
- package/build/api/collect.d.ts.map +1 -0
- package/build/api/collect.js +132 -0
- package/build/api/collect.js.map +1 -0
- package/build/api/consts.local.d.ts +21 -0
- package/build/api/consts.local.d.ts.map +1 -0
- package/build/api/consts.local.js +25 -0
- package/build/api/consts.local.js.map +1 -0
- package/build/api/index.d.ts +5 -0
- package/build/api/index.d.ts.map +1 -1
- package/build/api/index.js +2 -0
- package/build/api/index.js.map +1 -1
- package/build/api/remote.d.ts +13 -6
- package/build/api/remote.d.ts.map +1 -1
- package/build/api/remote.js +302 -35
- package/build/api/remote.js.map +1 -1
- package/build/api/transport/types.d.ts +14 -0
- package/build/api/transport/types.d.ts.map +1 -0
- package/build/api/transport/types.js +2 -0
- package/build/api/transport/types.js.map +1 -0
- package/build/api/transport.d.ts +4 -0
- package/build/api/transport.d.ts.map +1 -0
- package/build/api/transport.js +32 -0
- package/build/api/transport.js.map +1 -0
- package/build/api/types.d.ts +9 -0
- package/build/api/types.d.ts.map +1 -0
- package/build/api/types.js +2 -0
- package/build/api/types.js.map +1 -0
- package/build/api/types.local.d.ts +3 -0
- package/build/api/types.local.d.ts.map +1 -0
- package/build/api/types.local.js +2 -0
- package/build/api/types.local.js.map +1 -0
- package/build/consts.d.ts +29 -14
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +30 -14
- package/build/consts.js.map +1 -1
- package/build/context/consts.local.d.ts +18 -0
- package/build/context/consts.local.d.ts.map +1 -0
- package/build/context/consts.local.js +18 -0
- package/build/context/consts.local.js.map +1 -0
- package/build/context/index.d.ts +3 -7
- package/build/context/index.d.ts.map +1 -1
- package/build/context/index.js +58 -25
- package/build/context/index.js.map +1 -1
- package/build/context/types.d.ts +26 -0
- package/build/context/types.d.ts.map +1 -0
- package/build/context/types.js +2 -0
- package/build/context/types.js.map +1 -0
- package/build/executor/boot-check.d.ts +1 -40
- package/build/executor/boot-check.d.ts.map +1 -1
- package/build/executor/boot-check.js +22 -19
- package/build/executor/boot-check.js.map +1 -1
- package/build/executor/consts.d.ts +55 -0
- package/build/executor/consts.d.ts.map +1 -0
- package/build/executor/consts.js +66 -0
- package/build/executor/consts.js.map +1 -0
- package/build/executor/consts.local.d.ts +63 -0
- package/build/executor/consts.local.d.ts.map +1 -0
- package/build/executor/consts.local.js +69 -0
- package/build/executor/consts.local.js.map +1 -0
- package/build/executor/env/types.d.ts +40 -0
- package/build/executor/env/types.d.ts.map +1 -0
- package/build/executor/env/types.js +2 -0
- package/build/executor/env/types.js.map +1 -0
- package/build/executor/env.d.ts +11 -20
- package/build/executor/env.d.ts.map +1 -1
- package/build/executor/env.js +39 -59
- package/build/executor/env.js.map +1 -1
- package/build/executor/errors.d.ts +15 -0
- package/build/executor/errors.d.ts.map +1 -1
- package/build/executor/errors.js +19 -2
- package/build/executor/errors.js.map +1 -1
- package/build/executor/files/types.d.ts +106 -0
- package/build/executor/files/types.d.ts.map +1 -0
- package/build/executor/files/types.js +2 -0
- package/build/executor/files/types.js.map +1 -0
- package/build/executor/files.d.ts +2 -50
- package/build/executor/files.d.ts.map +1 -1
- package/build/executor/files.js +225 -68
- package/build/executor/files.js.map +1 -1
- package/build/executor/git/types.d.ts +19 -0
- package/build/executor/git/types.d.ts.map +1 -0
- package/build/executor/git/types.js +2 -0
- package/build/executor/git/types.js.map +1 -0
- package/build/executor/git.d.ts +4 -36
- package/build/executor/git.d.ts.map +1 -1
- package/build/executor/git.js +206 -241
- package/build/executor/git.js.map +1 -1
- package/build/executor/glob/types.d.ts +12 -0
- package/build/executor/glob/types.d.ts.map +1 -0
- package/build/executor/glob/types.js +2 -0
- package/build/executor/glob/types.js.map +1 -0
- package/build/executor/glob.d.ts +4 -0
- package/build/executor/glob.d.ts.map +1 -0
- package/build/executor/glob.js +11 -0
- package/build/executor/glob.js.map +1 -0
- package/build/executor/health/types.d.ts +39 -0
- package/build/executor/health/types.d.ts.map +1 -0
- package/build/executor/health/types.js +2 -0
- package/build/executor/health/types.js.map +1 -0
- package/build/executor/health.d.ts +3 -83
- package/build/executor/health.d.ts.map +1 -1
- package/build/executor/health.js +76 -91
- package/build/executor/health.js.map +1 -1
- package/build/executor/index.d.ts +14 -15
- package/build/executor/index.d.ts.map +1 -1
- package/build/executor/index.js +36 -18
- package/build/executor/index.js.map +1 -1
- package/build/executor/integrity/types.d.ts +25 -0
- package/build/executor/integrity/types.d.ts.map +1 -0
- package/build/executor/integrity/types.js +2 -0
- package/build/executor/integrity/types.js.map +1 -0
- package/build/executor/integrity.d.ts +5 -15
- package/build/executor/integrity.d.ts.map +1 -1
- package/build/executor/integrity.js +28 -39
- package/build/executor/integrity.js.map +1 -1
- package/build/executor/layout/types.d.ts +69 -0
- package/build/executor/layout/types.d.ts.map +1 -0
- package/build/executor/layout/types.js +2 -0
- package/build/executor/layout/types.js.map +1 -0
- package/build/executor/layout.d.ts +9 -56
- package/build/executor/layout.d.ts.map +1 -1
- package/build/executor/layout.js +35 -82
- package/build/executor/layout.js.map +1 -1
- package/build/executor/shell/types.d.ts +76 -0
- package/build/executor/shell/types.d.ts.map +1 -0
- package/build/executor/shell/types.js +2 -0
- package/build/executor/shell/types.js.map +1 -0
- package/build/executor/shell.d.ts +3 -78
- package/build/executor/shell.d.ts.map +1 -1
- package/build/executor/shell.js +61 -91
- package/build/executor/shell.js.map +1 -1
- package/build/executor/spawn/types.d.ts +98 -0
- package/build/executor/spawn/types.d.ts.map +1 -0
- package/build/executor/spawn/types.js +2 -0
- package/build/executor/spawn/types.js.map +1 -0
- package/build/executor/spawn.d.ts +3 -103
- package/build/executor/spawn.d.ts.map +1 -1
- package/build/executor/spawn.js +192 -274
- package/build/executor/spawn.js.map +1 -1
- package/build/executor/types.d.ts +123 -0
- package/build/executor/types.d.ts.map +1 -0
- package/build/executor/types.js +2 -0
- package/build/executor/types.js.map +1 -0
- package/build/executor/types.local.d.ts +6 -0
- package/build/executor/types.local.d.ts.map +1 -0
- package/build/executor/types.local.js +2 -0
- package/build/executor/types.local.js.map +1 -0
- package/build/index.d.ts +14 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/project/consts.d.ts +17 -0
- package/build/project/consts.d.ts.map +1 -0
- package/build/project/consts.js +17 -0
- package/build/project/consts.js.map +1 -0
- package/build/project/consts.local.d.ts +4 -0
- package/build/project/consts.local.d.ts.map +1 -0
- package/build/project/consts.local.js +4 -0
- package/build/project/consts.local.js.map +1 -0
- package/build/project/dotenv/types.d.ts +39 -0
- package/build/project/dotenv/types.d.ts.map +1 -0
- package/build/project/dotenv/types.js +2 -0
- package/build/project/dotenv/types.js.map +1 -0
- package/build/project/dotenv.d.ts +4 -0
- package/build/project/dotenv.d.ts.map +1 -0
- package/build/project/dotenv.js +56 -0
- package/build/project/dotenv.js.map +1 -0
- package/build/project/env/types.d.ts +40 -0
- package/build/project/env/types.d.ts.map +1 -0
- package/build/project/env/types.js +2 -0
- package/build/project/env/types.js.map +1 -0
- package/build/project/env.d.ts +2 -98
- package/build/project/env.d.ts.map +1 -1
- package/build/project/env.js +63 -215
- package/build/project/env.js.map +1 -1
- package/build/project/marker/types.d.ts +33 -0
- package/build/project/marker/types.d.ts.map +1 -0
- package/build/project/marker/types.js +2 -0
- package/build/project/marker/types.js.map +1 -0
- package/build/project/marker.d.ts +4 -25
- package/build/project/marker.d.ts.map +1 -1
- package/build/project/marker.js +40 -43
- package/build/project/marker.js.map +1 -1
- package/build/project/probe/types.d.ts +22 -0
- package/build/project/probe/types.d.ts.map +1 -0
- package/build/project/probe/types.js +2 -0
- package/build/project/probe/types.js.map +1 -0
- package/build/project/probe.d.ts +4 -0
- package/build/project/probe.d.ts.map +1 -0
- package/build/project/probe.js +39 -0
- package/build/project/probe.js.map +1 -0
- package/build/project/report/types.d.ts +18 -0
- package/build/project/report/types.d.ts.map +1 -0
- package/build/project/report/types.js +2 -0
- package/build/project/report/types.js.map +1 -0
- package/build/project/report.d.ts +7 -0
- package/build/project/report.d.ts.map +1 -0
- package/build/project/report.js +68 -0
- package/build/project/report.js.map +1 -0
- package/build/project/setup/types.d.ts +32 -0
- package/build/project/setup/types.d.ts.map +1 -0
- package/build/project/setup/types.js +2 -0
- package/build/project/setup/types.js.map +1 -0
- package/build/project/setup.d.ts +4 -53
- package/build/project/setup.d.ts.map +1 -1
- package/build/project/setup.js +112 -175
- package/build/project/setup.js.map +1 -1
- package/build/project/types.d.ts +37 -0
- package/build/project/types.d.ts.map +1 -0
- package/build/project/types.js +2 -0
- package/build/project/types.js.map +1 -0
- package/build/run/consts.local.d.ts +3 -0
- package/build/run/consts.local.d.ts.map +1 -0
- package/build/run/consts.local.js +26 -0
- package/build/run/consts.local.js.map +1 -0
- package/build/run/index.d.ts +11 -69
- package/build/run/index.d.ts.map +1 -1
- package/build/run/index.js +9 -147
- package/build/run/index.js.map +1 -1
- package/build/run/local/types.d.ts +39 -0
- package/build/run/local/types.d.ts.map +1 -0
- package/build/run/local/types.js +2 -0
- package/build/run/local/types.js.map +1 -0
- package/build/run/local.d.ts +3 -0
- package/build/run/local.d.ts.map +1 -0
- package/build/run/local.js +130 -0
- package/build/run/local.js.map +1 -0
- package/build/run/process/types.d.ts +15 -0
- package/build/run/process/types.d.ts.map +1 -0
- package/build/run/process/types.js +2 -0
- package/build/run/process/types.js.map +1 -0
- package/build/run/process.d.ts +4 -0
- package/build/run/process.d.ts.map +1 -0
- package/build/run/process.js +20 -0
- package/build/run/process.js.map +1 -0
- package/build/run/serve.d.ts +14 -9
- package/build/run/serve.d.ts.map +1 -1
- package/build/run/serve.js +1 -25
- package/build/run/serve.js.map +1 -1
- package/build/run/state/types.d.ts +35 -0
- package/build/run/state/types.d.ts.map +1 -0
- package/build/run/state/types.js +2 -0
- package/build/run/state/types.js.map +1 -0
- package/build/run/state.d.ts +3 -62
- package/build/run/state.d.ts.map +1 -1
- package/build/run/state.js +96 -123
- package/build/run/state.js.map +1 -1
- package/build/run/types.d.ts +78 -0
- package/build/run/types.d.ts.map +1 -0
- package/build/run/types.js +2 -0
- package/build/run/types.js.map +1 -0
- package/build/session/consts.local.d.ts +5 -0
- package/build/session/consts.local.d.ts.map +1 -0
- package/build/session/consts.local.js +5 -0
- package/build/session/consts.local.js.map +1 -0
- package/build/session/index.d.ts +5 -10
- package/build/session/index.d.ts.map +1 -1
- package/build/session/index.js +84 -15
- package/build/session/index.js.map +1 -1
- package/build/session/questions.d.ts +16 -0
- package/build/session/questions.d.ts.map +1 -0
- package/build/session/questions.js +17 -0
- package/build/session/questions.js.map +1 -0
- package/build/session/queue.d.ts +61 -0
- package/build/session/queue.d.ts.map +1 -0
- package/build/session/queue.js +156 -0
- package/build/session/queue.js.map +1 -0
- package/build/session/tasks.d.ts +11 -30
- package/build/session/tasks.d.ts.map +1 -1
- package/build/session/tasks.js +18 -78
- package/build/session/tasks.js.map +1 -1
- package/build/session/types.d.ts +20 -0
- package/build/session/types.d.ts.map +1 -0
- package/build/session/types.js +2 -0
- package/build/session/types.js.map +1 -0
- package/build/task/consts.d.ts +12 -0
- package/build/task/consts.d.ts.map +1 -0
- package/build/task/consts.js +12 -0
- package/build/task/consts.js.map +1 -0
- package/build/task/consts.local.d.ts +19 -0
- package/build/task/consts.local.d.ts.map +1 -0
- package/build/task/consts.local.js +72 -0
- package/build/task/consts.local.js.map +1 -0
- package/build/task/driver.d.ts +1 -28
- package/build/task/driver.d.ts.map +1 -1
- package/build/task/driver.js +2 -9
- package/build/task/driver.js.map +1 -1
- package/build/task/envelope/types.d.ts +29 -0
- package/build/task/envelope/types.d.ts.map +1 -0
- package/build/task/envelope/types.js +2 -0
- package/build/task/envelope/types.js.map +1 -0
- package/build/task/envelope.d.ts +4 -34
- package/build/task/envelope.d.ts.map +1 -1
- package/build/task/envelope.js +103 -165
- package/build/task/envelope.js.map +1 -1
- package/build/task/index.d.ts +5 -0
- package/build/task/index.d.ts.map +1 -1
- package/build/task/index.js +2 -0
- package/build/task/index.js.map +1 -1
- package/build/task/inquiry/types.d.ts +38 -0
- package/build/task/inquiry/types.d.ts.map +1 -0
- package/build/task/inquiry/types.js +2 -0
- package/build/task/inquiry/types.js.map +1 -0
- package/build/task/inquiry.d.ts +5 -0
- package/build/task/inquiry.d.ts.map +1 -0
- package/build/task/inquiry.js +188 -0
- package/build/task/inquiry.js.map +1 -0
- package/build/task/types.d.ts +48 -0
- package/build/task/types.d.ts.map +1 -0
- package/build/task/types.js +2 -0
- package/build/task/types.js.map +1 -0
- package/build/tools/account/types.d.ts +24 -0
- package/build/tools/account/types.d.ts.map +1 -0
- package/build/tools/account/types.js +2 -0
- package/build/tools/account/types.js.map +1 -0
- package/build/tools/account.d.ts +4 -0
- package/build/tools/account.d.ts.map +1 -0
- package/build/tools/account.js +72 -0
- package/build/tools/account.js.map +1 -0
- package/build/tools/blueprints/types.d.ts +5 -0
- package/build/tools/blueprints/types.d.ts.map +1 -0
- package/build/tools/blueprints/types.js +2 -0
- package/build/tools/blueprints/types.js.map +1 -0
- package/build/tools/blueprints.d.ts +4 -0
- package/build/tools/blueprints.d.ts.map +1 -0
- package/build/tools/blueprints.js +23 -0
- package/build/tools/blueprints.js.map +1 -0
- package/build/tools/catalogue/types.d.ts +8 -0
- package/build/tools/catalogue/types.d.ts.map +1 -0
- package/build/tools/catalogue/types.js +2 -0
- package/build/tools/catalogue/types.js.map +1 -0
- package/build/tools/catalogue.d.ts +8 -6
- package/build/tools/catalogue.d.ts.map +1 -1
- package/build/tools/catalogue.js +2565 -213
- package/build/tools/catalogue.js.map +1 -1
- package/build/tools/config/types.d.ts +19 -0
- package/build/tools/config/types.d.ts.map +1 -0
- package/build/tools/config/types.js +2 -0
- package/build/tools/config/types.js.map +1 -0
- package/build/tools/config.d.ts +4 -0
- package/build/tools/config.d.ts.map +1 -0
- package/build/tools/config.js +42 -0
- package/build/tools/config.js.map +1 -0
- package/build/tools/consts.d.ts +61 -0
- package/build/tools/consts.d.ts.map +1 -0
- package/build/tools/consts.js +515 -0
- package/build/tools/consts.js.map +1 -0
- package/build/tools/consts.local.d.ts +131 -0
- package/build/tools/consts.local.d.ts.map +1 -0
- package/build/tools/consts.local.js +236 -0
- package/build/tools/consts.local.js.map +1 -0
- package/build/tools/control/types.d.ts +17 -0
- package/build/tools/control/types.d.ts.map +1 -0
- package/build/tools/control/types.js +2 -0
- package/build/tools/control/types.js.map +1 -0
- package/build/tools/control.d.ts +4 -0
- package/build/tools/control.d.ts.map +1 -0
- package/build/tools/control.js +44 -0
- package/build/tools/control.js.map +1 -0
- package/build/tools/feed/types.d.ts +21 -0
- package/build/tools/feed/types.d.ts.map +1 -0
- package/build/tools/feed/types.js +2 -0
- package/build/tools/feed/types.js.map +1 -0
- package/build/tools/feed.d.ts +4 -0
- package/build/tools/feed.d.ts.map +1 -0
- package/build/tools/feed.js +75 -0
- package/build/tools/feed.js.map +1 -0
- package/build/tools/git/types.d.ts +25 -0
- package/build/tools/git/types.d.ts.map +1 -0
- package/build/tools/git/types.js +2 -0
- package/build/tools/git/types.js.map +1 -0
- package/build/tools/git.d.ts +4 -0
- package/build/tools/git.d.ts.map +1 -0
- package/build/tools/git.js +83 -0
- package/build/tools/git.js.map +1 -0
- package/build/tools/handover/types.d.ts +49 -0
- package/build/tools/handover/types.d.ts.map +1 -0
- package/build/tools/handover/types.js +2 -0
- package/build/tools/handover/types.js.map +1 -0
- package/build/tools/handover.d.ts +8 -0
- package/build/tools/handover.d.ts.map +1 -0
- package/build/tools/handover.js +138 -0
- package/build/tools/handover.js.map +1 -0
- package/build/tools/host/types.d.ts +34 -0
- package/build/tools/host/types.d.ts.map +1 -0
- package/build/tools/host/types.js +2 -0
- package/build/tools/host/types.js.map +1 -0
- package/build/tools/host.d.ts +4 -0
- package/build/tools/host.d.ts.map +1 -0
- package/build/tools/host.js +13 -0
- package/build/tools/host.js.map +1 -0
- package/build/tools/iam/types.d.ts +44 -0
- package/build/tools/iam/types.d.ts.map +1 -0
- package/build/tools/iam/types.js +2 -0
- package/build/tools/iam/types.js.map +1 -0
- package/build/tools/iam.d.ts +4 -0
- package/build/tools/iam.d.ts.map +1 -0
- package/build/tools/iam.js +229 -0
- package/build/tools/iam.js.map +1 -0
- package/build/tools/index.d.ts +27 -1
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +14 -1
- package/build/tools/index.js.map +1 -1
- package/build/tools/inflight/types.d.ts +47 -0
- package/build/tools/inflight/types.d.ts.map +1 -0
- package/build/tools/inflight/types.js +2 -0
- package/build/tools/inflight/types.js.map +1 -0
- package/build/tools/inflight.d.ts +3 -0
- package/build/tools/inflight.d.ts.map +1 -0
- package/build/tools/inflight.js +88 -0
- package/build/tools/inflight.js.map +1 -0
- package/build/tools/kits/types.d.ts +12 -0
- package/build/tools/kits/types.d.ts.map +1 -0
- package/build/tools/kits/types.js +2 -0
- package/build/tools/kits/types.js.map +1 -0
- package/build/tools/kits.d.ts +4 -0
- package/build/tools/kits.d.ts.map +1 -0
- package/build/tools/kits.js +33 -0
- package/build/tools/kits.js.map +1 -0
- package/build/tools/mcp.d.ts +13 -19
- package/build/tools/mcp.d.ts.map +1 -1
- package/build/tools/mcp.js +117 -38
- package/build/tools/mcp.js.map +1 -1
- package/build/tools/platform.d.ts +14 -0
- package/build/tools/platform.d.ts.map +1 -0
- package/build/tools/platform.js +90 -0
- package/build/tools/platform.js.map +1 -0
- package/build/tools/production/types.d.ts +22 -0
- package/build/tools/production/types.d.ts.map +1 -0
- package/build/tools/production/types.js +2 -0
- package/build/tools/production/types.js.map +1 -0
- package/build/tools/production.d.ts +4 -0
- package/build/tools/production.d.ts.map +1 -0
- package/build/tools/production.js +80 -0
- package/build/tools/production.js.map +1 -0
- package/build/tools/refusal/types.d.ts +95 -0
- package/build/tools/refusal/types.d.ts.map +1 -0
- package/build/tools/refusal/types.js +2 -0
- package/build/tools/refusal/types.js.map +1 -0
- package/build/tools/refusal.d.ts +4 -0
- package/build/tools/refusal.d.ts.map +1 -0
- package/build/tools/refusal.js +663 -0
- package/build/tools/refusal.js.map +1 -0
- package/build/tools/settings/types.d.ts +42 -0
- package/build/tools/settings/types.d.ts.map +1 -0
- package/build/tools/settings/types.js +2 -0
- package/build/tools/settings/types.js.map +1 -0
- package/build/tools/settings.d.ts +4 -0
- package/build/tools/settings.d.ts.map +1 -0
- package/build/tools/settings.js +71 -0
- package/build/tools/settings.js.map +1 -0
- package/build/tools/status/types.d.ts +25 -0
- package/build/tools/status/types.d.ts.map +1 -0
- package/build/tools/status/types.js +2 -0
- package/build/tools/status/types.js.map +1 -0
- package/build/tools/status.d.ts +4 -0
- package/build/tools/status.d.ts.map +1 -0
- package/build/tools/status.js +183 -0
- package/build/tools/status.js.map +1 -0
- package/build/tools/stories/types.d.ts +48 -0
- package/build/tools/stories/types.d.ts.map +1 -0
- package/build/tools/stories/types.js +2 -0
- package/build/tools/stories/types.js.map +1 -0
- package/build/tools/stories.d.ts +8 -0
- package/build/tools/stories.d.ts.map +1 -0
- package/build/tools/stories.js +79 -0
- package/build/tools/stories.js.map +1 -0
- package/build/tools/types.d.ts +177 -26
- package/build/tools/types.d.ts.map +1 -1
- package/build/tools/types.js +1 -32
- package/build/tools/types.js.map +1 -1
- package/build/types.d.ts +391 -26
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +8 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +12 -0
- package/build/utils.js.map +1 -0
- package/package.json +30 -34
- package/build/harness/index.d.ts +0 -28
- package/build/harness/index.d.ts.map +0 -1
- package/build/harness/index.js +0 -83
- package/build/harness/index.js.map +0 -1
- package/build/harness/templates.d.ts +0 -30
- package/build/harness/templates.d.ts.map +0 -1
- package/build/harness/templates.js +0 -154
- package/build/harness/templates.js.map +0 -1
- package/build/tools/jobs.d.ts +0 -12
- package/build/tools/jobs.d.ts.map +0 -1
- package/build/tools/jobs.js +0 -47
- package/build/tools/jobs.js.map +0 -1
package/build/consts.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare const ENV_TARGET = "VIABLE_TARGET";
|
|
|
5
5
|
export declare const ENV_LLM = "VIABLE_LLM";
|
|
6
6
|
export declare const ENV_HARNESS = "VIABLE_HARNESS";
|
|
7
7
|
export declare const ENV_PROJECT_DIR = "VIABLE_PROJECT_DIR";
|
|
8
|
+
/** The URL-configured MCP host's address — see `CONNECT_DEFAULT_MCP_URL`. */
|
|
9
|
+
export declare const ENV_MCP_URL = "VIABLE_MCP_URL";
|
|
10
|
+
export declare const DEFAULT_MCP_URL = "https://api.owlmeans.com/mcp";
|
|
8
11
|
/** The service alias the SDK's own client context registers under. */
|
|
9
12
|
export declare const SDK_SERVICE = "viable-sdk";
|
|
10
13
|
/**
|
|
@@ -12,27 +15,39 @@ export declare const SDK_SERVICE = "viable-sdk";
|
|
|
12
15
|
*
|
|
13
16
|
* Every MCP host bounds a tool call, and the strictest default in the field is sixty seconds
|
|
14
17
|
* (Codex). Forty-five leaves room for the round trip and keeps the connector inside every host's
|
|
15
|
-
* ceiling without configuration —
|
|
16
|
-
* are polled, rather than calls that block.
|
|
18
|
+
* ceiling without configuration — long operations return a domain status and continue server-side.
|
|
17
19
|
*/
|
|
18
20
|
export declare const TOOL_DEADLINE_MS = 45000;
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* How long a tool in the delegated mode waits for its call — or for a model task that call is
|
|
23
|
+
* waiting on — before answering "still running". Inside {@link TOOL_DEADLINE_MS}, so the answer
|
|
24
|
+
* always beats the host's ceiling.
|
|
25
|
+
*/
|
|
26
|
+
export declare const HANDOVER_WAIT_MS = 40000;
|
|
27
|
+
/**
|
|
28
|
+
* How long a story tool waits for its planning transition to COMMIT, in milliseconds.
|
|
21
29
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
30
|
+
* Well under {@link TOOL_DEADLINE_MS}: the same call has already resolved the story and posted the
|
|
31
|
+
* transition, and on the platform a person's narrative is re-formatted by a model before it is
|
|
32
|
+
* appended. A commit that is late is not a failure — the transition is durable and nothing is
|
|
33
|
+
* undone — so `develop_story` answers from the story status instead of waiting out the host's ceiling.
|
|
26
34
|
*/
|
|
27
|
-
export declare const
|
|
35
|
+
export declare const COMMIT_WAIT_MS = 20000;
|
|
36
|
+
/** How long one long poll of a commit may hold, in seconds — what the platform holds at most for a connector. */
|
|
37
|
+
export declare const COMMIT_POLL_SEC = 20;
|
|
38
|
+
/** How many stories one page of `list_stories` carries when the caller names no size. */
|
|
39
|
+
export declare const STORY_PAGE_SIZE = 25;
|
|
28
40
|
/** How long `next_task` waits before answering "nothing yet". Under every host's ceiling. */
|
|
29
41
|
export declare const NEXT_TASK_WAIT_MS = 30000;
|
|
42
|
+
/**
|
|
43
|
+
* How long `next_question` waits before answering "nothing yet".
|
|
44
|
+
*
|
|
45
|
+
* The same window as a model task's, and for the host's reasons rather than the person's: nobody
|
|
46
|
+
* is expected to answer inside it. What the wait buys is a parent that asked one call too early —
|
|
47
|
+
* the platform queues the question a moment after the domain status reported it — and what the ceiling buys
|
|
48
|
+
* is that the call returns before the host's own deadline turns it into a broken server.
|
|
49
|
+
*/
|
|
50
|
+
export declare const NEXT_QUESTION_WAIT_MS = 30000;
|
|
30
51
|
/** How long a pull waits for an operation before answering empty. */
|
|
31
52
|
export declare const PULL_WAIT_MS = 30000;
|
|
32
|
-
/** How often a socket says it is still there. Presence outlives three missed pings. */
|
|
33
|
-
export declare const PING_INTERVAL_MS = 30000;
|
|
34
|
-
/** How long the socket handshake may take before the connector falls back to polling. */
|
|
35
|
-
export declare const SOCKET_HANDSHAKE_MS = 10000;
|
|
36
|
-
/** Reconnection backoff, in order. The last entry repeats. */
|
|
37
|
-
export declare const RECONNECT_BACKOFF_MS: number[];
|
|
38
53
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,SAAS,qBAAqB,CAAA;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,UAAU,kBAAkB,CAAA;AACzC,eAAO,MAAM,OAAO,eAAe,CAAA;AACnC,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,eAAe,uBAAuB,CAAA;AACnD,6EAA6E;AAC7E,eAAO,MAAM,WAAW,mBAAsB,CAAA;AAC9C,eAAO,MAAM,eAAe,iCAA0B,CAAA;AAEtD,sEAAsE;AACtE,eAAO,MAAM,WAAW,eAAe,CAAA;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAS,CAAA;AAEpC,iHAAiH;AACjH,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,yFAAyF;AACzF,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C,qEAAqE;AACrE,eAAO,MAAM,YAAY,QAAS,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONNECT_DEFAULT_MCP_URL, CONNECT_ENV_MCP_URL } from '@owlmeans/viable-common';
|
|
1
2
|
/** Where the connector reads its configuration from. Only the token is a secret. */
|
|
2
3
|
export const ENV_TOKEN = 'VIABLE_API_TOKEN';
|
|
3
4
|
export const ENV_API_URL = 'VIABLE_API_URL';
|
|
@@ -5,6 +6,9 @@ export const ENV_TARGET = 'VIABLE_TARGET';
|
|
|
5
6
|
export const ENV_LLM = 'VIABLE_LLM';
|
|
6
7
|
export const ENV_HARNESS = 'VIABLE_HARNESS';
|
|
7
8
|
export const ENV_PROJECT_DIR = 'VIABLE_PROJECT_DIR';
|
|
9
|
+
/** The URL-configured MCP host's address — see `CONNECT_DEFAULT_MCP_URL`. */
|
|
10
|
+
export const ENV_MCP_URL = CONNECT_ENV_MCP_URL;
|
|
11
|
+
export const DEFAULT_MCP_URL = CONNECT_DEFAULT_MCP_URL;
|
|
8
12
|
/** The service alias the SDK's own client context registers under. */
|
|
9
13
|
export const SDK_SERVICE = 'viable-sdk';
|
|
10
14
|
/**
|
|
@@ -12,27 +16,39 @@ export const SDK_SERVICE = 'viable-sdk';
|
|
|
12
16
|
*
|
|
13
17
|
* Every MCP host bounds a tool call, and the strictest default in the field is sixty seconds
|
|
14
18
|
* (Codex). Forty-five leaves room for the round trip and keeps the connector inside every host's
|
|
15
|
-
* ceiling without configuration —
|
|
16
|
-
* are polled, rather than calls that block.
|
|
19
|
+
* ceiling without configuration — long operations return a domain status and continue server-side.
|
|
17
20
|
*/
|
|
18
21
|
export const TOOL_DEADLINE_MS = 45_000;
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
23
|
+
* How long a tool in the delegated mode waits for its call — or for a model task that call is
|
|
24
|
+
* waiting on — before answering "still running". Inside {@link TOOL_DEADLINE_MS}, so the answer
|
|
25
|
+
* always beats the host's ceiling.
|
|
26
|
+
*/
|
|
27
|
+
export const HANDOVER_WAIT_MS = 40_000;
|
|
28
|
+
/**
|
|
29
|
+
* How long a story tool waits for its planning transition to COMMIT, in milliseconds.
|
|
21
30
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
31
|
+
* Well under {@link TOOL_DEADLINE_MS}: the same call has already resolved the story and posted the
|
|
32
|
+
* transition, and on the platform a person's narrative is re-formatted by a model before it is
|
|
33
|
+
* appended. A commit that is late is not a failure — the transition is durable and nothing is
|
|
34
|
+
* undone — so `develop_story` answers from the story status instead of waiting out the host's ceiling.
|
|
26
35
|
*/
|
|
27
|
-
export const
|
|
36
|
+
export const COMMIT_WAIT_MS = 20_000;
|
|
37
|
+
/** How long one long poll of a commit may hold, in seconds — what the platform holds at most for a connector. */
|
|
38
|
+
export const COMMIT_POLL_SEC = 20;
|
|
39
|
+
/** How many stories one page of `list_stories` carries when the caller names no size. */
|
|
40
|
+
export const STORY_PAGE_SIZE = 25;
|
|
28
41
|
/** How long `next_task` waits before answering "nothing yet". Under every host's ceiling. */
|
|
29
42
|
export const NEXT_TASK_WAIT_MS = 30_000;
|
|
43
|
+
/**
|
|
44
|
+
* How long `next_question` waits before answering "nothing yet".
|
|
45
|
+
*
|
|
46
|
+
* The same window as a model task's, and for the host's reasons rather than the person's: nobody
|
|
47
|
+
* is expected to answer inside it. What the wait buys is a parent that asked one call too early —
|
|
48
|
+
* the platform queues the question a moment after the domain status reported it — and what the ceiling buys
|
|
49
|
+
* is that the call returns before the host's own deadline turns it into a broken server.
|
|
50
|
+
*/
|
|
51
|
+
export const NEXT_QUESTION_WAIT_MS = 30_000;
|
|
30
52
|
/** How long a pull waits for an operation before answering empty. */
|
|
31
53
|
export const PULL_WAIT_MS = 30_000;
|
|
32
|
-
/** How often a socket says it is still there. Presence outlives three missed pings. */
|
|
33
|
-
export const PING_INTERVAL_MS = 30_000;
|
|
34
|
-
/** How long the socket handshake may take before the connector falls back to polling. */
|
|
35
|
-
export const SOCKET_HANDSHAKE_MS = 10_000;
|
|
36
|
-
/** Reconnection backoff, in order. The last entry repeats. */
|
|
37
|
-
export const RECONNECT_BACKOFF_MS = [1_000, 2_000, 5_000, 10_000, 30_000];
|
|
38
54
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAEtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA;AACnD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAA;AAEtD,sEAAsE;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAA;AAEpC,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,yFAAyF;AACzF,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAE3C,qEAAqE;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The platform's websocket namespace, which the planning commit feed is declared under.
|
|
3
|
+
*
|
|
4
|
+
* A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
|
|
5
|
+
* exactly this reason, so that neither end has to import the other's constants.
|
|
6
|
+
*/
|
|
7
|
+
export declare const UPDATE_BASE = "viable:manager-api:update:base";
|
|
8
|
+
/**
|
|
9
|
+
* The base alias and path manager-api mounts the planning protocol tree under.
|
|
10
|
+
*
|
|
11
|
+
* Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
|
|
12
|
+
* `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
|
|
13
|
+
* Every planning alias and path derives from these, so the two ends agree on a route only while
|
|
14
|
+
* both build the tree from the same base, path and socket base.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PLANNING_BASE_ALIAS = "viable:manager-api:planning";
|
|
17
|
+
export declare const PLANNING_BASE_PATH = "/planning";
|
|
18
|
+
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/context/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,mCAAmC,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,gCAAgC,CAAA;AAEhE,eAAO,MAAM,kBAAkB,cAAc,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The platform's websocket namespace, which the planning commit feed is declared under.
|
|
3
|
+
*
|
|
4
|
+
* A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
|
|
5
|
+
* exactly this reason, so that neither end has to import the other's constants.
|
|
6
|
+
*/
|
|
7
|
+
export const UPDATE_BASE = 'viable:manager-api:update:base';
|
|
8
|
+
/**
|
|
9
|
+
* The base alias and path manager-api mounts the planning protocol tree under.
|
|
10
|
+
*
|
|
11
|
+
* Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
|
|
12
|
+
* `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
|
|
13
|
+
* Every planning alias and path derives from these, so the two ends agree on a route only while
|
|
14
|
+
* both build the tree from the same base, path and socket base.
|
|
15
|
+
*/
|
|
16
|
+
export const PLANNING_BASE_ALIAS = 'viable:manager-api:planning';
|
|
17
|
+
export const PLANNING_BASE_PATH = '/planning';
|
|
18
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/context/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAA;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,6BAA6B,CAAA;AAEhE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAA"}
|
package/build/context/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientConfig, type ClientContext } from '@owlmeans/client-context';
|
|
2
2
|
import { connect } from '@owlmeans/viable-common';
|
|
3
|
-
|
|
4
|
-
apiUrl: string;
|
|
5
|
-
token: string;
|
|
6
|
-
/** The service alias the API is registered under. One deployment, one alias. */
|
|
7
|
-
service?: string;
|
|
8
|
-
}
|
|
3
|
+
import type { SdkContextOptions } from './types.js';
|
|
9
4
|
/**
|
|
10
5
|
* A client context that speaks to a viable deployment with one access token.
|
|
11
6
|
*
|
|
@@ -19,4 +14,5 @@ export interface SdkContextOptions {
|
|
|
19
14
|
*/
|
|
20
15
|
export declare const makeSdkContext: (opts: SdkContextOptions) => Promise<ClientContext<ClientConfig>>;
|
|
21
16
|
export { connect };
|
|
17
|
+
export type { SdkContextOptions } from './types.js';
|
|
22
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAQnG,OAAO,EAAE,OAAO,EAAsD,MAAM,yBAAyB,CAAA;AAKrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAenD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,SAAgB,iBAAiB,KAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CA8FjG,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
package/build/context/index.js
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { AppType } from '@owlmeans/context';
|
|
2
2
|
import { makeClientContext } from '@owlmeans/client-context';
|
|
3
3
|
import { bind } from '@owlmeans/client-entrypoint';
|
|
4
|
+
import { appendPlanningClient } from '@owlmeans/client-planning';
|
|
4
5
|
import { openProtocol, protocols } from '@owlmeans/entrypoint';
|
|
6
|
+
import { makePlanningProtocols } from '@owlmeans/planning';
|
|
5
7
|
import { route } from '@owlmeans/route';
|
|
6
8
|
import { authMiddleware, DEFAULT_GUARD } from '@owlmeans/auth-common';
|
|
7
9
|
import { makeTokenCarrierGuard } from '@owlmeans/auth-token';
|
|
8
|
-
import { connect, connectProtocols, CONNECT_TOKEN_PREFIX } from '@owlmeans/viable-common';
|
|
9
|
-
import {
|
|
10
|
+
import { connect, connectProtocols, CONNECT_TOKEN_PREFIX, ConnectLlm } from '@owlmeans/viable-common';
|
|
11
|
+
import { appendCallCollectTransport } from '../api/collect.js';
|
|
12
|
+
import { COMMIT_POLL_SEC, SDK_SERVICE, TOOL_DEADLINE_MS } from '../consts.js';
|
|
10
13
|
import { SdkAuthError, SdkMisconfigured } from '../errors.js';
|
|
14
|
+
import { PLANNING_BASE_ALIAS, PLANNING_BASE_PATH, UPDATE_BASE } from './consts.local.js';
|
|
15
|
+
const updateBase = openProtocol(route(UPDATE_BASE, '/update'));
|
|
11
16
|
/**
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
* A literal because it belongs to manager-api: the contract package takes it as a parameter for
|
|
15
|
-
* exactly this reason, so that neither end has to import the other's constants.
|
|
17
|
+
* The planning tree exactly as manager-api mounts it, minus the ownership gate — a gate is the
|
|
18
|
+
* server's to apply, and a client binding carries none.
|
|
16
19
|
*/
|
|
17
|
-
const
|
|
20
|
+
const sdkPlanningProtocols = () => makePlanningProtocols({
|
|
21
|
+
base: { alias: PLANNING_BASE_ALIAS, path: PLANNING_BASE_PATH },
|
|
22
|
+
guards: DEFAULT_GUARD,
|
|
23
|
+
socketBase: updateBase,
|
|
24
|
+
});
|
|
18
25
|
/**
|
|
19
26
|
* A client context that speaks to a viable deployment with one access token.
|
|
20
27
|
*
|
|
@@ -27,14 +34,20 @@ const UPDATE_BASE = 'viable:manager-api:update:base';
|
|
|
27
34
|
* form of authentication would be a connector whose access nobody can revoke by revoking a token.
|
|
28
35
|
*/
|
|
29
36
|
export const makeSdkContext = async (opts) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
// A THUNK's value is unknown until it resolves — a holder that has not signed in yet returns
|
|
38
|
+
// `''` on purpose, and that is not a misconfiguration this constructor can see. Only a literal
|
|
39
|
+
// string is validated eagerly, exactly as it always was, so every existing caller that passes
|
|
40
|
+
// one keeps getting the same synchronous refusal.
|
|
41
|
+
if (typeof opts.token === 'string') {
|
|
42
|
+
if (opts.token === '') {
|
|
43
|
+
throw new SdkMisconfigured('token');
|
|
44
|
+
}
|
|
45
|
+
if (!opts.token.startsWith(CONNECT_TOKEN_PREFIX)) {
|
|
46
|
+
// Refused here rather than at the first call: a value that is not one of this platform's
|
|
47
|
+
// tokens produces a 401 with nothing in it about which of the several plausible mistakes was
|
|
48
|
+
// made, and the answer is always the same one — that is not the token you were given.
|
|
49
|
+
throw new SdkAuthError(`prefix:${CONNECT_TOKEN_PREFIX}`);
|
|
50
|
+
}
|
|
38
51
|
}
|
|
39
52
|
const service = opts.service ?? 'viable-manager-api';
|
|
40
53
|
const url = new URL(opts.apiUrl);
|
|
@@ -67,21 +80,41 @@ export const makeSdkContext = async (opts) => {
|
|
|
67
80
|
// The scheme the platform's own guard claims first; `Bearer` is accepted too, and is what a
|
|
68
81
|
// host configured with a bare URL will send.
|
|
69
82
|
scheme: 'auth-token',
|
|
83
|
+
onRejected: opts.onRejected,
|
|
70
84
|
}));
|
|
71
85
|
context.registerMiddleware(authMiddleware);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
// ONE transport in front of the API client for every bound route — the connector's and the
|
|
87
|
+
// planning client's. In the delegated mode it names each write (`x-viable-call`) and collects an
|
|
88
|
+
// early `{ pending }` answer until the call settles; otherwise it only forwards.
|
|
89
|
+
appendCallCollectTransport(context, { delegated: opts.llm === ConnectLlm.Local });
|
|
90
|
+
const surface = connectProtocols({ guard: DEFAULT_GUARD });
|
|
91
|
+
// The story tools speak planning: the same tree the platform mounts, reached with the same token.
|
|
92
|
+
const planning = sdkPlanningProtocols();
|
|
93
|
+
// The planning commit feed hangs under the platform's own websocket base, so that base has to
|
|
94
|
+
// exist here too — a parent a registry cannot resolve fails the whole context at init, not the
|
|
95
|
+
// one call that would have used it. It is a declaration-only namespace, so its client binding has
|
|
96
|
+
// no screen or request implementation, and the SDK never opens the feed.
|
|
97
|
+
const entrypoints = [
|
|
98
|
+
bind(updateBase),
|
|
99
|
+
...protocols(surface).map(declaration => bind(declaration)),
|
|
100
|
+
...protocols(planning).map(declaration => bind(declaration)),
|
|
101
|
+
];
|
|
82
102
|
// Every caller gets a context-local client binding from the immutable protocol it shares with
|
|
83
103
|
// the server. No alias lookup can drift from a path or contract declaration.
|
|
84
104
|
context.registerEntrypoints(entrypoints);
|
|
105
|
+
appendPlanningClient(context, {
|
|
106
|
+
protocols: planning,
|
|
107
|
+
// Bound above, beside the connector routes, so one registration holds the whole surface.
|
|
108
|
+
bind: false,
|
|
109
|
+
// No socket opener: a commit is awaited by long poll only, which is the only transport the SDK
|
|
110
|
+
// speaks and the one that survives every proxy.
|
|
111
|
+
poll: COMMIT_POLL_SEC,
|
|
112
|
+
timeout: opts.timeout ?? TOOL_DEADLINE_MS,
|
|
113
|
+
// Nothing a tool does reads a flow or a type, and the bundle would otherwise be fetched in the
|
|
114
|
+
// background the moment the context is ready — a network call from a server nobody has asked
|
|
115
|
+
// anything yet. `model()` still loads it on first use.
|
|
116
|
+
schemas: false,
|
|
117
|
+
});
|
|
85
118
|
await context.configure().init();
|
|
86
119
|
return context;
|
|
87
120
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA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6EAA6E;IAC7E,OAAO,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IAExC,oBAAoB,CAAC,OAAO,EAAE;QAC5B,SAAS,EAAE,QAAQ;QACnB,yFAAyF;QACzF,IAAI,EAAE,KAAK;QACX,+FAA+F;QAC/F,gDAAgD;QAChD,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,gBAAgB;QACzC,+FAA+F;QAC/F,6FAA6F;QAC7F,uDAAuD;QACvD,OAAO,EAAE,KAAK;KACf,CAAC,CAAA;IAEF,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAA;IAEhC,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ConnectLlm } from '@owlmeans/viable-common';
|
|
2
|
+
export interface SdkContextOptions {
|
|
3
|
+
apiUrl: string;
|
|
4
|
+
/**
|
|
5
|
+
* A fixed token, or a thunk resolved on every request. The thunk form is what lets a
|
|
6
|
+
* credential holder (`@owlmeans/cli-auth`) hand the carrier guard something that changes
|
|
7
|
+
* across the process's lifetime — empty before a sign-in completes, a real token after — with
|
|
8
|
+
* no reconfiguration in between.
|
|
9
|
+
*/
|
|
10
|
+
token: string | (() => string | Promise<string>);
|
|
11
|
+
/** The service alias the API is registered under. One deployment, one alias. */
|
|
12
|
+
service?: string;
|
|
13
|
+
/** The planning client's HTTP deadline. `TOOL_DEADLINE_MS` when absent. */
|
|
14
|
+
timeout?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Who performs the platform's model calls for this connector. `ConnectLlm.Local` (the delegated
|
|
17
|
+
* mode) names every write with `x-viable-call` and collects an early `{ pending }` answer through
|
|
18
|
+
* `connect.call.collect`, so a write that waits on its own parent's model call is never bounded by
|
|
19
|
+
* one HTTP request. Absent or `cloud`, calls go out untouched.
|
|
20
|
+
*/
|
|
21
|
+
llm?: ConnectLlm;
|
|
22
|
+
/** Called when the platform rejects a request that presented this token — a credential holder
|
|
23
|
+
* wires this to forgetting a dead token (and signing in again) or reporting the problem. */
|
|
24
|
+
onRejected?: () => void | Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAChD,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB;gGAC4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { TargetHealthReading } from './health.js';
|
|
1
|
+
import type { BootCheckDeps, BootCheckJob, BootCheckReport } from './types.js';
|
|
3
2
|
/**
|
|
4
3
|
* Boot the generated backend for real, in isolation, and report what happened.
|
|
5
4
|
*
|
|
@@ -11,32 +10,6 @@ import type { TargetHealthReading } from './health.js';
|
|
|
11
10
|
* It runs the real thing, but never the live one: a second process, on its own port, against a
|
|
12
11
|
* scratch schema, killed on every exit path.
|
|
13
12
|
*/
|
|
14
|
-
/** How far the boot got. `ready` is the only success. */
|
|
15
|
-
export type BootCheckPhase = 'build' | 'schema' | 'boot' | 'ready';
|
|
16
|
-
export interface BootCheckReport {
|
|
17
|
-
ok: boolean;
|
|
18
|
-
phase: BootCheckPhase;
|
|
19
|
-
/** The classifier's reason plus the captured startup log, or null when the boot succeeded. */
|
|
20
|
-
error: string | null;
|
|
21
|
-
dbOk?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface BootCheckDeps {
|
|
24
|
-
port: number;
|
|
25
|
-
/** Argv marker that tells this instance apart from the live one for process matching. */
|
|
26
|
-
marker: string;
|
|
27
|
-
cwd: string;
|
|
28
|
-
env: Record<string, string>;
|
|
29
|
-
bootId: string;
|
|
30
|
-
/** Omitted to reuse the artifacts already on disk. */
|
|
31
|
-
build?: () => Promise<string | null>;
|
|
32
|
-
readHealth?: (port: number, bootId: string, timeoutMs: number) => Promise<TargetHealthReading>;
|
|
33
|
-
spawn?: typeof nodeSpawn;
|
|
34
|
-
ddlWindowMs?: number;
|
|
35
|
-
readyWindowMs?: number;
|
|
36
|
-
readyPollMs?: number;
|
|
37
|
-
/** Whole-run cap, so a wedged boot cannot outlive the caller's deadline. */
|
|
38
|
-
timeoutMs?: number;
|
|
39
|
-
}
|
|
40
13
|
/**
|
|
41
14
|
* DELIBERATE DIFFERENCE from the publisher: no `resetSchema` step, and therefore no `schema`
|
|
42
15
|
* failure of its own.
|
|
@@ -49,18 +22,6 @@ export interface BootCheckDeps {
|
|
|
49
22
|
* simply leaves what it created behind, and the next run reconciles into it.
|
|
50
23
|
*/
|
|
51
24
|
export declare const runBootCheck: (deps: BootCheckDeps) => Promise<BootCheckReport>;
|
|
52
|
-
export interface BootCheckStatus {
|
|
53
|
-
running: boolean;
|
|
54
|
-
startedAt: number | null;
|
|
55
|
-
report: BootCheckReport | null;
|
|
56
|
-
}
|
|
57
|
-
export interface BootCheckJob {
|
|
58
|
-
/** Start a check, or join the one already running. `true` when this call started it. */
|
|
59
|
-
start: (run: () => Promise<BootCheckReport>) => boolean;
|
|
60
|
-
status: () => BootCheckStatus;
|
|
61
|
-
/** The running check, for the legacy blocking caller. */
|
|
62
|
-
pending: () => Promise<BootCheckReport> | null;
|
|
63
|
-
}
|
|
64
25
|
/**
|
|
65
26
|
* The job behind `BootCheck` / `BootCheckStatus`.
|
|
66
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-check.d.ts","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"boot-check.d.ts","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE9E;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,SAAgB,aAAa,KAAG,OAAO,CAAC,eAAe,CA6F/E,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,2BAA+B,YA2C7D,CAAA"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { spawn as nodeSpawn } from 'node:child_process';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { healthHelper } from './health.js';
|
|
3
|
+
import { spawnHelper } from './spawn.js';
|
|
4
|
+
import { STARTUP_LOG_CAP, WATCHDOG_MS } from './consts.local.js';
|
|
5
|
+
/**
|
|
6
|
+
* Boot the generated backend for real, in isolation, and report what happened.
|
|
7
|
+
*
|
|
8
|
+
* `tsc` cannot see a foreign key that names a resource nothing registers: the reference is a
|
|
9
|
+
* string in an AJV schema, and it is resolved while the OwlMeans context initializes. So a story
|
|
10
|
+
* can type-check, be stamped complete, and leave a backend that dies at boot — which is exactly
|
|
11
|
+
* what happened, because the only real boot in the pipeline ran AFTER the story was accepted.
|
|
12
|
+
*
|
|
13
|
+
* It runs the real thing, but never the live one: a second process, on its own port, against a
|
|
14
|
+
* scratch schema, killed on every exit path.
|
|
15
|
+
*/
|
|
5
16
|
/**
|
|
6
17
|
* DELIBERATE DIFFERENCE from the publisher: no `resetSchema` step, and therefore no `schema`
|
|
7
18
|
* failure of its own.
|
|
@@ -14,7 +25,7 @@ const STARTUP_LOG_CAP = 16_384;
|
|
|
14
25
|
* simply leaves what it created behind, and the next run reconciles into it.
|
|
15
26
|
*/
|
|
16
27
|
export const runBootCheck = async (deps) => {
|
|
17
|
-
const { port, marker, cwd, env, bootId, build, readHealth = readTargetHealth, spawn = nodeSpawn, ddlWindowMs = 10_000, readyWindowMs = 90_000, readyPollMs = 2_000, timeoutMs = 480_000, } = deps;
|
|
28
|
+
const { port, marker, cwd, env, bootId, build, readHealth = healthHelper.readTargetHealth, spawn = nodeSpawn, ddlWindowMs = 10_000, readyWindowMs = 90_000, readyPollMs = 2_000, timeoutMs = 480_000, } = deps;
|
|
18
29
|
const deadline = Date.now() + timeoutMs;
|
|
19
30
|
let child = null;
|
|
20
31
|
let log = '';
|
|
@@ -30,8 +41,8 @@ export const runBootCheck = async (deps) => {
|
|
|
30
41
|
// Before the spawn, not only after it. The leftover this reclaims belongs to a run that never
|
|
31
42
|
// finished, so it is already holding the port by the time anything asks for a fresh check —
|
|
32
43
|
// and the target refuses to start on a taken port rather than stealing it, correctly.
|
|
33
|
-
if (!await waitForPortFree(port, 2_000))
|
|
34
|
-
await reclaimPort(port, marker);
|
|
44
|
+
if (!await spawnHelper.waitForPortFree(port, 2_000))
|
|
45
|
+
await spawnHelper.reclaimPort(port, marker);
|
|
35
46
|
child = spawn('bun', ['dist/index.js', marker], {
|
|
36
47
|
cwd,
|
|
37
48
|
detached: true,
|
|
@@ -48,7 +59,7 @@ export const runBootCheck = async (deps) => {
|
|
|
48
59
|
// is for. A target that survives it may still be degraded, which is what the poll asks about.
|
|
49
60
|
const ddlDeadline = Date.now() + ddlWindowMs;
|
|
50
61
|
while (Date.now() < ddlDeadline && !exited) {
|
|
51
|
-
await delay(200);
|
|
62
|
+
await spawnHelper.delay(200);
|
|
52
63
|
}
|
|
53
64
|
if (exited) {
|
|
54
65
|
return { ok: false, phase: 'boot', error: `The target backend exited while initializing:\n${log}` };
|
|
@@ -68,7 +79,7 @@ export const runBootCheck = async (deps) => {
|
|
|
68
79
|
if (health.terminal) {
|
|
69
80
|
return { ok: false, phase: 'boot', error: `${reason}\n${log}`.trim(), dbOk: health.dbOk };
|
|
70
81
|
}
|
|
71
|
-
await delay(readyPollMs);
|
|
82
|
+
await spawnHelper.delay(readyPollMs);
|
|
72
83
|
}
|
|
73
84
|
return { ok: false, phase: 'boot', error: `${reason}\n${log}`.trim() };
|
|
74
85
|
}
|
|
@@ -80,7 +91,7 @@ export const runBootCheck = async (deps) => {
|
|
|
80
91
|
// and one left holding the database would be indistinguishable from the live backend.
|
|
81
92
|
if (child != null) {
|
|
82
93
|
try {
|
|
83
|
-
await killGroupAndWait(child);
|
|
94
|
+
await spawnHelper.killGroupAndWait(child);
|
|
84
95
|
}
|
|
85
96
|
catch {
|
|
86
97
|
// Already gone.
|
|
@@ -91,22 +102,14 @@ export const runBootCheck = async (deps) => {
|
|
|
91
102
|
// detached child alive, and every later check then fails with the target's own "the api port
|
|
92
103
|
// is already in use" — which reads as a defect in the generated app rather than as a stray
|
|
93
104
|
// process from a run that never finished.
|
|
94
|
-
if (!await waitForPortFree(port))
|
|
95
|
-
await reclaimPort(port, marker);
|
|
105
|
+
if (!await spawnHelper.waitForPortFree(port))
|
|
106
|
+
await spawnHelper.reclaimPort(port, marker);
|
|
96
107
|
}
|
|
97
108
|
catch {
|
|
98
109
|
// Nothing else to do — the next check reclaims by marker anyway.
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
};
|
|
102
|
-
/**
|
|
103
|
-
* Outer bound on one boot-check job.
|
|
104
|
-
*
|
|
105
|
-
* `runBootCheck` caps its own ready poll but not the build in front of it, so this is the only
|
|
106
|
-
* thing that guarantees a poller eventually reads `running: false` — a check that outlives it is
|
|
107
|
-
* abandoned, not awaited.
|
|
108
|
-
*/
|
|
109
|
-
const WATCHDOG_MS = 600_000;
|
|
110
113
|
/**
|
|
111
114
|
* The job behind `BootCheck` / `BootCheckStatus`.
|
|
112
115
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-check.js","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"boot-check.js","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAqB,MAAM,oBAAoB,CAAA;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGhE;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,IAAmB,EAA4B,EAAE;IAClF,MAAM,EACJ,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EACrC,UAAU,GAAG,YAAY,CAAC,gBAAgB,EAC1C,KAAK,GAAG,SAAS,EACjB,WAAW,GAAG,MAAM,EACpB,aAAa,GAAG,MAAM,EACtB,WAAW,GAAG,KAAK,EACnB,SAAS,GAAG,OAAO,GACpB,GAAG,IAAI,CAAA;IAER,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAA;IACvC,IAAI,KAAK,GAAwB,IAAI,CAAA;IACrC,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,MAAM,MAAM,GAAG,CAAC,KAAa,EAAQ,EAAE;QACrC,GAAG,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,CAAA;IA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