@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/session/tasks.js
CHANGED
|
@@ -1,89 +1,29 @@
|
|
|
1
|
+
import { OpQueue } from './queue.js';
|
|
2
|
+
/** When the platform stops waiting for a task; one without a readable time waits behind every other. */
|
|
3
|
+
const expiryOf = (task) => {
|
|
4
|
+
const at = Date.parse(task.expiresAt);
|
|
5
|
+
return Number.isNaN(at) ? Number.POSITIVE_INFINITY : at;
|
|
6
|
+
};
|
|
1
7
|
/**
|
|
2
8
|
* Model tasks waiting for the parent agent.
|
|
3
9
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The operation id is kept beside each task and never shown to the parent. It is what an answer is
|
|
9
|
-
* routed back on, and a parent that could name one could answer an operation it was never given.
|
|
10
|
+
* Everything about how they queue, redeliver and settle is {@link OpQueue}'s; what is left here is
|
|
11
|
+
* the name the rest of the SDK reads them under. A task is a model CALL — the parent runs it in a
|
|
12
|
+
* clean subagent and submits the answer back — which is a different thing from a question, and the
|
|
13
|
+
* two must never drain into one another's tools.
|
|
10
14
|
*/
|
|
11
|
-
export class TaskQueue {
|
|
12
|
-
queue = [];
|
|
13
|
-
ops = new Map();
|
|
15
|
+
export class TaskQueue extends OpQueue {
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* connector restart cost a round trip instead of a run. A model task takes a parent agent tens of
|
|
19
|
-
* seconds to answer, so without this the queue grew one copy per poll for the whole time it was
|
|
20
|
-
* being answered, and the parent then ran the same task over and over: real model calls, paid
|
|
21
|
-
* for, thrown away. Kept after settling too, so a redelivery that raced the platform's deletion
|
|
22
|
-
* is ignored rather than answered a second time.
|
|
17
|
+
* The task that expires first goes first. The platform gives up on a task at its `expiresAt` —
|
|
18
|
+
* a synchronous check inside a blocked call within seconds, a run's call within minutes — so the
|
|
19
|
+
* one with the least time left is the one a parent must not find behind the others.
|
|
23
20
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
outstanding = new Map();
|
|
27
|
-
waiting = [];
|
|
28
|
-
/** @returns whether the task was accepted — `false` for a redelivery of one already handed over. */
|
|
29
|
-
push(task, opId) {
|
|
30
|
-
// The op id is refreshed even for a known task: a redelivery carries the same id today, and
|
|
31
|
-
// answering the wrong operation is worse than answering none.
|
|
32
|
-
this.ops.set(task.id, opId);
|
|
33
|
-
if (this.seen.has(task.id))
|
|
34
|
-
return false;
|
|
35
|
-
this.seen.add(task.id);
|
|
36
|
-
const next = this.waiting.shift();
|
|
37
|
-
if (next != null) {
|
|
38
|
-
clearTimeout(next.timer);
|
|
39
|
-
next.resolve(task);
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
this.queue.push(task);
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
/** The next task, or null once `waitMs` elapses. Never rejects: nothing to do is not a failure. */
|
|
46
|
-
async take(waitMs) {
|
|
47
|
-
const ready = this.queue.shift();
|
|
48
|
-
if (ready != null) {
|
|
49
|
-
this.outstanding.set(ready.id, ready);
|
|
50
|
-
return ready;
|
|
51
|
-
}
|
|
52
|
-
if (waitMs <= 0)
|
|
53
|
-
return null;
|
|
54
|
-
return await new Promise(resolve => {
|
|
55
|
-
const entry = {
|
|
56
|
-
resolve: task => {
|
|
57
|
-
if (task != null)
|
|
58
|
-
this.outstanding.set(task.id, task);
|
|
59
|
-
resolve(task);
|
|
60
|
-
},
|
|
61
|
-
timer: setTimeout(() => {
|
|
62
|
-
const at = this.waiting.indexOf(entry);
|
|
63
|
-
if (at >= 0)
|
|
64
|
-
this.waiting.splice(at, 1);
|
|
65
|
-
resolve(null);
|
|
66
|
-
}, waitMs),
|
|
67
|
-
};
|
|
68
|
-
this.waiting.push(entry);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
opIdOf(taskId) {
|
|
72
|
-
return this.ops.get(taskId) ?? null;
|
|
21
|
+
constructor() {
|
|
22
|
+
super((a, b) => expiryOf(a) - expiryOf(b));
|
|
73
23
|
}
|
|
74
|
-
|
|
75
|
-
return this.outstanding.get(taskId) ?? null;
|
|
76
|
-
}
|
|
77
|
-
/** Handed out and still unanswered, oldest first. */
|
|
24
|
+
/** Handed to the parent and still unanswered, oldest first. */
|
|
78
25
|
outstandingTasks() {
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
settle(taskId) {
|
|
82
|
-
this.ops.delete(taskId);
|
|
83
|
-
this.outstanding.delete(taskId);
|
|
84
|
-
}
|
|
85
|
-
size() {
|
|
86
|
-
return this.queue.length;
|
|
26
|
+
return this.outstanding();
|
|
87
27
|
}
|
|
88
28
|
}
|
|
89
29
|
//# sourceMappingURL=tasks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/session/tasks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/session/tasks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,wGAAwG;AACxG,MAAM,QAAQ,GAAG,CAAC,IAAe,EAAU,EAAE;IAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAErC,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAA;AACzD,CAAC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,SAAU,SAAQ,OAAkB;IAC/C;;;;OAIG;IACH;QACE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,CAAC;IAED,+DAA+D;IAC/D,gBAAgB;QACd,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ConnectorApi, LocalExecutor, OpenSessionArgs } from '../types.js';
|
|
2
|
+
export interface SessionOptions {
|
|
3
|
+
api: ConnectorApi;
|
|
4
|
+
open: OpenSessionArgs;
|
|
5
|
+
/** Absent for a cloud target: the platform's own pod executes its commands. */
|
|
6
|
+
executor?: LocalExecutor;
|
|
7
|
+
/** Which deployment this is, recorded in the project's marker so a later connector finds it. */
|
|
8
|
+
apiUrl?: string;
|
|
9
|
+
log?: (line: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface Waiting<T> {
|
|
12
|
+
resolve: (item: T | null) => void;
|
|
13
|
+
timer: ReturnType<typeof setTimeout>;
|
|
14
|
+
}
|
|
15
|
+
/** A caller told when an item is queued, without taking it. */
|
|
16
|
+
export interface Watching {
|
|
17
|
+
resolve: (ready: boolean) => void;
|
|
18
|
+
timer: ReturnType<typeof setTimeout>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/session/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE/E,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,YAAY,CAAA;IACjB,IAAI,EAAE,eAAe,CAAA;IACrB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,gGAAgG;IAChG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAA;IACjC,KAAK,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;CACrC;AAED,+DAA+D;AAC/D,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACjC,KAAK,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/session/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two values a confirmed and a refused question answer with.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `CONFIRM_YES` / `CONFIRM_NO` in `@owlmeans/llm-common` — the package that reads the
|
|
5
|
+
* answer — value for value, and is deliberately a copy rather than an import: this package is
|
|
6
|
+
* installed by developers to drive their own machine and must not carry the model runtime, which
|
|
7
|
+
* is the same reason {@link ConnectInquiryKind} mirrors `InquiryKind`. The two must stay equal, or
|
|
8
|
+
* a person's "yes" reaches the asker as a value it has never heard of.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CONFIRM_YES = "yes";
|
|
11
|
+
export declare const CONFIRM_NO = "no";
|
|
12
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/task/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,QAAQ,CAAA;AAEhC,eAAO,MAAM,UAAU,OAAO,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two values a confirmed and a refused question answer with.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `CONFIRM_YES` / `CONFIRM_NO` in `@owlmeans/llm-common` — the package that reads the
|
|
5
|
+
* answer — value for value, and is deliberately a copy rather than an import: this package is
|
|
6
|
+
* installed by developers to drive their own machine and must not carry the model runtime, which
|
|
7
|
+
* is the same reason {@link ConnectInquiryKind} mirrors `InquiryKind`. The two must stay equal, or
|
|
8
|
+
* a person's "yes" reaches the asker as a value it has never heard of.
|
|
9
|
+
*/
|
|
10
|
+
export const CONFIRM_YES = 'yes';
|
|
11
|
+
export const CONFIRM_NO = 'no';
|
|
12
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/task/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAA;AAEhC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModelTaskRole, ConnectHarness, ModelTaskMode } from '@owlmeans/viable-common';
|
|
2
|
+
export declare const ROLE_TO_LC: Record<ModelTaskRole, string>;
|
|
3
|
+
/**
|
|
4
|
+
* How each parent agent is told to run a task in a CLEAN subagent.
|
|
5
|
+
*
|
|
6
|
+
* The instruction differs per harness only in the mechanism — which tool spawns a subagent, what
|
|
7
|
+
* the effort knob is called — never in what is being asked. A harness with no subagent mechanism
|
|
8
|
+
* Every one of them carries the inline fallback, which is the same request with the isolation
|
|
9
|
+
* stated rather than enforced. None may assert that the worker EXISTS: `install_harness` is what
|
|
10
|
+
* writes it, nothing in the flow requires that to have been run, and a block that names a file as
|
|
11
|
+
* a fact sends a literal agent to a subagent type it does not have — on the first task, before it
|
|
12
|
+
* has done anything.
|
|
13
|
+
*/
|
|
14
|
+
export declare const HOW_TO_RUN: Record<ConnectHarness, string>;
|
|
15
|
+
export declare const SHAPE: Record<ModelTaskMode, string>;
|
|
16
|
+
export declare const ROLE_LABEL: Record<ModelTaskRole, string>;
|
|
17
|
+
/** What a parent may send for a confirm question, beyond the two values themselves. */
|
|
18
|
+
export declare const CONFIRM_WORDS: Record<string, string>;
|
|
19
|
+
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/task/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAGtF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAOpD,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CA6BrD,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAU/C,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKpD,CAAA;AAED,uFAAuF;AACvF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQhD,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ModelTaskRole, ConnectHarness, ModelTaskMode } from '@owlmeans/viable-common';
|
|
2
|
+
import { CONFIRM_NO, CONFIRM_YES } from './consts.js';
|
|
3
|
+
export const ROLE_TO_LC = {
|
|
4
|
+
[ModelTaskRole.System]: 'system',
|
|
5
|
+
[ModelTaskRole.User]: 'user',
|
|
6
|
+
[ModelTaskRole.Assistant]: 'assistant',
|
|
7
|
+
// A chat model called without the tool definitions cannot receive a tool turn; the content is
|
|
8
|
+
// what mattered anyway, and presenting it as a user turn keeps the conversation readable.
|
|
9
|
+
[ModelTaskRole.Tool]: 'user',
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* How each parent agent is told to run a task in a CLEAN subagent.
|
|
13
|
+
*
|
|
14
|
+
* The instruction differs per harness only in the mechanism — which tool spawns a subagent, what
|
|
15
|
+
* the effort knob is called — never in what is being asked. A harness with no subagent mechanism
|
|
16
|
+
* Every one of them carries the inline fallback, which is the same request with the isolation
|
|
17
|
+
* stated rather than enforced. None may assert that the worker EXISTS: `install_harness` is what
|
|
18
|
+
* writes it, nothing in the flow requires that to have been run, and a block that names a file as
|
|
19
|
+
* a fact sends a literal agent to a subagent type it does not have — on the first task, before it
|
|
20
|
+
* has done anything.
|
|
21
|
+
*/
|
|
22
|
+
export const HOW_TO_RUN = {
|
|
23
|
+
[ConnectHarness.ClaudeCode]: 'Use the Agent tool with subagent_type "viable-worker", which install_harness writes to\n'
|
|
24
|
+
+ '.claude/agents/viable-worker.md with effort: low. If that subagent is not installed, either\n'
|
|
25
|
+
+ 'call install_harness now or answer INLINE: reason minimally and produce only the answer.\n'
|
|
26
|
+
+ 'Give the worker the SYSTEM PROMPT as its opening instruction, then the CONVERSATION in\n'
|
|
27
|
+
+ 'order, then the shape rule below. Take its final message verbatim.',
|
|
28
|
+
[ConnectHarness.Codex]: 'Spawn a subagent with the "viable-worker" role, which install_harness writes to config.toml\n'
|
|
29
|
+
+ 'as `[agents.viable-worker]` with a low model_reasoning_effort. If it is not installed or\n'
|
|
30
|
+
+ 'your session has no subagents, answer the task INLINE in a single reply: reason minimally,\n'
|
|
31
|
+
+ 'produce only the answer in the required shape, and nothing else. Give the worker the SYSTEM\n'
|
|
32
|
+
+ 'PROMPT first, then the CONVERSATION in order, then the shape rule below. Do not pass this\n'
|
|
33
|
+
+ 'outer HOW TO RUN or submit_task_result instruction to the worker: only the parent submits its\n'
|
|
34
|
+
+ 'final answer. A text task returns the requested text or source, never a JSON tool-call array;\n'
|
|
35
|
+
+ 'that array is only valid in tools mode. Take the worker\'s final message verbatim.',
|
|
36
|
+
[ConnectHarness.Copilot]: 'Delegate to the "viable-worker" custom agent, which install_harness writes to\n'
|
|
37
|
+
+ '.github/agents/viable-worker.agent.md. If it is not installed or delegation is\n'
|
|
38
|
+
+ 'unavailable, answer the task INLINE in a single reply: reason minimally and produce only\n'
|
|
39
|
+
+ 'the answer in the required shape.',
|
|
40
|
+
[ConnectHarness.OpenCode]: 'Invoke the `viable-worker` subagent (@viable-worker, or the Task tool), which install_harness\n'
|
|
41
|
+
+ 'writes to .opencode/agent/viable-worker.md. If it is not installed, answer INLINE instead:\n'
|
|
42
|
+
+ 'reason minimally and produce only the answer. Give the worker the SYSTEM PROMPT, then the\n'
|
|
43
|
+
+ 'CONVERSATION, then the shape rule below.',
|
|
44
|
+
[ConnectHarness.Other]: 'Run this in a fresh, isolated context — not in this conversation. Reason minimally. Produce\n'
|
|
45
|
+
+ 'only the answer in the required shape.',
|
|
46
|
+
};
|
|
47
|
+
export const SHAPE = {
|
|
48
|
+
[ModelTaskMode.Text]: 'The answer is plain text. Send it as the `result` string, verbatim.',
|
|
49
|
+
[ModelTaskMode.Json]: 'The answer must be ONE JSON object matching the OUTPUT SCHEMA below — no prose, no code fence,\n'
|
|
50
|
+
+ 'no explanation. Send it as `result`.',
|
|
51
|
+
[ModelTaskMode.Tools]: 'Answer with a JSON array of tool calls chosen from the TOOLS below, each\n'
|
|
52
|
+
+ '{"name": "...", "args": {...}} — nothing else around it. If no tool call is needed and the\n'
|
|
53
|
+
+ 'work is done, answer in plain text instead: that is how the caller learns the turn is over.\n'
|
|
54
|
+
+ 'Send whichever it is as `result`.',
|
|
55
|
+
};
|
|
56
|
+
export const ROLE_LABEL = {
|
|
57
|
+
[ModelTaskRole.System]: 'system',
|
|
58
|
+
[ModelTaskRole.User]: 'user',
|
|
59
|
+
[ModelTaskRole.Assistant]: 'assistant',
|
|
60
|
+
[ModelTaskRole.Tool]: 'tool',
|
|
61
|
+
};
|
|
62
|
+
/** What a parent may send for a confirm question, beyond the two values themselves. */
|
|
63
|
+
export const CONFIRM_WORDS = {
|
|
64
|
+
yes: CONFIRM_YES,
|
|
65
|
+
y: CONFIRM_YES,
|
|
66
|
+
true: CONFIRM_YES,
|
|
67
|
+
ok: CONFIRM_YES,
|
|
68
|
+
no: CONFIRM_NO,
|
|
69
|
+
n: CONFIRM_NO,
|
|
70
|
+
false: CONFIRM_NO,
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/task/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,CAAC,MAAM,UAAU,GAAkC;IACvD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,QAAQ;IAChC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM;IAC5B,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,WAAW;IACtC,8FAA8F;IAC9F,0FAA0F;IAC1F,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM;CAC7B,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAmC;IACxD,CAAC,cAAc,CAAC,UAAU,CAAC,EACzB,0FAA0F;UACxF,+FAA+F;UAC/F,4FAA4F;UAC5F,0FAA0F;UAC1F,oEAAoE;IACxE,CAAC,cAAc,CAAC,KAAK,CAAC,EACpB,+FAA+F;UAC7F,4FAA4F;UAC5F,8FAA8F;UAC9F,+FAA+F;UAC/F,6FAA6F;UAC7F,iGAAiG;UACjG,iGAAiG;UACjG,oFAAoF;IACxF,CAAC,cAAc,CAAC,OAAO,CAAC,EACtB,iFAAiF;UAC/E,kFAAkF;UAClF,4FAA4F;UAC5F,mCAAmC;IACvC,CAAC,cAAc,CAAC,QAAQ,CAAC,EACvB,iGAAiG;UAC/F,8FAA8F;UAC9F,6FAA6F;UAC7F,0CAA0C;IAC9C,CAAC,cAAc,CAAC,KAAK,CAAC,EACpB,+FAA+F;UAC7F,wCAAwC;CAC7C,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAkC;IAClD,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,qEAAqE;IAC3F,CAAC,aAAa,CAAC,IAAI,CAAC,EAClB,kGAAkG;UAChG,sCAAsC;IAC1C,CAAC,aAAa,CAAC,KAAK,CAAC,EACnB,4EAA4E;UAC1E,8FAA8F;UAC9F,+FAA+F;UAC/F,mCAAmC;CACxC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAkC;IACvD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,QAAQ;IAChC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM;IAC5B,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,WAAW;IACtC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM;CAC7B,CAAA;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,GAAG,EAAE,WAAW;IAChB,CAAC,EAAE,WAAW;IACd,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,UAAU;IACd,CAAC,EAAE,UAAU;IACb,KAAK,EAAE,UAAU;CAClB,CAAA"}
|
package/build/task/driver.d.ts
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
* Something that can answer a model task without a coding agent in front of it.
|
|
4
|
-
*
|
|
5
|
-
* Two consumers, and both are the reason it is an interface rather than a function on the session:
|
|
6
|
-
* the end-to-end tests, which have to play the parent agent deterministically, and the CLI this
|
|
7
|
-
* SDK exists to make possible, where the "parent agent" is the CLI's own model.
|
|
8
|
-
*/
|
|
9
|
-
export interface TaskDriver {
|
|
10
|
-
answer: (task: ModelTask) => Promise<ModelTaskResult>;
|
|
11
|
-
}
|
|
12
|
-
/** The minimum a chat model must offer to stand in for a parent agent. */
|
|
13
|
-
export interface DriverModel {
|
|
14
|
-
invoke: (messages: Array<{
|
|
15
|
-
role: string;
|
|
16
|
-
content: string;
|
|
17
|
-
}>) => Promise<string>;
|
|
18
|
-
}
|
|
19
|
-
export interface LangchainLikeModel {
|
|
20
|
-
invoke: (messages: unknown) => Promise<{
|
|
21
|
-
content: unknown;
|
|
22
|
-
}>;
|
|
23
|
-
bindTools?: (tools: unknown[], kwargs?: unknown) => LangchainLikeModel;
|
|
24
|
-
}
|
|
25
|
-
export interface ModelDriverOptions {
|
|
26
|
-
/** One model per tier. A tier with no model falls back to the first one given. */
|
|
27
|
-
models: Partial<Record<string, LangchainLikeModel>>;
|
|
28
|
-
}
|
|
1
|
+
import type { ModelDriverOptions, TaskDriver } from './types.js';
|
|
29
2
|
export declare const makeModelTaskDriver: (opts: ModelDriverOptions) => TaskDriver;
|
|
30
3
|
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAqDpF,eAAO,MAAM,mBAAmB,SAAU,kBAAkB,KAAG,UAwE9D,CAAA"}
|
package/build/task/driver.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { ModelTaskMode, ModelTaskResultKind
|
|
1
|
+
import { ModelTaskMode, ModelTaskResultKind } from '@owlmeans/viable-common';
|
|
2
|
+
import { ROLE_TO_LC } from './consts.local.js';
|
|
2
3
|
const textOf = (content) => typeof content === 'string'
|
|
3
4
|
? content
|
|
4
5
|
: Array.isArray(content)
|
|
5
6
|
? content.map(part => part.text ?? '').join('')
|
|
6
7
|
: String(content ?? '');
|
|
7
|
-
const ROLE_TO_LC = {
|
|
8
|
-
[ModelTaskRole.System]: 'system',
|
|
9
|
-
[ModelTaskRole.User]: 'user',
|
|
10
|
-
[ModelTaskRole.Assistant]: 'assistant',
|
|
11
|
-
// A chat model called without the tool definitions cannot receive a tool turn; the content is
|
|
12
|
-
// what mattered anyway, and presenting it as a user turn keeps the conversation readable.
|
|
13
|
-
[ModelTaskRole.Tool]: 'user',
|
|
14
|
-
};
|
|
15
8
|
/**
|
|
16
9
|
* A reference parent agent, backed by a chat model.
|
|
17
10
|
*
|
package/build/task/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,MAAM,MAAM,GAAG,CAAC,OAAgB,EAAU,EAAE,CAAC,OAAO,OAAO,KAAK,QAAQ;IACtE,CAAC,CAAC,OAAO;IACT,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAE,IAA0B,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACtE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;AAE3B;;;;;;;;GAQG;AACH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,GAAG,CAClB,MAAe,EACgD,EAAE;IACjE,MAAM,OAAO,GAAG,MAA8D,CAAA;IAC9E,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EA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AI,EAAE;oBAC3D,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;YAChF,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,0FAA0F;gBAC1F,uFAAuF;gBACvF,mDAAmD;gBACnD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAG,CAAW,CAAC,OAAO,EAAE,CAAA;YAC1F,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ModelTask } from '@owlmeans/viable-common';
|
|
2
|
+
import type { EnvelopeOptions, ParsedTaskResult } from '../types.js';
|
|
3
|
+
/** One model task handed to a parent agent, and the answer it sends back checked against it. */
|
|
4
|
+
export interface TaskEnvelopeModel {
|
|
5
|
+
readonly task: ModelTask;
|
|
6
|
+
/**
|
|
7
|
+
* What `next_task` hands the parent agent.
|
|
8
|
+
*
|
|
9
|
+
* Text rather than a structure, because the reader is a language model working from a tool result:
|
|
10
|
+
* it has to be able to act on this without a schema in front of it. Everything it must do is
|
|
11
|
+
* stated in order — how to run it, what to call afterwards, what shape the answer takes — before
|
|
12
|
+
* the material itself, so a model that stops reading early has still read the instruction.
|
|
13
|
+
*
|
|
14
|
+
* The task id appears at the top and in the follow-up call on purpose. It is the only thing that
|
|
15
|
+
* routes an answer back, and a parent that paraphrases the rest but copies the id still works.
|
|
16
|
+
*/
|
|
17
|
+
renderTaskEnvelope: (opts: EnvelopeOptions) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Check a parent's answer against what the task asked for, before the platform ever sees it.
|
|
20
|
+
*
|
|
21
|
+
* The refusal is worth more than the parse. A malformed answer that reaches the platform costs a
|
|
22
|
+
* whole retry — another task, another subagent, another wait — while one caught here is a sentence
|
|
23
|
+
* the parent can act on immediately, with the subagent's context still open. So a failure comes
|
|
24
|
+
* back as a `problem`, not as a thrown error, and the caller renders it as a tool error the model
|
|
25
|
+
* reads and corrects.
|
|
26
|
+
*/
|
|
27
|
+
parseTaskResult: (raw: unknown) => ParsedTaskResult;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/task/envelope/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEpE,gGAAgG;AAChG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB;;;;;;;;;;OAUG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,MAAM,CAAA;IACrD;;;;;;;;OAQG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,gBAAgB,CAAA;CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/task/envelope/types.ts"],"names":[],"mappings":""}
|
package/build/task/envelope.d.ts
CHANGED
|
@@ -1,35 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** What the parent said it would run each tier on. Display only. */
|
|
6
|
-
tiers?: Partial<Record<string, string>>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* What `next_task` hands the parent agent.
|
|
10
|
-
*
|
|
11
|
-
* Text rather than a structure, because the reader is a language model working from a tool result:
|
|
12
|
-
* it has to be able to act on this without a schema in front of it. Everything it must do is
|
|
13
|
-
* stated in order — how to run it, what to call afterwards, what shape the answer takes — before
|
|
14
|
-
* the material itself, so a model that stops reading early has still read the instruction.
|
|
15
|
-
*
|
|
16
|
-
* The task id appears at the top and in the follow-up call on purpose. It is the only thing that
|
|
17
|
-
* routes an answer back, and a parent that paraphrases the rest but copies the id still works.
|
|
18
|
-
*/
|
|
19
|
-
export declare const renderTaskEnvelope: (task: ModelTask, opts: EnvelopeOptions) => string;
|
|
20
|
-
export interface ParsedTaskResult {
|
|
21
|
-
result?: ModelTaskResult;
|
|
22
|
-
/** Present when the answer did not match what was asked. Quoted back to the parent verbatim. */
|
|
23
|
-
problem?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Check a parent's answer against what the task asked for, before the platform ever sees it.
|
|
27
|
-
*
|
|
28
|
-
* The refusal is worth more than the parse. A malformed answer that reaches the platform costs a
|
|
29
|
-
* whole retry — another task, another subagent, another wait — while one caught here is a sentence
|
|
30
|
-
* the parent can act on immediately, with the subagent's context still open. So a failure comes
|
|
31
|
-
* back as a `problem`, not as a thrown error, and the caller renders it as a tool error the model
|
|
32
|
-
* reads and corrects.
|
|
33
|
-
*/
|
|
34
|
-
export declare const parseTaskResult: (task: ModelTask, raw: unknown) => ParsedTaskResult;
|
|
1
|
+
import { type ModelTask } from '@owlmeans/viable-common';
|
|
2
|
+
import type { TaskEnvelopeModel } from './envelope/types.js';
|
|
3
|
+
/** One model task handed to a parent agent, and the answer it sends back checked against it. */
|
|
4
|
+
export declare const makeTaskEnvelopeModel: (task: ModelTask) => TaskEnvelopeModel;
|
|
35
5
|
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/task/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/task/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAI5G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AA0D5D,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,SAAU,SAAS,KAAG,iBA2HvD,CAAA"}
|