@owlmeans/viable-sdk 0.1.18-rc.9 → 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,30 @@
|
|
|
1
|
+
import type { EntrypointTransport } from '@owlmeans/entrypoint';
|
|
2
|
+
export interface CallCollectOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Whether this context runs in the DELEGATED mode (`llm=local`). Only then is a write named with
|
|
5
|
+
* `x-viable-call` and an early `{ pending }` answer collected; otherwise every call passes through
|
|
6
|
+
* to the API client untouched.
|
|
7
|
+
*/
|
|
8
|
+
delegated: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The SDK context's HTTP transport — ONE seam in front of the API client that every bound route
|
|
12
|
+
* goes through, the connector routes and the planning client alike.
|
|
13
|
+
*
|
|
14
|
+
* In the delegated mode a write may wait on a model call the connector's own parent performs, which
|
|
15
|
+
* outlasts what an edge holds a response open. So every non-GET request carries `x-viable-call:
|
|
16
|
+
* <uuid>` (kept when the request already names one, so a retry reuses it), and an answer `{ pending:
|
|
17
|
+
* <that id> }` is turned into `connect.call.collect` long polls until the call settles: its value
|
|
18
|
+
* resolves the original call exactly as a direct answer would have, its marshalled error is rethrown
|
|
19
|
+
* as its own class, and a lost call throws `ConnectCallLost`. Any other answer is returned as is.
|
|
20
|
+
*/
|
|
21
|
+
export interface CallCollectTransport extends EntrypointTransport {
|
|
22
|
+
/** Whether writes are named and collected — the delegated mode. */
|
|
23
|
+
readonly delegated: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** A collected call's answer, as the original entrypoint would have resolved. */
|
|
26
|
+
export interface CollectedCall {
|
|
27
|
+
value: unknown;
|
|
28
|
+
outcome: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/collect/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B;AAED,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/collect/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CallCollectOptions, CallCollectTransport } from './collect/types.js';
|
|
2
|
+
import type { Ctx } from './types.local.js';
|
|
3
|
+
/**
|
|
4
|
+
* The SDK context's HTTP transport: request now, collect later — see {@link CallCollectTransport}.
|
|
5
|
+
*
|
|
6
|
+
* Registered under `transportAlias('http')`, which every client entrypoint asks for before it
|
|
7
|
+
* reaches for the API client, so the connector routes and the planning client get it with no
|
|
8
|
+
* per-method code. It forwards to the context's API client (the service `cfg.webService` names),
|
|
9
|
+
* resolved per call.
|
|
10
|
+
*/
|
|
11
|
+
export declare const createCallCollectTransport: (opts: CallCollectOptions) => CallCollectTransport;
|
|
12
|
+
/** Register the call-collect transport on an SDK context — before its `init()`. */
|
|
13
|
+
export declare const appendCallCollectTransport: <T extends Ctx>(context: T, opts: CallCollectOptions) => T;
|
|
14
|
+
//# sourceMappingURL=collect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/api/collect.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAiB,MAAM,oBAAoB,CAAA;AACjG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAW3C;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,SAAU,kBAAkB,KAAG,oBAgHrE,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,GAAG,WAAW,CAAC,QAAQ,kBAAkB,KAAG,CAIhG,CAAA"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { DEFAULT_ALIAS } from '@owlmeans/api';
|
|
3
|
+
import { DEFAULT_KEY } from '@owlmeans/client-config';
|
|
4
|
+
import { assertContext, createService } from '@owlmeans/context';
|
|
5
|
+
import { EntrypointOutcome, provideResponse, transportAlias, } from '@owlmeans/entrypoint';
|
|
6
|
+
import { ResilientError } from '@owlmeans/error';
|
|
7
|
+
import { RouteMethod, RouteProtocols } from '@owlmeans/route';
|
|
8
|
+
import { CONNECT_CALL_COLLECT_WAIT_SEC, CONNECT_CALL_HEADER, ConnectCallLost, ConnectCallState, connectRef, } from '@owlmeans/viable-common';
|
|
9
|
+
import { SdkUnsupported } from '../errors.js';
|
|
10
|
+
import { AXIOS_TIMEOUT_CODE, COLLECT_DROPPED_HOPS, COLLECT_DROPPED_STATUSES, COLLECT_FAST_MS, COLLECT_HOP_TIMEOUT_MS, COLLECT_PAUSE_MS, } from './consts.local.js';
|
|
11
|
+
import { transportHelper } from './transport.js';
|
|
12
|
+
/** A pause that a caller's abort cuts short. */
|
|
13
|
+
const pause = async (ms, signal) => await new Promise(resolve => {
|
|
14
|
+
const timer = setTimeout(resolve, ms);
|
|
15
|
+
signal?.addEventListener('abort', () => {
|
|
16
|
+
clearTimeout(timer);
|
|
17
|
+
resolve();
|
|
18
|
+
}, { once: true });
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* The SDK context's HTTP transport: request now, collect later — see {@link CallCollectTransport}.
|
|
22
|
+
*
|
|
23
|
+
* Registered under `transportAlias('http')`, which every client entrypoint asks for before it
|
|
24
|
+
* reaches for the API client, so the connector routes and the planning client get it with no
|
|
25
|
+
* per-method code. It forwards to the context's API client (the service `cfg.webService` names),
|
|
26
|
+
* resolved per call.
|
|
27
|
+
*/
|
|
28
|
+
export const createCallCollectTransport = (opts) => {
|
|
29
|
+
const location = 'viable-sdk:call-collect-transport';
|
|
30
|
+
const contextOf = () => assertContext(transport.ctx, location);
|
|
31
|
+
/** The API client this transport stands in front of — what an entrypoint would have called. */
|
|
32
|
+
const apiOf = (context) => {
|
|
33
|
+
const named = context.cfg.webService;
|
|
34
|
+
const alias = typeof named === 'string' ? named : named?.[DEFAULT_KEY] ?? DEFAULT_ALIAS;
|
|
35
|
+
return context.service(alias);
|
|
36
|
+
};
|
|
37
|
+
/** A write is anything but a GET: only a write can wait on a model call. */
|
|
38
|
+
const writes = (context, alias) => (context.entrypoint(alias).route.route.method ?? RouteMethod.GET) !== RouteMethod.GET;
|
|
39
|
+
/**
|
|
40
|
+
* The call's id, written onto the request itself: a request that already names one keeps it, so
|
|
41
|
+
* a retry of the same request is the same call to the platform.
|
|
42
|
+
*/
|
|
43
|
+
const nameCall = (req) => {
|
|
44
|
+
const existing = Object.entries(req.headers ?? {})
|
|
45
|
+
.find(([key]) => key.toLowerCase() === CONNECT_CALL_HEADER)?.[1];
|
|
46
|
+
const named = Array.isArray(existing) ? existing[0] : existing;
|
|
47
|
+
const callId = typeof named === 'string' && named !== '' ? named : randomUUID();
|
|
48
|
+
req.headers = req.headers ?? {};
|
|
49
|
+
req.headers[CONNECT_CALL_HEADER] = callId;
|
|
50
|
+
return callId;
|
|
51
|
+
};
|
|
52
|
+
const pendingFor = (value, callId) => value != null && typeof value === 'object' && value.pending === callId;
|
|
53
|
+
/** A hop the line dropped rather than the platform refused — asked again, since a collect is a read. */
|
|
54
|
+
const dropped = (e) => transportHelper.isTransientTransportError(e)
|
|
55
|
+
|| e?.code === AXIOS_TIMEOUT_CODE
|
|
56
|
+
|| COLLECT_DROPPED_STATUSES.has(e?.responseStatus ?? 0);
|
|
57
|
+
const collect = async (context, callId, signal) => {
|
|
58
|
+
let drops = 0;
|
|
59
|
+
for (;;) {
|
|
60
|
+
const started = Date.now();
|
|
61
|
+
let result;
|
|
62
|
+
try {
|
|
63
|
+
result = await context.entrypoint(connectRef.call.collect).call({
|
|
64
|
+
params: { callId },
|
|
65
|
+
query: { wait: CONNECT_CALL_COLLECT_WAIT_SEC },
|
|
66
|
+
timeout: COLLECT_HOP_TIMEOUT_MS,
|
|
67
|
+
...(signal != null ? { signal } : {}),
|
|
68
|
+
});
|
|
69
|
+
drops = 0;
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
if (signal?.aborted === true || !dropped(e) || ++drops > COLLECT_DROPPED_HOPS)
|
|
73
|
+
throw e;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
switch (result.state) {
|
|
77
|
+
case ConnectCallState.Settled:
|
|
78
|
+
if (result.error != null && result.error !== '') {
|
|
79
|
+
// The class the call itself would have thrown — rebuilt from its marshalled form.
|
|
80
|
+
throw ResilientError.ensure(result.error);
|
|
81
|
+
}
|
|
82
|
+
return { value: result.value ?? null, outcome: result.outcome ?? EntrypointOutcome.Ok };
|
|
83
|
+
case ConnectCallState.Lost:
|
|
84
|
+
throw new ConnectCallLost(callId);
|
|
85
|
+
case ConnectCallState.Pending:
|
|
86
|
+
if (Date.now() - started < COLLECT_FAST_MS)
|
|
87
|
+
await pause(COLLECT_PAUSE_MS, signal);
|
|
88
|
+
continue;
|
|
89
|
+
default:
|
|
90
|
+
throw new SdkUnsupported(`call-state:${String(result.state)}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const handle = async (req, res) => {
|
|
95
|
+
const context = contextOf();
|
|
96
|
+
const api = apiOf(context);
|
|
97
|
+
if (!opts.delegated || !writes(context, req.alias)) {
|
|
98
|
+
await api.handler(req, res);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const callId = nameCall(req);
|
|
102
|
+
const first = provideResponse();
|
|
103
|
+
await api.handler(req, first);
|
|
104
|
+
if (first.error != null) {
|
|
105
|
+
res.reject(first.error);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (!pendingFor(first.value, callId)) {
|
|
109
|
+
res.resolve(first.value, first.outcome);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
const settled = await collect(context, callId, req.signal);
|
|
114
|
+
res.resolve(settled.value, settled.outcome);
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
res.reject(e);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const transport = createService(transportAlias(RouteProtocols.WEB), {
|
|
121
|
+
protocol: RouteProtocols.WEB,
|
|
122
|
+
delegated: opts.delegated,
|
|
123
|
+
handle: handle,
|
|
124
|
+
});
|
|
125
|
+
return transport;
|
|
126
|
+
};
|
|
127
|
+
/** Register the call-collect transport on an SDK context — before its `init()`. */
|
|
128
|
+
export const appendCallCollectTransport = (context, opts) => {
|
|
129
|
+
context.registerService(createCallCollectTransport(opts));
|
|
130
|
+
return context;
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=collect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect.js","sourceRoot":"","sources":["../../src/api/collect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,aAAa,EAA8C,MAAM,eAAe,CAAA;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EACL,iBAAiB,EAAE,eAAe,EAAE,cAAc,GAEnD,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAA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AC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACvB,OAAM;QACR,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC;YACrC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAClD,OAAM;QACR,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;YAC1D,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,OAA4B,CAAC,CAAA;QAClE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,GAAG,CAAC,MAAM,CAAC,CAAU,CAAC,CAAA;QACxB,CAAC;IACH,CAAC,CAAA;IAED,MAAM,SAAS,GAAyB,aAAa,CAAuB,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QAC9G,QAAQ,EAAE,cAAc,CAAC,GAAG;QAC5B,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,MAAM,EAAE,MAAwC;KACjD,CAAC,CAAA;IAEF,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAgB,OAAU,EAAE,IAAwB,EAAK,EAAE;IACnG,OAAO,CAAC,eAAe,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAA;IAEzD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const TRANSIENT_TRANSPORT_CODES: Set<string>;
|
|
2
|
+
/**
|
|
3
|
+
* A collect hop's HTTP deadline: the hold the platform answers within, plus room for the round trip
|
|
4
|
+
* — a quiet hop must never read as a dropped line.
|
|
5
|
+
*/
|
|
6
|
+
export declare const COLLECT_HOP_TIMEOUT_MS: number;
|
|
7
|
+
/**
|
|
8
|
+
* How many collect hops in a row may DROP (a reset, a timeout, an edge's 502/503/504) before the
|
|
9
|
+
* call's own promise gives up. A collect is a read, so a dropped hop is simply asked again; a
|
|
10
|
+
* platform that stays unreachable is a failure the parent should hear about.
|
|
11
|
+
*/
|
|
12
|
+
export declare const COLLECT_DROPPED_HOPS = 3;
|
|
13
|
+
/** The statuses an edge answers when it, not the platform, dropped a held response. */
|
|
14
|
+
export declare const COLLECT_DROPPED_STATUSES: Set<number>;
|
|
15
|
+
/** The code axios rejects a request with when its own deadline fired. */
|
|
16
|
+
export declare const AXIOS_TIMEOUT_CODE = "ECONNABORTED";
|
|
17
|
+
/** A `pending` answered faster than this was not held, so the next hop waits {@link COLLECT_PAUSE_MS} first. */
|
|
18
|
+
export declare const COLLECT_FAST_MS = 1000;
|
|
19
|
+
/** The rest after an unheld `pending`, so a platform that answers at once is not asked in a hot loop. */
|
|
20
|
+
export declare const COLLECT_PAUSE_MS = 1000;
|
|
21
|
+
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/api/consts.local.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,aAGpC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAA8C,CAAA;AAEjF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAErC,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,aAA2B,CAAA;AAEhE,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAEhD,gHAAgH;AAChH,eAAO,MAAM,eAAe,OAAQ,CAAA;AAEpC,yGAAyG;AACzG,eAAO,MAAM,gBAAgB,OAAQ,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CONNECT_CALL_COLLECT_WAIT_SEC } from '@owlmeans/viable-common';
|
|
2
|
+
export const TRANSIENT_TRANSPORT_CODES = new Set([
|
|
3
|
+
'ECONNRESET', 'ECONNREFUSED', 'EPIPE', 'ETIMEDOUT', 'UND_ERR_CONNECT_TIMEOUT',
|
|
4
|
+
'UND_ERR_HEADERS_TIMEOUT', 'UND_ERR_SOCKET',
|
|
5
|
+
]);
|
|
6
|
+
/**
|
|
7
|
+
* A collect hop's HTTP deadline: the hold the platform answers within, plus room for the round trip
|
|
8
|
+
* — a quiet hop must never read as a dropped line.
|
|
9
|
+
*/
|
|
10
|
+
export const COLLECT_HOP_TIMEOUT_MS = (CONNECT_CALL_COLLECT_WAIT_SEC + 10) * 1000;
|
|
11
|
+
/**
|
|
12
|
+
* How many collect hops in a row may DROP (a reset, a timeout, an edge's 502/503/504) before the
|
|
13
|
+
* call's own promise gives up. A collect is a read, so a dropped hop is simply asked again; a
|
|
14
|
+
* platform that stays unreachable is a failure the parent should hear about.
|
|
15
|
+
*/
|
|
16
|
+
export const COLLECT_DROPPED_HOPS = 3;
|
|
17
|
+
/** The statuses an edge answers when it, not the platform, dropped a held response. */
|
|
18
|
+
export const COLLECT_DROPPED_STATUSES = new Set([502, 503, 504]);
|
|
19
|
+
/** The code axios rejects a request with when its own deadline fired. */
|
|
20
|
+
export const AXIOS_TIMEOUT_CODE = 'ECONNABORTED';
|
|
21
|
+
/** A `pending` answered faster than this was not held, so the next hop waits {@link COLLECT_PAUSE_MS} first. */
|
|
22
|
+
export const COLLECT_FAST_MS = 1_000;
|
|
23
|
+
/** The rest after an unheld `pending`, so a platform that answers at once is not asked in a hot loop. */
|
|
24
|
+
export const COLLECT_PAUSE_MS = 1_000;
|
|
25
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/api/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IAC/C,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,yBAAyB;IAC7E,yBAAyB,EAAE,gBAAgB;CAC5C,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,6BAA6B,GAAG,EAAE,CAAC,GAAG,IAAI,CAAA;AAEjF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAEhE,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA;AAEhD,gHAAgH;AAChH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAA;AAEpC,yGAAyG;AACzG,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA"}
|
package/build/api/index.d.ts
CHANGED
package/build/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,sBAAsB,CAAA"}
|
package/build/api/index.js
CHANGED
package/build/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
|
package/build/api/remote.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import type { ClientConfig, ClientContext } from '@owlmeans/client-context';
|
|
2
1
|
import type { ConnectorApi } from '../types.js';
|
|
3
|
-
type Ctx
|
|
2
|
+
import type { Ctx } from './types.local.js';
|
|
3
|
+
import type { RemoteConnectorOptions } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* The connector API over HTTP.
|
|
6
6
|
*
|
|
7
7
|
* Every call is bounded by the tool deadline rather than left to the transport's own default: a
|
|
8
8
|
* tool that outlives its host's ceiling is reported to the user as a broken server, and the true
|
|
9
|
-
* answer — the platform was slow — never reaches them.
|
|
10
|
-
* a
|
|
9
|
+
* answer — the platform was slow — never reaches them. Long work returns its current domain status.
|
|
10
|
+
* In the delegated mode a write may wait on a model call the connector's own parent performs; the
|
|
11
|
+
* context's transport names it and collects an early `{ pending }` answer, so the deadline bounds
|
|
12
|
+
* each request and collect hop, never the call (and its tool answers before the call ends: the
|
|
13
|
+
* handover).
|
|
14
|
+
*
|
|
15
|
+
* `planning` is the facade `makeSdkContext` registered with `appendPlanningClient`: its reads and
|
|
16
|
+
* its execute POST carry the same tool deadline, and a commit is awaited by long polls whose HTTP
|
|
17
|
+
* deadline outlasts their own hold by ten seconds. Its scope is empty on purpose — the platform
|
|
18
|
+
* reads the organization and the profile from the token.
|
|
11
19
|
*/
|
|
12
|
-
export declare const makeRemoteConnectorApi: (context: Ctx) => ConnectorApi;
|
|
13
|
-
export {};
|
|
20
|
+
export declare const makeRemoteConnectorApi: (context: Ctx, opts?: RemoteConnectorOptions) => ConnectorApi;
|
|
14
21
|
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/api/remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/api/remote.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAiC,MAAM,aAAa,CAAA;AAC9E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAGxD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,YAAa,GAAG,SAAQ,sBAAsB,KAAQ,YAgXxF,CAAA"}
|