@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/project/probe.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAA;AAE1B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAGnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAgB,EAAE;IACjD,MAAM,eAAe,GAAG,CAAC,GAAuB,EAA0B,EAAE;QAC1E,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,KAAK,EAAE;YAAE,OAAO,IAAI,CAAA;QAE1C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;YAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,KAAK,EAAE;gBAC7B,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;gBACvB,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAA;YACnD,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE,IAAI,IAAI,IAAI,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,OAAO,IAAI,CAAA;YAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAA;QACxC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC,CAAA;IAED,MAAM,SAAS,GAAG,KAAK,EACrB,IAAY,EAAE,IAAY,EAAE,SAAS,GAAG,gBAAgB,EACtC,EAAE,CAAC,MAAM,IAAI,OAAO,CAAU,OAAO,CAAC,EAAE;QAC1D,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QAC1C,MAAM,IAAI,GAAG,CAAC,KAAc,EAAE,EAAE;YAC9B,MAAM,CAAC,kBAAkB,EAAE,CAAA;YAC3B,MAAM,CAAC,OAAO,EAAE,CAAA;YAChB,OAAO,CAAC,KAAK,CAAC,CAAA;QAChB,CAAC,CAAA;QACD,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QAC5B,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACxC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;QACzC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,KAAK,EAAE,GAAuB,EAAoB,EAAE;QACnE,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;QAErC,OAAO,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IACjF,CAAC,CAAA;IAED,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;AACjD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SetupReport } from '../types.js';
|
|
2
|
+
/** What a project needs before it can run here, read off ONE setup report. */
|
|
3
|
+
export interface SetupReportModel {
|
|
4
|
+
readonly report: SetupReport;
|
|
5
|
+
/** What is still missing before the application can start. */
|
|
6
|
+
missingServices: () => Array<'database' | 'queue'>;
|
|
7
|
+
/**
|
|
8
|
+
* The answer a parent agent reads when the project cannot run yet.
|
|
9
|
+
*
|
|
10
|
+
* It is written as a QUESTION with three answers, because which one is right is the user's to
|
|
11
|
+
* decide and nobody else's: they may already run Postgres, they may want one installed here, or
|
|
12
|
+
* they may prefer a hosted free tier and never install anything. Guessing means either a container
|
|
13
|
+
* on somebody's machine they did not ask for, or a connection string invented for a database that
|
|
14
|
+
* does not exist — and the second surfaces minutes later as a boot error nobody can place.
|
|
15
|
+
*/
|
|
16
|
+
renderSetupGuide: () => string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/project/report/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,8DAA8D;IAC9D,eAAe,EAAE,MAAM,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,CAAA;IAClD;;;;;;;;OAQG;IACH,gBAAgB,EAAE,MAAM,MAAM,CAAA;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/project/report/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SetupReport } from './types.js';
|
|
2
|
+
import type { SetupReportModel } from './report/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a project needs before it can run here, read off one setup report.
|
|
5
|
+
*/
|
|
6
|
+
export declare const makeSetupReportModel: (report: SetupReport) => SetupReportModel;
|
|
7
|
+
//# sourceMappingURL=report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/project/report.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,oBAAoB,WAAY,WAAW,KAAG,gBA8G1D,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import p from 'node:path';
|
|
2
|
+
import { ROOT_ENV_FILE } from './consts.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a project needs before it can run here, read off one setup report.
|
|
5
|
+
*/
|
|
6
|
+
export const makeSetupReportModel = (report) => {
|
|
7
|
+
const missingServices = () => [
|
|
8
|
+
...(report.database.reachable ? [] : ['database']),
|
|
9
|
+
...(report.needsWorker && !report.queue.reachable ? ['queue'] : []),
|
|
10
|
+
];
|
|
11
|
+
const dockerPostgres = (port) => `docker run -d --name viable-postgres -e POSTGRES_PASSWORD=viable -e POSTGRES_USER=viable`
|
|
12
|
+
+ ` -e POSTGRES_DB=viable -p ${port}:5432 postgres:18.6-alpine`;
|
|
13
|
+
const dockerValkey = (port) => `docker run -d --name viable-valkey -p ${port}:6379 valkey/valkey:9.1.2-alpine`;
|
|
14
|
+
const nativeInstall = (platform) => platform === 'darwin'
|
|
15
|
+
? [' brew install postgresql@18 && brew services start postgresql@18',
|
|
16
|
+
' brew install valkey && brew services start valkey']
|
|
17
|
+
: platform === 'win32'
|
|
18
|
+
? [' winget install PostgreSQL.PostgreSQL',
|
|
19
|
+
' (a queue store is easiest through Docker Desktop on Windows)']
|
|
20
|
+
: [' sudo apt install postgresql redis-server # Debian/Ubuntu',
|
|
21
|
+
' sudo systemctl enable --now postgresql redis-server'];
|
|
22
|
+
const renderSetupGuide = () => {
|
|
23
|
+
const missing = missingServices();
|
|
24
|
+
const lines = [`Project: ${report.dir}`, ''];
|
|
25
|
+
lines.push('What this machine provides:');
|
|
26
|
+
lines.push(` bun ${report.tools.bun ? 'yes' : 'NO — install it from https://bun.sh'}`);
|
|
27
|
+
lines.push(` git ${report.tools.git ? 'yes' : 'NO — the project keeps its own history'}`);
|
|
28
|
+
lines.push(` database ${report.database.reachable
|
|
29
|
+
? `yes — ${report.database.redacted ?? 'configured'}`
|
|
30
|
+
: report.database.configured
|
|
31
|
+
? `configured but NOT answering — ${report.database.redacted ?? ''}`
|
|
32
|
+
: 'not configured'}`);
|
|
33
|
+
lines.push(` queue ${report.needsWorker
|
|
34
|
+
? report.queue.reachable
|
|
35
|
+
? `yes — ${report.queue.redacted ?? 'configured'}`
|
|
36
|
+
: report.queue.configured ? 'configured but NOT answering' : 'not configured'
|
|
37
|
+
: 'not needed — this project has no background worker'}`);
|
|
38
|
+
lines.push('');
|
|
39
|
+
if (missing.length < 1) {
|
|
40
|
+
lines.push('Everything the application needs is in place. Call run_local to build and start it.');
|
|
41
|
+
return lines.join('\n');
|
|
42
|
+
}
|
|
43
|
+
const what = missing.map(one => one === 'database' ? 'a Postgres database' : 'a queue store (Valkey or Redis)');
|
|
44
|
+
lines.push(`ASK THE USER — this project still needs ${what.join(' and ')}, and only they can say how to`, 'provide it. Put these three choices to them in your own words and wait for an answer:', '', ' 1. "I already have one" — running here, on another machine, or a service you already pay', ' for. Ask for the connection string and nothing else.', ' 2. "Install one here" — the commands are below; run them only if they choose this.', ' 3. "Use a free hosted plan" — Supabase or Neon for Postgres, Upstash for Redis. They sign', ' up, create a project, and copy the connection string.', '', 'Then call set_local_service with what they gave you. Do not invent a connection string, and do', 'not install anything before they have chosen.', '');
|
|
45
|
+
if (missing.includes('database')) {
|
|
46
|
+
lines.push('--- 2. Install Postgres here ---');
|
|
47
|
+
lines.push(report.tools.docker
|
|
48
|
+
? ` ${dockerPostgres(5432)}`
|
|
49
|
+
: ' Docker is not installed. Either install Docker, or use the native package:');
|
|
50
|
+
if (!report.tools.docker)
|
|
51
|
+
lines.push(nativeInstall(report.platform)[0]);
|
|
52
|
+
lines.push(' Then the connection string is:', ' postgres://viable:viable@localhost:5432/viable', '', '--- 3. Free hosted Postgres ---', ' Supabase: https://supabase.com → New project → Settings → Database → Connection string', ' (choose the "URI" form; it already carries the password)', ' Neon: https://neon.tech → New project → Connection string', ' Either gives a `postgres://…` URL that goes straight into set_local_service.', '');
|
|
53
|
+
}
|
|
54
|
+
if (missing.includes('queue')) {
|
|
55
|
+
lines.push('--- A queue store, for this project\'s worker ---');
|
|
56
|
+
lines.push(report.tools.docker
|
|
57
|
+
? ` ${dockerValkey(6379)}`
|
|
58
|
+
: nativeInstall(report.platform)[1]);
|
|
59
|
+
lines.push(' Then: redis://localhost:6379', ' Free hosted: https://upstash.com → Redis → Create database → copy the `redis://…` URL.', '');
|
|
60
|
+
}
|
|
61
|
+
lines.push('--- Where the value goes ---', ` Into ${p.join(report.dir, ROOT_ENV_FILE)}, OUTSIDE the block marked "viable:managed".`, ' set_local_service writes it there for you. The platform never overwrites a key you set,', ' and the credential never reaches the project marker, your agent\'s configuration, or the', ' platform.', report.envIgnored
|
|
62
|
+
? ' That file is git-ignored, so the credential stays out of the project\'s history.'
|
|
63
|
+
: ' WARNING: .env is NOT git-ignored in this project. Say so before writing a credential.');
|
|
64
|
+
return lines.join('\n');
|
|
65
|
+
};
|
|
66
|
+
return { report, missingServices, renderSetupGuide };
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/project/report.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAI3C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAmB,EAAoB,EAAE;IAC5E,MAAM,eAAe,GAAG,GAAgC,EAAE,CAAC;QACzD,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,S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AED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC,CAAA;IAED,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA;AACtD,CAAC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SetupReport } from '../types.js';
|
|
2
|
+
export interface SetUserEnvResult {
|
|
3
|
+
/** The keys that were written — a blank value is skipped, never written empty. */
|
|
4
|
+
written: string[];
|
|
5
|
+
/** The file they were written to. */
|
|
6
|
+
file: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* What a project needs before it can run here, and what this machine already provides.
|
|
10
|
+
*
|
|
11
|
+
* The platform provisions nothing on somebody's own computer: a database and, for a project with a
|
|
12
|
+
* background worker, a queue store are the two things it cannot supply and cannot guess. So the
|
|
13
|
+
* connector finds out what is already there, and where nothing is, ASKS — it never installs
|
|
14
|
+
* something on a person's machine on its own initiative and never invents a connection string.
|
|
15
|
+
*/
|
|
16
|
+
export interface SetupHelper {
|
|
17
|
+
/** Everything a connection string says except who is connecting. */
|
|
18
|
+
redactUrl: (url: string) => string;
|
|
19
|
+
/** Whether a command can be run here. `--version` rather than `which`, which Windows lacks. */
|
|
20
|
+
probeCommand: (command: string) => Promise<boolean>;
|
|
21
|
+
/** What the project in `dir` needs and what this machine provides: services, tools, platform. */
|
|
22
|
+
readSetupReport: (dir: string) => Promise<SetupReport>;
|
|
23
|
+
/**
|
|
24
|
+
* Write the user's own service lines into their half of the `.env`.
|
|
25
|
+
*
|
|
26
|
+
* Replaces the key where it already exists outside the managed block and appends it otherwise, so
|
|
27
|
+
* running this twice leaves one line rather than two — a `.env` takes the LAST assignment, and two
|
|
28
|
+
* copies of a credential is one of them being quietly ignored.
|
|
29
|
+
*/
|
|
30
|
+
setUserEnv: (dir: string, values: Record<string, string>) => Promise<SetUserEnvResult>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/project/setup/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,+FAA+F;IAC/F,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,iGAAiG;IACjG,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAA;IACtD;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/project/setup/types.ts"],"names":[],"mappings":""}
|
package/build/project/setup.d.ts
CHANGED
|
@@ -1,62 +1,13 @@
|
|
|
1
|
+
import type { SetupHelper } from './setup/types.js';
|
|
1
2
|
/**
|
|
2
3
|
* What a project needs before it can run here, and what this machine already provides.
|
|
3
4
|
*
|
|
4
5
|
* The platform provisions nothing on somebody's own computer: a database and, for a project with a
|
|
5
6
|
* background worker, a queue store are the two things it cannot supply and cannot guess. So the
|
|
6
|
-
* connector's
|
|
7
|
+
* connector's responsibility is to find out what is already there, and where nothing is, to ASK — never to
|
|
7
8
|
* install something on a person's machine on its own initiative, and never to invent a connection
|
|
8
9
|
* string and let the failure surface later as a boot error nobody can place.
|
|
9
10
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
configured: boolean;
|
|
13
|
-
/** Something answers where it points. False for an unset URL and for one nothing listens on. */
|
|
14
|
-
reachable: boolean;
|
|
15
|
-
/** The value, with everything between the scheme and the host removed. */
|
|
16
|
-
redacted?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface SetupReport {
|
|
19
|
-
dir: string;
|
|
20
|
-
/** Only a project with a worker needs a queue store; for the rest it is noise. */
|
|
21
|
-
needsWorker: boolean;
|
|
22
|
-
database: ServiceState;
|
|
23
|
-
queue: ServiceState;
|
|
24
|
-
/** The command-line tools the paths below depend on. */
|
|
25
|
-
tools: {
|
|
26
|
-
bun: boolean;
|
|
27
|
-
git: boolean;
|
|
28
|
-
docker: boolean;
|
|
29
|
-
};
|
|
30
|
-
platform: NodeJS.Platform;
|
|
31
|
-
/** Whether the file holding these values is kept out of the project's history. */
|
|
32
|
-
envIgnored: boolean;
|
|
33
|
-
}
|
|
34
|
-
/** Everything a connection string says except who is connecting. */
|
|
35
|
-
export declare const redactUrl: (url: string) => string;
|
|
36
|
-
/** Whether a command can be run here. `--version` rather than `which`, which Windows lacks. */
|
|
37
|
-
export declare const probeCommand: (command: string) => Promise<boolean>;
|
|
38
|
-
export declare const readSetupReport: (dir: string) => Promise<SetupReport>;
|
|
39
|
-
/** What is still missing before the application can start. */
|
|
40
|
-
export declare const missingServices: (report: SetupReport) => Array<'database' | 'queue'>;
|
|
41
|
-
/**
|
|
42
|
-
* The answer a parent agent reads when the project cannot run yet.
|
|
43
|
-
*
|
|
44
|
-
* It is written as a QUESTION with three answers, because which one is right is the user's to
|
|
45
|
-
* decide and nobody else's: they may already run Postgres, they may want one installed here, or
|
|
46
|
-
* they may prefer a hosted free tier and never install anything. Guessing means either a container
|
|
47
|
-
* on somebody's machine they did not ask for, or a connection string invented for a database that
|
|
48
|
-
* does not exist — and the second surfaces minutes later as a boot error nobody can place.
|
|
49
|
-
*/
|
|
50
|
-
export declare const renderSetupGuide: (report: SetupReport) => string;
|
|
51
|
-
/**
|
|
52
|
-
* Write the user's own service lines into their half of the `.env`.
|
|
53
|
-
*
|
|
54
|
-
* Replaces the key where it already exists outside the managed block and appends it otherwise, so
|
|
55
|
-
* running this twice leaves one line rather than two — a `.env` takes the LAST assignment, and two
|
|
56
|
-
* copies of a credential is one of them being quietly ignored.
|
|
57
|
-
*/
|
|
58
|
-
export declare const setUserEnv: (dir: string, values: Record<string, string>) => Promise<{
|
|
59
|
-
written: string[];
|
|
60
|
-
file: string;
|
|
61
|
-
}>;
|
|
11
|
+
export declare const createSetupHelper: () => SetupHelper;
|
|
12
|
+
export declare const setupHelper: SetupHelper;
|
|
62
13
|
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/project/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/project/setup.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,kBAAkB,CAAA;AAErE;;;;;;;;GAQG;AAEH,eAAO,MAAM,iBAAiB,QAAO,WAmHpC,CAAA;AAED,eAAO,MAAM,WAAW,aAAsB,CAAA"}
|
package/build/project/setup.js
CHANGED
|
@@ -1,190 +1,127 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import p from 'node:path';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
|
-
import {
|
|
4
|
+
import { makeLayoutHelper } from '../executor/layout.js';
|
|
5
5
|
import { CONNECT_ENV_BEGIN, CONNECT_ENV_END } from '@owlmeans/viable-common';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
try {
|
|
10
|
-
const parsed = new URL(url);
|
|
11
|
-
if (parsed.username !== '' || parsed.password !== '') {
|
|
12
|
-
parsed.username = '***';
|
|
13
|
-
parsed.password = '';
|
|
14
|
-
}
|
|
15
|
-
return parsed.toString();
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
return url.replace(/\/\/[^@/]*@/, '//***@');
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
/** Whether a command can be run here. `--version` rather than `which`, which Windows lacks. */
|
|
22
|
-
export const probeCommand = async (command) => await new Promise(resolve => {
|
|
23
|
-
const child = spawn(command, ['--version'], { stdio: 'ignore', shell: process.platform === 'win32' });
|
|
24
|
-
const settle = (ok) => { resolve(ok); };
|
|
25
|
-
child.once('error', () => { settle(false); });
|
|
26
|
-
child.once('exit', code => { settle(code === 0); });
|
|
27
|
-
setTimeout(() => { child.kill(); settle(false); }, 4_000).unref?.();
|
|
28
|
-
});
|
|
29
|
-
const stateOf = async (url) => {
|
|
30
|
-
const configured = url != null && url.trim() !== '' && !url.includes('postgres:postgres@localhost:5432');
|
|
31
|
-
return {
|
|
32
|
-
configured,
|
|
33
|
-
reachable: configured ? await probeUrl(url) : false,
|
|
34
|
-
...(configured ? { redacted: redactUrl(url) } : {}),
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
/** Whether the project's own `.env` is kept out of its history — it holds credentials. */
|
|
38
|
-
const envIsIgnored = async (dir) => {
|
|
39
|
-
const ignore = await fs.readFile(p.join(dir, '.gitignore'), 'utf-8').catch(() => '');
|
|
40
|
-
return /^\s*\.env\s*$/m.test(ignore) || /^\s*\*\.env\s*$/m.test(ignore) || /^\s*\.env\*/m.test(ignore);
|
|
41
|
-
};
|
|
42
|
-
export const readSetupReport = async (dir) => {
|
|
43
|
-
const { values } = await readEnv(dir);
|
|
44
|
-
const [database, queue, bun, git, docker, envIgnored] = await Promise.all([
|
|
45
|
-
stateOf(values.DATABASE_URL),
|
|
46
|
-
stateOf(values.VALKEY_URL),
|
|
47
|
-
probeCommand('bun'),
|
|
48
|
-
probeCommand('git'),
|
|
49
|
-
probeCommand('docker'),
|
|
50
|
-
envIsIgnored(dir),
|
|
51
|
-
]);
|
|
52
|
-
return {
|
|
53
|
-
dir,
|
|
54
|
-
needsWorker: hasWorker(dir),
|
|
55
|
-
database,
|
|
56
|
-
queue,
|
|
57
|
-
tools: { bun, git, docker },
|
|
58
|
-
platform: process.platform,
|
|
59
|
-
envIgnored,
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
/** What is still missing before the application can start. */
|
|
63
|
-
export const missingServices = (report) => [
|
|
64
|
-
...(report.database.reachable ? [] : ['database']),
|
|
65
|
-
...(report.needsWorker && !report.queue.reachable ? ['queue'] : []),
|
|
66
|
-
];
|
|
67
|
-
const dockerPostgres = (port) => `docker run -d --name viable-postgres -e POSTGRES_PASSWORD=viable -e POSTGRES_USER=viable`
|
|
68
|
-
+ ` -e POSTGRES_DB=viable -p ${port}:5432 postgres:16-alpine`;
|
|
69
|
-
const dockerValkey = (port) => `docker run -d --name viable-valkey -p ${port}:6379 valkey/valkey:8-alpine`;
|
|
70
|
-
const nativeInstall = (platform) => platform === 'darwin'
|
|
71
|
-
? [' brew install postgresql@16 && brew services start postgresql@16',
|
|
72
|
-
' brew install valkey && brew services start valkey']
|
|
73
|
-
: platform === 'win32'
|
|
74
|
-
? [' winget install PostgreSQL.PostgreSQL',
|
|
75
|
-
' (a queue store is easiest through Docker Desktop on Windows)']
|
|
76
|
-
: [' sudo apt install postgresql redis-server # Debian/Ubuntu',
|
|
77
|
-
' sudo systemctl enable --now postgresql redis-server'];
|
|
78
|
-
/**
|
|
79
|
-
* The answer a parent agent reads when the project cannot run yet.
|
|
80
|
-
*
|
|
81
|
-
* It is written as a QUESTION with three answers, because which one is right is the user's to
|
|
82
|
-
* decide and nobody else's: they may already run Postgres, they may want one installed here, or
|
|
83
|
-
* they may prefer a hosted free tier and never install anything. Guessing means either a container
|
|
84
|
-
* on somebody's machine they did not ask for, or a connection string invented for a database that
|
|
85
|
-
* does not exist — and the second surfaces minutes later as a boot error nobody can place.
|
|
86
|
-
*/
|
|
87
|
-
export const renderSetupGuide = (report) => {
|
|
88
|
-
const missing = missingServices(report);
|
|
89
|
-
const lines = [`Project: ${report.dir}`, ''];
|
|
90
|
-
lines.push('What this machine provides:');
|
|
91
|
-
lines.push(` bun ${report.tools.bun ? 'yes' : 'NO — install it from https://bun.sh'}`);
|
|
92
|
-
lines.push(` git ${report.tools.git ? 'yes' : 'NO — the project keeps its own history'}`);
|
|
93
|
-
lines.push(` database ${report.database.reachable
|
|
94
|
-
? `yes — ${report.database.redacted ?? 'configured'}`
|
|
95
|
-
: report.database.configured
|
|
96
|
-
? `configured but NOT answering — ${report.database.redacted ?? ''}`
|
|
97
|
-
: 'not configured'}`);
|
|
98
|
-
lines.push(` queue ${report.needsWorker
|
|
99
|
-
? report.queue.reachable
|
|
100
|
-
? `yes — ${report.queue.redacted ?? 'configured'}`
|
|
101
|
-
: report.queue.configured ? 'configured but NOT answering' : 'not configured'
|
|
102
|
-
: 'not needed — this project has no background worker'}`);
|
|
103
|
-
lines.push('');
|
|
104
|
-
if (missing.length < 1) {
|
|
105
|
-
lines.push('Everything the application needs is in place. Call run_local to build and start it.');
|
|
106
|
-
return lines.join('\n');
|
|
107
|
-
}
|
|
108
|
-
const what = missing.map(one => one === 'database' ? 'a Postgres database' : 'a queue store (Valkey or Redis)');
|
|
109
|
-
lines.push(`ASK THE USER — this project still needs ${what.join(' and ')}, and only they can say how to`, 'provide it. Put these three choices to them in your own words and wait for an answer:', '', ' 1. "I already have one" — running here, on another machine, or a service you already pay', ' for. Ask for the connection string and nothing else.', ' 2. "Install one here" — the commands are below; run them only if they choose this.', ' 3. "Use a free hosted plan" — Supabase or Neon for Postgres, Upstash for Redis. They sign', ' up, create a project, and copy the connection string.', '', 'Then call set_local_service with what they gave you. Do not invent a connection string, and do', 'not install anything before they have chosen.', '');
|
|
110
|
-
if (missing.includes('database')) {
|
|
111
|
-
lines.push('--- 2. Install Postgres here ---');
|
|
112
|
-
lines.push(report.tools.docker
|
|
113
|
-
? ` ${dockerPostgres(5432)}`
|
|
114
|
-
: ' Docker is not installed. Either install Docker, or use the native package:');
|
|
115
|
-
if (!report.tools.docker)
|
|
116
|
-
lines.push(nativeInstall(report.platform)[0]);
|
|
117
|
-
lines.push(' Then the connection string is:', ' postgres://viable:viable@localhost:5432/viable', '', '--- 3. Free hosted Postgres ---', ' Supabase: https://supabase.com → New project → Settings → Database → Connection string', ' (choose the "URI" form; it already carries the password)', ' Neon: https://neon.tech → New project → Connection string', ' Either gives a `postgres://…` URL that goes straight into set_local_service.', '');
|
|
118
|
-
}
|
|
119
|
-
if (missing.includes('queue')) {
|
|
120
|
-
lines.push('--- A queue store, for this project\'s worker ---');
|
|
121
|
-
lines.push(report.tools.docker
|
|
122
|
-
? ` ${dockerValkey(6379)}`
|
|
123
|
-
: nativeInstall(report.platform)[1]);
|
|
124
|
-
lines.push(' Then: redis://localhost:6379', ' Free hosted: https://upstash.com → Redis → Create database → copy the `redis://…` URL.', '');
|
|
125
|
-
}
|
|
126
|
-
lines.push('--- Where the value goes ---', ` Into ${p.join(report.dir, ROOT_ENV_FILE)}, OUTSIDE the block marked "viable:managed".`, ' set_local_service writes it there for you. The platform never overwrites a key you set,', ' and the credential never reaches the project marker, your agent\'s configuration, or the', ' platform.', report.envIgnored
|
|
127
|
-
? ' That file is git-ignored, so the credential stays out of the project\'s history.'
|
|
128
|
-
: ' WARNING: .env is NOT git-ignored in this project. Say so before writing a credential.');
|
|
129
|
-
return lines.join('\n');
|
|
130
|
-
};
|
|
6
|
+
import { makeProjectEnvHelper } from './env.js';
|
|
7
|
+
import { probeHelper } from './probe.js';
|
|
8
|
+
import { ROOT_ENV_FILE } from './consts.js';
|
|
131
9
|
/**
|
|
132
|
-
*
|
|
10
|
+
* What a project needs before it can run here, and what this machine already provides.
|
|
133
11
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
12
|
+
* The platform provisions nothing on somebody's own computer: a database and, for a project with a
|
|
13
|
+
* background worker, a queue store are the two things it cannot supply and cannot guess. So the
|
|
14
|
+
* connector's responsibility is to find out what is already there, and where nothing is, to ASK — never to
|
|
15
|
+
* install something on a person's machine on its own initiative, and never to invent a connection
|
|
16
|
+
* string and let the failure surface later as a boot error nobody can place.
|
|
137
17
|
*/
|
|
138
|
-
export const
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
continue;
|
|
146
|
-
written.push(key);
|
|
147
|
-
const line = `${key}=${value}`;
|
|
148
|
-
const pattern = new RegExp(`^\\s*(?:export\\s+)?${key}\\s*=`);
|
|
149
|
-
// Walked with the block's boundaries in hand, because only a line the USER owns may be
|
|
150
|
-
// rewritten: one inside the managed block belongs to the platform, which composes its half
|
|
151
|
-
// whole on every push.
|
|
152
|
-
let inside = false;
|
|
153
|
-
let replaced = false;
|
|
154
|
-
for (let i = 0; i < lines.length; ++i) {
|
|
155
|
-
if (lines[i].trim() === CONNECT_ENV_BEGIN) {
|
|
156
|
-
inside = true;
|
|
157
|
-
continue;
|
|
18
|
+
export const createSetupHelper = () => {
|
|
19
|
+
const redactUrl = (url) => {
|
|
20
|
+
try {
|
|
21
|
+
const parsed = new URL(url);
|
|
22
|
+
if (parsed.username !== '' || parsed.password !== '') {
|
|
23
|
+
parsed.username = '***';
|
|
24
|
+
parsed.password = '';
|
|
158
25
|
}
|
|
159
|
-
|
|
160
|
-
|
|
26
|
+
return parsed.toString();
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return url.replace(/\/\/[^@/]*@/, '//***@');
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const probeCommand = async (command) => await new Promise(resolve => {
|
|
33
|
+
const child = spawn(command, ['--version'], { stdio: 'ignore', shell: process.platform === 'win32' });
|
|
34
|
+
const settle = (ok) => { resolve(ok); };
|
|
35
|
+
child.once('error', () => { settle(false); });
|
|
36
|
+
child.once('exit', code => { settle(code === 0); });
|
|
37
|
+
setTimeout(() => { child.kill(); settle(false); }, 4_000).unref?.();
|
|
38
|
+
});
|
|
39
|
+
const stateOf = async (url) => {
|
|
40
|
+
const configured = url != null && url.trim() !== '' && !url.includes('postgres:postgres@localhost:5432');
|
|
41
|
+
return {
|
|
42
|
+
configured,
|
|
43
|
+
reachable: configured ? await probeHelper.probeUrl(url) : false,
|
|
44
|
+
...(configured ? { redacted: redactUrl(url) } : {}),
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/** Whether the project's own `.env` is kept out of its history — it holds credentials. */
|
|
48
|
+
const envIsIgnored = async (dir) => {
|
|
49
|
+
const ignore = await fs.readFile(p.join(dir, '.gitignore'), 'utf-8').catch(() => '');
|
|
50
|
+
return /^\s*\.env\s*$/m.test(ignore) || /^\s*\*\.env\s*$/m.test(ignore) || /^\s*\.env\*/m.test(ignore);
|
|
51
|
+
};
|
|
52
|
+
const readSetupReport = async (dir) => {
|
|
53
|
+
const { values } = await makeProjectEnvHelper(dir).readEnv();
|
|
54
|
+
const [database, queue, bun, git, docker, envIgnored] = await Promise.all([
|
|
55
|
+
stateOf(values.DATABASE_URL),
|
|
56
|
+
stateOf(values.VALKEY_URL),
|
|
57
|
+
probeCommand('bun'),
|
|
58
|
+
probeCommand('git'),
|
|
59
|
+
probeCommand('docker'),
|
|
60
|
+
envIsIgnored(dir),
|
|
61
|
+
]);
|
|
62
|
+
return {
|
|
63
|
+
dir,
|
|
64
|
+
needsWorker: makeLayoutHelper(dir).hasWorker(),
|
|
65
|
+
database,
|
|
66
|
+
queue,
|
|
67
|
+
tools: { bun, git, docker },
|
|
68
|
+
platform: process.platform,
|
|
69
|
+
envIgnored,
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const setUserEnv = async (dir, values) => {
|
|
73
|
+
const file = p.join(dir, ROOT_ENV_FILE);
|
|
74
|
+
const existing = await fs.readFile(file, 'utf-8').catch(() => '');
|
|
75
|
+
const lines = existing === '' ? [] : existing.split('\n');
|
|
76
|
+
const written = [];
|
|
77
|
+
for (const [key, value] of Object.entries(values)) {
|
|
78
|
+
if (value.trim() === '')
|
|
161
79
|
continue;
|
|
80
|
+
written.push(key);
|
|
81
|
+
const line = `${key}=${value}`;
|
|
82
|
+
const pattern = new RegExp(`^\\s*(?:export\\s+)?${key}\\s*=`);
|
|
83
|
+
// Walked with the block's boundaries in hand, because only a line the USER owns may be
|
|
84
|
+
// rewritten: one inside the managed block belongs to the platform, which composes its half
|
|
85
|
+
// whole on every push.
|
|
86
|
+
let inside = false;
|
|
87
|
+
let replaced = false;
|
|
88
|
+
for (let i = 0; i < lines.length; ++i) {
|
|
89
|
+
if (lines[i].trim() === CONNECT_ENV_BEGIN) {
|
|
90
|
+
inside = true;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (lines[i].trim() === CONNECT_ENV_END) {
|
|
94
|
+
inside = false;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (inside || !pattern.test(lines[i]))
|
|
98
|
+
continue;
|
|
99
|
+
lines[i] = line;
|
|
100
|
+
replaced = true;
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
// Appended AFTER the block when it is new. A `.env` takes the last assignment, so a value the
|
|
104
|
+
// user set outranks the platform's placeholder wherever the block happens to sit.
|
|
105
|
+
if (!replaced) {
|
|
106
|
+
if (lines.length > 0 && lines[lines.length - 1] === '')
|
|
107
|
+
lines.pop();
|
|
108
|
+
lines.push(line);
|
|
162
109
|
}
|
|
163
|
-
if (inside || !pattern.test(lines[i]))
|
|
164
|
-
continue;
|
|
165
|
-
lines[i] = line;
|
|
166
|
-
replaced = true;
|
|
167
|
-
break;
|
|
168
110
|
}
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
lines.
|
|
111
|
+
// Nothing to say, nothing to write: rewriting the file for an empty call would rewrite its
|
|
112
|
+
// trailing whitespace and show up as a change nobody made.
|
|
113
|
+
if (written.length < 1)
|
|
114
|
+
return { written, file };
|
|
115
|
+
while (lines.length > 0 && lines[lines.length - 1] === '')
|
|
116
|
+
lines.pop();
|
|
117
|
+
const next = lines.length > 0 ? `${lines.join('\n')}\n` : '';
|
|
118
|
+
if (next !== existing) {
|
|
119
|
+
await fs.ensureDir(p.dirname(file));
|
|
120
|
+
await fs.writeFile(file, next);
|
|
175
121
|
}
|
|
176
|
-
}
|
|
177
|
-
// Nothing to say, nothing to write: rewriting the file for an empty call would rewrite its
|
|
178
|
-
// trailing whitespace and show up as a change nobody made.
|
|
179
|
-
if (written.length < 1)
|
|
180
122
|
return { written, file };
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const next = lines.length > 0 ? `${lines.join('\n')}\n` : '';
|
|
184
|
-
if (next !== existing) {
|
|
185
|
-
await fs.ensureDir(p.dirname(file));
|
|
186
|
-
await fs.writeFile(file, next);
|
|
187
|
-
}
|
|
188
|
-
return { written, file };
|
|
123
|
+
};
|
|
124
|
+
return { redactUrl, probeCommand, readSetupReport, setUserEnv };
|
|
189
125
|
};
|
|
126
|
+
export const setupHelper = createSetupHelper();
|
|
190
127
|
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/project/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/project/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yBAA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