@cotal-ai/workspace 0.90.1 → 0.92.0
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/build/Release/win32-arm64/build.json +1 -1
- package/build/Release/win32-x64/build.json +2 -2
- package/build/Release/win32-x64/creation.node +0 -0
- package/dist/agent-secrets.d.ts +2 -2
- package/dist/agent-secrets.d.ts.map +1 -1
- package/dist/agent-secrets.js +2 -2
- package/dist/agent-secrets.js.map +1 -1
- package/dist/auth-paths.d.ts +8 -2
- package/dist/auth-paths.d.ts.map +1 -1
- package/dist/auth-paths.js +12 -5
- package/dist/auth-paths.js.map +1 -1
- package/dist/broker-display.d.ts +4 -0
- package/dist/broker-display.d.ts.map +1 -0
- package/dist/broker-display.js +29 -0
- package/dist/broker-display.js.map +1 -0
- package/dist/colors.d.ts +11 -4
- package/dist/colors.d.ts.map +1 -1
- package/dist/colors.js +36 -9
- package/dist/colors.js.map +1 -1
- package/dist/connect.d.ts +81 -10
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +195 -75
- package/dist/connect.js.map +1 -1
- package/dist/control-target.d.ts +2 -2
- package/dist/control-target.d.ts.map +1 -1
- package/dist/control-target.js +13 -5
- package/dist/control-target.js.map +1 -1
- package/dist/credential-actions.d.ts +91 -0
- package/dist/credential-actions.d.ts.map +1 -0
- package/dist/credential-actions.js +74 -0
- package/dist/credential-actions.js.map +1 -0
- package/dist/deprecated-daemon-entries.d.ts +30 -0
- package/dist/deprecated-daemon-entries.d.ts.map +1 -0
- package/dist/deprecated-daemon-entries.js +37 -0
- package/dist/deprecated-daemon-entries.js.map +1 -0
- package/dist/endpoint-actions.d.ts +31 -0
- package/dist/endpoint-actions.d.ts.map +1 -0
- package/dist/endpoint-actions.js +2 -0
- package/dist/endpoint-actions.js.map +1 -0
- package/dist/endpoint-caller.d.ts +74 -0
- package/dist/endpoint-caller.d.ts.map +1 -0
- package/dist/endpoint-caller.js +118 -0
- package/dist/endpoint-caller.js.map +1 -0
- package/dist/endpoint-contract.d.ts +32 -0
- package/dist/endpoint-contract.d.ts.map +1 -0
- package/dist/endpoint-contract.js +92 -0
- package/dist/endpoint-contract.js.map +1 -0
- package/dist/extension-mutation.d.ts.map +1 -1
- package/dist/extension-mutation.js +4 -1
- package/dist/extension-mutation.js.map +1 -1
- package/dist/extensions.d.ts +28 -8
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +20 -8
- package/dist/extensions.js.map +1 -1
- package/dist/flags.d.ts +8 -1
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +9 -7
- package/dist/flags.js.map +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/launch-persona.d.ts +10 -0
- package/dist/launch-persona.d.ts.map +1 -0
- package/dist/launch-persona.js +34 -0
- package/dist/launch-persona.js.map +1 -0
- package/dist/local-process.d.ts +60 -12
- package/dist/local-process.d.ts.map +1 -1
- package/dist/local-process.js +173 -4
- package/dist/local-process.js.map +1 -1
- package/dist/maintenance.d.ts +267 -4
- package/dist/maintenance.d.ts.map +1 -1
- package/dist/maintenance.js +666 -12
- package/dist/maintenance.js.map +1 -1
- package/dist/mesh-manifest-schema.d.ts +118 -0
- package/dist/mesh-manifest-schema.d.ts.map +1 -0
- package/dist/mesh-manifest-schema.js +96 -0
- package/dist/mesh-manifest-schema.js.map +1 -0
- package/dist/mesh-registry.d.ts +30 -0
- package/dist/mesh-registry.d.ts.map +1 -1
- package/dist/mesh-registry.js +74 -13
- package/dist/mesh-registry.js.map +1 -1
- package/dist/mesh-target.d.ts +15 -7
- package/dist/mesh-target.d.ts.map +1 -1
- package/dist/mesh-target.js +77 -26
- package/dist/mesh-target.js.map +1 -1
- package/dist/official-connectors.d.ts +13 -0
- package/dist/official-connectors.d.ts.map +1 -1
- package/dist/official-connectors.js +18 -2
- package/dist/official-connectors.js.map +1 -1
- package/dist/output.d.ts +147 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +186 -0
- package/dist/output.js.map +1 -0
- package/dist/pid.d.ts +5 -3
- package/dist/pid.d.ts.map +1 -1
- package/dist/pid.js +25 -13
- package/dist/pid.js.map +1 -1
- package/dist/preferences.d.ts +93 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +272 -0
- package/dist/preferences.js.map +1 -0
- package/dist/preflight.d.ts +3 -0
- package/dist/preflight.d.ts.map +1 -1
- package/dist/preflight.js +6 -3
- package/dist/preflight.js.map +1 -1
- package/dist/prepared-spaces.d.ts +27 -0
- package/dist/prepared-spaces.d.ts.map +1 -0
- package/dist/prepared-spaces.js +57 -0
- package/dist/prepared-spaces.js.map +1 -0
- package/dist/present.d.ts +108 -0
- package/dist/present.d.ts.map +1 -0
- package/dist/present.js +249 -0
- package/dist/present.js.map +1 -0
- package/dist/prompt-input.d.ts +12 -0
- package/dist/prompt-input.d.ts.map +1 -0
- package/dist/prompt-input.js +35 -0
- package/dist/prompt-input.js.map +1 -0
- package/dist/protected-records.d.ts +102 -0
- package/dist/protected-records.d.ts.map +1 -0
- package/dist/protected-records.js +465 -0
- package/dist/protected-records.js.map +1 -0
- package/dist/registration-policy.d.ts +4 -1
- package/dist/registration-policy.d.ts.map +1 -1
- package/dist/registration-policy.js +4 -3
- package/dist/registration-policy.js.map +1 -1
- package/dist/render.d.ts +8 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +49 -32
- package/dist/render.js.map +1 -1
- package/dist/renewal-path.d.ts +5 -0
- package/dist/renewal-path.d.ts.map +1 -0
- package/dist/renewal-path.js +9 -0
- package/dist/renewal-path.js.map +1 -0
- package/dist/renewal.d.ts +6 -9
- package/dist/renewal.d.ts.map +1 -1
- package/dist/renewal.js +7 -12
- package/dist/renewal.js.map +1 -1
- package/dist/service-adapter.d.ts +201 -0
- package/dist/service-adapter.d.ts.map +1 -0
- package/dist/service-adapter.js +294 -0
- package/dist/service-adapter.js.map +1 -0
- package/dist/service-custody.d.ts +5 -0
- package/dist/service-custody.d.ts.map +1 -0
- package/dist/service-custody.js +41 -0
- package/dist/service-custody.js.map +1 -0
- package/dist/service-definition.d.ts +52 -0
- package/dist/service-definition.d.ts.map +1 -0
- package/dist/service-definition.js +85 -0
- package/dist/service-definition.js.map +1 -0
- package/dist/service-definition.schema.json +79 -0
- package/dist/service-extension-metadata.d.ts +11 -0
- package/dist/service-extension-metadata.d.ts.map +1 -0
- package/dist/service-extension-metadata.js +66 -0
- package/dist/service-extension-metadata.js.map +1 -0
- package/dist/service-identity.d.ts +51 -0
- package/dist/service-identity.d.ts.map +1 -0
- package/dist/service-identity.js +103 -0
- package/dist/service-identity.js.map +1 -0
- package/dist/service-observation.d.ts +32 -0
- package/dist/service-observation.d.ts.map +1 -0
- package/dist/service-observation.js +134 -0
- package/dist/service-observation.js.map +1 -0
- package/dist/service-preset.d.ts +12 -0
- package/dist/service-preset.d.ts.map +1 -0
- package/dist/service-preset.js +10 -0
- package/dist/service-preset.js.map +1 -0
- package/dist/service-startup.d.ts +23 -0
- package/dist/service-startup.d.ts.map +1 -0
- package/dist/service-startup.js +39 -0
- package/dist/service-startup.js.map +1 -0
- package/dist/service-stop.d.ts +47 -0
- package/dist/service-stop.d.ts.map +1 -0
- package/dist/service-stop.js +152 -0
- package/dist/service-stop.js.map +1 -0
- package/dist/service-target.d.ts +5 -0
- package/dist/service-target.d.ts.map +1 -0
- package/dist/service-target.js +19 -0
- package/dist/service-target.js.map +1 -0
- package/dist/signer-export.d.ts +31 -0
- package/dist/signer-export.d.ts.map +1 -0
- package/dist/signer-export.js +114 -0
- package/dist/signer-export.js.map +1 -0
- package/dist/space-segmentation.d.ts +21 -7
- package/dist/space-segmentation.d.ts.map +1 -1
- package/dist/space-segmentation.js +26 -9
- package/dist/space-segmentation.js.map +1 -1
- package/dist/space.d.ts +5 -5
- package/dist/space.d.ts.map +1 -1
- package/dist/space.js +8 -6
- package/dist/space.js.map +1 -1
- package/dist/system-rotation.d.ts +4 -3
- package/dist/system-rotation.d.ts.map +1 -1
- package/dist/system-rotation.js +16 -6
- package/dist/system-rotation.js.map +1 -1
- package/dist/web-session.d.ts +7 -0
- package/dist/web-session.d.ts.map +1 -1
- package/dist/web-session.js +9 -0
- package/dist/web-session.js.map +1 -1
- package/package.json +6 -2
package/dist/render.js
CHANGED
|
@@ -1,98 +1,115 @@
|
|
|
1
|
+
import { brokerAddressForDisplay } from "./broker-display.js";
|
|
1
2
|
import { PREFLIGHT_CONFIRM_TIMEOUT_MS } from "./preflight.js";
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
const parts = (message, remedy) => (remedy === undefined ? { message } : { message, remedy });
|
|
4
|
+
/** A workspace failure as its message and remedy, for a caller that reports them apart, such as a
|
|
5
|
+
* structured command's `error.message` and `error.remedy`. */
|
|
6
|
+
export function workspaceErrorParts(e) {
|
|
4
7
|
switch (e.kind) {
|
|
5
8
|
case "target":
|
|
6
|
-
return
|
|
9
|
+
return targetErrorParts(e.error);
|
|
7
10
|
case "preflight":
|
|
8
|
-
return
|
|
11
|
+
return preflightFailureParts(e.failure, e.target, e.pruned);
|
|
9
12
|
case "reachable":
|
|
10
|
-
return
|
|
13
|
+
return reachableParts(e.reason, e.server, e.hasAuth);
|
|
11
14
|
}
|
|
12
15
|
}
|
|
16
|
+
/** Render a workspace failure as the canonical one-line `cotal …` sentence. */
|
|
17
|
+
export function renderWorkspaceError(e) {
|
|
18
|
+
const { message, remedy } = workspaceErrorParts(e);
|
|
19
|
+
return `✗ ${message}${remedy === undefined ? "" : ` - ${remedy}`}`;
|
|
20
|
+
}
|
|
13
21
|
/** "Which mesh" resolution failures — maps a {@link MeshTargetError}'s `{code, details}` to copy. */
|
|
14
|
-
function
|
|
22
|
+
function targetErrorParts(err) {
|
|
15
23
|
const d = err.details;
|
|
16
24
|
switch (err.code) {
|
|
17
25
|
case "no-meshes":
|
|
18
|
-
return "
|
|
26
|
+
return parts("no mesh running", "run `cotal up` in a project, or pass `--server`");
|
|
19
27
|
case "unknown-space":
|
|
20
|
-
return
|
|
28
|
+
return d.selected
|
|
29
|
+
? parts(`the selected space "${d.requested}" is not registered here`, "select one with `cotal use <name>` (`cotal space` lists them), or name one with `--space`")
|
|
30
|
+
: parts(`no space named "${d.requested}" is registered here`, "see `cotal space`");
|
|
21
31
|
case "ambiguous-target":
|
|
22
|
-
return
|
|
32
|
+
return parts(`multiple meshes running: ${(d.available ?? []).join(", ")}`, "pick one with `--space <name>` or set a default with `cotal use <name>`");
|
|
23
33
|
case "default-occupied":
|
|
24
|
-
return
|
|
34
|
+
return parts(`another mesh ("${d.space}") is running at ${brokerAddressForDisplay(d.server ?? "") ?? "an invalid broker address"}`, `run \`cotal up\` here to start yours, or \`--space ${d.space}\` to join it`);
|
|
25
35
|
case "stale-auth-root":
|
|
26
36
|
// An operator-registered entry is KEPT (only `cotal meshes rm` drops it), so the recovery
|
|
27
37
|
// there is to point it at the right root — never a claim that it was removed for you.
|
|
28
38
|
return d.removed === false
|
|
29
|
-
?
|
|
30
|
-
:
|
|
39
|
+
? parts(`registry entry "${d.space}" points at ${d.root}, whose auth is now for "${d.found}"`, `re-register it with \`cotal meshes add ${d.space} --server <url> --root <dir>\` (\`--force\` replaces), or \`cotal meshes rm ${d.space}\``)
|
|
40
|
+
: parts(`registry entry "${d.space}" points at ${d.root}, whose auth is now for "${d.found}"; stale entry removed`, "re-run `cotal up` or check `cotal meshes`");
|
|
31
41
|
case "unreadable-auth":
|
|
32
|
-
return
|
|
42
|
+
return parts(`space "${d.space}"'s trust material under ${d.root} will not load (${err.message})`, "repair or remove the account record, then re-run `cotal up`");
|
|
43
|
+
case "not-started":
|
|
44
|
+
// A prepared space names itself. A root whose stack journal recorded a broker names that broker.
|
|
45
|
+
return d.space === undefined
|
|
46
|
+
? parts(`the stack in ${d.root} recorded ${d.server === undefined ? "a broker" : `the broker ${brokerAddressForDisplay(d.server) ?? "at an invalid address"}`}, and no space is registered for it here`, `start it with \`cotal up\` in ${d.root}`)
|
|
47
|
+
: parts(`"${d.space}" is prepared but not started`, `start it with \`cotal up\` in ${d.root}`);
|
|
33
48
|
case "user-auth-unrecorded":
|
|
34
49
|
// U11: without a TRUSTED local record of the space's IdP there is no actionable
|
|
35
50
|
// `cotal login --idp <?>` line to print — the honest recovery is re-registering the mesh
|
|
36
51
|
// where its user-auth state lives, and remote discovery is explicitly not supported yet.
|
|
37
|
-
return
|
|
52
|
+
return parts(`space "${d.space}" requires user auth, but no trusted IdP config for it is registered on this machine`, `re-run \`cotal up --user-auth\` in ${d.root ?? "its broker root"} to re-register it (user-auth spaces are configured where their broker runs; remote discovery is not supported yet)`);
|
|
38
53
|
}
|
|
39
54
|
}
|
|
40
55
|
/** "Is it live" failures on a registry-resolved target — the classified preflight sentence. */
|
|
41
|
-
function
|
|
56
|
+
function preflightFailureParts(kind, t, pruned) {
|
|
57
|
+
const server = brokerAddressForDisplay(t.server) ?? "an invalid broker address";
|
|
42
58
|
switch (kind) {
|
|
43
59
|
case "unreachable":
|
|
44
60
|
// An operator-registered mesh usually runs on ANOTHER machine, so `cotal up` is the wrong
|
|
45
61
|
// remedy here — this machine can only wait for it or stop pointing at it.
|
|
46
62
|
if (t.origin === "manual" || t.origin === "catalog")
|
|
47
|
-
return
|
|
63
|
+
return parts(`no broker answered at ${server}; "${t.space}" is registered here but its mesh is not up`, `start it where it runs, or \`cotal meshes rm ${t.space}\` to unregister it`);
|
|
48
64
|
// An `up` / pre-origin record is KEPT on a liveness miss. Keep `no mesh running at`
|
|
49
65
|
// so existing attach/mint cells still recognise the classified refusal, and name
|
|
50
66
|
// the recorded root so the operator restarts THAT mesh, not a new one from cwd.
|
|
51
|
-
return
|
|
67
|
+
return parts(`no mesh running at ${server}; mesh "${t.space}" is recorded at ${t.root} but not running`, "run `cotal up` there to restart");
|
|
52
68
|
// The registry-mismatch pair, like `unreachable`, must not prescribe `cotal up` for a mesh this
|
|
53
69
|
// machine only registered: the repair there is the credentials under `--root`, or re-registering
|
|
54
70
|
// the entry — `cotal up` would start a DIFFERENT, local mesh under that name.
|
|
55
71
|
case "registry-creds-rejected":
|
|
56
72
|
return t.origin === "manual" || t.origin === "catalog"
|
|
57
|
-
?
|
|
58
|
-
:
|
|
73
|
+
? parts(`mesh "${t.space}" at ${server} rejected the credentials under ${t.root}`, `re-mint them where that mesh runs, or re-register it with \`cotal meshes add ${t.space} --server <url> --root <dir> --force\``)
|
|
74
|
+
: parts(`mesh "${t.space}" at ${server} no longer matches its registry entry (credentials rejected - port reused?)`, `re-run \`cotal up\` from ${t.root}, or \`cotal meshes\` to see what's live`);
|
|
59
75
|
case "registry-open-now-auth":
|
|
60
76
|
return t.origin === "manual" || t.origin === "catalog"
|
|
61
|
-
?
|
|
62
|
-
:
|
|
77
|
+
? parts(`"${t.space}" is registered as an open mesh, but the broker at ${server} requires auth`, `copy that mesh's account + creds under ${t.root} and re-register with \`cotal meshes add ${t.space} --server <url> --mode auth --force\``)
|
|
78
|
+
: parts(`open mesh "${t.space}" at ${server} no longer matches its registry entry (broker now requires auth - port reused?)`, `re-run \`cotal up\` from ${t.root}, or \`cotal meshes\` to see what's live`);
|
|
63
79
|
case "creds-rejected":
|
|
64
|
-
return
|
|
80
|
+
return parts(`credentials for "${t.space}" were rejected at ${server}; a different mesh may be running there`, "run `cotal meshes` to check, or `cotal up` here to start yours");
|
|
65
81
|
case "open-wants-auth":
|
|
66
|
-
return
|
|
82
|
+
return parts(`broker at ${server} requires auth, but this mesh is open (no trust material)`, "use `--space <name>` for an auth mesh, or run `cotal up` here without `--open`");
|
|
67
83
|
case "stale-auth":
|
|
68
|
-
return
|
|
84
|
+
return parts(`credentials for "${t.space}" have EXPIRED; this mesh enforces bounded credential lifetimes`, `run \`cotal doctor auth\` in ${t.root} for the diagnosis + exact repair (the mesh itself is up)`);
|
|
69
85
|
case "tls-trust":
|
|
70
86
|
// INFO advertised tls_required (shape evidence only — unauthenticated). Never claims removal
|
|
71
87
|
// or peer identity; conservatively keep the record and point at the trust-store repair.
|
|
72
|
-
return
|
|
88
|
+
return parts(`mesh "${t.space}" at ${server} requires TLS but this client could not complete the handshake (untrusted or missing CA?)`, "set `NODE_EXTRA_CA_CERTS` to the issuing CA for a private CA, or fix the trust store; a TLS-required NATS listener still greets there (INFO is unauthenticated — not mesh identity) so the registry entry was conservatively kept");
|
|
73
89
|
case "slow-link":
|
|
74
90
|
// No CA guidance here: the confirm probe never reached a conclusive answer, so there is no
|
|
75
91
|
// trust evidence to diagnose. The broker answered TCP; only the credentialed connect ran out
|
|
76
92
|
// of its budget.
|
|
77
|
-
return
|
|
93
|
+
return parts(`mesh "${t.space}" at ${server} answered TCP but the credentialed connect did not complete within ${PREFLIGHT_CONFIRM_TIMEOUT_MS / 1000}s; the registry entry was kept`, "retry, or raise the connect budget if this link is consistently slow");
|
|
78
94
|
}
|
|
79
95
|
}
|
|
80
96
|
/** Plain reachability for a RAW (off-registry) probe — the `--creds` / `--server`+unregistered-`--space`
|
|
81
97
|
* escape hatch, which never touches the registry (no prune, no stale-entry wording). */
|
|
82
|
-
function
|
|
98
|
+
function reachableParts(reason, rawServer, hasAuth) {
|
|
99
|
+
const server = brokerAddressForDisplay(rawServer) ?? "an invalid broker address";
|
|
83
100
|
if (reason === "stale-auth")
|
|
84
|
-
return
|
|
101
|
+
return parts(`credential EXPIRED at ${server}; bounded lifetime reached (credential death)`, "run `cotal doctor auth` where the mesh runs, or re-mint the credential");
|
|
85
102
|
if (reason === "unreachable")
|
|
86
|
-
return
|
|
103
|
+
return parts(`can't reach a broker at ${server}`, "is it running? (`cotal up`)");
|
|
87
104
|
if (reason === "timeout")
|
|
88
|
-
return
|
|
105
|
+
return parts(`the connect to ${server} did not complete within ${PREFLIGHT_CONFIRM_TIMEOUT_MS / 1000}s; the broker may just be slow to reach`, "retry, or raise the connect budget if this link is consistently slow");
|
|
89
106
|
// `auth-required` is two different user situations with two different repairs, and this path used
|
|
90
107
|
// to collapse them. The registry path never did: `classifyPreflightFailure` branches on the same
|
|
91
108
|
// bit into `creds-rejected` vs `open-wants-auth`. Told "credentials rejected" after sending NO
|
|
92
109
|
// credentials, a caller goes looking for what is wrong with creds they never had, when the actual
|
|
93
110
|
// next step is to obtain some.
|
|
94
111
|
return hasAuth
|
|
95
|
-
?
|
|
96
|
-
:
|
|
112
|
+
? parts(`credentials rejected at ${server}`, "check your creds, or the broker wants different auth")
|
|
113
|
+
: parts(`broker at ${server} requires auth, but no credentials were supplied`, "pass `--creds <file>`, or `cotal join` with a link/token");
|
|
97
114
|
}
|
|
98
115
|
//# sourceMappingURL=render.js.map
|
package/dist/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAwB9D,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,MAAe,EAAuB,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;AAEpI;+DAC+D;AAC/D,MAAM,UAAU,mBAAmB,CAAC,CAAiB;IACnD,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;QAC9D,KAAK,WAAW;YACd,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAA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,iGAAiG;IACjG,+FAA+F;IAC/F,kGAAkG;IAClG,+BAA+B;IAC/B,OAAO,OAAO;QACZ,CAAC,CAAC,KAAK,CAAC,2BAA2B,MAAM,EAAE,EAAE,sDAAsD,CAAC;QACpG,CAAC,CAAC,KAAK,CAAC,aAAa,MAAM,kDAAkD,EAAE,0DAA0D,CAAC,CAAC;AAC/I,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** `.cotal/renewal.<spaceKey>.json` — one renewal owner's current state per space. */
|
|
2
|
+
export declare const RENEWAL_RECORD_FILE = "renewal.{space}.json";
|
|
3
|
+
/** The path a renewal owner writes and a reader or per-space reaper addresses. */
|
|
4
|
+
export declare function renewalRecordPath(root: string, space: string): string;
|
|
5
|
+
//# sourceMappingURL=renewal-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renewal-path.d.ts","sourceRoot":"","sources":["../src/renewal-path.ts"],"names":[],"mappings":"AAGA,sFAAsF;AACtF,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAErE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { spaceKey } from "./auth-paths.js";
|
|
3
|
+
/** `.cotal/renewal.<spaceKey>.json` — one renewal owner's current state per space. */
|
|
4
|
+
export const RENEWAL_RECORD_FILE = "renewal.{space}.json";
|
|
5
|
+
/** The path a renewal owner writes and a reader or per-space reaper addresses. */
|
|
6
|
+
export function renewalRecordPath(root, space) {
|
|
7
|
+
return join(root, ".cotal", RENEWAL_RECORD_FILE.replaceAll("{space}", spaceKey(space)));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=renewal-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renewal-path.js","sourceRoot":"","sources":["../src/renewal-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,sFAAsF;AACtF,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAE1D,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,KAAa;IAC3D,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,mBAAmB,CAAC,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
package/dist/renewal.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Profile, type SecretStore } from "@cotal-ai/core";
|
|
2
|
+
import { RENEWAL_RECORD_FILE, renewalRecordPath } from "./renewal-path.js";
|
|
2
3
|
/**
|
|
3
4
|
* D5 slice 5 class-2 standing renewal — the RENEWAL OWNER'S half, shared by the manager (the
|
|
4
5
|
* resident owner in every mesh mode) and `cotal doctor auth --fix` (the operator repair). The
|
|
@@ -99,19 +100,15 @@ export interface RenewalRecord {
|
|
|
99
100
|
authority?: "lease" | "offline";
|
|
100
101
|
}
|
|
101
102
|
/** `.cotal/renewal.<spaceKey>.json` — the renewal record's filename, PER-SPACE. The `{space}` is
|
|
102
|
-
* expanded with the same injective hex
|
|
103
|
+
* expanded with the same injective hex `spaceKey` the pidfiles use (`manager.<space>.pid`,
|
|
103
104
|
* `delivery.<space>.pid` via `canonicalLocalProcessPath`), because the record is per-tenant in
|
|
104
105
|
* meaning exactly as they are: a root-scoped `renewal.json` gave one root one adoption verdict by
|
|
105
106
|
* filename, so a second space's clean pass overwrote the first space's refusal and every reader
|
|
106
|
-
* (`doctor auth`, `status --components`) then answered about the wrong renewal (#1850).
|
|
107
|
-
export declare const RENEWAL_RECORD_FILE = "renewal.{space}.json";
|
|
108
|
-
/** The path a renewal owner WRITES and a reader READS for one space's record (#1850).
|
|
107
|
+
* (`doctor auth`, `status --components`) then answered about the wrong renewal (#1850).
|
|
109
108
|
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
* {@link legacyRenewalRecord} and removed by `cotal clean`, not adopted. */
|
|
114
|
-
export declare function renewalRecordPath(root: string, space: string): string;
|
|
109
|
+
* Defined with {@link renewalRecordPath} in `renewal-path.ts`, the dependency-neutral layout module
|
|
110
|
+
* shared with the per-space reaper. */
|
|
111
|
+
export { RENEWAL_RECORD_FILE, renewalRecordPath };
|
|
115
112
|
/** The root-scoped name a pre-per-space build wrote the record under — the one place that history is
|
|
116
113
|
* spelled. A READER fact only (see {@link renewalRecordPath}); `cotal clean` removes it with the
|
|
117
114
|
* rest of a reset. */
|
package/dist/renewal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renewal.d.ts","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"renewal.d.ts","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3E;;;;;;;GAOG;AAEH;;;;;;;;;;kFAUkF;AAClF,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB,CAGA,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B;;;;+DAI2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,+FAA+F;IA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G,IAAI,CAM3F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAQxF"}
|
package/dist/renewal.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { credsClaims, credsFingerprint, identityFromCreds, mintCreds, writeSecretFile, } from "@cotal-ai/core";
|
|
4
|
-
import { getSpaceAuth
|
|
4
|
+
import { getSpaceAuth } from "./auth-paths.js";
|
|
5
|
+
import { RENEWAL_RECORD_FILE, renewalRecordPath } from "./renewal-path.js";
|
|
5
6
|
import { workspaceSecretStore } from "./secret-store-fs.js";
|
|
6
7
|
import { DELIVERY_CREDS_KIND, MEMBERSHIP_RW_CREDS_KIND, segmentedKey } from "./space-segmentation.js";
|
|
7
8
|
/**
|
|
@@ -125,21 +126,15 @@ export async function remintDaemonCreds(root, expectedSpace, store, opts) {
|
|
|
125
126
|
return results;
|
|
126
127
|
}
|
|
127
128
|
/** `.cotal/renewal.<spaceKey>.json` — the renewal record's filename, PER-SPACE. The `{space}` is
|
|
128
|
-
* expanded with the same injective hex
|
|
129
|
+
* expanded with the same injective hex `spaceKey` the pidfiles use (`manager.<space>.pid`,
|
|
129
130
|
* `delivery.<space>.pid` via `canonicalLocalProcessPath`), because the record is per-tenant in
|
|
130
131
|
* meaning exactly as they are: a root-scoped `renewal.json` gave one root one adoption verdict by
|
|
131
132
|
* filename, so a second space's clean pass overwrote the first space's refusal and every reader
|
|
132
|
-
* (`doctor auth`, `status --components`) then answered about the wrong renewal (#1850).
|
|
133
|
-
export const RENEWAL_RECORD_FILE = "renewal.{space}.json";
|
|
134
|
-
/** The path a renewal owner WRITES and a reader READS for one space's record (#1850).
|
|
133
|
+
* (`doctor auth`, `status --components`) then answered about the wrong renewal (#1850).
|
|
135
134
|
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
* {@link legacyRenewalRecord} and removed by `cotal clean`, not adopted. */
|
|
140
|
-
export function renewalRecordPath(root, space) {
|
|
141
|
-
return join(root, ".cotal", RENEWAL_RECORD_FILE.replaceAll("{space}", spaceKey(space)));
|
|
142
|
-
}
|
|
135
|
+
* Defined with {@link renewalRecordPath} in `renewal-path.ts`, the dependency-neutral layout module
|
|
136
|
+
* shared with the per-space reaper. */
|
|
137
|
+
export { RENEWAL_RECORD_FILE, renewalRecordPath };
|
|
143
138
|
/** The root-scoped name a pre-per-space build wrote the record under — the one place that history is
|
|
144
139
|
* spelled. A READER fact only (see {@link renewalRecordPath}); `cotal clean` removes it with the
|
|
145
140
|
* rest of a reset. */
|
package/dist/renewal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renewal.js","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"renewal.js","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,oBAAoB,E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EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACtH,eAAe,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,KAAa;IAC3D,MAAM,CAAC,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACrC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAkB,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC,CAAC,qEAAqE;IACzF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { ControllerStackView } from "./maintenance.js";
|
|
2
|
+
import type { ProcessIdentityRecord } from "./pid.js";
|
|
3
|
+
import { type ServiceDefinitionInput } from "./service-definition.js";
|
|
4
|
+
/** Workstation ABI only. A declaration grants no native endpoint or OS process authority. */
|
|
5
|
+
export interface ServiceAdapterDeclaration {
|
|
6
|
+
readonly abiVersion: 1;
|
|
7
|
+
readonly requiresCli?: true;
|
|
8
|
+
readonly optionsSchema: Readonly<Record<string, unknown>>;
|
|
9
|
+
/** Top-level string options that reference local paths, never file contents. */
|
|
10
|
+
readonly paths?: Readonly<Record<string, "file" | "directory" | "private-file">>;
|
|
11
|
+
readonly capabilities: {
|
|
12
|
+
readonly multiInstance: boolean;
|
|
13
|
+
readonly foreground: boolean;
|
|
14
|
+
readonly logs: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** `listener` is a launch-bound listener report from the exact pinned child, never endpoint serving. */
|
|
17
|
+
readonly readiness: "process" | "endpoint" | "listener";
|
|
18
|
+
/** Native stop hooks own their reservation, impact recheck and request-bound terminal evidence.
|
|
19
|
+
* `kernel-exit` stops only the exact pinned child and records the observed kernel exit; it has no
|
|
20
|
+
* native acknowledgement, endpoint identity or cleanup proof. */
|
|
21
|
+
readonly stop?: "native" | "kernel-exit";
|
|
22
|
+
}
|
|
23
|
+
export interface ServiceAdapterContext {
|
|
24
|
+
readonly space: string;
|
|
25
|
+
readonly definition: string;
|
|
26
|
+
readonly definitionRevision: string;
|
|
27
|
+
readonly instanceId: string;
|
|
28
|
+
readonly launchRequestId: string;
|
|
29
|
+
readonly stateDirectory: string;
|
|
30
|
+
readonly cliInvocation?: readonly string[];
|
|
31
|
+
readonly options: Readonly<Record<string, unknown>>;
|
|
32
|
+
readonly credentialRef?: ServiceDefinitionInput["credentialRef"];
|
|
33
|
+
/** The definition's environment references by name, child variable to controller variable. No
|
|
34
|
+
* value is passed; an adapter reads this to refuse a child environment it cannot check against. */
|
|
35
|
+
readonly envRefs?: ServiceDefinitionInput["envRefs"];
|
|
36
|
+
/** Launch-only inputs bound to one maintenance attempt. Never part of a saved definition, an
|
|
37
|
+
* instance record or a receipt; only the controller's resume passes it, and each adapter accepts
|
|
38
|
+
* only its own closed fields (see {@link serviceAdapterAttempt}). */
|
|
39
|
+
readonly attempt?: ServiceAdapterAttempt;
|
|
40
|
+
/** Launch-only facts of the root's controller stack journal, passed to a manager-service launch
|
|
41
|
+
* while that root holds a maintenance journal. The adapter compares them through
|
|
42
|
+
* `admittedControllerRestore`; they grant nothing by themselves and are never saved. */
|
|
43
|
+
readonly stack?: ControllerStackView;
|
|
44
|
+
}
|
|
45
|
+
/** A resume attempt's per-launch inputs. `resumeCommit` names a protected handoff file by path and
|
|
46
|
+
* digest; the token bytes never travel here. */
|
|
47
|
+
export interface ServiceAdapterAttempt {
|
|
48
|
+
readonly kind: "maintenance-resume";
|
|
49
|
+
readonly attemptId: string;
|
|
50
|
+
readonly serverName?: string;
|
|
51
|
+
readonly resumeCommit?: {
|
|
52
|
+
readonly path: string;
|
|
53
|
+
readonly sha256: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** A plan is returned only on an explicit start, before the controller launches its direct child.
|
|
57
|
+
* Providers must not launch processes, mint credentials or start dependencies while planning. */
|
|
58
|
+
export interface ServiceAdapterLaunch {
|
|
59
|
+
readonly executable: string;
|
|
60
|
+
readonly args: readonly string[];
|
|
61
|
+
readonly cwd: string;
|
|
62
|
+
}
|
|
63
|
+
/** A listener the exact pinned child reported for its own launch. It is not endpoint, trust or
|
|
64
|
+
* storage readiness, and a port answer alone never produces it. */
|
|
65
|
+
export interface ServiceAdapterListenerReport {
|
|
66
|
+
readonly kind: "nats-ports-file";
|
|
67
|
+
readonly nats: readonly string[];
|
|
68
|
+
}
|
|
69
|
+
export type ServiceAdapterReadiness = {
|
|
70
|
+
readonly state: "pending";
|
|
71
|
+
} | {
|
|
72
|
+
readonly state: "ready";
|
|
73
|
+
readonly process: ProcessIdentityRecord;
|
|
74
|
+
readonly observedAt: string;
|
|
75
|
+
readonly native?: {
|
|
76
|
+
readonly endpoint: string;
|
|
77
|
+
readonly instanceId: string;
|
|
78
|
+
readonly owner: string;
|
|
79
|
+
readonly actor: string;
|
|
80
|
+
readonly lifecycleUid: string;
|
|
81
|
+
readonly epoch: number;
|
|
82
|
+
};
|
|
83
|
+
/** Present only with `native`: the coordinates are the pinned child's own request-bound local
|
|
84
|
+
* receipt, not an attributed endpoint response. */
|
|
85
|
+
readonly evidence?: ServiceAdapterNativeEvidence;
|
|
86
|
+
readonly listener?: ServiceAdapterListenerReport;
|
|
87
|
+
};
|
|
88
|
+
export type ServiceAdapterNativeEvidence = "local-process-receipt";
|
|
89
|
+
export interface ServiceAdapterStopPlan {
|
|
90
|
+
readonly scopeSha256: string;
|
|
91
|
+
readonly observedAt: string;
|
|
92
|
+
readonly withAgents: boolean;
|
|
93
|
+
readonly native: NonNullable<Extract<ServiceAdapterReadiness, {
|
|
94
|
+
state: "ready";
|
|
95
|
+
}>["native"]>;
|
|
96
|
+
readonly evidence?: ServiceAdapterNativeEvidence;
|
|
97
|
+
readonly subjects: readonly {
|
|
98
|
+
readonly name: string;
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly lifecycleUid: string;
|
|
101
|
+
readonly action: "stop" | "release-custody" | "stop-retaining-state";
|
|
102
|
+
}[];
|
|
103
|
+
/** A preserved-exit preview only, with `withAgents: false`: the scope binds this attempt and
|
|
104
|
+
* inventory digest. */
|
|
105
|
+
readonly preserved?: ServiceAdapterPreservedStop;
|
|
106
|
+
}
|
|
107
|
+
export interface ServiceAdapterPreservedStop {
|
|
108
|
+
readonly attemptId: string;
|
|
109
|
+
readonly inventorySha256: string;
|
|
110
|
+
}
|
|
111
|
+
export type ServiceAdapterStopContext = ServiceAdapterContext & {
|
|
112
|
+
readonly process: ProcessIdentityRecord;
|
|
113
|
+
readonly withAgents: boolean;
|
|
114
|
+
readonly signal: AbortSignal;
|
|
115
|
+
/** Present only for a preserved-exit stop. An adapter that does not declare it must refuse. */
|
|
116
|
+
readonly preserved?: ServiceAdapterPreservedStop;
|
|
117
|
+
};
|
|
118
|
+
export interface ServiceAdapterStopResult {
|
|
119
|
+
readonly requestId: string;
|
|
120
|
+
readonly scopeSha256: string;
|
|
121
|
+
readonly process: ProcessIdentityRecord;
|
|
122
|
+
/** `preserved-exit-returned` only answers a preserved request; the caller checks that pairing. */
|
|
123
|
+
readonly nativeStop: "returned" | "preserved-exit-returned";
|
|
124
|
+
readonly cleanup: "not-checked";
|
|
125
|
+
readonly observedAt: string;
|
|
126
|
+
}
|
|
127
|
+
/** The exact local broker configuration a kernel-exit stop is bound to. It names no mesh endpoint,
|
|
128
|
+
* principal or epoch, because a broker process has none. */
|
|
129
|
+
export interface ServiceAdapterBrokerBinding {
|
|
130
|
+
readonly kind: "nats-broker";
|
|
131
|
+
readonly root: string;
|
|
132
|
+
readonly space: string;
|
|
133
|
+
readonly server: string;
|
|
134
|
+
readonly configSha256: string;
|
|
135
|
+
}
|
|
136
|
+
/** Closed kernel-exit preview. Observation data only: it reserves nothing and grants no signal. */
|
|
137
|
+
export interface ServiceAdapterKernelStopPlan {
|
|
138
|
+
readonly kind: "kernel-exit";
|
|
139
|
+
readonly scopeSha256: string;
|
|
140
|
+
readonly observedAt: string;
|
|
141
|
+
readonly binding: ServiceAdapterBrokerBinding;
|
|
142
|
+
}
|
|
143
|
+
/** The observed exit of the exact pinned process after this request's signal. A removed ports file
|
|
144
|
+
* is the broker's own shutdown trace for that launch, not an acknowledgement or cleanup proof. */
|
|
145
|
+
export interface ServiceAdapterKernelStopResult {
|
|
146
|
+
readonly kind: "kernel-exit";
|
|
147
|
+
readonly requestId: string;
|
|
148
|
+
readonly scopeSha256: string;
|
|
149
|
+
readonly process: ProcessIdentityRecord;
|
|
150
|
+
readonly observation: "exact-process-exit";
|
|
151
|
+
readonly brokerShutdownTrace: "ports-file-removed" | "ports-file-retained";
|
|
152
|
+
readonly cleanup: "not-checked";
|
|
153
|
+
readonly observedAt: string;
|
|
154
|
+
}
|
|
155
|
+
export type ServiceAdapterKernelStopContext = ServiceAdapterContext & {
|
|
156
|
+
readonly process: ProcessIdentityRecord;
|
|
157
|
+
readonly signal: AbortSignal;
|
|
158
|
+
};
|
|
159
|
+
export interface ServiceAdapterHooks {
|
|
160
|
+
/** Kernel-exit stop scope: the exact binding and every dependant guard, rechecked at effect. */
|
|
161
|
+
readonly prepareKernelStop?: (context: ServiceAdapterKernelStopContext) => Promise<ServiceAdapterKernelStopPlan>;
|
|
162
|
+
/** After the exact process exit, report only the broker's own launch-bound shutdown trace. */
|
|
163
|
+
readonly observeKernelStop?: (context: ServiceAdapterContext & {
|
|
164
|
+
readonly process: ProcessIdentityRecord;
|
|
165
|
+
}) => "ports-file-removed" | "ports-file-retained";
|
|
166
|
+
readonly prepareServiceStop?: (context: ServiceAdapterStopContext) => Promise<ServiceAdapterStopPlan>;
|
|
167
|
+
readonly stopService?: (context: ServiceAdapterStopContext & {
|
|
168
|
+
readonly requestId: string;
|
|
169
|
+
readonly plan: ServiceAdapterStopPlan;
|
|
170
|
+
}) => Promise<ServiceAdapterStopResult>;
|
|
171
|
+
readonly buildServiceLaunch?: (context: ServiceAdapterContext) => ServiceAdapterLaunch | Promise<ServiceAdapterLaunch>;
|
|
172
|
+
readonly checkServiceReadiness?: (context: ServiceAdapterContext & {
|
|
173
|
+
readonly process: ProcessIdentityRecord;
|
|
174
|
+
readonly signal: AbortSignal;
|
|
175
|
+
}) => Promise<ServiceAdapterReadiness>;
|
|
176
|
+
}
|
|
177
|
+
/** Closed reader for a launch attempt, with the fields one adapter role may receive. Any other key
|
|
178
|
+
* refuses. Messages name fields, never values, because `resumeCommit` points at a secret file. */
|
|
179
|
+
export declare function serviceAdapterAttempt(input: unknown, allowed: readonly ("serverName" | "resumeCommit")[]): ServiceAdapterAttempt;
|
|
180
|
+
/** Finite JSON and sorted keys give cached declarations a stable fingerprint, not a signature. */
|
|
181
|
+
export declare function serviceMetadataDigest(value: unknown): string;
|
|
182
|
+
/** A deliberately closed, bounded JSON Schema subset. No references, regexes, formats, executable
|
|
183
|
+
* keywords, schema fetching, coercion, defaults or removal of unknown options are admitted. */
|
|
184
|
+
export declare function serviceAdapterDeclaration(input: unknown): ServiceAdapterDeclaration;
|
|
185
|
+
export declare function validateServiceAdapterOptions(declaration: ServiceAdapterDeclaration, options: Readonly<Record<string, unknown>>): void;
|
|
186
|
+
/** Public readiness evidence is closed and bound to a creation-pinned process. The installed
|
|
187
|
+
* adapter must itself correlate the native instance/lifecycle using its supported authority. */
|
|
188
|
+
export declare function serviceAdapterReadiness(input: unknown): ServiceAdapterReadiness;
|
|
189
|
+
/** Reference protection is checked without reading file contents or importing provider code. A
|
|
190
|
+
* refusal names the option, the path that failed and what that path's metadata shows. */
|
|
191
|
+
export declare function validateServiceAdapterPaths(declaration: ServiceAdapterDeclaration, options: Readonly<Record<string, unknown>>): void;
|
|
192
|
+
/** Full controller-assigned IDs only. These are local operation coordinates, not wire grants. */
|
|
193
|
+
export declare function serviceOperationId(value: unknown): string;
|
|
194
|
+
/** Closed public stop preview. It is observation data, never a reservation or native grant. */
|
|
195
|
+
export declare function serviceAdapterStopPlan(input: unknown, process: ProcessIdentityRecord): ServiceAdapterStopPlan;
|
|
196
|
+
/** Closed kernel-exit preview. A broker binding carries no fabricated endpoint identity. */
|
|
197
|
+
export declare function serviceAdapterKernelStopPlan(input: unknown): ServiceAdapterKernelStopPlan;
|
|
198
|
+
/** Closed kernel-exit receipt: observed exact process exit, never a broker acknowledgement. */
|
|
199
|
+
export declare function serviceAdapterKernelStopResult(input: unknown): ServiceAdapterKernelStopResult;
|
|
200
|
+
export declare function serviceAdapterStopResult(input: unknown): ServiceAdapterStopResult;
|
|
201
|
+
//# sourceMappingURL=service-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-adapter.d.ts","sourceRoot":"","sources":["../src/service-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAI3F,6FAA6F;AAC7F,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1D,gFAAgF;IAChF,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,cAAc,CAA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