@owlmeans/viable-sdk 0.1.18-rc.41 → 0.1.18-rc.43
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 +1 -1
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/viable-sdk/SKILL.md +42 -12
- package/build/api/consts.local.d.ts +2 -0
- package/build/api/consts.local.d.ts.map +1 -0
- package/build/api/consts.local.js +5 -0
- package/build/api/consts.local.js.map +1 -0
- package/build/api/remote.d.ts +1 -3
- package/build/api/remote.d.ts.map +1 -1
- package/build/api/remote.js +5 -9
- package/build/api/remote.js.map +1 -1
- 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 +0 -7
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +0 -10
- 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 -16
- package/build/context/index.d.ts.map +1 -1
- package/build/context/index.js +1 -17
- package/build/context/index.js.map +1 -1
- package/build/context/types.d.ts +16 -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 +12 -9
- 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 +60 -0
- package/build/executor/consts.local.d.ts.map +1 -0
- package/build/executor/consts.local.js +66 -0
- package/build/executor/consts.local.js.map +1 -0
- package/build/executor/env.d.ts +13 -0
- package/build/executor/env.d.ts.map +1 -1
- package/build/executor/env.js +3 -6
- package/build/executor/env.js.map +1 -1
- package/build/executor/files.d.ts +2 -12
- package/build/executor/files.d.ts.map +1 -1
- package/build/executor/files.js +6 -21
- package/build/executor/files.js.map +1 -1
- package/build/executor/git.d.ts +2 -34
- package/build/executor/git.d.ts.map +1 -1
- package/build/executor/git.js +4 -63
- package/build/executor/git.js.map +1 -1
- package/build/executor/glob.d.ts +17 -0
- package/build/executor/glob.d.ts.map +1 -0
- package/build/executor/glob.js +16 -0
- package/build/executor/glob.js.map +1 -0
- package/build/executor/health.d.ts +1 -64
- package/build/executor/health.d.ts.map +1 -1
- package/build/executor/health.js +9 -3
- package/build/executor/health.js.map +1 -1
- package/build/executor/index.d.ts +6 -15
- package/build/executor/index.d.ts.map +1 -1
- package/build/executor/index.js +3 -1
- package/build/executor/index.js.map +1 -1
- package/build/executor/integrity.d.ts +1 -1
- package/build/executor/integrity.d.ts.map +1 -1
- package/build/executor/integrity.js +1 -9
- package/build/executor/integrity.js.map +1 -1
- package/build/executor/shell.d.ts +2 -14
- package/build/executor/shell.d.ts.map +1 -1
- package/build/executor/shell.js +3 -10
- package/build/executor/shell.js.map +1 -1
- package/build/executor/spawn.d.ts +2 -17
- package/build/executor/spawn.d.ts.map +1 -1
- package/build/executor/spawn.js +2 -17
- package/build/executor/spawn.js.map +1 -1
- package/build/executor/types.d.ts +127 -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/harness/consts.d.ts +10 -0
- package/build/harness/consts.d.ts.map +1 -0
- package/build/harness/consts.js +37 -0
- package/build/harness/consts.js.map +1 -0
- package/build/harness/consts.local.d.ts +12 -0
- package/build/harness/consts.local.d.ts.map +1 -0
- package/build/harness/consts.local.js +18 -0
- package/build/harness/consts.local.js.map +1 -0
- package/build/harness/index.d.ts +4 -9
- package/build/harness/index.d.ts.map +1 -1
- package/build/harness/index.js +2 -2
- package/build/harness/index.js.map +1 -1
- package/build/harness/templates.d.ts +1 -17
- package/build/harness/templates.d.ts.map +1 -1
- package/build/harness/templates.js +2 -51
- package/build/harness/templates.js.map +1 -1
- package/build/harness/types.d.ts +17 -0
- package/build/harness/types.d.ts.map +1 -0
- package/build/harness/types.js +2 -0
- package/build/harness/types.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- 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/env.d.ts +2 -23
- package/build/project/env.d.ts.map +1 -1
- package/build/project/env.js +2 -19
- package/build/project/env.js.map +1 -1
- package/build/project/marker.d.ts +2 -6
- package/build/project/marker.d.ts.map +1 -1
- package/build/project/marker.js +7 -0
- package/build/project/marker.js.map +1 -1
- package/build/project/setup.d.ts +1 -24
- package/build/project/setup.d.ts.map +1 -1
- package/build/project/setup.js +12 -2
- 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 +3 -47
- package/build/run/index.d.ts.map +1 -1
- package/build/run/index.js.map +1 -1
- 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.d.ts +1 -33
- package/build/run/state.d.ts.map +1 -1
- package/build/run/state.js +11 -0
- 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/index.d.ts +3 -10
- package/build/session/index.d.ts.map +1 -1
- package/build/session/index.js.map +1 -1
- package/build/session/queue.d.ts +0 -17
- package/build/session/queue.d.ts.map +1 -1
- package/build/session/queue.js +0 -17
- package/build/session/queue.js.map +1 -1
- package/build/session/types.d.ts +15 -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.d.ts +2 -12
- package/build/task/envelope.d.ts.map +1 -1
- package/build/task/envelope.js +2 -52
- package/build/task/envelope.js.map +1 -1
- package/build/task/index.d.ts +2 -0
- package/build/task/index.d.ts.map +1 -1
- package/build/task/index.js +1 -0
- package/build/task/index.js.map +1 -1
- package/build/task/inquiry.d.ts +2 -21
- package/build/task/inquiry.d.ts.map +1 -1
- package/build/task/inquiry.js +2 -21
- package/build/task/inquiry.js.map +1 -1
- 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/catalogue.d.ts +1 -1
- package/build/tools/catalogue.d.ts.map +1 -1
- package/build/tools/catalogue.js +69 -18
- package/build/tools/catalogue.js.map +1 -1
- package/build/tools/consts.d.ts +55 -0
- package/build/tools/consts.d.ts.map +1 -0
- package/build/tools/consts.js +384 -0
- package/build/tools/consts.js.map +1 -0
- package/build/tools/consts.local.d.ts +25 -0
- package/build/tools/consts.local.d.ts.map +1 -0
- package/build/tools/consts.local.js +36 -0
- package/build/tools/consts.local.js.map +1 -0
- package/build/tools/index.d.ts +2 -0
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +2 -0
- package/build/tools/index.js.map +1 -1
- package/build/tools/mcp.d.ts +1 -16
- package/build/tools/mcp.d.ts.map +1 -1
- package/build/tools/mcp.js +11 -26
- package/build/tools/mcp.js.map +1 -1
- package/build/tools/platform.d.ts +1 -83
- package/build/tools/platform.d.ts.map +1 -1
- package/build/tools/platform.js +1 -316
- package/build/tools/platform.js.map +1 -1
- package/build/tools/refusal.d.ts +28 -21
- package/build/tools/refusal.d.ts.map +1 -1
- package/build/tools/refusal.js +93 -27
- package/build/tools/refusal.js.map +1 -1
- package/build/tools/settings.d.ts +2 -18
- package/build/tools/settings.d.ts.map +1 -1
- package/build/tools/settings.js +1 -25
- package/build/tools/settings.js.map +1 -1
- package/build/tools/status.d.ts +2 -12
- package/build/tools/status.d.ts.map +1 -1
- package/build/tools/status.js +1 -1
- package/build/tools/status.js.map +1 -1
- package/build/tools/stories.d.ts +3 -31
- package/build/tools/stories.d.ts.map +1 -1
- package/build/tools/stories.js +2 -28
- package/build/tools/stories.js.map +1 -1
- package/build/tools/types.d.ts +122 -30
- package/build/tools/types.d.ts.map +1 -1
- package/build/tools/types.js +1 -37
- package/build/tools/types.js.map +1 -1
- package/build/tools/utils.d.ts +31 -0
- package/build/tools/utils.d.ts.map +1 -0
- package/build/tools/utils.js +31 -0
- package/build/tools/utils.js.map +1 -0
- package/build/types.d.ts +4 -3
- 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 +27 -27
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
96
96
|
your project's skill store (`.agents/skills/`):
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
99
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/viable-sdk",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.43",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.089Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/viable-sdk
|
|
9
9
|
|
|
10
10
|
**Layer:** Tooling (Node/Bun; not a browser or React package)
|
|
11
|
-
**Install:** `"@owlmeans/viable-sdk": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/viable-sdk": "^0.1.18-rc.43"` in `dependencies`
|
|
12
12
|
**Subpaths:** `.` · `./executor` · `./run` · `./tools` · `./task` · `./harness`
|
|
13
13
|
**Contracts:** `@owlmeans/viable-common` (`./connect`, `./slot`, `./integrity`, and the planning
|
|
14
14
|
vocabulary — story type and story flow) and `@owlmeans/planning` (the planning protocol tree
|
|
@@ -106,8 +106,8 @@ without the capability is refused at the boundary rather than by a check somewhe
|
|
|
106
106
|
|
|
107
107
|
`ConnectorApi` has exactly one member per connector route plus the planning facade — the session
|
|
108
108
|
(`openSession`, `closeSession`, `pullOps`, `submitOp`), projects, branding, story status, files,
|
|
109
|
-
pipeline state, conversion (`create`, `check`, `start`, `proceed
|
|
110
|
-
answers. There is no capability view, no session read or heartbeat and no conversion cancel, and a
|
|
109
|
+
pipeline state, conversion (`create`, `check`, `start(projectId, body?)`, `proceed(projectId, body)`
|
|
110
|
+
— the bodies are the route's, `confirm` included —, `status`, `purge`) and inquiry answers. There is no capability view, no session read or heartbeat and no conversion cancel, and a
|
|
111
111
|
project's inference settings are not a connector call: a person sets them in the browser, through
|
|
112
112
|
the platform's own API. A member is added together with the route in `connectProtocols` and its
|
|
113
113
|
`connectRef` entry — never one without the others.
|
|
@@ -120,7 +120,8 @@ opening one there would claim the project's single connector slot, **supersede t
|
|
|
120
120
|
legitimately holding it**, and be abandoned before the first operation was delivered.
|
|
121
121
|
|
|
122
122
|
So `ensureSession` — what `confirm_project`, `reinitialize_project`, `develop_story`,
|
|
123
|
-
`modify_project
|
|
123
|
+
`modify_project` and `resume_pipeline` call before returning their job, and `apply_planning_kit`
|
|
124
|
+
before its write — opens one only on a
|
|
124
125
|
`sessionCapable` host, and `next_task`/`submit_task_result` are available on `performsModelTasks`
|
|
125
126
|
(delegated **and** session-capable) rather than on the account setting alone. `serverInstructions`
|
|
126
127
|
reads the same predicate: a parent told to call `next_task` when the tool is not in its list is a
|
|
@@ -268,10 +269,12 @@ same facts in one sentence, because it is read at the same moment by a parent th
|
|
|
268
269
|
`describe_platform`; the two sit side by side in `platform.ts`. The pipelines' `stages` name the steps
|
|
269
270
|
a run can stop at (`landing` and `legal` in init, `landing` in story development).
|
|
270
271
|
|
|
271
|
-
## A balance or
|
|
272
|
+
## A balance, consent or confirmation refusal is phrased for a person, and pushed through `notify`
|
|
272
273
|
|
|
273
|
-
`
|
|
274
|
-
(`@owlmeans/viable-common` `connect/errors.ts`), by `instanceof
|
|
274
|
+
`personRefusalPhrase(e, retry?)` (`tools/refusal.ts`) phrases the three refusals only a PERSON can
|
|
275
|
+
resolve (`@owlmeans/viable-common` `connect/errors.ts`), by `instanceof`, and answers `null` for
|
|
276
|
+
anything else. Both `registerCatalogue`'s catch and the conversion tools' `answering` use it, so a
|
|
277
|
+
conversion's balance refusal reads exactly like any other tool's:
|
|
275
278
|
|
|
276
279
|
- `ConnectOutOfCredits` — rather than the raw `viable-connect:out-of-credits:...` marker, the tool
|
|
277
280
|
result reads as a sentence: what it needed, what the account has, and a link to top up.
|
|
@@ -279,18 +282,42 @@ a run can stop at (`landing` and `legal` in init, `landing` in story development
|
|
|
279
282
|
than 14 days ago may only be used once a person expressly asks, the purchase still withdrawable up
|
|
280
283
|
to the last day), the `consentUrl` to open and confirm in the browser, and that the call must NOT
|
|
281
284
|
be retried automatically — only after the user says they confirmed (`consentRequiredPhrase(url,
|
|
282
|
-
deadline)
|
|
285
|
+
deadline)`, shared with the stored-text entry below).
|
|
286
|
+
- `ConnectConfirmationRequired` — a conversion step that would use the plan's conversion or spend
|
|
287
|
+
credits (`confirmationRequiredPhrase(fields, retry?)`): "Nothing was started"; for a start, what the
|
|
288
|
+
plan's conversion covers (free up to `cap` credits, the conversion limit; beyond it credit limits
|
|
289
|
+
first, then topped-up credits; every stage quoted and asked first); for a stage, its estimate
|
|
290
|
+
split ("580,000 from the conversion limit, 150,000 from the organization's credit limits, $2.40
|
|
291
|
+
of topped-up credits" — credit limits as credits, topped-up credits as money) and what the limit
|
|
292
|
+
has used and left. Then: tell the user exactly this, and only after they agree make the call it
|
|
293
|
+
prints — never `confirm: true` on the model's own. Every variant names the conversion limit (a
|
|
294
|
+
conversion with no plan unit "has no conversion limit").
|
|
283
295
|
|
|
284
296
|
Their fields travel packed into the message (only `type` and `message` survive the platform's
|
|
285
|
-
internal HTTP hop) and are read back with `finalizeUnmarshal()`.
|
|
297
|
+
internal HTTP hop) and are read back with `finalizeUnmarshal()`. All three are also handed to the
|
|
286
298
|
optional `ToolDeps.notify?('warning', text)`, which a host wires to its own out-of-band channel —
|
|
287
299
|
the stdio `viable-mcp` host sends an MCP `notifications/message`; the platform's stateless `/mcp`
|
|
288
300
|
host has no channel and omits it, so `notify` is always best-effort and optional. Every other
|
|
289
301
|
error returns through `refusalPhrase` and never calls `notify`.
|
|
290
302
|
|
|
303
|
+
**A conversion's confirmation is answered inside its tool, with the exact call to repeat**
|
|
304
|
+
(`confirming` in `catalogue.ts`): `convert_project` / `proceed_conversion` print
|
|
305
|
+
`<tool> {"projectId":…[,"decision":…,"note":…],"confirm":true}` — the project NAMED, because the
|
|
306
|
+
URL-configured host keeps no attachment between calls and a bare repeat of `convert_project` there
|
|
307
|
+
would file a second conversion (the start is what a confirmation stops; the create before it is
|
|
308
|
+
never repeated). Both take `confirm` (`z.boolean().default(false)`, described), sent only when the
|
|
309
|
+
parent passed `true`, and their descriptions explain the conversion limit (1,000,000 credits today),
|
|
310
|
+
the spend order and that a delegated conversion is never asked — so a parent can say it before it is
|
|
311
|
+
refused. A production body carries only the status: a bare `api:client:status:428` to a call sent
|
|
312
|
+
WITHOUT `confirm` is answered with `unconfirmedConversionPhrase(retry)` (the confirmation, and the
|
|
313
|
+
consent as what a second refusal of the confirmed call would mean); to a confirmed call it can only
|
|
314
|
+
be the consent and falls to `REFUSALS`. `serverInstructions` says the same in one sentence of the
|
|
315
|
+
workflow paragraph.
|
|
316
|
+
|
|
291
317
|
The same refusals also arrive where no class survives, and `REFUSALS` phrases them by marker:
|
|
292
318
|
`viable-connect:consent-required:` (a stored run error; the URL and deadline parsed from the
|
|
293
|
-
detail), `
|
|
319
|
+
detail), `viable-connect:confirmation-required:` (`ConnectConfirmationRequired.decode` of the
|
|
320
|
+
detail, the generic "same arguments and confirm: true" repeat), `performance-consent-required` (the web refusal inside a planning `commit-failed:` or a
|
|
294
321
|
stored error — no URL, so "Billing in the OwlMeans web application") — both ABOVE the planning
|
|
295
322
|
markers, because the consent is what the person acts on — and, for a production body that carries
|
|
296
323
|
only an incident id (`@owlmeans/api` `ApiStatusError`), `api:client:status:428` (the consent
|
|
@@ -405,7 +432,7 @@ environment otherwise hides the credentials file). The result is safe to commit.
|
|
|
405
432
|
into every harness's instruction file, so the four cannot drift into four different protocols.
|
|
406
433
|
|
|
407
434
|
**The server command is written once, too.** Every harness configuration starts the connector from
|
|
408
|
-
`MCP_COMMAND` in `src/harness/
|
|
435
|
+
`MCP_COMMAND` in `src/harness/consts.local.ts` — viable-mcp through `npx -y`, pinned with a caret at the
|
|
409
436
|
viable-mcp release, on ONE line with its `npx` so the release pin audit reads it as an install
|
|
410
437
|
command and moves it with every viable-mcp bump. Never a tag (`@next` is refused by that audit) and
|
|
411
438
|
never a per-harness literal: three copies spelled `@next` while the fourth carried the pin.
|
|
@@ -529,7 +556,10 @@ reader looking for a database that was never configured.
|
|
|
529
556
|
`bun test ./tests` — offline: the envelope and its parser, the harness installer, the tool catalogue,
|
|
530
557
|
the `registerCatalogue` out-of-credits, consent and planning-refusal phrasing and `notify` wiring
|
|
531
558
|
(`mcp-catalogue.spec.ts`; the consent marker, the bare 428/402 statuses and a consent inside a
|
|
532
|
-
commit failure in `catalogue.spec.ts
|
|
559
|
+
commit failure in `catalogue.spec.ts`; the conversion confirmation — schemas and descriptions, the
|
|
560
|
+
start and stage phrasing, the repeat call naming a freshly filed project, the stored marker, the
|
|
561
|
+
bare 428 either side of `confirm`, the confirmed call's balance and consent refusals and the MCP
|
|
562
|
+
boundary — in `conversion-confirmation.spec.ts`), the executor's files/git/layout rules, and the marker + managed-`.env`
|
|
533
563
|
block. The story tools run over a REAL `@owlmeans/server-planning` service (memory store, the Viable
|
|
534
564
|
types and flows, one plugin standing in for the platform's format seam) built in `tests/context.ts`,
|
|
535
565
|
the landing mark included; the settings and planning-kit tools over a recorded `ConnectorApi` (order of
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/api/consts.local.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,aAGpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/api/consts.local.ts"],"names":[],"mappings":"AAAA,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"}
|
package/build/api/remote.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
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';
|
|
4
3
|
/** A broken HTTP connection, as opposed to a refusal the platform deliberately answered. */
|
|
5
4
|
export declare const isTransientTransportError: (value: unknown) => boolean;
|
|
6
5
|
/**
|
|
@@ -24,5 +23,4 @@ export declare const recoverLongPoll: <T>(poll: () => Promise<T>, snapshot: () =
|
|
|
24
23
|
* reads the organization and the profile from the token.
|
|
25
24
|
*/
|
|
26
25
|
export declare const makeRemoteConnectorApi: (context: Ctx) => ConnectorApi;
|
|
27
|
-
export {};
|
|
28
26
|
//# 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;AAE9E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,UAAW,OAAO,KAAG,OAgB1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAU,CAAC,QAC/B,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,MAAM,OAAO,CAAC,CAAC,CAAC,KACjD,OAAO,CAAC,CAAC,CAQX,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,YAAa,GAAG,KAAG,YAqHrD,CAAA"}
|
package/build/api/remote.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { planningOf } from '@owlmeans/client-planning';
|
|
2
2
|
import { connectRef } from '@owlmeans/viable-common';
|
|
3
3
|
import { TOOL_DEADLINE_MS } from '../consts.js';
|
|
4
|
-
|
|
5
|
-
'ECONNRESET', 'ECONNREFUSED', 'EPIPE', 'ETIMEDOUT', 'UND_ERR_CONNECT_TIMEOUT',
|
|
6
|
-
'UND_ERR_HEADERS_TIMEOUT', 'UND_ERR_SOCKET',
|
|
7
|
-
]);
|
|
4
|
+
import { TRANSIENT_TRANSPORT_CODES } from './consts.local.js';
|
|
8
5
|
/** A broken HTTP connection, as opposed to a refusal the platform deliberately answered. */
|
|
9
6
|
export const isTransientTransportError = (value) => {
|
|
10
7
|
const seen = new Set();
|
|
@@ -129,11 +126,10 @@ export const makeRemoteConnectorApi = (context) => {
|
|
|
129
126
|
}),
|
|
130
127
|
check: async (id) => await context
|
|
131
128
|
.entrypoint(connectRef.convert.check).call({ params: { id }, timeout: TOOL_DEADLINE_MS }),
|
|
132
|
-
start: async (id) => await context
|
|
133
|
-
.entrypoint(connectRef.convert.start).call({ params: { id }, timeout: TOOL_DEADLINE_MS }),
|
|
134
|
-
proceed: async (id,
|
|
135
|
-
params: { id }, body
|
|
136
|
-
timeout: TOOL_DEADLINE_MS,
|
|
129
|
+
start: async (id, body) => await context
|
|
130
|
+
.entrypoint(connectRef.convert.start).call({ params: { id }, body: body ?? {}, timeout: TOOL_DEADLINE_MS }),
|
|
131
|
+
proceed: async (id, body) => await context.entrypoint(connectRef.convert.proceed).call({
|
|
132
|
+
params: { id }, body, timeout: TOOL_DEADLINE_MS,
|
|
137
133
|
}),
|
|
138
134
|
status: async (id) => await context
|
|
139
135
|
.entrypoint(connectRef.convert.status).call({ params: { id }, timeout: TOOL_DEADLINE_MS }),
|
package/build/api/remote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/api/remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/api/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,UAAU,EAAif,MAAM,yBAAyB,CAAA;AACniB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAG7D,4FAA4F;AAC5F,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAc,EAAW,EAAE;IACnE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAW,CAAA;IAC/B,IAAI,OAAO,GAAY,KAAK,CAAA;IAE5B,OAAO,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7C,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACjB,MAAM,KAAK,GAAG,OAAiE,CAAA;QAC/E,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,yBAAyB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAA;QAC5F,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACnF,IAAI,oGAAoG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACvH,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO,GAAG,KAAK,CAAC,KAAK,CAAA;IACvB,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,IAAsB,EAAE,QAA0B,EACt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+
{"version":3,"file":"types.local.js","sourceRoot":"","sources":["../../src/api/types.local.ts"],"names":[],"mappings":""}
|
package/build/consts.d.ts
CHANGED
|
@@ -8,13 +8,6 @@ export declare const ENV_PROJECT_DIR = "VIABLE_PROJECT_DIR";
|
|
|
8
8
|
/** The URL-configured MCP host's address — see `CONNECT_DEFAULT_MCP_URL`. */
|
|
9
9
|
export declare const ENV_MCP_URL = "VIABLE_MCP_URL";
|
|
10
10
|
export declare const DEFAULT_MCP_URL = "https://api.owlmeans.com/mcp";
|
|
11
|
-
/**
|
|
12
|
-
* The `/mcp` URL a person, a doc or a verification tool should use: the value the merged
|
|
13
|
-
* configuration names (environment over `~/.owlmeans`, already resolved by the caller), else the
|
|
14
|
-
* production default. An empty value counts as unset, and a trailing slash is dropped — a
|
|
15
|
-
* canonical resource URI (RFC 8707) has one spelling.
|
|
16
|
-
*/
|
|
17
|
-
export declare const resolveMcpUrl: (values: Record<string, string | undefined>) => string;
|
|
18
11
|
/** The service alias the SDK's own client context registers under. */
|
|
19
12
|
export declare const SDK_SERVICE = "viable-sdk";
|
|
20
13
|
/**
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,SAAS,qBAAqB,CAAA;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,UAAU,kBAAkB,CAAA;AACzC,eAAO,MAAM,OAAO,eAAe,CAAA;AACnC,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,eAAe,uBAAuB,CAAA;AACnD,6EAA6E;AAC7E,eAAO,MAAM,WAAW,mBAAsB,CAAA;AAC9C,eAAO,MAAM,eAAe,iCAA0B,CAAA;AAEtD
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,SAAS,qBAAqB,CAAA;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,UAAU,kBAAkB,CAAA;AACzC,eAAO,MAAM,OAAO,eAAe,CAAA;AACnC,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,eAAe,uBAAuB,CAAA;AACnD,6EAA6E;AAC7E,eAAO,MAAM,WAAW,mBAAsB,CAAA;AAC9C,eAAO,MAAM,eAAe,iCAA0B,CAAA;AAEtD,sEAAsE;AACtE,eAAO,MAAM,WAAW,eAAe,CAAA;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,QAAS,CAAA;AAEpC,iHAAiH;AACjH,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,yFAAyF;AACzF,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C,qEAAqE;AACrE,eAAO,MAAM,YAAY,QAAS,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -9,16 +9,6 @@ export const ENV_PROJECT_DIR = 'VIABLE_PROJECT_DIR';
|
|
|
9
9
|
/** The URL-configured MCP host's address — see `CONNECT_DEFAULT_MCP_URL`. */
|
|
10
10
|
export const ENV_MCP_URL = CONNECT_ENV_MCP_URL;
|
|
11
11
|
export const DEFAULT_MCP_URL = CONNECT_DEFAULT_MCP_URL;
|
|
12
|
-
/**
|
|
13
|
-
* The `/mcp` URL a person, a doc or a verification tool should use: the value the merged
|
|
14
|
-
* configuration names (environment over `~/.owlmeans`, already resolved by the caller), else the
|
|
15
|
-
* production default. An empty value counts as unset, and a trailing slash is dropped — a
|
|
16
|
-
* canonical resource URI (RFC 8707) has one spelling.
|
|
17
|
-
*/
|
|
18
|
-
export const resolveMcpUrl = (values) => {
|
|
19
|
-
const named = values[ENV_MCP_URL];
|
|
20
|
-
return (named != null && named !== '' ? named : DEFAULT_MCP_URL).replace(/\/+$/, '');
|
|
21
|
-
};
|
|
22
12
|
/** The service alias the SDK's own client context registers under. */
|
|
23
13
|
export const SDK_SERVICE = 'viable-sdk';
|
|
24
14
|
/**
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAEtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA;AACnD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAA;AAEtD
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAEtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA;AACnD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAA;AAEtD,sEAAsE;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAA;AAEpC,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,yFAAyF;AACzF,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAE3C,qEAAqE;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The platform's websocket namespace, which the planning commit feed is declared under.
|
|
3
|
+
*
|
|
4
|
+
* A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
|
|
5
|
+
* exactly this reason, so that neither end has to import the other's constants.
|
|
6
|
+
*/
|
|
7
|
+
export declare const UPDATE_BASE = "viable:manager-api:update:base";
|
|
8
|
+
/**
|
|
9
|
+
* The base alias and path manager-api mounts the planning protocol tree under.
|
|
10
|
+
*
|
|
11
|
+
* Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
|
|
12
|
+
* `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
|
|
13
|
+
* Every planning alias and path derives from these, so the two ends agree on a route only while
|
|
14
|
+
* both build the tree from the same base, path and socket base.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PLANNING_BASE_ALIAS = "viable:manager-api:planning";
|
|
17
|
+
export declare const PLANNING_BASE_PATH = "/planning";
|
|
18
|
+
//# sourceMappingURL=consts.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/context/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,mCAAmC,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,gCAAgC,CAAA;AAEhE,eAAO,MAAM,kBAAkB,cAAc,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The platform's websocket namespace, which the planning commit feed is declared under.
|
|
3
|
+
*
|
|
4
|
+
* A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
|
|
5
|
+
* exactly this reason, so that neither end has to import the other's constants.
|
|
6
|
+
*/
|
|
7
|
+
export const UPDATE_BASE = 'viable:manager-api:update:base';
|
|
8
|
+
/**
|
|
9
|
+
* The base alias and path manager-api mounts the planning protocol tree under.
|
|
10
|
+
*
|
|
11
|
+
* Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
|
|
12
|
+
* `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
|
|
13
|
+
* Every planning alias and path derives from these, so the two ends agree on a route only while
|
|
14
|
+
* both build the tree from the same base, path and socket base.
|
|
15
|
+
*/
|
|
16
|
+
export const PLANNING_BASE_ALIAS = 'viable:manager-api:planning';
|
|
17
|
+
export const PLANNING_BASE_PATH = '/planning';
|
|
18
|
+
//# sourceMappingURL=consts.local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/context/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAA;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,6BAA6B,CAAA;AAEhE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAA"}
|
package/build/context/index.d.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientConfig, type ClientContext } from '@owlmeans/client-context';
|
|
2
2
|
import { connect } from '@owlmeans/viable-common';
|
|
3
|
-
|
|
4
|
-
apiUrl: string;
|
|
5
|
-
/**
|
|
6
|
-
* A fixed token, or a thunk resolved on every request. The thunk form is what lets a
|
|
7
|
-
* credential holder (`@owlmeans/cli-auth`) hand the carrier guard something that changes
|
|
8
|
-
* across the process's lifetime — empty before a sign-in completes, a real token after — with
|
|
9
|
-
* no reconfiguration in between.
|
|
10
|
-
*/
|
|
11
|
-
token: string | (() => string | Promise<string>);
|
|
12
|
-
/** The service alias the API is registered under. One deployment, one alias. */
|
|
13
|
-
service?: string;
|
|
14
|
-
/** Called when the platform rejects a request that presented this token — a credential holder
|
|
15
|
-
* wires this to forgetting a dead token (and signing in again) or reporting the problem. */
|
|
16
|
-
onRejected?: () => void | Promise<void>;
|
|
17
|
-
}
|
|
3
|
+
import type { SdkContextOptions } from './types.js';
|
|
18
4
|
/**
|
|
19
5
|
* A client context that speaks to a viable deployment with one access token.
|
|
20
6
|
*
|
|
@@ -28,4 +14,5 @@ export interface SdkContextOptions {
|
|
|
28
14
|
*/
|
|
29
15
|
export declare const makeSdkContext: (opts: SdkContextOptions) => Promise<ClientContext<ClientConfig>>;
|
|
30
16
|
export { connect };
|
|
17
|
+
export type { SdkContextOptions } from './types.js';
|
|
31
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAQnG,OAAO,EAAE,OAAO,EAA0C,MAAM,yBAAyB,CAAA;AAIzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAenD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,SAAgB,iBAAiB,KAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CA0FjG,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
package/build/context/index.js
CHANGED
|
@@ -10,24 +10,8 @@ import { makeTokenCarrierGuard } from '@owlmeans/auth-token';
|
|
|
10
10
|
import { connect, connectProtocols, CONNECT_TOKEN_PREFIX } from '@owlmeans/viable-common';
|
|
11
11
|
import { COMMIT_POLL_SEC, SDK_SERVICE, TOOL_DEADLINE_MS } from '../consts.js';
|
|
12
12
|
import { SdkAuthError, SdkMisconfigured } from '../errors.js';
|
|
13
|
-
|
|
14
|
-
* The platform's websocket namespace, which the planning commit feed is declared under.
|
|
15
|
-
*
|
|
16
|
-
* A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
|
|
17
|
-
* exactly this reason, so that neither end has to import the other's constants.
|
|
18
|
-
*/
|
|
19
|
-
const UPDATE_BASE = 'viable:manager-api:update:base';
|
|
13
|
+
import { PLANNING_BASE_ALIAS, PLANNING_BASE_PATH, UPDATE_BASE } from './consts.local.js';
|
|
20
14
|
const updateBase = openProtocol(route(UPDATE_BASE, '/update'));
|
|
21
|
-
/**
|
|
22
|
-
* The base alias and path manager-api mounts the planning protocol tree under.
|
|
23
|
-
*
|
|
24
|
-
* Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
|
|
25
|
-
* `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
|
|
26
|
-
* Every planning alias and path derives from these, so the two ends agree on a route only while
|
|
27
|
-
* both build the tree from the same base, path and socket base.
|
|
28
|
-
*/
|
|
29
|
-
const PLANNING_BASE_ALIAS = 'viable:manager-api:planning';
|
|
30
|
-
const PLANNING_BASE_PATH = '/planning';
|
|
31
15
|
/**
|
|
32
16
|
* The planning tree exactly as manager-api mounts it, minus the ownership gate — a gate is the
|
|
33
17
|
* server's to apply, and a client binding carries none.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAyC,MAAM,0BAA0B,CAAA;AACnG,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAuB,MAAM,sBAAsB,CAAA;AACnF,OAAO,EAAE,qBAAqB,EAA0B,MAAM,oBAAoB,CAAA;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACzF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,mBAA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I,CAAC,WAAW,CAAC,CAAC;QAC3D,GAAG,SAAS,CAAC,QAAqC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KAC1F,CAAA;IAED,8FAA8F;IAC9F,6EAA6E;IAC7E,OAAO,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IAExC,oBAAoB,CAAC,OAAO,EAAE;QAC5B,SAAS,EAAE,QAAQ;QACnB,yFAAyF;QACzF,IAAI,EAAE,KAAK;QACX,+FAA+F;QAC/F,gDAAgD;QAChD,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,gBAAgB;QACzB,+FAA+F;QAC/F,6FAA6F;QAC7F,uDAAuD;QACvD,OAAO,EAAE,KAAK;KACf,CAAC,CAAA;IAEF,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAA;IAEhC,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SdkContextOptions {
|
|
2
|
+
apiUrl: string;
|
|
3
|
+
/**
|
|
4
|
+
* A fixed token, or a thunk resolved on every request. The thunk form is what lets a
|
|
5
|
+
* credential holder (`@owlmeans/cli-auth`) hand the carrier guard something that changes
|
|
6
|
+
* across the process's lifetime — empty before a sign-in completes, a real token after — with
|
|
7
|
+
* no reconfiguration in between.
|
|
8
|
+
*/
|
|
9
|
+
token: string | (() => string | Promise<string>);
|
|
10
|
+
/** The service alias the API is registered under. One deployment, one alias. */
|
|
11
|
+
service?: string;
|
|
12
|
+
/** Called when the platform rejects a request that presented this token — a credential holder
|
|
13
|
+
* wires this to forgetting a dead token (and signing in again) or reporting the problem. */
|
|
14
|
+
onRejected?: () => void | Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAChD,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;gGAC4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { TargetHealthReading } from './health.js';
|
|
1
|
+
import type { BootCheckDeps, BootCheckJob, BootCheckReport } from './types.js';
|
|
3
2
|
/**
|
|
4
3
|
* Boot the generated backend for real, in isolation, and report what happened.
|
|
5
4
|
*
|
|
@@ -11,32 +10,6 @@ import type { TargetHealthReading } from './health.js';
|
|
|
11
10
|
* It runs the real thing, but never the live one: a second process, on its own port, against a
|
|
12
11
|
* scratch schema, killed on every exit path.
|
|
13
12
|
*/
|
|
14
|
-
/** How far the boot got. `ready` is the only success. */
|
|
15
|
-
export type BootCheckPhase = 'build' | 'schema' | 'boot' | 'ready';
|
|
16
|
-
export interface BootCheckReport {
|
|
17
|
-
ok: boolean;
|
|
18
|
-
phase: BootCheckPhase;
|
|
19
|
-
/** The classifier's reason plus the captured startup log, or null when the boot succeeded. */
|
|
20
|
-
error: string | null;
|
|
21
|
-
dbOk?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface BootCheckDeps {
|
|
24
|
-
port: number;
|
|
25
|
-
/** Argv marker that tells this instance apart from the live one for process matching. */
|
|
26
|
-
marker: string;
|
|
27
|
-
cwd: string;
|
|
28
|
-
env: Record<string, string>;
|
|
29
|
-
bootId: string;
|
|
30
|
-
/** Omitted to reuse the artifacts already on disk. */
|
|
31
|
-
build?: () => Promise<string | null>;
|
|
32
|
-
readHealth?: (port: number, bootId: string, timeoutMs: number) => Promise<TargetHealthReading>;
|
|
33
|
-
spawn?: typeof nodeSpawn;
|
|
34
|
-
ddlWindowMs?: number;
|
|
35
|
-
readyWindowMs?: number;
|
|
36
|
-
readyPollMs?: number;
|
|
37
|
-
/** Whole-run cap, so a wedged boot cannot outlive the caller's deadline. */
|
|
38
|
-
timeoutMs?: number;
|
|
39
|
-
}
|
|
40
13
|
/**
|
|
41
14
|
* DELIBERATE DIFFERENCE from the publisher: no `resetSchema` step, and therefore no `schema`
|
|
42
15
|
* failure of its own.
|
|
@@ -49,18 +22,6 @@ export interface BootCheckDeps {
|
|
|
49
22
|
* simply leaves what it created behind, and the next run reconciles into it.
|
|
50
23
|
*/
|
|
51
24
|
export declare const runBootCheck: (deps: BootCheckDeps) => Promise<BootCheckReport>;
|
|
52
|
-
export interface BootCheckStatus {
|
|
53
|
-
running: boolean;
|
|
54
|
-
startedAt: number | null;
|
|
55
|
-
report: BootCheckReport | null;
|
|
56
|
-
}
|
|
57
|
-
export interface BootCheckJob {
|
|
58
|
-
/** Start a check, or join the one already running. `true` when this call started it. */
|
|
59
|
-
start: (run: () => Promise<BootCheckReport>) => boolean;
|
|
60
|
-
status: () => BootCheckStatus;
|
|
61
|
-
/** The running check, for the legacy blocking caller. */
|
|
62
|
-
pending: () => Promise<BootCheckReport> | null;
|
|
63
|
-
}
|
|
64
25
|
/**
|
|
65
26
|
* The job behind `BootCheck` / `BootCheckStatus`.
|
|
66
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-check.d.ts","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"boot-check.d.ts","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE9E;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,SAAgB,aAAa,KAAG,OAAO,CAAC,eAAe,CA6F/E,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,2BAA+B,YA2C7D,CAAA"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { spawn as nodeSpawn } from 'node:child_process';
|
|
2
2
|
import { readTargetHealth } from './health.js';
|
|
3
3
|
import { delay, killGroupAndWait, reclaimPort, waitForPortFree } from './spawn.js';
|
|
4
|
-
|
|
4
|
+
import { STARTUP_LOG_CAP, WATCHDOG_MS } from './consts.local.js';
|
|
5
|
+
/**
|
|
6
|
+
* Boot the generated backend for real, in isolation, and report what happened.
|
|
7
|
+
*
|
|
8
|
+
* `tsc` cannot see a foreign key that names a resource nothing registers: the reference is a
|
|
9
|
+
* string in an AJV schema, and it is resolved while the OwlMeans context initializes. So a story
|
|
10
|
+
* can type-check, be stamped complete, and leave a backend that dies at boot — which is exactly
|
|
11
|
+
* what happened, because the only real boot in the pipeline ran AFTER the story was accepted.
|
|
12
|
+
*
|
|
13
|
+
* It runs the real thing, but never the live one: a second process, on its own port, against a
|
|
14
|
+
* scratch schema, killed on every exit path.
|
|
15
|
+
*/
|
|
5
16
|
/**
|
|
6
17
|
* DELIBERATE DIFFERENCE from the publisher: no `resetSchema` step, and therefore no `schema`
|
|
7
18
|
* failure of its own.
|
|
@@ -99,14 +110,6 @@ export const runBootCheck = async (deps) => {
|
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
};
|
|
102
|
-
/**
|
|
103
|
-
* Outer bound on one boot-check job.
|
|
104
|
-
*
|
|
105
|
-
* `runBootCheck` caps its own ready poll but not the build in front of it, so this is the only
|
|
106
|
-
* thing that guarantees a poller eventually reads `running: false` — a check that outlives it is
|
|
107
|
-
* abandoned, not awaited.
|
|
108
|
-
*/
|
|
109
|
-
const WATCHDOG_MS = 600_000;
|
|
110
113
|
/**
|
|
111
114
|
* The job behind `BootCheck` / `BootCheckStatus`.
|
|
112
115
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-check.js","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"boot-check.js","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAqB,MAAM,oBAAoB,CAAA;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAClF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGhE;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,IAAmB,EAA4B,EAAE;IAClF,MAAM,EACJ,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EACrC,UAAU,GAAG,gBAAgB,EAC7B,KAAK,GAAG,SAAS,EACjB,WAAW,GAAG,MAAM,EACpB,aAAa,GAAG,MAAM,EACtB,WAAW,GAAG,KAAK,EACnB,SAAS,GAAG,OAAO,GACpB,GAAG,IAAI,CAAA;IAER,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAA;IACvC,IAAI,KAAK,GAAwB,IAAI,CAAA;IACrC,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,MAAM,MAAM,GAAG,CAAC,KAAa,EAAQ,EAAE;QACrC,GAAG,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,KAAK,CAA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