@rosthq/cli 0.7.155 → 0.7.157
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 +14 -7
- package/dist/acting-principal.d.ts +82 -0
- package/dist/acting-principal.d.ts.map +1 -0
- package/dist/acting-principal.test.d.ts +2 -0
- package/dist/acting-principal.test.d.ts.map +1 -0
- package/dist/commands/implementation-access.d.ts +2 -0
- package/dist/commands/implementation-access.d.ts.map +1 -1
- package/dist/commands/onboarding-preflight.d.ts +86 -0
- package/dist/commands/onboarding-preflight.d.ts.map +1 -0
- package/dist/commands/onboarding-preflight.test.d.ts +2 -0
- package/dist/commands/onboarding-preflight.test.d.ts.map +1 -0
- package/dist/commands/onboarding.d.ts +9 -3
- package/dist/commands/onboarding.d.ts.map +1 -1
- package/dist/implementation-bootstrap.d.ts +20 -3
- package/dist/implementation-bootstrap.d.ts.map +1 -1
- package/dist/implementation-credential-store.d.ts +18 -0
- package/dist/implementation-credential-store.d.ts.map +1 -1
- package/dist/implementation-run-tombstone.d.ts +31 -0
- package/dist/implementation-run-tombstone.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1501 -496
- package/dist/index.js.map +4 -4
- package/dist/runner-serve.d.ts +7 -0
- package/dist/runner-serve.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,11 +96,18 @@ rost onboard status
|
|
|
96
96
|
rost onboard resume
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Every tenant-scoped `rost onboard` verb (and `rost seat create-complete`)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
Every tenant-scoped `rost onboard` verb (and `rost seat create-complete`) uses
|
|
100
|
+
an existing implementation-bootstrap credential first. An absent credential
|
|
101
|
+
leaves the ordinary owner-session path available; an expired, unreadable, or
|
|
102
|
+
refused credential stops the command without retrying under another principal.
|
|
103
|
+
Human decision commands are terminal in headless runs and remain available to
|
|
104
|
+
an explicit interactive TTY owner. This includes the registry's
|
|
105
|
+
`human_required` commands, all four `credential_flow` commands
|
|
106
|
+
(`agent.configure_tools`, `credential.ingress`, `integration.connect_rest`, and
|
|
107
|
+
`tenant.anthropic_key.save`), and the none-class human decisions for
|
|
108
|
+
escalations, onboarding path selection, task proposals, Signal readings, error
|
|
109
|
+
logs, and confirmation approve/reject/remint. (`rost onboard run` prints the
|
|
110
|
+
public onboarding prompt offline and needs no credential.)
|
|
104
111
|
|
|
105
112
|
Retain each allowed local business source before constructing the setup plan.
|
|
106
113
|
The CLI reads the file and base64-encodes it client-side; the server computes
|
|
@@ -210,6 +217,6 @@ rost implementation access install-mcp --client codex
|
|
|
210
217
|
rost implementation access install-mcp --client cursor
|
|
211
218
|
```
|
|
212
219
|
|
|
213
|
-
The implementation credential is intentionally narrow and
|
|
220
|
+
The implementation credential is intentionally narrow and explicitly classified. It can run vetted reads (for example `onboarding.status`, `graph.get`, `charter.get/list`, `compass.get_current`, `goal.list`, `agent.list_fleet`, `system.health`), stage human-gated proposals (`onboarding.setup`, `onboarding.activate`, `seat.create_complete`, `agent.create_custom`, `agent.create_from_template`, `compass.set`, `compass.approve_version`, `onboarding.finish`, `agent.run_now`), execute only the receipt-bound sandbox exception `onboarding.rehearse`, and close its own run. `seat.create_complete` stages one atomic complete-Seat proposal for an owner to approve; it never makes an optional agent live. `onboarding.activate` stages the one post-rehearsal owner decision and cannot approve itself. `agent.run_now` stages one manual production run at a time, bounded to agents this same implementation run's own setup receipt created and re-checked when the approved run dispatches; it arms no schedule. The rehearsal exception grants no general agent execution authority and cannot reach unrelated agents. Everything outside the explicit class map, including other confirmation-free durable mutations and `confirmation.approve`, stays outside the bounded principal. The policy module is `packages/commands/src/implementation-bootstrap-policy.ts` and is enforced by both the runtime guard and a CI drift test.
|
|
214
221
|
|
|
215
|
-
With
|
|
222
|
+
With an implementation credential present, the CLI runs every classified command over that credential — on `rost command <id> --json '<body>'` and on the ergonomic verbs that resolve to a classified command (`rost graph show`, `rost seat list`, `rost agent list-fleet`, `rost agent templates`, `rost goal list`, `rost system health`, `rost skills list`, `rost skills catalog`, `rost charter list`, `rost charter get`, `rost compass get-current`) — even when a user session also exists. An expired, unreadable, unauthenticated, or refused implementation credential is terminal for that invocation; the CLI never silently replays the classified command as the owner. The complete human-only floor — `human_required`, `credential_flow`, and the explicit none-class decisions for escalations, onboarding path selection, task proposals, Signal readings, error logs, confirmation approve/reject/remint/dismiss/dismiss_stale/activation_set.list, `agent_grant_intervention.resume`, and `coach.draft_guide` — stops in a headless session while an explicit interactive TTY remains the deliberate owner path. A successful `implementation_access.complete` or `.abandon` clears the bearer and writes a local closed-run tombstone so headless bootstrap commands refuse owner fallthrough until a new `implementation access start`. Note that a Markdown-rendering `show` verb resolves to a `*.show_markdown` command outside the bounded surface (so `rost compass show` remains session-only; use `rost compass get-current`), and `rost agent fleet-digest` is likewise outside it (use `rost agent list-fleet`).
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ACTING_PRINCIPAL_KINDS: readonly ["none", "unknown", "user_session", "implementation_bootstrap"];
|
|
3
|
+
export declare const actingPrincipalSchema: z.ZodObject<{
|
|
4
|
+
kind: z.ZodEnum<{
|
|
5
|
+
none: "none";
|
|
6
|
+
unknown: "unknown";
|
|
7
|
+
user_session: "user_session";
|
|
8
|
+
implementation_bootstrap: "implementation_bootstrap";
|
|
9
|
+
}>;
|
|
10
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
11
|
+
email: z.ZodNullable<z.ZodString>;
|
|
12
|
+
tenant_id: z.ZodNullable<z.ZodString>;
|
|
13
|
+
tenant_name: z.ZodNullable<z.ZodString>;
|
|
14
|
+
role: z.ZodNullable<z.ZodString>;
|
|
15
|
+
source: z.ZodNullable<z.ZodString>;
|
|
16
|
+
principal_switch: z.ZodNullable<z.ZodString>;
|
|
17
|
+
note: z.ZodNullable<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export type ActingPrincipal = z.infer<typeof actingPrincipalSchema>;
|
|
20
|
+
/** The canonical `none` projection — no credential resolved at all. */
|
|
21
|
+
export declare function noneActingPrincipal(note?: string): ActingPrincipal;
|
|
22
|
+
/**
|
|
23
|
+
* Decode the self-describing identity claims out of a session's own JWT. This
|
|
24
|
+
* is a LOCAL read of a token the CLI already holds — never a network call and
|
|
25
|
+
* never a signature check (the server re-authenticates every request). It is
|
|
26
|
+
* used only to render whose authority a command acts under, so every failure
|
|
27
|
+
* mode resolves to nulls rather than throwing: a non-JWT test token, a token
|
|
28
|
+
* with no email claim, or malformed base64 all yield an unresolved identity,
|
|
29
|
+
* which the projection reports as `user_session` with a null email — never a
|
|
30
|
+
* fabricated one.
|
|
31
|
+
*/
|
|
32
|
+
export declare function decodeSessionIdentity(accessToken: string | undefined): {
|
|
33
|
+
email: string | null;
|
|
34
|
+
tenantId: string | null;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Project the acting principal for a resolved user session. `accessToken` is
|
|
38
|
+
* the session's JWT (decoded locally for the email/tenant); `source` is the
|
|
39
|
+
* token store's describe() string. Identity that does not decode stays null —
|
|
40
|
+
* the projection is `user_session` with a null email, distinct from `none`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function userSessionActingPrincipal(params: {
|
|
43
|
+
accessToken: string | undefined;
|
|
44
|
+
source: string | null;
|
|
45
|
+
tenantName?: string | null;
|
|
46
|
+
}): ActingPrincipal;
|
|
47
|
+
/**
|
|
48
|
+
* Project the acting principal for the bounded implementation-run credential.
|
|
49
|
+
* The tenant id and run id are proven facts carried on the credential itself;
|
|
50
|
+
* `source` is the credential store's describe() string. `otherCredential`,
|
|
51
|
+
* when set, records that a competing credential (typically the caller's own
|
|
52
|
+
* logged-in user session) was also available and this bounded principal was
|
|
53
|
+
* selected over it — the explicit switch note the dual-credential control
|
|
54
|
+
* requires.
|
|
55
|
+
*/
|
|
56
|
+
export declare function implementationActingPrincipal(params: {
|
|
57
|
+
tenantId: string;
|
|
58
|
+
implementationRunId: string;
|
|
59
|
+
source: string | null;
|
|
60
|
+
otherCredential?: string | null;
|
|
61
|
+
}): ActingPrincipal;
|
|
62
|
+
/**
|
|
63
|
+
* The one-line human header rendered BEFORE a command's payload. It states
|
|
64
|
+
* whose authority the command acts under and never renders an unproven
|
|
65
|
+
* identity as a proven one: `none`/`unknown` say exactly that, and a user
|
|
66
|
+
* session whose JWT did not decode reports the credential without inventing an
|
|
67
|
+
* email.
|
|
68
|
+
*/
|
|
69
|
+
export declare function renderActingPrincipalHeader(principal: ActingPrincipal): string;
|
|
70
|
+
/**
|
|
71
|
+
* The stable --json envelope: the acting principal alongside the command's own
|
|
72
|
+
* result. Chosen over sibling-key injection because most --json command
|
|
73
|
+
* outputs are opaque to the CLI (it never inspects their shape), so a
|
|
74
|
+
* top-level envelope cannot collide with a result field and is uniform across
|
|
75
|
+
* every command. Documented in the PR so downstream consumers read
|
|
76
|
+
* `.output` for the former raw result.
|
|
77
|
+
*/
|
|
78
|
+
export declare function actingPrincipalEnvelope(principal: ActingPrincipal, output: unknown): {
|
|
79
|
+
acting_principal: ActingPrincipal;
|
|
80
|
+
output: unknown;
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=acting-principal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acting-principal.d.ts","sourceRoot":"","sources":["../src/acting-principal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,sBAAsB,0EAKzB,CAAC;AAEX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;kBAuBvB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAcpE,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,eAAe,CAElE;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAgCnD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IACjD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,GAAG,eAAe,CAalB;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,GAAG,eAAe,CAclB;AAYD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAoB9E;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,eAAe,EAC1B,MAAM,EAAE,OAAO,GACd;IAAE,gBAAgB,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAExD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acting-principal.test.d.ts","sourceRoot":"","sources":["../src/acting-principal.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CommandClient } from "../command-client.js";
|
|
2
2
|
import { pollDeviceAuthorizationHandoff } from "../device-auth.js";
|
|
3
3
|
import { type ImplementationCredentialStore } from "../implementation-credential-store.js";
|
|
4
|
+
import { type ImplementationRunTombstoneStore } from "../implementation-run-tombstone.js";
|
|
4
5
|
export type ImplementationAccessAction = "start" | "status" | "complete" | "abandon";
|
|
5
6
|
type CliIo = {
|
|
6
7
|
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
@@ -9,6 +10,7 @@ type CliIo = {
|
|
|
9
10
|
export type ImplementationAccessDeps = {
|
|
10
11
|
appUrl: string;
|
|
11
12
|
createImplementationStore(): ImplementationCredentialStore;
|
|
13
|
+
createTombstoneStore?(): ImplementationRunTombstoneStore;
|
|
12
14
|
pollDeviceAuthorizationHandoff: typeof pollDeviceAuthorizationHandoff;
|
|
13
15
|
CommandClient: typeof CommandClient;
|
|
14
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation-access.d.ts","sourceRoot":"","sources":["../../src/commands/implementation-access.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"implementation-access.d.ts","sourceRoot":"","sources":["../../src/commands/implementation-access.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EACL,8BAA8B,EAI/B,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,oCAAoC,CAAC;AAe5C,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAErF,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB,IAAI,6BAA6B,CAAC;IAC3D,oBAAoB,CAAC,IAAI,+BAA+B,CAAC;IACzD,8BAA8B,EAAE,OAAO,8BAA8B,CAAC;IACtE,aAAa,EAAE,OAAO,aAAa,CAAC;CACrC,CAAC;AAEF,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM;CAI5B;AAKD,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,KAAK,EACT,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,MAAM,CAAC,CA2DjB;AA0JD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEtD;AAiID,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,CAOxF"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type ActingPrincipal } from "../acting-principal.js";
|
|
3
|
+
type CliIo = {
|
|
4
|
+
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
5
|
+
stderr: Pick<NodeJS.WriteStream, "write">;
|
|
6
|
+
};
|
|
7
|
+
export type PreflightCheckStatus = "pass" | "fail" | "unknown";
|
|
8
|
+
export declare const preflightCheckSchema: z.ZodObject<{
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
status: z.ZodEnum<{
|
|
11
|
+
unknown: "unknown";
|
|
12
|
+
pass: "pass";
|
|
13
|
+
fail: "fail";
|
|
14
|
+
}>;
|
|
15
|
+
detail: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export declare const preflightResultSchema: z.ZodObject<{
|
|
18
|
+
ok: z.ZodBoolean;
|
|
19
|
+
acting_principal: z.ZodObject<{
|
|
20
|
+
kind: z.ZodEnum<{
|
|
21
|
+
none: "none";
|
|
22
|
+
unknown: "unknown";
|
|
23
|
+
user_session: "user_session";
|
|
24
|
+
implementation_bootstrap: "implementation_bootstrap";
|
|
25
|
+
}>;
|
|
26
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
27
|
+
email: z.ZodNullable<z.ZodString>;
|
|
28
|
+
tenant_id: z.ZodNullable<z.ZodString>;
|
|
29
|
+
tenant_name: z.ZodNullable<z.ZodString>;
|
|
30
|
+
role: z.ZodNullable<z.ZodString>;
|
|
31
|
+
source: z.ZodNullable<z.ZodString>;
|
|
32
|
+
principal_switch: z.ZodNullable<z.ZodString>;
|
|
33
|
+
note: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
status: z.ZodEnum<{
|
|
38
|
+
unknown: "unknown";
|
|
39
|
+
pass: "pass";
|
|
40
|
+
fail: "fail";
|
|
41
|
+
}>;
|
|
42
|
+
detail: z.ZodString;
|
|
43
|
+
}, z.core.$strict>>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export type PreflightCheck = z.infer<typeof preflightCheckSchema>;
|
|
46
|
+
export type PreflightResult = z.infer<typeof preflightResultSchema>;
|
|
47
|
+
/**
|
|
48
|
+
* The implementation-credential fact the preflight reports. `present` carries
|
|
49
|
+
* the expiry decision and the store the credential was read from (`stored_in`);
|
|
50
|
+
* `error` is a store read failure (never proof of absence).
|
|
51
|
+
*/
|
|
52
|
+
export type PreflightImplementationCredential = {
|
|
53
|
+
kind: "present";
|
|
54
|
+
expired: boolean;
|
|
55
|
+
storedIn: string;
|
|
56
|
+
} | {
|
|
57
|
+
kind: "absent";
|
|
58
|
+
} | {
|
|
59
|
+
kind: "error";
|
|
60
|
+
detail: string;
|
|
61
|
+
};
|
|
62
|
+
export type PreflightDeps = {
|
|
63
|
+
json: boolean;
|
|
64
|
+
principal: ActingPrincipal;
|
|
65
|
+
sessionRefreshError: string | null;
|
|
66
|
+
implementationCredential: PreflightImplementationCredential;
|
|
67
|
+
cliVersion: string | null;
|
|
68
|
+
fetchLatestVersion: () => Promise<string | null>;
|
|
69
|
+
probeDeployment: () => Promise<{
|
|
70
|
+
ok: boolean;
|
|
71
|
+
status: number | null;
|
|
72
|
+
detail: string;
|
|
73
|
+
}>;
|
|
74
|
+
readOnboardingState: (() => Promise<{
|
|
75
|
+
ok: boolean;
|
|
76
|
+
alreadyOnboarded: boolean;
|
|
77
|
+
detail: string;
|
|
78
|
+
}>) | null;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Run the preflight and render it. Returns 0 only when EVERY check passed; any
|
|
82
|
+
* `fail` or `unknown` returns 1 (unproven is not green).
|
|
83
|
+
*/
|
|
84
|
+
export declare function runOnboardingPreflight(io: CliIo, deps: PreflightDeps): Promise<number>;
|
|
85
|
+
export {};
|
|
86
|
+
//# sourceMappingURL=onboarding-preflight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding-preflight.d.ts","sourceRoot":"","sources":["../../src/commands/onboarding-preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAEhC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC3C,CAAC;AASF,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/D,eAAO,MAAM,oBAAoB;;;;;;;;kBAMtB,CAAC;AAEZ,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMvB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GACzC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,OAAO,CAAC;IAEd,SAAS,EAAE,eAAe,CAAC;IAO3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,wBAAwB,EAAE,iCAAiC,CAAC;IAE5D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,kBAAkB,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAIjD,eAAe,EAAE,MAAM,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAIvF,mBAAmB,EACf,CAAC,MAAM,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,gBAAgB,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,GAC3E,IAAI,CAAC;CACV,CAAC;AAgIF;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding-preflight.test.d.ts","sourceRoot":"","sources":["../../src/commands/onboarding-preflight.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommandClient } from "../command-client.js";
|
|
2
|
+
import { type ActingPrincipal } from "../acting-principal.js";
|
|
2
3
|
type CliIo = {
|
|
3
4
|
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
4
5
|
stderr: Pick<NodeJS.WriteStream, "write">;
|
|
@@ -6,6 +7,7 @@ type CliIo = {
|
|
|
6
7
|
export type OnboardingDeps = {
|
|
7
8
|
makeClient(): Promise<CommandClient>;
|
|
8
9
|
readFile?: (path: string) => Promise<Buffer>;
|
|
10
|
+
actingPrincipal?: ActingPrincipal;
|
|
9
11
|
};
|
|
10
12
|
/**
|
|
11
13
|
* The largest source file this invocation can actually send: the smallest of the
|
|
@@ -44,12 +46,16 @@ export declare function runOnboarding(args: string[], io: CliIo, deps: Onboardin
|
|
|
44
46
|
* the user-session path (runOnboarding) and the implementation-credential path
|
|
45
47
|
* in index.ts, so both credentials get identical bodies and rendering.
|
|
46
48
|
*
|
|
47
|
-
* `onError` lets the implementation-credential caller intercept
|
|
48
|
-
*
|
|
49
|
+
* `onError` lets the implementation-credential caller intercept credential or
|
|
50
|
+
* policy errors before shared rendering; the caller handles an intercepted
|
|
51
|
+
* outcome as terminal rather than retrying under an owner session.
|
|
49
52
|
*/
|
|
50
|
-
export declare function executeOnboardingInvocation(invocation: OnboardingInvocation, io: CliIo, client: CommandClient
|
|
53
|
+
export declare function executeOnboardingInvocation(invocation: OnboardingInvocation, io: CliIo, client: CommandClient, options?: {
|
|
54
|
+
actingPrincipal?: ActingPrincipal;
|
|
55
|
+
}): Promise<number>;
|
|
51
56
|
export declare function executeOnboardingInvocation(invocation: OnboardingInvocation, io: CliIo, client: CommandClient, options: {
|
|
52
57
|
onError: (error: unknown) => "handled" | "print";
|
|
58
|
+
actingPrincipal?: ActingPrincipal;
|
|
53
59
|
}): Promise<number | "fall-through">;
|
|
54
60
|
/**
|
|
55
61
|
* Resolve the local file reads a parsed invocation deferred: the source bytes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/commands/onboarding.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAsB,MA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aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBpG;AAED;;;;;;;;GAQG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,oBAAoB,EAChC,EAAE,EAAE,KAAK,EACT,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,eAAe,CAAA;CAAE,GAC9C,OAAO,CAAC,MAAM,CAAC,CAAC;AACnB,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,oBAAoB,EAChC,EAAE,EAAE,KAAK,EACT,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE;IAAE,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,SAAS,GAAG,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,eAAe,CAAA;CAAE,GAC/F,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;AAiDpC;;;;;GAKG;AACH,wBAAsB,gCAAgC,CACpD,UAAU,EAAE,oBAAoB,EAChC,YAAY,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAY,GACzD,OAAO,CAAC,IAAI,CAAC,CAqEf;AAgDD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,oBAAoB,CA+G9E;AA2FD,wBAAgB,eAAe,IAAI,MAAM,CAWxC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,OAAO,GACd,MAAM,CAoBR"}
|
|
@@ -2,13 +2,20 @@ import { CommandClient, type CommandClientOptions } from "./command-client.js";
|
|
|
2
2
|
import type { ManifestBootstrapClass } from "./generator/manifest-types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The implementation-bootstrap class for a command id, as bundled in this CLI
|
|
5
|
-
* build.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* build. The manifest carries the positive class projection; an id outside that
|
|
6
|
+
* projection is not available to this principal (and is returned as `deny` for
|
|
7
|
+
* the instance gate). This projection is a local emission boundary only. The
|
|
8
|
+
* server's registry policy remains the authority, so a stale projection may be
|
|
9
|
+
* narrower or broader than the server's current view, but it cannot authorize a
|
|
10
|
+
* request the server rejects.
|
|
8
11
|
*/
|
|
9
12
|
export declare function resolveImplementationBootstrapClass(commandId: string): ManifestBootstrapClass;
|
|
10
13
|
/** Every command id this CLI build will send over the implementation credential, sorted. */
|
|
11
14
|
export declare function implementationBootstrapCommandIds(): string[];
|
|
15
|
+
/** Whether the production registry marks this id as a human-decision command. */
|
|
16
|
+
export declare function isHumanDecisionCommand(commandId: string): boolean;
|
|
17
|
+
/** Treat malformed or equal-to-now expiries as unusable before any network send. */
|
|
18
|
+
export declare function isImplementationCredentialExpired(expiresAt: string, now?: Date): boolean;
|
|
12
19
|
/**
|
|
13
20
|
* Raised INSTEAD of sending a deny-class command over the implementation
|
|
14
21
|
* credential. It carries the command id and nothing else — never the token, the
|
|
@@ -18,6 +25,16 @@ export declare class ImplementationBootstrapDeniedError extends Error {
|
|
|
18
25
|
readonly commandId: string;
|
|
19
26
|
constructor(commandId: string);
|
|
20
27
|
}
|
|
28
|
+
/** A stable operator message for a credential that cannot be retried as owner. */
|
|
29
|
+
export declare function implementationCredentialExpiredMessage(hasUserSession: boolean): string;
|
|
30
|
+
/** Refuse a noninteractive human-decision command while a bounded run is active. */
|
|
31
|
+
export declare function implementationHumanDecisionMessage(commandId: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* A server response means the bearer is unusable only for authentication
|
|
34
|
+
* failures. Authorization/policy refusals are not liveness signals and must not
|
|
35
|
+
* trigger a more-privileged owner retry.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isImplementationCredentialUnusable(error: unknown): boolean;
|
|
21
38
|
/**
|
|
22
39
|
* Build the implementation-bootstrap `CommandClient` — the ONLY sanctioned way to
|
|
23
40
|
* construct one — with the class gate installed on the instance's `execute`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation-bootstrap.d.ts","sourceRoot":"","sources":["../src/implementation-bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implementation-bootstrap.d.ts","sourceRoot":"","sources":["../src/implementation-bootstrap.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,aAAa,EAAsB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEnG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AA0D5E;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,CAE7F;AAED,4FAA4F;AAC5F,wBAAgB,iCAAiC,IAAI,MAAM,EAAE,CAE5D;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED,oFAAoF;AACpF,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAa,GAAG,OAAO,CAG9F;AAED;;;;GAIG;AACH,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,SAAS,EAAE,MAAM;CAK9B;AAED,kFAAkF;AAClF,wBAAgB,sCAAsC,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,CAStF;AAED,oFAAoF;AACpF,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM5E;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQ1E;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mCAAmC,CACjD,iBAAiB,EAAE,OAAO,aAAa,EACvC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,GACpD,aAAa,CAUf"}
|
|
@@ -15,6 +15,24 @@ export type ImplementationCredentialStore = {
|
|
|
15
15
|
clear(): Promise<void>;
|
|
16
16
|
describe(): string;
|
|
17
17
|
};
|
|
18
|
+
export type ImplementationCredentialStoreBackend = "macOS Keychain" | "owner-only file store" | "Windows Credential Manager" | "Secret Service";
|
|
19
|
+
/**
|
|
20
|
+
* No supported implementation-credential backend is configured for this
|
|
21
|
+
* platform. This is a genuine absence (there is nowhere a credential could
|
|
22
|
+
* be stored), unlike a failure after a backend has been selected.
|
|
23
|
+
*/
|
|
24
|
+
export declare class ImplementationCredentialStoreUnavailableError extends Error {
|
|
25
|
+
constructor(message?: string);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A backend was reached but could not produce a trustworthy credential result.
|
|
29
|
+
* The message intentionally carries only the backend class — never the
|
|
30
|
+
* subprocess error, stdout, stderr, credential path, or token material.
|
|
31
|
+
*/
|
|
32
|
+
export declare class ImplementationCredentialStoreReadError extends Error {
|
|
33
|
+
readonly backend: ImplementationCredentialStoreBackend;
|
|
34
|
+
constructor(backend: ImplementationCredentialStoreBackend);
|
|
35
|
+
}
|
|
18
36
|
export declare class ImplementationFileTokenStore implements ImplementationCredentialStore {
|
|
19
37
|
private readonly filePath;
|
|
20
38
|
constructor(filePath?: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation-credential-store.d.ts","sourceRoot":"","sources":["../src/implementation-credential-store.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAUL,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAC;AAO1B,QAAA,MAAM,uCAAuC;;;;;;;kBAOlC,CAAC;AAEZ,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,IAAI,OAAO,CAAC,iCAAiC,GAAG,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AAC;IAezD,KAAK,CAAC,UAAU,EAAE,iCAAiC,GAAG,OAAO,CAAC,IAAI,CAAC;IAOnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,IAAI,MAAM;YAIJ,cAAc;CAI7B;AAaD,MAAM,MAAM,0CAA0C,GAAG;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAgB,mCAAmC,CACjD,OAAO,GAAE,0CAA+C,GACvD,6BAA6B,CAmC/B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Durable local marker that a bounded implementation run closed and cleared its credential. */
|
|
3
|
+
export declare const implementationRunTombstoneSchema: z.ZodObject<{
|
|
4
|
+
tenant_id: z.ZodString;
|
|
5
|
+
implementation_run_id: z.ZodString;
|
|
6
|
+
status: z.ZodEnum<{
|
|
7
|
+
completed: "completed";
|
|
8
|
+
abandoned: "abandoned";
|
|
9
|
+
}>;
|
|
10
|
+
closed_at: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type ImplementationRunTombstone = z.infer<typeof implementationRunTombstoneSchema>;
|
|
13
|
+
export type ImplementationRunTombstoneStore = {
|
|
14
|
+
read(): Promise<ImplementationRunTombstone | null>;
|
|
15
|
+
write(tombstone: ImplementationRunTombstone): Promise<void>;
|
|
16
|
+
clear(): Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export declare class ImplementationRunTombstoneFileStore implements ImplementationRunTombstoneStore {
|
|
19
|
+
private readonly filePath;
|
|
20
|
+
constructor(filePath?: string);
|
|
21
|
+
read(): Promise<ImplementationRunTombstone | null>;
|
|
22
|
+
write(tombstone: ImplementationRunTombstone): Promise<void>;
|
|
23
|
+
clear(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export type CreateImplementationRunTombstoneStoreOptions = {
|
|
26
|
+
env?: NodeJS.ProcessEnv;
|
|
27
|
+
};
|
|
28
|
+
export declare function createImplementationRunTombstoneStore(options?: CreateImplementationRunTombstoneStoreOptions): ImplementationRunTombstoneStore;
|
|
29
|
+
export declare function implementationRunClosedMessage(tombstone: ImplementationRunTombstone, hasUserSession: boolean): string;
|
|
30
|
+
export declare function recordImplementationRunClosed(store: ImplementationRunTombstoneStore, status: ImplementationRunTombstone["status"], fields: Pick<ImplementationRunTombstone, "tenant_id" | "implementation_run_id">, closedAt?: Date): Promise<void>;
|
|
31
|
+
//# sourceMappingURL=implementation-run-tombstone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementation-run-tombstone.d.ts","sourceRoot":"","sources":["../src/implementation-run-tombstone.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,gGAAgG;AAChG,eAAO,MAAM,gCAAgC;;;;;;;;kBAKlC,CAAC;AAEZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,IAAI,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAC;IACnD,KAAK,CAAC,SAAS,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAcF,qBAAa,mCAAoC,YAAW,+BAA+B;IAC7E,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,SAAyB;IAExD,IAAI,IAAI,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAelD,KAAK,CAAC,SAAS,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B;AAED,MAAM,MAAM,4CAA4C,GAAG;IACzD,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,OAAO,GAAE,4CAAiD,GACzD,+BAA+B,CAOjC;AAED,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,0BAA0B,EACrC,cAAc,EAAE,OAAO,GACtB,MAAM,CAUR;AAED,wBAAsB,6BAA6B,CACjD,KAAK,EAAE,+BAA+B,EACtC,MAAM,EAAE,0BAA0B,CAAC,QAAQ,CAAC,EAC5C,MAAM,EAAE,IAAI,CAAC,0BAA0B,EAAE,WAAW,GAAG,uBAAuB,CAAC,EAC/E,QAAQ,OAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,15 @@ import { CommandClient } from "./command-client.js";
|
|
|
3
3
|
import { loginWithBrowser, refreshCliSessionIfNeeded } from "./auth.js";
|
|
4
4
|
import { loginWithDeviceCode } from "./device-auth.js";
|
|
5
5
|
import { type TokenStore } from "./token-store.js";
|
|
6
|
+
import { type ImplementationCredentialStore } from "./implementation-credential-store.js";
|
|
7
|
+
import { type ImplementationRunTombstoneStore } from "./implementation-run-tombstone.js";
|
|
6
8
|
type CliIo = {
|
|
7
9
|
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
8
10
|
stderr: Pick<NodeJS.WriteStream, "write">;
|
|
9
11
|
interactive?: boolean;
|
|
10
12
|
confirm?: (question: string) => Promise<boolean>;
|
|
11
13
|
};
|
|
14
|
+
type ImplementationCredentialStoreFactory = () => ImplementationCredentialStore;
|
|
12
15
|
export declare function createConfirmPrompt(input: NodeJS.ReadableStream, output: NodeJS.WritableStream): (question: string) => Promise<boolean>;
|
|
13
16
|
type MainOptions = {
|
|
14
17
|
store?: TokenStore;
|
|
@@ -17,6 +20,8 @@ type MainOptions = {
|
|
|
17
20
|
deviceLogin?: typeof loginWithDeviceCode;
|
|
18
21
|
refreshSession?: typeof refreshCliSessionIfNeeded;
|
|
19
22
|
commandClient?: typeof CommandClient;
|
|
23
|
+
implementationCredentialStore?: ImplementationCredentialStoreFactory;
|
|
24
|
+
implementationRunTombstoneStore?: () => ImplementationRunTombstoneStore;
|
|
20
25
|
};
|
|
21
26
|
export declare function main(argv?: string[], options?: MainOptions): Promise<number>;
|
|
22
27
|
export declare function isCliEntrypoint(moduleUrl: string, argvPath: string | undefined): boolean;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,aAAa,EAAsB,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAoB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,aAAa,EAAsB,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAoB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,CAAC;AAW9C,OAAO,EAKL,KAAK,+BAA+B,EACrC,MAAM,mCAAmC,CAAC;AAoD3C,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;I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