@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/tools/mcp.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { TOOL_DEADLINE_MS } from '../consts.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { catalogueHelper } from './catalogue.js';
|
|
3
|
+
import { HANDOVER_EXEMPT } from './consts.local.js';
|
|
4
|
+
import { makeHandoverHelper } from './handover.js';
|
|
5
|
+
import { createInflightCalls } from './inflight.js';
|
|
6
|
+
import { toolHostHelper } from './host.js';
|
|
4
7
|
const withDeadline = async (label, ms, fn) => {
|
|
5
8
|
let timer;
|
|
6
9
|
try {
|
|
@@ -24,27 +27,23 @@ const withDeadline = async (label, ms, fn) => {
|
|
|
24
27
|
* rather than as a slow platform. And containment: a thrown error becomes an `isError` result the
|
|
25
28
|
* model can read and act on, because an exception crossing the transport tells it only that
|
|
26
29
|
* something went wrong somewhere.
|
|
30
|
+
*
|
|
31
|
+
* In the delegated mode a platform call may itself stop for a model call this session's parent
|
|
32
|
+
* performs — the parent that is blocked on this very tool. There a tool is the HANDOVER instead of
|
|
33
|
+
* a deadline: its call races a model task arriving, the task is answered first, and the call's own
|
|
34
|
+
* result is delivered by `submit_task_result` / `next_task` once it settles. The task loop and the
|
|
35
|
+
* tools that never reach the platform keep the deadline.
|
|
27
36
|
*/
|
|
28
37
|
export const registerCatalogue = (server, deps) => {
|
|
29
38
|
const registered = [];
|
|
30
|
-
for
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
catch (e) {
|
|
41
|
-
deps.log(`${tool.name} failed: ${e.message}`);
|
|
42
|
-
return {
|
|
43
|
-
content: [{ type: 'text', text: e.message }],
|
|
44
|
-
isError: true,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
});
|
|
39
|
+
// One registry for the life of the server, shared by every tool through the deps it is handed.
|
|
40
|
+
const toolDeps = deps.inflight != null ? deps : { ...deps, inflight: createInflightCalls() };
|
|
41
|
+
const handover = makeHandoverHelper(toolDeps);
|
|
42
|
+
const delegated = toolHostHelper.performsModelTasks(toolDeps.host);
|
|
43
|
+
for (const tool of catalogueHelper.visibleTools(toolDeps.host)) {
|
|
44
|
+
server.registerTool(tool.name, { title: tool.title, description: tool.description, inputSchema: tool.input, annotations: tool.annotations }, async (args) => delegated && !HANDOVER_EXEMPT.has(tool.name)
|
|
45
|
+
? await handover.run(tool, args ?? {})
|
|
46
|
+
: await handover.contain(tool.name, async () => await withDeadline(tool.name, TOOL_DEADLINE_MS, async () => await tool.run(args ?? {}, toolDeps))));
|
|
48
47
|
registered.push(tool.name);
|
|
49
48
|
}
|
|
50
49
|
return registered;
|
|
@@ -52,12 +51,38 @@ export const registerCatalogue = (server, deps) => {
|
|
|
52
51
|
/**
|
|
53
52
|
* What the server tells a parent agent about itself, before any tool is called.
|
|
54
53
|
*
|
|
55
|
-
* It states the workflow
|
|
56
|
-
*
|
|
57
|
-
*
|
|
54
|
+
* It states the workflow, a one-line map of every capability group (one tool named per family, the
|
|
55
|
+
* full list being `describe_platform`'s), and the rules that are not discoverable from a tool list:
|
|
56
|
+
* that long operations continue server-side and expose domain statuses, that an irreversible tool
|
|
57
|
+
* needs the user's agreement as `confirm: true`, what stays in the browser, and — in the delegated
|
|
58
|
+
* mode — that this session's model calls are the parent's to perform. A family whose tools this
|
|
59
|
+
* host does not offer is never named by tool.
|
|
58
60
|
*/
|
|
59
61
|
export const serverInstructions = (deps) => {
|
|
60
62
|
const { host } = deps;
|
|
63
|
+
const cloud = toolHostHelper.cloudTarget(host);
|
|
64
|
+
const families = [
|
|
65
|
+
'supported stacks and application categories (describe_blueprints)',
|
|
66
|
+
'projects (list_projects, rename_project, delete_project, unlock_project_agent, list_slots)',
|
|
67
|
+
'stories (list_stories, create_story, develop_story, start_story_batch, story_batch_status)',
|
|
68
|
+
'open-ended changes (modify_project, steer_agent), stopping the agent (stop_agent) and planning kits'
|
|
69
|
+
+ ' (describe_planning_kits)',
|
|
70
|
+
...(cloud
|
|
71
|
+
? [
|
|
72
|
+
'the generated files and the preview (list_files, read_file, write_file, delete_file, preview_control)',
|
|
73
|
+
'git and GitHub (git_status, git_commit, connect_github, publish_to_github, github_sync)',
|
|
74
|
+
'the production site (production_status, publish_production, custom_domain, production_auth)',
|
|
75
|
+
]
|
|
76
|
+
: []),
|
|
77
|
+
'configuration variables (project_configuration)',
|
|
78
|
+
'project and organization branding (project_settings, set_platform_credit, organization_branding)',
|
|
79
|
+
'the account (inference_settings, list_access_tokens, privacy_choices, pickup_intent)',
|
|
80
|
+
'the generated application\'s own users and permissions (app_users, app_permissions, app_groups)',
|
|
81
|
+
`activity feeds (project_activity, notifications${cloud ? ', file_changes' : ''})`,
|
|
82
|
+
...(catalogueHelper.visibleTools(host).some(tool => tool.name === 'describe_harness')
|
|
83
|
+
? ['this agent\'s own setup (describe_harness)']
|
|
84
|
+
: []),
|
|
85
|
+
];
|
|
61
86
|
const lines = [
|
|
62
87
|
'This server connects you to the OwlMeans Viable platform, which builds full-stack web'
|
|
63
88
|
+ ' applications from a description: it writes the specification, generates the code, and'
|
|
@@ -66,33 +91,87 @@ export const serverInstructions = (deps) => {
|
|
|
66
91
|
'',
|
|
67
92
|
`Mode: target=${host.target}, llm=${host.llm}.`,
|
|
68
93
|
'',
|
|
69
|
-
'Workflow: describe_capabilities → create_project →
|
|
70
|
-
+ ' list_stories → develop_story →
|
|
94
|
+
'Workflow: describe_capabilities → create_project → project_status → confirm_project →'
|
|
95
|
+
+ ' project_status → list_stories → develop_story → story_status. develop_story implements one'
|
|
96
|
+
+ ' story; start_story_batch implements several (every planned one by default) one after another, in'
|
|
97
|
+
+ ' the order the platform chooses for building them — follow it with story_batch_status. An application that already'
|
|
98
|
+
+ ' exists is brought onto the same rails instead: convert_project → conversion_status → check_convertible →'
|
|
99
|
+
+ ' proceed_conversion at each stage. The check reads what the intake found, so it comes'
|
|
100
|
+
+ ' after the first stage rather than before it. A conversion step that would use the plan\'s'
|
|
101
|
+
+ ' conversion limit or spend credits answers with what it costs instead of starting: tell the'
|
|
102
|
+
+ ' user, and repeat the call with confirm: true only after they agree.',
|
|
103
|
+
'',
|
|
104
|
+
'The stock blueprint is owlmeans-fullstack-ts. Cases: web (business web apps, portals and dashboards); scalable (queued services); ai-pipeline (staged AI workflows); ai-agent (tool-using assistants); game (casual, online-turn and online-live games); work-management and work-management-tenanted (project tracking, CRM, service desk, inventory, recruiting, field service and process workflows). The tenanted case supports multiple organization entities. Call describe_blueprints for the deployed registry, category ids and current capabilities before choosing.',
|
|
105
|
+
'',
|
|
106
|
+
'Call describe_platform for what this platform can build and which of it this session can'
|
|
107
|
+
+ ' drive, every tool listed by group.',
|
|
108
|
+
'',
|
|
109
|
+
`Everything the web application does except billing is here too: ${families.join('; ')}.`,
|
|
110
|
+
'',
|
|
111
|
+
'Long operations do not block. Read progress with project_status, story_status,'
|
|
112
|
+
+ ' conversion_status, or pipeline_status for the domain you are working in; to follow work as it'
|
|
113
|
+
+ ' happens, pass each feed\'s cursor back as after (wait up to 20 s) instead of re-reading a status'
|
|
114
|
+
+ ' in a loop.',
|
|
115
|
+
'',
|
|
116
|
+
'A story\'s status moves through the platform\'s story flow; develop_story (or a batch) is what starts'
|
|
117
|
+
+ ' that move, reset_story and complete_story are the two manual moves, and update_story never changes'
|
|
118
|
+
+ ' it. While the agent works, stop_agent stops it — a story run at its next step, rolled back to where'
|
|
119
|
+
+ ' that run started; an open-ended change once the model\'s current answer arrives, its edits kept and'
|
|
120
|
+
+ ' summarised — and steer_agent sends a running open-ended change a message it reads before its next'
|
|
121
|
+
+ ' model call.',
|
|
122
|
+
'',
|
|
123
|
+
'A tool that changes what cannot be undone — deleting a project'
|
|
124
|
+
+ (cloud ? ', a file' : '') + ', a converted origin, an application user or group, releasing an agent'
|
|
125
|
+
+ ' lock, stopping a story run or cancelling a story batch (the story in progress is rolled back), '
|
|
126
|
+
+ (cloud ? 'discarding or reverting git changes, disconnecting GitHub, publishing the'
|
|
127
|
+
+ ' production site, ' : '')
|
|
128
|
+
+ 'revoking an access token — refuses without confirm: true: ask the user first, and only then call'
|
|
129
|
+
+ ' it again with confirm: true.',
|
|
130
|
+
'',
|
|
131
|
+
'Some acts stay the user\'s own, in the browser, and no tool here does them: payments, credits and'
|
|
132
|
+
+ ' the plan; creating an access token; giving a marketing consent or accepting terms; approving'
|
|
133
|
+
+ ' a connector'
|
|
134
|
+
+ (cloud ? '; finishing a GitHub authorization (connect_github answers the address they open)' : '')
|
|
135
|
+
+ '. Send the user to the web application for these.',
|
|
71
136
|
'',
|
|
72
|
-
'
|
|
73
|
-
+ '
|
|
137
|
+
'The copyright line, the organization name, the Terms and Privacy links and the Google tag are'
|
|
138
|
+
+ ' project settings: project_settings reads them and update_project_settings changes them. The'
|
|
139
|
+
+ ' Terms and Privacy pages at /terms and /privacy are generated with the application — do not'
|
|
140
|
+
+ ' write your own.',
|
|
74
141
|
];
|
|
75
|
-
if (
|
|
76
|
-
lines.push('', 'MODEL TASKS:
|
|
77
|
-
+
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
142
|
+
if (toolHostHelper.sessionCapable(host)) {
|
|
143
|
+
lines.push('', 'MODEL TASKS: '
|
|
144
|
+
+ (toolHostHelper.performsModelTasks(host)
|
|
145
|
+
? 'this session runs in the delegated mode, so EVERY model call the platform makes for it is'
|
|
146
|
+
+ ' yours to perform — project drafting, content checks and story formatting included; a'
|
|
147
|
+
+ ' delegated conversion spends no credits. A tool whose call waits on one answers with the'
|
|
148
|
+
+ ' task and says it is NOT finished: do not call that tool again — perform the task, and'
|
|
149
|
+
+ ' submit_task_result replies with the tool\'s result or the next model call it waits on.'
|
|
150
|
+
+ ' Whenever a domain status reports waiting for a model task, call next_task. Run every task'
|
|
151
|
+
+ ' in a CLEAN subagent at LOW reasoning effort — never in this conversation — and pass its'
|
|
152
|
+
+ ' answer to submit_task_result verbatim. Repeat until next_task says there is nothing. Do'
|
|
153
|
+
+ ' not summarise, improve or reinterpret an answer.'
|
|
154
|
+
: 'this session runs in the cloud mode: the platform performs every model call itself —'
|
|
155
|
+
+ ' a conversion\'s included — so there is no task for you to collect.'));
|
|
156
|
+
lines.push('', 'QUESTIONS: when a domain status reports waiting for a person, use its pending inquiry or call next_question, put the question'
|
|
157
|
+
+ ' to the person you are working for, and send their answer back with answer_question. Do not'
|
|
158
|
+
+ ' answer it yourself; if they are unavailable, submit declined: true so the platform records'
|
|
159
|
+
+ ' an assumption.');
|
|
81
160
|
}
|
|
82
|
-
else if (delegatedLlm(host)
|
|
161
|
+
else if (toolHostHelper.delegatedLlm(host)) {
|
|
83
162
|
// The account asks for the delegated mode and this host cannot serve it: it answers one
|
|
84
163
|
// request and forgets, so there is nothing here to hold a task until an answer comes back.
|
|
85
164
|
// Said plainly, because the alternative is a parent waiting for a next_task tool that is not
|
|
86
165
|
// in its list.
|
|
87
166
|
lines.push('', 'Your account asks for the delegated model mode, which this URL-configured server cannot'
|
|
88
167
|
+ ' run: it holds no session between calls. The platform performs the model calls of a run'
|
|
89
|
-
+ ' started here, unless the stdio connector
|
|
90
|
-
+ ' the project.');
|
|
168
|
+
+ ' started here, unless the package-based stdio connector is attached to the project.');
|
|
91
169
|
}
|
|
92
170
|
if (host.target === 'local') {
|
|
93
171
|
lines.push('', 'The project lives on this machine. The platform writes its files through this server, so do'
|
|
94
|
-
+ ' not edit them yourself while a
|
|
95
|
-
+ ' application needs in order to run here.'
|
|
172
|
+
+ ' not edit them yourself while a platform run is active. Use local_setup_guide for what the'
|
|
173
|
+
+ ' application needs in order to run here. Its files, git repository and deployment are this'
|
|
174
|
+
+ ' machine\'s, so the platform\'s file, preview, git and production tools are not offered.');
|
|
96
175
|
}
|
|
97
176
|
return lines.join('\n');
|
|
98
177
|
};
|
package/build/tools/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/tools/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/tools/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG1C,MAAM,YAAY,GAAG,KAAK,EAAK,KAAa,EAAE,EAAU,EAAE,EAAoB,EAAc,EAAE;IAC5F,IAAI,KAAgD,CAAA;IACpD,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC;YACxB,EAAE,EAAE;YACJ,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;gBAC/B,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,qBAAqB,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACtF,CAAC,CAAC;SACH,CAAC,CAAA;IACJ,CAAC;YAAS,CAAC;QACT,IAAI,KAAK,IAAI,IAAI;YAAE,YAAY,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAq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;QAC7F,eAAe;QACf,KAAK,CAAC,IAAI,CACR,EAAE,EACF,yFAAyF;cACvF,yFAAyF;cACzF,qFAAqF,CACxF,CAAA;IACH,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC5B,KAAK,CAAC,IAAI,CACR,EAAE,EACF,6FAA6F;cAC3F,4FAA4F;cAC5F,4FAA4F;cAC5F,0FAA0F,CAC7F,CAAA;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToolHost, PlatformCatalogue } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The catalogue as text, narrowed to what THIS session can drive.
|
|
4
|
+
*
|
|
5
|
+
* Two rules, and the second is the point. Nothing is listed that the host does not offer, so a
|
|
6
|
+
* parent never proposes a path it cannot take. And every group that IS hidden says so in one line,
|
|
7
|
+
* because a parent reading a shorter list without an explanation concludes the platform cannot do
|
|
8
|
+
* the thing at all — and then writes the application by hand.
|
|
9
|
+
*
|
|
10
|
+
* Deterministic: no clock, no host name, no ordering that depends on a map. Two calls with the
|
|
11
|
+
* same host produce the same bytes, which is what makes it safe to cache in a system prompt.
|
|
12
|
+
*/
|
|
13
|
+
export declare const renderPlatform: (catalogue: PlatformCatalogue, host: ToolHost) => string;
|
|
14
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/tools/platform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAsB,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEjF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,cAAe,iBAAiB,QAAQ,QAAQ,KAAG,MAuG7E,CAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ConnectLlm, ConnectTarget } from '@owlmeans/viable-common';
|
|
2
|
+
import { catalogueHelper } from './catalogue.js';
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue as text, narrowed to what THIS session can drive.
|
|
5
|
+
*
|
|
6
|
+
* Two rules, and the second is the point. Nothing is listed that the host does not offer, so a
|
|
7
|
+
* parent never proposes a path it cannot take. And every group that IS hidden says so in one line,
|
|
8
|
+
* because a parent reading a shorter list without an explanation concludes the platform cannot do
|
|
9
|
+
* the thing at all — and then writes the application by hand.
|
|
10
|
+
*
|
|
11
|
+
* Deterministic: no clock, no host name, no ordering that depends on a map. Two calls with the
|
|
12
|
+
* same host produce the same bytes, which is what makes it safe to cache in a system prompt.
|
|
13
|
+
*/
|
|
14
|
+
export const renderPlatform = (catalogue, host) => {
|
|
15
|
+
const offered = new Set(catalogueHelper.visibleTools(host).map(tool => tool.name));
|
|
16
|
+
const has = (tool) => offered.has(tool);
|
|
17
|
+
const lines = [
|
|
18
|
+
'THE OWLMEANS VIABLE PLATFORM',
|
|
19
|
+
'',
|
|
20
|
+
'It builds full-stack web applications from a description, and converts applications that'
|
|
21
|
+
+ ' already exist onto the same rails. Everything below is what the platform does; the'
|
|
22
|
+
+ ' "in this session" notes say which of it you can drive from here.',
|
|
23
|
+
'',
|
|
24
|
+
`This session: target=${host.target} (${host.target === ConnectTarget.Local
|
|
25
|
+
? 'the sources live on this machine'
|
|
26
|
+
: 'the sources live in a platform slot'}), llm=${host.llm} (${
|
|
27
|
+
// Read off the offered set, never off the mode alone. A host that cannot hold a session
|
|
28
|
+
// cannot collect a task whatever the account setting says — and the setting is `local` there
|
|
29
|
+
// often enough (an entitled account gets it on the URL host too) that branching on the mode
|
|
30
|
+
// told such a parent to poll a `next_task` it was never offered, which it reports as a
|
|
31
|
+
// broken server. Where the loop IS offered, every model call is the parent's.
|
|
32
|
+
has('next_task')
|
|
33
|
+
? 'every model call the platform makes for this session is yours to perform — project'
|
|
34
|
+
+ ' drafting, content checks and formatting included'
|
|
35
|
+
: host.llm === ConnectLlm.Local
|
|
36
|
+
? 'the platform performs its own model calls — this session cannot collect one'
|
|
37
|
+
: 'the platform performs every model call itself, a conversion\'s included'}).`,
|
|
38
|
+
'',
|
|
39
|
+
'WHAT IT RUNS',
|
|
40
|
+
];
|
|
41
|
+
for (const pipeline of catalogue.pipelines) {
|
|
42
|
+
const startable = pipeline.startedBy.filter(has);
|
|
43
|
+
lines.push('', ` ${pipeline.title} · ${pipeline.id}`, ` ${pipeline.what}`, startable.length > 0
|
|
44
|
+
? ` start: ${startable.join(' or ')}`
|
|
45
|
+
: ` not startable in this session (${pipeline.startedBy.join(', ')} is not offered here)`);
|
|
46
|
+
if (pipeline.stages != null)
|
|
47
|
+
lines.push(` steps: ${pipeline.stages.join(' → ')}`);
|
|
48
|
+
lines.push(` ${pipeline.resumable ? 'resumable — resume_pipeline continues it' : 'not resumable'}`);
|
|
49
|
+
if (pipeline.waitsFor != null && pipeline.waitsFor.length > 0) {
|
|
50
|
+
lines.push(` may wait for: ${pipeline.waitsFor.join(', ')}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Rendered whole on every host: what the platform GENERATES does not depend on which connector
|
|
54
|
+
// is reading. Only the tool names are narrowed, like everywhere else.
|
|
55
|
+
lines.push('', 'WHAT A GENERATED APPLICATION CARRIES');
|
|
56
|
+
for (const feature of catalogue.features) {
|
|
57
|
+
lines.push('', ` ${feature.title}`, ` ${feature.what}`);
|
|
58
|
+
const tools = (feature.tools ?? []).filter(has);
|
|
59
|
+
if (tools.length > 0)
|
|
60
|
+
lines.push(` see: ${tools.join(', ')}`);
|
|
61
|
+
}
|
|
62
|
+
lines.push('', 'WHAT YOU CAN CALL');
|
|
63
|
+
const hidden = [];
|
|
64
|
+
for (const capability of catalogue.capabilities) {
|
|
65
|
+
const available = capability.tools.filter(has);
|
|
66
|
+
if (available.length < 1) {
|
|
67
|
+
hidden.push(capability);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
lines.push('', ` ${capability.title}`, ` ${capability.what}`, ` ${available.join(', ')}`);
|
|
71
|
+
}
|
|
72
|
+
if (hidden.length > 0) {
|
|
73
|
+
lines.push('', 'NOT IN THIS SESSION (the platform does it; this connector cannot)');
|
|
74
|
+
for (const capability of hidden) {
|
|
75
|
+
lines.push(` ${capability.title} — ${capability.absent}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
lines.push('', 'LIMITS', ` every tool answers within ${Math.round(catalogue.limits.toolDeadlineMs / 1000)}s — long work`
|
|
79
|
+
+ ' continues server-side and is read through its domain status tool',
|
|
80
|
+
// Named only where the tool is offered: a limit for a call that is not in the list is an
|
|
81
|
+
// invitation to make it.
|
|
82
|
+
...(has('next_task')
|
|
83
|
+
? [` next_task waits up to ${Math.round(catalogue.limits.nextTaskWaitMs / 1000)}s`]
|
|
84
|
+
: []), ...(has('next_question')
|
|
85
|
+
? [` next_question waits up to ${Math.round(catalogue.limits.nextQuestionWaitMs / 1000)}s`]
|
|
86
|
+
: []), '', 'Publishing to production, custom domains and billing are done by the user in the web'
|
|
87
|
+
+ ' application, and are deliberately not offered through a connector.');
|
|
88
|
+
return lines.join('\n');
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/tools/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGhD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAA4B,EAAE,IAAc,EAAU,EAAE;IACrF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;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,0 +1,22 @@
|
|
|
1
|
+
import type { ConnectProductionAuth, ConnectProductionDomain, ConnectProductionStatus } from '@owlmeans/viable-common';
|
|
2
|
+
/** How the production tools put the platform's answers into words. */
|
|
3
|
+
export interface ProductionToolHelper {
|
|
4
|
+
/**
|
|
5
|
+
* The production workload — its status and address, or that it was never published — then its
|
|
6
|
+
* custom domain in one line, and what to do next.
|
|
7
|
+
*/
|
|
8
|
+
renderStatus: (status: ConnectProductionStatus) => string;
|
|
9
|
+
/**
|
|
10
|
+
* A custom domain: its status, and — until it is active — the two DNS records the owner creates at
|
|
11
|
+
* their DNS provider, each with the provider's own state of it, and what to do next.
|
|
12
|
+
*/
|
|
13
|
+
renderDomain: (domain: ConnectProductionDomain | null) => string;
|
|
14
|
+
/**
|
|
15
|
+
* The standalone sign-in configuration a self-hosted copy uses. The client secret is never part of
|
|
16
|
+
* it: only whether one is set, and where the owner reads it.
|
|
17
|
+
*/
|
|
18
|
+
renderAuth: (auth: ConnectProductionAuth) => string;
|
|
19
|
+
/** The stored redirect addresses after a replace, and when they apply. */
|
|
20
|
+
renderRedirects: (redirectUris: string[]) => string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/production/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAEtH,sEAAsE;AACtE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,MAAM,CAAA;IACzD;;;OAGG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,KAAK,MAAM,CAAA;IAChE;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,MAAM,CAAA;IACnD,0EAA0E;IAC1E,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/production/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.d.ts","sourceRoot":"","sources":["../../src/tools/production.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,eAAO,MAAM,0BAA0B,QAAO,oBAmF7C,CAAA;AAED,eAAO,MAAM,oBAAoB,sBAA+B,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DOMAIN_STATUS_WORDS, PRODUCTION_STATUS_WORDS } from './consts.local.js';
|
|
2
|
+
import { refusalHelper } from './refusal.js';
|
|
3
|
+
export const createProductionToolHelper = () => {
|
|
4
|
+
const addressOf = (domain) => domain?.customDomain != null && domain.status === 'linked'
|
|
5
|
+
? domain.customDomain
|
|
6
|
+
: domain?.generatedHost != null && domain.generatedHost !== '' ? domain.generatedHost : null;
|
|
7
|
+
/** The provider's own word for one record, when it said one. */
|
|
8
|
+
const said = (state) => state != null && state !== '' ? ` — provider: ${state}` : '';
|
|
9
|
+
const renderDomain = domain => {
|
|
10
|
+
if (domain?.customDomain == null || domain.customDomain === '') {
|
|
11
|
+
return 'custom domain: none — custom_domain { action: attach, domain } attaches one'
|
|
12
|
+
+ (domain?.generatedHost != null && domain.generatedHost !== '' ? `; the site answers on ${domain.generatedHost}` : '')
|
|
13
|
+
+ '.';
|
|
14
|
+
}
|
|
15
|
+
const lines = [`custom domain ${domain.customDomain}: ${DOMAIN_STATUS_WORDS[domain.status] ?? domain.status}`];
|
|
16
|
+
if (domain.status === 'linked') {
|
|
17
|
+
lines.push(`The site answers on https://${domain.customDomain}; ${domain.generatedHost} keeps serving too.`);
|
|
18
|
+
return lines.join('\n');
|
|
19
|
+
}
|
|
20
|
+
const records = [
|
|
21
|
+
...(domain.cnameTarget != null && domain.cnameTarget !== ''
|
|
22
|
+
? [` CNAME ${domain.customDomain} → ${domain.cnameTarget} (the traffic${said(domain.hostnameStatus)})`] : []),
|
|
23
|
+
...(domain.dcvName != null && domain.dcvName !== '' && domain.dcvValue != null && domain.dcvValue !== ''
|
|
24
|
+
? [` CNAME ${domain.dcvName} → ${domain.dcvValue} (the certificate${said(domain.sslStatus)})`] : []),
|
|
25
|
+
];
|
|
26
|
+
if (records.length > 0) {
|
|
27
|
+
lines.push('The user creates these DNS records at the domain\'s DNS provider:', ...records);
|
|
28
|
+
}
|
|
29
|
+
if (domain.message != null && domain.message !== '') {
|
|
30
|
+
lines.push(`the provider said: ${refusalHelper.refusalPhrase(domain.message)}`);
|
|
31
|
+
}
|
|
32
|
+
lines.push('next: once the records are in place, custom_domain { action: verify } asks the provider again;'
|
|
33
|
+
+ ' DNS can take minutes to hours to reach it.');
|
|
34
|
+
return lines.join('\n');
|
|
35
|
+
};
|
|
36
|
+
const renderStatus = ({ workload, domain }) => {
|
|
37
|
+
if (workload == null) {
|
|
38
|
+
return 'Not published yet — publish_production builds the current sources and deploys them as the'
|
|
39
|
+
+ ' production site (with the user\'s agreement, confirm: true).';
|
|
40
|
+
}
|
|
41
|
+
const address = addressOf(domain);
|
|
42
|
+
const lines = [
|
|
43
|
+
`production: ${PRODUCTION_STATUS_WORDS[workload.status] ?? workload.status}`
|
|
44
|
+
+ (address != null && workload.status === 'live' ? ` · https://${address}` : ''),
|
|
45
|
+
];
|
|
46
|
+
for (const warning of [workload.lastError, workload.buildWarning, workload.backendWarning]) {
|
|
47
|
+
if (warning != null && warning !== '')
|
|
48
|
+
lines.push(`warning: ${refusalHelper.refusalPhrase(warning)}`);
|
|
49
|
+
}
|
|
50
|
+
lines.push(renderDomain(domain));
|
|
51
|
+
if (workload.status === 'building' || workload.status === 'deploying') {
|
|
52
|
+
lines.push('next: production_status again in a minute — a build takes several.');
|
|
53
|
+
}
|
|
54
|
+
else if (workload.status === 'not-deployed' || workload.status === 'error') {
|
|
55
|
+
lines.push('next: production_control { action: restart } brings the last published build back;'
|
|
56
|
+
+ ' publish_production publishes the current sources.');
|
|
57
|
+
}
|
|
58
|
+
return lines.join('\n');
|
|
59
|
+
};
|
|
60
|
+
const renderAuth = auth => [
|
|
61
|
+
'The production sign-in (OIDC) a self-hosted copy of this project is configured with:',
|
|
62
|
+
`issuer: ${auth.issuerUrl !== '' ? auth.issuerUrl : 'not provisioned yet — the first publish provisions it'}`,
|
|
63
|
+
`client id: ${auth.clientId !== '' ? auth.clientId : 'not provisioned yet — the first publish provisions it'}`,
|
|
64
|
+
`client secret: ${auth.secretSet
|
|
65
|
+
? 'set — never shown here; the user reads it in the OwlMeans web application (Publish → Auth)'
|
|
66
|
+
: 'not set yet — the first publish provisions it'}`,
|
|
67
|
+
...(auth.customDomain != null || auth.generatedHost !== '' ? [`site: https://${auth.customDomain ?? auth.generatedHost}`] : []),
|
|
68
|
+
auth.redirectUris.length > 0
|
|
69
|
+
? `the owner's own redirect addresses:\n${auth.redirectUris.map(uri => ` ${uri}`).join('\n')}`
|
|
70
|
+
: 'the owner\'s own redirect addresses: none — the site\'s own address is always allowed',
|
|
71
|
+
'next: set_production_redirects { redirects } replaces that list; it applies on the next publish_production.',
|
|
72
|
+
].join('\n');
|
|
73
|
+
const renderRedirects = redirectUris => (redirectUris.length > 0
|
|
74
|
+
? `Stored ${redirectUris.length} redirect address(es):\n${redirectUris.map(uri => ` ${uri}`).join('\n')}`
|
|
75
|
+
: 'The owner\'s redirect addresses were cleared.')
|
|
76
|
+
+ '\nThey reach the sign-in on the next publish_production.';
|
|
77
|
+
return { renderStatus, renderDomain, renderAuth, renderRedirects };
|
|
78
|
+
};
|
|
79
|
+
export const productionToolHelper = createProductionToolHelper();
|
|
80
|
+
//# sourceMappingURL=production.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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AY,EAAE,UAAU,EAAE,eAAe,EAAE,CAAA;AACpE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,EAAE,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ConnectConfirmation } from '@owlmeans/viable-common';
|
|
2
|
+
import type { RefusalPhrase } from '../types.js';
|
|
3
|
+
/** What a parent agent is told when the platform refuses it — one actionable sentence per refusal. */
|
|
4
|
+
export interface RefusalHelper {
|
|
5
|
+
/**
|
|
6
|
+
* What the model tells a PERSON when a paid action waits for the EU spend consent. Only a person
|
|
7
|
+
* can give that express request, in the browser, so the sentence names the page and says outright
|
|
8
|
+
* that retrying first is pointless: a model that retries on its own gets the same refusal.
|
|
9
|
+
*/
|
|
10
|
+
consentRequiredPhrase: (url: string, deadline?: Date) => string;
|
|
11
|
+
/**
|
|
12
|
+
* What the model tells a PERSON when a conversion verb waits for their agreement — what the plan's
|
|
13
|
+
* conversion limit covers and has left, what the stage is estimated at and where that comes from
|
|
14
|
+
* (credit limits as credits, topped-up credits as money) — and the exact call that gives it.
|
|
15
|
+
* Unlike the consent, this is agreed to in the conversation; the sentence still forbids the model
|
|
16
|
+
* from sending `confirm: true` on its own, because the call it unlocks spends the user's money.
|
|
17
|
+
*
|
|
18
|
+
* `retry` is the call to repeat (the caller knows the project and the arguments); without it, the
|
|
19
|
+
* same tool with the same arguments and `confirm: true`.
|
|
20
|
+
*/
|
|
21
|
+
confirmationRequiredPhrase: (fields: ConnectConfirmation, retry?: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* A bare 428 answered to a conversion verb sent WITHOUT `confirm` — what a production body leaves
|
|
24
|
+
* of a refusal (an incident id and the status). It is the confirmation unless the organization's
|
|
25
|
+
* spend consent is also missing, and the two cannot be told apart here, so both are said, in the
|
|
26
|
+
* order they are met: the confirmation, then — only if the confirmed call is refused again — the
|
|
27
|
+
* consent in the browser.
|
|
28
|
+
*/
|
|
29
|
+
unconfirmedConversionPhrase: (retry: string) => string;
|
|
30
|
+
/**
|
|
31
|
+
* What the model tells a PERSON when the organization's plan lacks the capability an action
|
|
32
|
+
* needs (`capability-required:<param|param>`): which feature, and that the plan is changed in the
|
|
33
|
+
* browser. Nothing a parent does unlocks it.
|
|
34
|
+
*/
|
|
35
|
+
capabilityRequiredPhrase: (params: string) => string;
|
|
36
|
+
/**
|
|
37
|
+
* What the model tells a PERSON when one of the plan's limits has no room left
|
|
38
|
+
* (`limit-exhausted:<key>:<used>/<limit>[:<resets at>]`): which limit, how full, when it renews.
|
|
39
|
+
*/
|
|
40
|
+
limitExhaustedPhrase: (packed: string) => string;
|
|
41
|
+
/**
|
|
42
|
+
* The refusals only a PERSON can resolve — the balance, the EU spend consent, a conversion's
|
|
43
|
+
* confirmation, a capability the plan lacks and a limit with no room — in the words the model
|
|
44
|
+
* relays to them, or `null` for anything else. The first three are matched by class (their fields
|
|
45
|
+
* travel packed in the message and are rebuilt by `finalizeUnmarshal()`); the plan's two by their
|
|
46
|
+
* marker, because their classes are declared in a package this one does not depend on. `retry` is
|
|
47
|
+
* the confirmation's call to repeat, where the caller knows it.
|
|
48
|
+
*/
|
|
49
|
+
personRefusalPhrase: (e: unknown, retry?: string) => string | null;
|
|
50
|
+
/**
|
|
51
|
+
* What a refusal SAYS, with the marshalling and the stack taken off it.
|
|
52
|
+
*
|
|
53
|
+
* A marshalled error is `type|||message|||stack`, so the middle segment is the marker and the last
|
|
54
|
+
* one is a stack trace from a machine the reader has no access to. What is left is the marker
|
|
55
|
+
* alone — which is the fallback whenever nothing in {@link RefusalHelper.refusals} recognises it, because a
|
|
56
|
+
* marker names the refusal even when no sentence has been written for it yet.
|
|
57
|
+
*
|
|
58
|
+
* Text that was never marshalled is returned exactly as it is. A stack only ever arrives inside
|
|
59
|
+
* the marshalling, and the same field carries things that are not refusals at all — a run's
|
|
60
|
+
* `error` doubles as the build warning a slot recorded, and cutting that at the first line that
|
|
61
|
+
* looks like a stack frame would throw away the diagnostics somebody asked for.
|
|
62
|
+
*/
|
|
63
|
+
refusalMessage: (e: unknown) => string;
|
|
64
|
+
/**
|
|
65
|
+
* The one sentence a parent agent is given for anything that refused it.
|
|
66
|
+
*
|
|
67
|
+
* The reader is a language model holding a tool result, and it acts on what it reads: a marshalled
|
|
68
|
+
* type name followed by a stack trace tells it only that something went wrong somewhere, so it
|
|
69
|
+
* retries a call that can never succeed, or reports the server as broken. A refusal is an ANSWER —
|
|
70
|
+
* this origin is the project, that decision is not available here, the balance will not cover it —
|
|
71
|
+
* and every one of them has something the parent should do next.
|
|
72
|
+
*
|
|
73
|
+
* An unknown marker keeps that property rather than dropping it: the marker stays, because it is
|
|
74
|
+
* the honest answer as the platform grows refusals faster than phrasings, and {@link
|
|
75
|
+
* UNPHRASED_REFUSAL} names the tool to call — a parent left holding wire text alone has neither.
|
|
76
|
+
*/
|
|
77
|
+
refusalPhrase: (e: unknown) => string;
|
|
78
|
+
/**
|
|
79
|
+
* Every refusal a connector can be handed, and the one sentence it is handed instead.
|
|
80
|
+
*
|
|
81
|
+
* Ordered by SPECIFICITY, because the first marker the message contains wins: every reason of a
|
|
82
|
+
* family sits above the family's own marker, or the family would answer for all of them. A marker
|
|
83
|
+
* that is a substring of a later one is a marker that shadows it, which `catalogue.spec.ts` pins
|
|
84
|
+
* rather than leaves to review.
|
|
85
|
+
*
|
|
86
|
+
* The markers are literals here on purpose. They are wire text owned by packages this one does not
|
|
87
|
+
* depend on, and copying the constant would need a dependency edge from a tooling package onto the
|
|
88
|
+
* platform's own — so they are spelled once, in the order the platform spells them, and are
|
|
89
|
+
* exactly the substrings the manager's own phrasing matches on. Anything unmatched falls back to
|
|
90
|
+
* its marker, which is the one outcome that stays honest as the platform grows a refusal this
|
|
91
|
+
* table has never heard of.
|
|
92
|
+
*/
|
|
93
|
+
refusals: RefusalPhrase[];
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/refusal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,sGAAsG;AACtG,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,qBAAqB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,KAAK,MAAM,CAAA;IAC/D;;;;;;;;;OASG;IACH,0BAA0B,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACnF;;;;;;OAMG;IACH,2BAA2B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACtD;;;;OAIG;IACH,wBAAwB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IACpD;;;OAGG;IACH,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAChD;;;;;;;OAOG;IACH,mBAAmB,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClE;;;;;;;;;;;;OAYG;IACH,cAAc,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAA;IACtC;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAA;IACrC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,EAAE,aAAa,EAAE,CAAA;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/refusal/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../../src/tools/refusal.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,eAAO,MAAM,mBAAmB,QAAO,aAurBtC,CAAA;AAED,eAAO,MAAM,aAAa,eAAwB,CAAA"}
|