@rosthq/cli 0.7.157 → 0.7.158
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/dist/acting-principal.d.ts +1 -1
- package/dist/acting-principal.d.ts.map +1 -1
- package/dist/commands/auth-device-status.d.ts +13 -0
- package/dist/commands/auth-device-status.d.ts.map +1 -0
- package/dist/commands/implementation-access.d.ts.map +1 -1
- package/dist/commands/onboarding-preflight.d.ts +1 -1
- package/dist/device-auth.d.ts +5 -1
- package/dist/device-auth.d.ts.map +1 -1
- package/dist/device-exchange-store.d.ts +49 -0
- package/dist/device-exchange-store.d.ts.map +1 -0
- package/dist/generated/command-discovery.d.ts.map +1 -1
- package/dist/generated/command-manifest.d.ts.map +1 -1
- package/dist/implementation-bootstrap.d.ts +42 -1
- package/dist/implementation-bootstrap.d.ts.map +1 -1
- package/dist/implementation-credential-store.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1799 -1026
- package/dist/index.js.map +4 -4
- package/dist/signup.d.ts +33 -9
- package/dist/signup.d.ts.map +1 -1
- package/dist/skill-trust.d.ts +1 -1
- package/dist/token-store.d.ts +19 -0
- package/dist/token-store.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const ACTING_PRINCIPAL_KINDS: readonly ["none", "unknown", "user_session", "implementation_bootstrap"];
|
|
3
3
|
export declare const actingPrincipalSchema: z.ZodObject<{
|
|
4
4
|
kind: z.ZodEnum<{
|
|
5
|
-
none: "none";
|
|
6
5
|
unknown: "unknown";
|
|
6
|
+
none: "none";
|
|
7
7
|
user_session: "user_session";
|
|
8
8
|
implementation_bootstrap: "implementation_bootstrap";
|
|
9
9
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acting-principal.d.ts","sourceRoot":"","sources":["../src/acting-principal.ts"],"names":[],"mappings":"AAAA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C1B,MAAM,EAAE,OAAO,GACd;IAAE,gBAAgB,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAExD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DeviceExchangeStore } from "../device-exchange-store.js";
|
|
2
|
+
type CliIo = {
|
|
3
|
+
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
4
|
+
stderr: Pick<NodeJS.WriteStream, "write">;
|
|
5
|
+
};
|
|
6
|
+
export type AuthDeviceStatusDeps = {
|
|
7
|
+
createDeviceExchangeStore(): DeviceExchangeStore;
|
|
8
|
+
now?: () => number;
|
|
9
|
+
};
|
|
10
|
+
export declare function defaultAuthDeviceStatusDeps(): AuthDeviceStatusDeps;
|
|
11
|
+
export declare function runAuthDeviceStatus(args: string[], io: CliIo, deps: AuthDeviceStatusDeps): Promise<number>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=auth-device-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-device-status.d.ts","sourceRoot":"","sources":["../../src/commands/auth-device-status.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,6BAA6B,CAAC;AAUrC,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,oBAAoB,GAAG;IACjC,yBAAyB,IAAI,mBAAmB,CAAC;IACjD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,oBAAoB,CAElE;AAMD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,KAAK,EACT,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,MAAM,CAAC,CAiEjB"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA2B5C,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;AAmMD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEtD;AA4JD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,CAOxF"}
|
|
@@ -18,8 +18,8 @@ export declare const preflightResultSchema: z.ZodObject<{
|
|
|
18
18
|
ok: z.ZodBoolean;
|
|
19
19
|
acting_principal: z.ZodObject<{
|
|
20
20
|
kind: z.ZodEnum<{
|
|
21
|
-
none: "none";
|
|
22
21
|
unknown: "unknown";
|
|
22
|
+
none: "none";
|
|
23
23
|
user_session: "user_session";
|
|
24
24
|
implementation_bootstrap: "implementation_bootstrap";
|
|
25
25
|
}>;
|
package/dist/device-auth.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { CliConfig } from "./config.js";
|
|
3
|
+
import type { DeviceExchangeStore } from "./device-exchange-store.js";
|
|
3
4
|
import type { CliSession } from "./token-store.js";
|
|
4
5
|
type CliIo = {
|
|
5
6
|
stdout: Pick<NodeJS.WriteStream, "write">;
|
|
@@ -14,6 +15,7 @@ export type DeviceLoginDeps = {
|
|
|
14
15
|
type: string;
|
|
15
16
|
}) => Promise<CliSession>;
|
|
16
17
|
now?: () => number;
|
|
18
|
+
deviceExchangeStore?: DeviceExchangeStore;
|
|
17
19
|
};
|
|
18
20
|
declare const startResponseSchema: z.ZodObject<{
|
|
19
21
|
device_code: z.ZodString;
|
|
@@ -37,7 +39,9 @@ export type ApprovedPoll = z.infer<typeof approvedPollResponseSchema>;
|
|
|
37
39
|
export declare class DeviceLoginError extends Error {
|
|
38
40
|
constructor(message: string);
|
|
39
41
|
}
|
|
40
|
-
export declare function loginWithDeviceCode(config: CliConfig, io: CliIo, deps?: DeviceLoginDeps
|
|
42
|
+
export declare function loginWithDeviceCode(config: CliConfig, io: CliIo, deps?: DeviceLoginDeps, options?: {
|
|
43
|
+
pairingCode?: string;
|
|
44
|
+
}): Promise<CliSession>;
|
|
41
45
|
export declare function pollDeviceAuthorizationHandoff<TApproved>(config: CliConfig, io: CliIo, options: {
|
|
42
46
|
purpose?: "user_session" | "implementation_bootstrap" | "operator_grant";
|
|
43
47
|
sourceClient?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-auth.d.ts","sourceRoot":"","sources":["../src/device-auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"device-auth.d.ts","sourceRoot":"","sources":["../src/device-auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAcnD,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;AAGF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAGhD,SAAS,C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,iBAAiB,CAAC;IACjE,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,EACD,IAAI,EAAE,eAAe,EACrB,WAAW,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,SAAS,GAAG,IAAI,GACxD,OAAO,CAAC,SAAS,CAAC,CAsKpB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type ExecFile } from "./token-store.js";
|
|
3
|
+
declare const pendingDeviceExchangeSchema: z.ZodObject<{
|
|
4
|
+
purpose: z.ZodEnum<{
|
|
5
|
+
user_session: "user_session";
|
|
6
|
+
implementation_bootstrap: "implementation_bootstrap";
|
|
7
|
+
operator_grant: "operator_grant";
|
|
8
|
+
}>;
|
|
9
|
+
device_code: z.ZodString;
|
|
10
|
+
user_code: z.ZodString;
|
|
11
|
+
verification_uri: z.ZodString;
|
|
12
|
+
verification_uri_complete: z.ZodOptional<z.ZodString>;
|
|
13
|
+
expires_at: z.ZodString;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
export type PendingDeviceExchange = z.infer<typeof pendingDeviceExchangeSchema>;
|
|
16
|
+
export type DeviceExchangeStore = {
|
|
17
|
+
read(): Promise<PendingDeviceExchange | null>;
|
|
18
|
+
write(exchange: PendingDeviceExchange): Promise<void>;
|
|
19
|
+
clear(): Promise<void>;
|
|
20
|
+
describe(): string;
|
|
21
|
+
};
|
|
22
|
+
export type DeviceExchangeStoreBackend = "macOS Keychain" | "owner-only file store" | "Windows Credential Manager" | "Secret Service";
|
|
23
|
+
/**
|
|
24
|
+
* A backend was reached but could not produce a trustworthy read result. The
|
|
25
|
+
* message intentionally carries only the backend class — never the subprocess
|
|
26
|
+
* error, stdout, stderr, file path, device code, or user code.
|
|
27
|
+
*/
|
|
28
|
+
export declare class DeviceExchangeStoreReadError extends Error {
|
|
29
|
+
readonly backend: DeviceExchangeStoreBackend;
|
|
30
|
+
constructor(backend: DeviceExchangeStoreBackend);
|
|
31
|
+
}
|
|
32
|
+
export declare class DeviceExchangeFileStore implements DeviceExchangeStore {
|
|
33
|
+
private readonly filePath;
|
|
34
|
+
constructor(filePath?: string);
|
|
35
|
+
read(): Promise<PendingDeviceExchange | null>;
|
|
36
|
+
write(exchange: PendingDeviceExchange): Promise<void>;
|
|
37
|
+
clear(): Promise<void>;
|
|
38
|
+
describe(): string;
|
|
39
|
+
private chmodOwnerOnly;
|
|
40
|
+
}
|
|
41
|
+
export type CreateDeviceExchangeStoreOptions = {
|
|
42
|
+
platform?: NodeJS.Platform;
|
|
43
|
+
env?: NodeJS.ProcessEnv;
|
|
44
|
+
execFile?: ExecFile;
|
|
45
|
+
stderr?: Pick<NodeJS.WriteStream, "write">;
|
|
46
|
+
};
|
|
47
|
+
export declare function createDeviceExchangeStore(options?: CreateDeviceExchangeStoreOptions): DeviceExchangeStore;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=device-exchange-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-exchange-store.d.ts","sourceRoot":"","sources":["../src/device-exchange-store.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAWL,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAC;AA6B1B,QAAA,MAAM,2BAA2B;;;;;;;;;;;kBAOtB,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,IAAI,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IAC9C,KAAK,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,IAAI,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAClC,gBAAgB,GAChB,uBAAuB,GACvB,4BAA4B,GAC5B,gBAAgB,CAAC;AAErB;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAC;gBAEjC,OAAO,EAAE,0BAA0B;CAKhD;AA4VD,qBAAa,uBAAwB,YAAW,mBAAmB;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,SAAwB;IAEvD,IAAI,IAAI,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAe7C,KAAK,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,IAAI,MAAM;YAIJ,cAAc;CAI7B;AAaD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,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,yBAAyB,CACvC,OAAO,GAAE,gCAAqC,GAC7C,mBAAmB,CAyBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-discovery.d.ts","sourceRoot":"","sources":["../../src/generated/command-discovery.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,eAAO,MAAM,iBAAiB,EAAE,SAAS,qBAAqB,
|
|
1
|
+
{"version":3,"file":"command-discovery.d.ts","sourceRoot":"","sources":["../../src/generated/command-discovery.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,eAAO,MAAM,iBAAiB,EAAE,SAAS,qBAAqB,EAwS7D,CAAC;AAKF,eAAO,MAAM,sBAAsB,EAAE,iBACq56F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/command-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,gBAAgB,EAAE,SAAS,oBAAoB,
|
|
1
|
+
{"version":3,"file":"command-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/command-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,gBAAgB,EAAE,SAAS,oBAAoB,EA0S3D,CAAC"}
|
|
@@ -14,6 +14,20 @@ export declare function resolveImplementationBootstrapClass(commandId: string):
|
|
|
14
14
|
export declare function implementationBootstrapCommandIds(): string[];
|
|
15
15
|
/** Whether the production registry marks this id as a human-decision command. */
|
|
16
16
|
export declare function isHumanDecisionCommand(commandId: string): boolean;
|
|
17
|
+
/** Whether this id names a registered command at all (as opposed to a typo). */
|
|
18
|
+
export declare function isKnownCommandId(commandId: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* DER-3255 (correctness review F4): a MISTYPED command id under a live bounded
|
|
21
|
+
* credential must not be described as an authority refusal.
|
|
22
|
+
*
|
|
23
|
+
* The class map fails closed, so an unknown id resolves to `deny` exactly like a
|
|
24
|
+
* real deny-class command — and the route-unavailable message would then tell an
|
|
25
|
+
* operator that `onboarding.attach_referenc` "is not available to the
|
|
26
|
+
* implementation credential", which reads as a permissions problem and sends
|
|
27
|
+
* them to re-mint or end their run over a missing character. Same fail-closed
|
|
28
|
+
* outcome, truthful reason.
|
|
29
|
+
*/
|
|
30
|
+
export declare function unknownCommandMessage(commandId: string): string;
|
|
17
31
|
/** Treat malformed or equal-to-now expiries as unusable before any network send. */
|
|
18
32
|
export declare function isImplementationCredentialExpired(expiresAt: string, now?: Date): boolean;
|
|
19
33
|
/**
|
|
@@ -25,10 +39,37 @@ export declare class ImplementationBootstrapDeniedError extends Error {
|
|
|
25
39
|
readonly commandId: string;
|
|
26
40
|
constructor(commandId: string);
|
|
27
41
|
}
|
|
28
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* A stable operator message for a credential that cannot be retried as owner.
|
|
44
|
+
*
|
|
45
|
+
* DER-3255: an EXPIRED credential during an ACTIVE run is the same leak through a
|
|
46
|
+
* different door, so this path is fail-closed exactly like the route-unavailable
|
|
47
|
+
* one — the run being active is the operative fact, and usability only decides
|
|
48
|
+
* WHICH message the operator reads. That makes naming the recovery command load
|
|
49
|
+
* bearing rather than decorative: this is the message a bounded agent hits when
|
|
50
|
+
* its credential ages out mid-run, which is the state the DER-2965 observation
|
|
51
|
+
* produced.
|
|
52
|
+
*/
|
|
29
53
|
export declare function implementationCredentialExpiredMessage(hasUserSession: boolean): string;
|
|
30
54
|
/** Refuse a noninteractive human-decision command while a bounded run is active. */
|
|
31
55
|
export declare function implementationHumanDecisionMessage(commandId: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* DER-3255: refuse a noninteractive deny-class command while a bounded run is
|
|
58
|
+
* active, NAMING the route that does not exist.
|
|
59
|
+
*
|
|
60
|
+
* The sibling message above covers the human-decision half of the deny class
|
|
61
|
+
* (DER-3023). This one covers the rest — the 160-odd deny-class commands that
|
|
62
|
+
* are not human decisions, of which `onboarding.attach_reference` is the member
|
|
63
|
+
* DER-3045's acceptance run caught executing under owner authority. Reusing the
|
|
64
|
+
* human-decision wording for them would be a false claim: `attach_reference` is
|
|
65
|
+
* not a human-decision command, it simply has no implementation route.
|
|
66
|
+
*
|
|
67
|
+
* The two messages are deliberately distinct rather than merged. The operator's
|
|
68
|
+
* remedy differs: a human-decision command is waiting for a HUMAN, so the TTY is
|
|
69
|
+
* the intended path; a deny-class command has no implementation route at all, so
|
|
70
|
+
* the honest remedy is to end the run.
|
|
71
|
+
*/
|
|
72
|
+
export declare function implementationRouteUnavailableMessage(commandId: string, hasUserSession: boolean): string;
|
|
32
73
|
/**
|
|
33
74
|
* A server response means the bearer is unusable only for authentication
|
|
34
75
|
* failures. Authorization/policy refusals are not liveness signals and must not
|
|
@@ -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":"AAoCA,OAAO,EAAE,aAAa,EAAsB,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEnG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AA8E5E;;;;;;;;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;AAOD,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM/D;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;;;;;;;;;;GAUG;AACH,wBAAgB,sCAAsC,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,CA0BtF;AAED,oFAAoF;AACpF,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM5E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qCAAqC,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,GAAG,MAAM,CAexG;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"}
|
|
@@ -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,
|
|
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,EAWL,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,IAAI,CAAC,CAAC;IAC1D,KAAK,CAAC,UAAU,EAAE,iCAAiC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,IAAI,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAC5C,gBAAgB,GAChB,uBAAuB,GACvB,4BAA4B,GAC5B,gBAAgB,CAAC;AAErB;;;;GAIG;AACH,qBAAa,6CAA8C,SAAQ,KAAK;gBAEpE,OAAO,SAAwE;CAKlF;AAED;;;;GAIG;AACH,qBAAa,sCAAuC,SAAQ,KAAK;IAC/D,QAAQ,CAAC,OAAO,EAAE,oCAAoC,CAAC;gBAE3C,OAAO,EAAE,oCAAoC;CAK1D;AA2VD,qBAAa,4BAA6B,YAAW,6BAA6B;IACpE,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,SAAqB;IAEpD,IAAI,IAAI,OAAO,CAAC,iCAAiC,GAAG,IAAI,CAAC;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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { CommandClient } from "./command-client.js";
|
|
3
3
|
import { loginWithBrowser, refreshCliSessionIfNeeded } from "./auth.js";
|
|
4
4
|
import { loginWithDeviceCode } from "./device-auth.js";
|
|
5
|
+
import { type DeviceExchangeStore } from "./device-exchange-store.js";
|
|
5
6
|
import { type TokenStore } from "./token-store.js";
|
|
6
7
|
import { type ImplementationCredentialStore } from "./implementation-credential-store.js";
|
|
7
8
|
import { type ImplementationRunTombstoneStore } from "./implementation-run-tombstone.js";
|
|
@@ -22,6 +23,7 @@ type MainOptions = {
|
|
|
22
23
|
commandClient?: typeof CommandClient;
|
|
23
24
|
implementationCredentialStore?: ImplementationCredentialStoreFactory;
|
|
24
25
|
implementationRunTombstoneStore?: () => ImplementationRunTombstoneStore;
|
|
26
|
+
deviceExchangeStore?: DeviceExchangeStore;
|
|
25
27
|
};
|
|
26
28
|
export declare function main(argv?: string[], options?: MainOptions): Promise<number>;
|
|
27
29
|
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;AACrE,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,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,EAA6B,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,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