@run402/sdk 4.93.2 → 4.95.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/README.md +40 -38
- package/core-dist/config.d.ts +16 -2
- package/core-dist/config.js +52 -18
- package/core-dist/control-plane-session.d.ts +29 -14
- package/core-dist/control-plane-session.js +31 -6
- package/core-dist/keystore.js +7 -7
- package/core-dist/profiles.d.ts +3 -3
- package/core-dist/profiles.js +9 -7
- package/core-dist/{allowance-auth.d.ts → wallet-auth.d.ts} +6 -6
- package/core-dist/{allowance-auth.js → wallet-auth.js} +15 -15
- package/core-dist/wallet.d.ts +22 -0
- package/core-dist/{allowance.js → wallet.js} +20 -20
- package/core-dist/{write-auth-session.d.ts → write-approvals.d.ts} +28 -26
- package/core-dist/{write-auth-session.js → write-approvals.js} +19 -19
- package/dist/actions.d.ts +4 -4
- package/dist/actions.d.ts.map +1 -1
- package/dist/app-up.d.ts +2 -2
- package/dist/app-up.d.ts.map +1 -1
- package/dist/config.d.ts +1 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/control-plane-credentials.d.ts +8 -8
- package/dist/control-plane-credentials.js +7 -7
- package/dist/credentials.d.ts +20 -20
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +1 -1
- package/dist/errors.d.ts +26 -28
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +35 -38
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +29 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -17
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +10 -9
- package/dist/kernel.js.map +1 -1
- package/dist/namespaces/admin.d.ts +52 -121
- package/dist/namespaces/admin.d.ts.map +1 -1
- package/dist/namespaces/admin.js +41 -45
- package/dist/namespaces/admin.js.map +1 -1
- package/dist/namespaces/agent.d.ts +2 -2
- package/dist/namespaces/agent.d.ts.map +1 -1
- package/dist/namespaces/agent.js +2 -2
- package/dist/namespaces/agent.js.map +1 -1
- package/dist/namespaces/ai.d.ts +2 -2
- package/dist/namespaces/ai.js +3 -3
- package/dist/namespaces/ai.js.map +1 -1
- package/dist/namespaces/assets.js +1 -1
- package/dist/namespaces/assets.js.map +1 -1
- package/dist/namespaces/billing.d.ts +6 -3
- package/dist/namespaces/billing.d.ts.map +1 -1
- package/dist/namespaces/billing.js.map +1 -1
- package/dist/namespaces/buzz-notifications.types.d.ts +1 -1
- package/dist/namespaces/buzz.d.ts +2 -2
- package/dist/namespaces/buzz.d.ts.map +1 -1
- package/dist/namespaces/buzz.js +2 -2
- package/dist/namespaces/buzz.js.map +1 -1
- package/dist/namespaces/buzz.types.d.ts +2 -2
- package/dist/namespaces/buzz.types.d.ts.map +1 -1
- package/dist/namespaces/ci.js +3 -3
- package/dist/namespaces/ci.js.map +1 -1
- package/dist/namespaces/credentials.types.d.ts +1 -1
- package/dist/namespaces/deploy.d.ts +1 -1
- package/dist/namespaces/deploy.d.ts.map +1 -1
- package/dist/namespaces/deploy.js +31 -32
- package/dist/namespaces/deploy.js.map +1 -1
- package/dist/namespaces/deploy.types.d.ts +6 -6
- package/dist/namespaces/deploy.types.d.ts.map +1 -1
- package/dist/namespaces/domains.d.ts +10 -2
- package/dist/namespaces/domains.d.ts.map +1 -1
- package/dist/namespaces/domains.js +10 -5
- package/dist/namespaces/domains.js.map +1 -1
- package/dist/namespaces/errors.js +1 -1
- package/dist/namespaces/escalations.d.ts +1 -1
- package/dist/namespaces/escalations.js +1 -1
- package/dist/namespaces/escalations.types.d.ts +2 -2
- package/dist/namespaces/escalations.types.d.ts.map +1 -1
- package/dist/namespaces/events.types.d.ts +1 -1
- package/dist/namespaces/functions.d.ts +1 -1
- package/dist/namespaces/functions.js +2 -2
- package/dist/namespaces/functions.js.map +1 -1
- package/dist/namespaces/gitvault.crypto.d.ts +1 -1
- package/dist/namespaces/gitvault.d.ts +26 -26
- package/dist/namespaces/gitvault.d.ts.map +1 -1
- package/dist/namespaces/gitvault.js +113 -113
- package/dist/namespaces/gitvault.js.map +1 -1
- package/dist/namespaces/me.d.ts +120 -0
- package/dist/namespaces/me.d.ts.map +1 -0
- package/dist/namespaces/me.js +34 -0
- package/dist/namespaces/me.js.map +1 -0
- package/dist/namespaces/org.d.ts +108 -6
- package/dist/namespaces/org.d.ts.map +1 -1
- package/dist/namespaces/org.js +63 -7
- package/dist/namespaces/org.js.map +1 -1
- package/dist/namespaces/org.types.d.ts +29 -9
- package/dist/namespaces/org.types.d.ts.map +1 -1
- package/dist/namespaces/pay.js +3 -3
- package/dist/namespaces/pay.js.map +1 -1
- package/dist/namespaces/projects.d.ts +9 -9
- package/dist/namespaces/projects.js +15 -15
- package/dist/namespaces/projects.js.map +1 -1
- package/dist/namespaces/projects.types.d.ts +28 -12
- package/dist/namespaces/projects.types.d.ts.map +1 -1
- package/dist/namespaces/rooms.d.ts +7 -7
- package/dist/namespaces/rooms.js +17 -17
- package/dist/namespaces/rooms.js.map +1 -1
- package/dist/namespaces/rooms.types.d.ts +9 -9
- package/dist/namespaces/rooms.types.d.ts.map +1 -1
- package/dist/namespaces/service.d.ts +1 -1
- package/dist/namespaces/service.js +1 -1
- package/dist/namespaces/{operator-session.d.ts → session.d.ts} +135 -51
- package/dist/namespaces/session.d.ts.map +1 -0
- package/dist/namespaces/{operator-session.js → session.js} +118 -30
- package/dist/namespaces/session.js.map +1 -0
- package/dist/namespaces/subdomains.d.ts +5 -5
- package/dist/namespaces/subdomains.d.ts.map +1 -1
- package/dist/namespaces/subdomains.js +6 -6
- package/dist/namespaces/subdomains.js.map +1 -1
- package/dist/namespaces/tier.d.ts +44 -21
- package/dist/namespaces/tier.d.ts.map +1 -1
- package/dist/namespaces/tier.js +7 -7
- package/dist/namespaces/tier.js.map +1 -1
- package/dist/namespaces/transfers.d.ts +119 -85
- package/dist/namespaces/transfers.d.ts.map +1 -1
- package/dist/namespaces/transfers.js +31 -38
- package/dist/namespaces/transfers.js.map +1 -1
- package/dist/namespaces/vouchers.d.ts +9 -10
- package/dist/namespaces/vouchers.d.ts.map +1 -1
- package/dist/namespaces/vouchers.js +4 -5
- package/dist/namespaces/vouchers.js.map +1 -1
- package/dist/namespaces/wallets.d.ts +72 -3
- package/dist/namespaces/wallets.d.ts.map +1 -1
- package/dist/namespaces/wallets.js +141 -3
- package/dist/namespaces/wallets.js.map +1 -1
- package/dist/namespaces/write-approval.d.ts +101 -0
- package/dist/namespaces/write-approval.d.ts.map +1 -0
- package/dist/namespaces/write-approval.js +62 -0
- package/dist/namespaces/write-approval.js.map +1 -0
- package/dist/node/actions-node.d.ts +3 -3
- package/dist/node/actions-node.d.ts.map +1 -1
- package/dist/node/actions-node.js +44 -44
- package/dist/node/actions-node.js.map +1 -1
- package/dist/node/assets-node.js +6 -6
- package/dist/node/assets-node.js.map +1 -1
- package/dist/node/{bearer-claim-key.d.ts → bearer-redeem-key.d.ts} +12 -12
- package/dist/node/bearer-redeem-key.d.ts.map +1 -0
- package/dist/node/{bearer-claim-key.js → bearer-redeem-key.js} +21 -21
- package/dist/node/bearer-redeem-key.js.map +1 -0
- package/dist/node/ci.d.ts +1 -1
- package/dist/node/ci.d.ts.map +1 -1
- package/dist/node/ci.js +6 -6
- package/dist/node/ci.js.map +1 -1
- package/dist/node/credentials.d.ts +18 -17
- package/dist/node/credentials.d.ts.map +1 -1
- package/dist/node/credentials.js +29 -28
- package/dist/node/credentials.js.map +1 -1
- package/dist/node/deploy-manifest.d.ts +3 -5
- package/dist/node/deploy-manifest.d.ts.map +1 -1
- package/dist/node/deploy-manifest.js +3 -12
- package/dist/node/deploy-manifest.js.map +1 -1
- package/dist/node/funding-recovery.d.ts +1 -1
- package/dist/node/funding-recovery.d.ts.map +1 -1
- package/dist/node/funding-recovery.js +1 -1
- package/dist/node/funding-recovery.js.map +1 -1
- package/dist/node/gitvault-apply.d.ts +1 -1
- package/dist/node/gitvault-apply.d.ts.map +1 -1
- package/dist/node/gitvault-apply.js +1 -1
- package/dist/node/gitvault-apply.js.map +1 -1
- package/dist/node/gitvault-handoff.d.ts +22 -22
- package/dist/node/gitvault-handoff.d.ts.map +1 -1
- package/dist/node/gitvault-handoff.js +45 -45
- package/dist/node/gitvault-handoff.js.map +1 -1
- package/dist/node/gitvault-prewarm.js +7 -7
- package/dist/node/gitvault-prewarm.js.map +1 -1
- package/dist/node/gitvault-restore.d.ts +1 -1
- package/dist/node/gitvault-restore.js +1 -1
- package/dist/node/index.d.ts +16 -16
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +15 -15
- package/dist/node/index.js.map +1 -1
- package/dist/node/manifest-export.js +2 -2
- package/dist/node/manifest-export.js.map +1 -1
- package/dist/node/org-adopt.d.ts +49 -0
- package/dist/node/org-adopt.d.ts.map +1 -0
- package/dist/node/org-adopt.js +77 -0
- package/dist/node/org-adopt.js.map +1 -0
- package/dist/node/paid-fetch.d.ts +7 -7
- package/dist/node/paid-fetch.d.ts.map +1 -1
- package/dist/node/paid-fetch.js +54 -54
- package/dist/node/paid-fetch.js.map +1 -1
- package/dist/node/preflight.d.ts +1 -1
- package/dist/node/preflight.d.ts.map +1 -1
- package/dist/node/preflight.js +1 -1
- package/dist/node/preflight.js.map +1 -1
- package/dist/node/sites-node.js +1 -1
- package/dist/node/sites-node.js.map +1 -1
- package/dist/node/source-scan.d.ts +1 -1
- package/dist/node/source-scan.js +2 -2
- package/dist/node/source-scan.js.map +1 -1
- package/dist/scoped.d.ts +11 -11
- package/dist/scoped.d.ts.map +1 -1
- package/dist/scoped.js +5 -5
- package/dist/scoped.js.map +1 -1
- package/package.json +1 -1
- package/core-dist/allowance.d.ts +0 -22
- package/core-dist/operator-session.d.ts +0 -80
- package/core-dist/operator-session.js +0 -154
- package/dist/namespaces/allowance.d.ts +0 -79
- package/dist/namespaces/allowance.d.ts.map +0 -1
- package/dist/namespaces/allowance.js +0 -149
- package/dist/namespaces/allowance.js.map +0 -1
- package/dist/namespaces/operator-session.d.ts.map +0 -1
- package/dist/namespaces/operator-session.js.map +0 -1
- package/dist/namespaces/operator.d.ts +0 -359
- package/dist/namespaces/operator.d.ts.map +0 -1
- package/dist/namespaces/operator.js +0 -272
- package/dist/namespaces/operator.js.map +0 -1
- package/dist/node/bearer-claim-key.d.ts.map +0 -1
- package/dist/node/bearer-claim-key.js.map +0 -1
- package/dist/node/operator-claim.d.ts +0 -49
- package/dist/node/operator-claim.d.ts.map +0 -1
- package/dist/node/operator-claim.js +0 -77
- package/dist/node/operator-claim.js.map +0 -1
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `operator` namespace — the *human* (email) principal, distinct from the
|
|
3
|
-
* agent's per-wallet SIWX identity.
|
|
4
|
-
*
|
|
5
|
-
* The human authenticates in the browser via an OAuth 2.0 device-authorization
|
|
6
|
-
* grant (RFC 8628, the `aws sso login` model): `deviceStart` returns a
|
|
7
|
-
* user-facing code + URL, the human approves it via the existing magic-link or
|
|
8
|
-
* passkey web flow, and `devicePoll` brokers the resulting operator-session
|
|
9
|
-
* token. `overview` reads the email-union account view with that token, and
|
|
10
|
-
* `revoke` ends the session server-side.
|
|
11
|
-
*
|
|
12
|
-
* Bearer auth is passed explicitly (`opts.token`) rather than sourced from a
|
|
13
|
-
* credential provider, because the operator session is a Node-only on-disk
|
|
14
|
-
* cache (`core/operator-session.ts`) and this namespace stays isomorphic. The
|
|
15
|
-
* `device*` endpoints are unauthenticated (the `device_code` in the body is the
|
|
16
|
-
* credential), so they send no auth headers.
|
|
17
|
-
*
|
|
18
|
-
* Gateway contract: the RFC 8628 device-auth bridge.
|
|
19
|
-
*/
|
|
20
|
-
import type { Client } from "../kernel.js";
|
|
21
|
-
import type { WriteAuthCapability } from "../credentials.js";
|
|
22
|
-
import { OperatorSession } from "./operator-session.js";
|
|
23
|
-
/** RFC 8628 device-authorization start response. */
|
|
24
|
-
export interface DeviceAuthStart {
|
|
25
|
-
device_code: string;
|
|
26
|
-
user_code: string;
|
|
27
|
-
verification_uri: string;
|
|
28
|
-
/** Pre-fills the user_code so the human can click straight through. */
|
|
29
|
-
verification_uri_complete?: string;
|
|
30
|
-
expires_in: number;
|
|
31
|
-
/** Minimum seconds between `devicePoll` calls. */
|
|
32
|
-
interval: number;
|
|
33
|
-
}
|
|
34
|
-
/** The operator-session token payload (wire shape; relative `expires_in`). */
|
|
35
|
-
export interface OperatorSessionToken {
|
|
36
|
-
operator_session_token: string;
|
|
37
|
-
token_type: string;
|
|
38
|
-
expires_in: number;
|
|
39
|
-
absolute_expires_at: string;
|
|
40
|
-
email: string;
|
|
41
|
-
wallets: string[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Result of one `devicePoll`. The non-approved states are the RFC 8628 token
|
|
45
|
-
* error codes — they are expected polling states, NOT thrown errors, so callers
|
|
46
|
-
* can run the poll loop without try/catch.
|
|
47
|
-
*/
|
|
48
|
-
export type DevicePollResult = {
|
|
49
|
-
kind: "approved";
|
|
50
|
-
session: OperatorSessionToken;
|
|
51
|
-
} | {
|
|
52
|
-
kind: "authorization_pending";
|
|
53
|
-
} | {
|
|
54
|
-
kind: "slow_down";
|
|
55
|
-
} | {
|
|
56
|
-
kind: "access_denied";
|
|
57
|
-
} | {
|
|
58
|
-
kind: "expired_token";
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Organization overview. Forward-compatible: the gateway owns the exact shape and
|
|
62
|
-
* may add fields, so unknown keys are preserved via the index signature.
|
|
63
|
-
* `scope.kind` is `"email"` for the operator-session (email-union) and
|
|
64
|
-
* `"wallet"` for a SIWX slice.
|
|
65
|
-
*/
|
|
66
|
-
export interface OperatorOverview {
|
|
67
|
-
scope?: {
|
|
68
|
-
kind?: "email" | "wallet" | string;
|
|
69
|
-
principal?: string;
|
|
70
|
-
};
|
|
71
|
-
rollup?: Record<string, unknown>;
|
|
72
|
-
organizations?: unknown[];
|
|
73
|
-
wallets?: unknown[];
|
|
74
|
-
advisories?: unknown[];
|
|
75
|
-
[key: string]: unknown;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A control-plane session minted by the loopback-PKCE flow
|
|
79
|
-
* (`POST /agent/v1/control-plane/cli/token`). Distinct from the device-flow
|
|
80
|
-
* {@link OperatorSessionToken} (read-only): this carries `provenance` and `amr`.
|
|
81
|
-
* It authorizes most control-plane ops, but `provision` / `deploy` / secrets
|
|
82
|
-
* additionally require a passkey-fresh operator approval (v1.85/v1.87) — see
|
|
83
|
-
* `r.operator.approval`. Forward-compatible.
|
|
84
|
-
*/
|
|
85
|
-
export interface ControlPlaneSession {
|
|
86
|
-
control_plane_session_token: string;
|
|
87
|
-
token_type?: string;
|
|
88
|
-
/** Relative lifetime in seconds. */
|
|
89
|
-
expires_in?: number;
|
|
90
|
-
/** How it was minted — `loopback_pkce` for the CLI write-login. */
|
|
91
|
-
provenance?: string;
|
|
92
|
-
/** The control-plane principal id. */
|
|
93
|
-
principal_id?: string;
|
|
94
|
-
/** Auth methods satisfied (e.g. `["passkey"]`). */
|
|
95
|
-
amr?: string[];
|
|
96
|
-
[key: string]: unknown;
|
|
97
|
-
}
|
|
98
|
-
/** Parameters for {@link Operator.buildCliAuthorizeUrl}. */
|
|
99
|
-
export interface CliAuthorizeParams {
|
|
100
|
-
/** The CLI's loopback redirect, e.g. `http://127.0.0.1:54321/callback`. */
|
|
101
|
-
redirectUri: string;
|
|
102
|
-
/** PKCE S256 challenge = base64url(sha256(verifier)). */
|
|
103
|
-
codeChallenge: string;
|
|
104
|
-
/** Opaque CSRF state echoed back on the redirect. */
|
|
105
|
-
state: string;
|
|
106
|
-
/** Replay nonce. */
|
|
107
|
-
nonce: string;
|
|
108
|
-
}
|
|
109
|
-
/** Parameters for {@link Operator.exchangeCliToken}. */
|
|
110
|
-
export interface CliTokenExchange {
|
|
111
|
-
/** Authorization code received on the loopback redirect. */
|
|
112
|
-
code: string;
|
|
113
|
-
/** The PKCE verifier whose hash was sent as `codeChallenge`. */
|
|
114
|
-
codeVerifier: string;
|
|
115
|
-
/** Must match the `redirectUri` used at authorize time. */
|
|
116
|
-
redirectUri: string;
|
|
117
|
-
/** Must match the `state` used at authorize time. */
|
|
118
|
-
state: string;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* A claim challenge (`POST …/claim-wallet-org/challenge`). The wallet must sign a
|
|
122
|
-
* fresh SIWX message carrying {@link ClaimChallenge.nonce}; that signed message
|
|
123
|
-
* becomes the `SIGN-IN-WITH-X` header on {@link ClaimWalletOrg.submit}. Reveals
|
|
124
|
-
* nothing about the wallet's orgs — control is proven only at claim time.
|
|
125
|
-
*/
|
|
126
|
-
export interface ClaimChallenge {
|
|
127
|
-
challenge_id: string;
|
|
128
|
-
nonce: string;
|
|
129
|
-
expires_at: string;
|
|
130
|
-
sign_instructions?: {
|
|
131
|
-
scheme?: string;
|
|
132
|
-
nonce?: string;
|
|
133
|
-
note?: string;
|
|
134
|
-
[key: string]: unknown;
|
|
135
|
-
};
|
|
136
|
-
[key: string]: unknown;
|
|
137
|
-
}
|
|
138
|
-
/** Input to {@link ClaimWalletOrg.challenge}. */
|
|
139
|
-
export interface ClaimChallengeInput {
|
|
140
|
-
/** The wallet (0x EVM address) whose agent-owned org is being claimed. */
|
|
141
|
-
wallet: string;
|
|
142
|
-
/**
|
|
143
|
-
* The human's write-capable control-plane session bearer. Falls back to the
|
|
144
|
-
* client's default auth when omitted — pass it explicitly unless the client was
|
|
145
|
-
* constructed with control-plane-session credentials.
|
|
146
|
-
*/
|
|
147
|
-
token?: string;
|
|
148
|
-
}
|
|
149
|
-
/** Input to {@link ClaimWalletOrg.submit}. */
|
|
150
|
-
export interface ClaimSubmitInput {
|
|
151
|
-
/**
|
|
152
|
-
* The fresh SIWX proof over the challenge nonce — the value of the
|
|
153
|
-
* `SIGN-IN-WITH-X` header (the wallet proof). In Node, build it with
|
|
154
|
-
* `signWalletOrgClaim` from `@run402/sdk/node`.
|
|
155
|
-
*/
|
|
156
|
-
siwx: string;
|
|
157
|
-
/** The human's control-plane session bearer (see {@link ClaimChallengeInput.token}). */
|
|
158
|
-
token?: string;
|
|
159
|
-
/**
|
|
160
|
-
* Target org id. Omit on the first submit; supply it on the second round when
|
|
161
|
-
* the first returned `select_org` (the wallet's agent owns more than one org).
|
|
162
|
-
* The same `token` + `siwx` are reused — no re-challenge, no re-sign.
|
|
163
|
-
*/
|
|
164
|
-
orgId?: string;
|
|
165
|
-
/** Optional label to set on the claimed org at the same time. `null`/`""` clears. */
|
|
166
|
-
displayName?: string | null;
|
|
167
|
-
}
|
|
168
|
-
/** One org offered for selection when a wallet's agent owns more than one (`select_org`). */
|
|
169
|
-
export interface SelectableOrg {
|
|
170
|
-
org_id: string;
|
|
171
|
-
display_name: string | null;
|
|
172
|
-
tier: string;
|
|
173
|
-
[key: string]: unknown;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Result of {@link ClaimWalletOrg.submit}. A discriminated union: `"claimed"` on
|
|
177
|
-
* success, or `"select_org"` when the wallet's agent owns more than one org and
|
|
178
|
-
* the caller must re-submit with a chosen `orgId`. `select_org` is a normal
|
|
179
|
-
* (non-error) result — it is returned, never thrown.
|
|
180
|
-
*/
|
|
181
|
-
export type ClaimResult = {
|
|
182
|
-
status: "claimed";
|
|
183
|
-
org_id: string;
|
|
184
|
-
display_name: string | null;
|
|
185
|
-
role: string;
|
|
186
|
-
/** True when the human already owned the org (idempotent re-claim). */
|
|
187
|
-
already_owned?: boolean;
|
|
188
|
-
[key: string]: unknown;
|
|
189
|
-
} | {
|
|
190
|
-
status: "select_org";
|
|
191
|
-
selectable_orgs: SelectableOrg[];
|
|
192
|
-
[key: string]: unknown;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Wallet-owned org claim — `r.operator.claimWalletOrg.*`. The isomorphic
|
|
196
|
-
* (raw-proof) seam: `challenge` issues a nonce; `submit` posts the dual proof
|
|
197
|
-
* (control-plane session bearer + a fresh `SIGN-IN-WITH-X` wallet signature). The
|
|
198
|
-
* Node convenience `signWalletOrgClaim` / `claimWalletOrg` in `@run402/sdk/node`
|
|
199
|
-
* runs the whole dance (read session → challenge → sign → submit).
|
|
200
|
-
*/
|
|
201
|
-
export declare class ClaimWalletOrg {
|
|
202
|
-
private readonly client;
|
|
203
|
-
constructor(client: Client);
|
|
204
|
-
/** Request a single-use challenge nonce the wallet must sign (`POST …/claim-wallet-org/challenge`). */
|
|
205
|
-
challenge(input: ClaimChallengeInput): Promise<ClaimChallenge>;
|
|
206
|
-
/**
|
|
207
|
-
* Execute the claim (`POST …/claim-wallet-org`) carrying both proofs: the
|
|
208
|
-
* control-plane session bearer (the human) and the `SIGN-IN-WITH-X` wallet
|
|
209
|
-
* signature. Returns a discriminated {@link ClaimResult}; a `select_org` result
|
|
210
|
-
* is returned (not thrown). Throws {@link StepUpRequiredError} when the session
|
|
211
|
-
* is not passkey-fresh, and `ApiError` (`WALLET_PROOF_INVALID`) on a bad proof.
|
|
212
|
-
*/
|
|
213
|
-
submit(input: ClaimSubmitInput): Promise<ClaimResult>;
|
|
214
|
-
}
|
|
215
|
-
/** Input to {@link Approval.requestChallenge}. */
|
|
216
|
-
export interface ApprovalChallengeInput {
|
|
217
|
-
/** The capability to approve. Determines whether `orgId` or `projectId` is required. */
|
|
218
|
-
action: WriteAuthCapability;
|
|
219
|
-
/** Required for `org.project.create`. */
|
|
220
|
-
orgId?: string;
|
|
221
|
-
/** Required for `project.deploy` / `project.secret.write`. */
|
|
222
|
-
projectId?: string;
|
|
223
|
-
/** The CLI's loopback redirect, e.g. `http://127.0.0.1:54321/callback`. */
|
|
224
|
-
cliRedirectUri: string;
|
|
225
|
-
/** PKCE S256 challenge = base64url(sha256(verifier)). */
|
|
226
|
-
codeChallenge: string;
|
|
227
|
-
/** Opaque CSRF state echoed back on the loopback redirect. */
|
|
228
|
-
state: string;
|
|
229
|
-
/**
|
|
230
|
-
* The human's control-plane session bearer. Falls back to the client's
|
|
231
|
-
* default auth when omitted — pass it explicitly unless the client was
|
|
232
|
-
* constructed with control-plane-session credentials.
|
|
233
|
-
*/
|
|
234
|
-
token?: string;
|
|
235
|
-
}
|
|
236
|
-
/** Result of {@link Approval.requestChallenge}. Forward-compatible. */
|
|
237
|
-
export interface ApprovalChallengeResult {
|
|
238
|
-
challenge_id: string;
|
|
239
|
-
confirm_url: string;
|
|
240
|
-
expires_at?: string;
|
|
241
|
-
action?: string;
|
|
242
|
-
org_id?: string | null;
|
|
243
|
-
project_id?: string | null;
|
|
244
|
-
delivery?: "cli_loopback" | "postmessage" | string;
|
|
245
|
-
[key: string]: unknown;
|
|
246
|
-
}
|
|
247
|
-
/** Input to {@link Approval.exchangeClaimCode}. */
|
|
248
|
-
export interface ApprovalClaimInput {
|
|
249
|
-
/** Authorization code received on the loopback redirect. */
|
|
250
|
-
code: string;
|
|
251
|
-
/** The PKCE verifier whose hash was sent as `codeChallenge`. */
|
|
252
|
-
codeVerifier: string;
|
|
253
|
-
/** Must match the `state` used at challenge time. */
|
|
254
|
-
state: string;
|
|
255
|
-
}
|
|
256
|
-
/** Minted approval token payload. Expiry lives inside `session` as ISO-8601 strings. Forward-compatible. */
|
|
257
|
-
export interface ApprovalTokenResult {
|
|
258
|
-
write_auth_token: string;
|
|
259
|
-
token_type?: string;
|
|
260
|
-
header?: string;
|
|
261
|
-
session?: {
|
|
262
|
-
expires_at?: string;
|
|
263
|
-
absolute_expires_at?: string;
|
|
264
|
-
amr?: string[];
|
|
265
|
-
[k: string]: unknown;
|
|
266
|
-
} | null;
|
|
267
|
-
[key: string]: unknown;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Operator-approval ceremony seams — `r.operator.approval.*`. Isomorphic
|
|
271
|
-
* (raw-request) seams: `requestChallenge` opens a passkey approval scoped to an
|
|
272
|
-
* `(action, target)`; the human approves in the browser; the confirm page
|
|
273
|
-
* redirects to the CLI loopback with a one-time `code`; `exchangeClaimCode`
|
|
274
|
-
* (PKCE) mints the token. The loopback server + PKCE generation live in the
|
|
275
|
-
* Node CLI (`run402 operator approve`).
|
|
276
|
-
*/
|
|
277
|
-
export declare class Approval {
|
|
278
|
-
private readonly client;
|
|
279
|
-
constructor(client: Client);
|
|
280
|
-
/** Begin a scoped approval (`POST …/write-auth/challenges`). Carries the cp-session bearer. */
|
|
281
|
-
requestChallenge(input: ApprovalChallengeInput): Promise<ApprovalChallengeResult>;
|
|
282
|
-
/**
|
|
283
|
-
* Exchange the loopback claim `code` (+ PKCE verifier + `state`) for the
|
|
284
|
-
* approval token (`POST …/write-auth/cli/token`). No `redirect_uri` — it is
|
|
285
|
-
* bound at challenge time. Unauthenticated (code+verifier are the credential).
|
|
286
|
-
*/
|
|
287
|
-
exchangeClaimCode(input: ApprovalClaimInput): Promise<ApprovalTokenResult>;
|
|
288
|
-
}
|
|
289
|
-
export declare class Operator {
|
|
290
|
-
private readonly client;
|
|
291
|
-
/**
|
|
292
|
-
* The hosted/browser control-plane **session** surface (gateway v1.78):
|
|
293
|
-
* `r.operator.session.email`, `verifyEmail`, `passkeyVerify`, `whoami`,
|
|
294
|
-
* `refresh`, `revoke`, and the step-up / authenticator helpers.
|
|
295
|
-
* The write-capable human login + step-up + authenticators, distinct from the
|
|
296
|
-
* read-only device/overview methods on this class and the loopback-PKCE
|
|
297
|
-
* CLI write-login below. See {@link OperatorSession}.
|
|
298
|
-
*/
|
|
299
|
-
readonly session: OperatorSession;
|
|
300
|
-
/**
|
|
301
|
-
* Wallet-owned org claim (v1.82): `r.operator.claimWalletOrg.challenge()` +
|
|
302
|
-
* `.submit()`. The raw dual-proof seam; the Node convenience `claimWalletOrg`
|
|
303
|
-
* in `@run402/sdk/node` runs the full dance.
|
|
304
|
-
*/
|
|
305
|
-
readonly claimWalletOrg: ClaimWalletOrg;
|
|
306
|
-
/**
|
|
307
|
-
* Operator-approval (write-auth) ceremony: `r.operator.approval.requestChallenge()`
|
|
308
|
-
* + `.exchangeClaimCode()`. The Node CLI (`run402 operator approve`) runs the
|
|
309
|
-
* loopback + PKCE around these isomorphic seams.
|
|
310
|
-
*/
|
|
311
|
-
readonly approval: Approval;
|
|
312
|
-
constructor(client: Client);
|
|
313
|
-
/**
|
|
314
|
-
* Begin the device-authorization flow. Unauthenticated. Returns the codes the
|
|
315
|
-
* CLI prints (`user_code` + `verification_uri`) plus the poll `interval` and
|
|
316
|
-
* `expires_in`.
|
|
317
|
-
*/
|
|
318
|
-
deviceStart(opts?: {
|
|
319
|
-
clientName?: string;
|
|
320
|
-
}): Promise<DeviceAuthStart>;
|
|
321
|
-
/**
|
|
322
|
-
* Poll once for approval. Bypasses the kernel's error mapping on purpose: the
|
|
323
|
-
* RFC 8628 error codes (`authorization_pending`, `slow_down`, ...) are normal
|
|
324
|
-
* polling states returned as data, not exceptions. Only an unexpected
|
|
325
|
-
* response shape throws.
|
|
326
|
-
*/
|
|
327
|
-
devicePoll(deviceCode: string): Promise<DevicePollResult>;
|
|
328
|
-
/**
|
|
329
|
-
* Fetch the organization overview. With `opts.token` the request carries the
|
|
330
|
-
* operator-session bearer and returns the email-union; without it the request
|
|
331
|
-
* falls back to the credential provider's default auth (SIWX) and returns
|
|
332
|
-
* that wallet's slice. The CLI always passes a token (human-only surface); the
|
|
333
|
-
* SDK supports both because the gateway endpoint accepts both principals.
|
|
334
|
-
*/
|
|
335
|
-
overview(opts?: {
|
|
336
|
-
token?: string;
|
|
337
|
-
}): Promise<OperatorOverview>;
|
|
338
|
-
/**
|
|
339
|
-
* Revoke the operator session server-side (the server half of
|
|
340
|
-
* `operator logout`). Idempotent on the gateway; returns 204. The local cache
|
|
341
|
-
* is cleared separately by the CLI.
|
|
342
|
-
*/
|
|
343
|
-
revoke(opts: {
|
|
344
|
-
token: string;
|
|
345
|
-
}): Promise<void>;
|
|
346
|
-
/**
|
|
347
|
-
* Build the loopback-PKCE authorize URL the CLI opens in the browser. Pure —
|
|
348
|
-
* no network, no Node APIs — so it is safe in any runtime. The caller
|
|
349
|
-
* generates `codeChallenge`/`state`/`nonce` and runs the redirect server.
|
|
350
|
-
*/
|
|
351
|
-
buildCliAuthorizeUrl(params: CliAuthorizeParams): string;
|
|
352
|
-
/**
|
|
353
|
-
* Exchange the loopback authorization code (+ PKCE verifier) for a
|
|
354
|
-
* write-capable {@link ControlPlaneSession}. Unauthenticated — the code +
|
|
355
|
-
* verifier are the credential.
|
|
356
|
-
*/
|
|
357
|
-
exchangeCliToken(params: CliTokenExchange): Promise<ControlPlaneSession>;
|
|
358
|
-
}
|
|
359
|
-
//# sourceMappingURL=operator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../src/namespaces/operator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,8EAA8E;AAC9E,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,oBA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;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;gBAEC,MAAM,EAAE,MAAM;IAM3C;;;;OAIG;IACG,WAAW,CAAC,IAAI,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IAS/E;;;;;OAKG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgC/D;;;;;;OAMG;IACG,QAAQ,CAAC,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAaxE;;;;OAIG;IACG,MAAM,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpD;;;;OAIG;IACH,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IAWxD;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAa/E"}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `operator` namespace — the *human* (email) principal, distinct from the
|
|
3
|
-
* agent's per-wallet SIWX identity.
|
|
4
|
-
*
|
|
5
|
-
* The human authenticates in the browser via an OAuth 2.0 device-authorization
|
|
6
|
-
* grant (RFC 8628, the `aws sso login` model): `deviceStart` returns a
|
|
7
|
-
* user-facing code + URL, the human approves it via the existing magic-link or
|
|
8
|
-
* passkey web flow, and `devicePoll` brokers the resulting operator-session
|
|
9
|
-
* token. `overview` reads the email-union account view with that token, and
|
|
10
|
-
* `revoke` ends the session server-side.
|
|
11
|
-
*
|
|
12
|
-
* Bearer auth is passed explicitly (`opts.token`) rather than sourced from a
|
|
13
|
-
* credential provider, because the operator session is a Node-only on-disk
|
|
14
|
-
* cache (`core/operator-session.ts`) and this namespace stays isomorphic. The
|
|
15
|
-
* `device*` endpoints are unauthenticated (the `device_code` in the body is the
|
|
16
|
-
* credential), so they send no auth headers.
|
|
17
|
-
*
|
|
18
|
-
* Gateway contract: the RFC 8628 device-auth bridge.
|
|
19
|
-
*/
|
|
20
|
-
import { ApiError, LocalError, NetworkError } from "../errors.js";
|
|
21
|
-
import { OperatorSession } from "./operator-session.js";
|
|
22
|
-
const POLL_ERROR_CODES = new Set([
|
|
23
|
-
"authorization_pending",
|
|
24
|
-
"slow_down",
|
|
25
|
-
"access_denied",
|
|
26
|
-
"expired_token",
|
|
27
|
-
]);
|
|
28
|
-
/**
|
|
29
|
-
* Wallet-owned org claim — `r.operator.claimWalletOrg.*`. The isomorphic
|
|
30
|
-
* (raw-proof) seam: `challenge` issues a nonce; `submit` posts the dual proof
|
|
31
|
-
* (control-plane session bearer + a fresh `SIGN-IN-WITH-X` wallet signature). The
|
|
32
|
-
* Node convenience `signWalletOrgClaim` / `claimWalletOrg` in `@run402/sdk/node`
|
|
33
|
-
* runs the whole dance (read session → challenge → sign → submit).
|
|
34
|
-
*/
|
|
35
|
-
export class ClaimWalletOrg {
|
|
36
|
-
client;
|
|
37
|
-
constructor(client) {
|
|
38
|
-
this.client = client;
|
|
39
|
-
}
|
|
40
|
-
/** Request a single-use challenge nonce the wallet must sign (`POST …/claim-wallet-org/challenge`). */
|
|
41
|
-
async challenge(input) {
|
|
42
|
-
if (!input?.wallet) {
|
|
43
|
-
throw new LocalError("claimWalletOrg.challenge requires { wallet }", "requesting wallet-org claim challenge");
|
|
44
|
-
}
|
|
45
|
-
return this.client.request("/agent/v1/operator/claim-wallet-org/challenge", {
|
|
46
|
-
method: "POST",
|
|
47
|
-
body: { wallet: input.wallet },
|
|
48
|
-
...(input.token ? { headers: { Authorization: `Bearer ${input.token}` }, withAuth: false } : {}),
|
|
49
|
-
context: "requesting wallet-org claim challenge",
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Execute the claim (`POST …/claim-wallet-org`) carrying both proofs: the
|
|
54
|
-
* control-plane session bearer (the human) and the `SIGN-IN-WITH-X` wallet
|
|
55
|
-
* signature. Returns a discriminated {@link ClaimResult}; a `select_org` result
|
|
56
|
-
* is returned (not thrown). Throws {@link StepUpRequiredError} when the session
|
|
57
|
-
* is not passkey-fresh, and `ApiError` (`WALLET_PROOF_INVALID`) on a bad proof.
|
|
58
|
-
*/
|
|
59
|
-
async submit(input) {
|
|
60
|
-
if (!input?.siwx) {
|
|
61
|
-
throw new LocalError("claimWalletOrg.submit requires { siwx } (the SIGN-IN-WITH-X proof)", "claiming wallet org");
|
|
62
|
-
}
|
|
63
|
-
const headers = { "SIGN-IN-WITH-X": input.siwx };
|
|
64
|
-
if (input.token)
|
|
65
|
-
headers.Authorization = `Bearer ${input.token}`;
|
|
66
|
-
const body = {};
|
|
67
|
-
if (input.orgId !== undefined)
|
|
68
|
-
body.org_id = input.orgId;
|
|
69
|
-
if (input.displayName !== undefined)
|
|
70
|
-
body.display_name = input.displayName;
|
|
71
|
-
return this.client.request("/agent/v1/operator/claim-wallet-org", {
|
|
72
|
-
method: "POST",
|
|
73
|
-
body,
|
|
74
|
-
headers,
|
|
75
|
-
withAuth: !input.token,
|
|
76
|
-
context: "claiming wallet org",
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Operator-approval ceremony seams — `r.operator.approval.*`. Isomorphic
|
|
82
|
-
* (raw-request) seams: `requestChallenge` opens a passkey approval scoped to an
|
|
83
|
-
* `(action, target)`; the human approves in the browser; the confirm page
|
|
84
|
-
* redirects to the CLI loopback with a one-time `code`; `exchangeClaimCode`
|
|
85
|
-
* (PKCE) mints the token. The loopback server + PKCE generation live in the
|
|
86
|
-
* Node CLI (`run402 operator approve`).
|
|
87
|
-
*/
|
|
88
|
-
export class Approval {
|
|
89
|
-
client;
|
|
90
|
-
constructor(client) {
|
|
91
|
-
this.client = client;
|
|
92
|
-
}
|
|
93
|
-
/** Begin a scoped approval (`POST …/write-auth/challenges`). Carries the cp-session bearer. */
|
|
94
|
-
async requestChallenge(input) {
|
|
95
|
-
const body = {
|
|
96
|
-
action: input.action,
|
|
97
|
-
cli_redirect_uri: input.cliRedirectUri,
|
|
98
|
-
code_challenge: input.codeChallenge,
|
|
99
|
-
state: input.state,
|
|
100
|
-
};
|
|
101
|
-
if (input.orgId !== undefined)
|
|
102
|
-
body.org_id = input.orgId;
|
|
103
|
-
if (input.projectId !== undefined)
|
|
104
|
-
body.project_id = input.projectId;
|
|
105
|
-
return this.client.request("/agent/v1/control-plane/write-auth/challenges", {
|
|
106
|
-
method: "POST",
|
|
107
|
-
body,
|
|
108
|
-
...(input.token
|
|
109
|
-
? { headers: { Authorization: `Bearer ${input.token}` }, withAuth: false }
|
|
110
|
-
: {}),
|
|
111
|
-
context: "requesting operator approval challenge",
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Exchange the loopback claim `code` (+ PKCE verifier + `state`) for the
|
|
116
|
-
* approval token (`POST …/write-auth/cli/token`). No `redirect_uri` — it is
|
|
117
|
-
* bound at challenge time. Unauthenticated (code+verifier are the credential).
|
|
118
|
-
*/
|
|
119
|
-
async exchangeClaimCode(input) {
|
|
120
|
-
return this.client.request("/agent/v1/control-plane/write-auth/cli/token", {
|
|
121
|
-
method: "POST",
|
|
122
|
-
body: { code: input.code, code_verifier: input.codeVerifier, state: input.state },
|
|
123
|
-
withAuth: false,
|
|
124
|
-
context: "exchanging operator approval claim code",
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
export class Operator {
|
|
129
|
-
client;
|
|
130
|
-
/**
|
|
131
|
-
* The hosted/browser control-plane **session** surface (gateway v1.78):
|
|
132
|
-
* `r.operator.session.email`, `verifyEmail`, `passkeyVerify`, `whoami`,
|
|
133
|
-
* `refresh`, `revoke`, and the step-up / authenticator helpers.
|
|
134
|
-
* The write-capable human login + step-up + authenticators, distinct from the
|
|
135
|
-
* read-only device/overview methods on this class and the loopback-PKCE
|
|
136
|
-
* CLI write-login below. See {@link OperatorSession}.
|
|
137
|
-
*/
|
|
138
|
-
session;
|
|
139
|
-
/**
|
|
140
|
-
* Wallet-owned org claim (v1.82): `r.operator.claimWalletOrg.challenge()` +
|
|
141
|
-
* `.submit()`. The raw dual-proof seam; the Node convenience `claimWalletOrg`
|
|
142
|
-
* in `@run402/sdk/node` runs the full dance.
|
|
143
|
-
*/
|
|
144
|
-
claimWalletOrg;
|
|
145
|
-
/**
|
|
146
|
-
* Operator-approval (write-auth) ceremony: `r.operator.approval.requestChallenge()`
|
|
147
|
-
* + `.exchangeClaimCode()`. The Node CLI (`run402 operator approve`) runs the
|
|
148
|
-
* loopback + PKCE around these isomorphic seams.
|
|
149
|
-
*/
|
|
150
|
-
approval;
|
|
151
|
-
constructor(client) {
|
|
152
|
-
this.client = client;
|
|
153
|
-
this.session = new OperatorSession(client);
|
|
154
|
-
this.claimWalletOrg = new ClaimWalletOrg(client);
|
|
155
|
-
this.approval = new Approval(client);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Begin the device-authorization flow. Unauthenticated. Returns the codes the
|
|
159
|
-
* CLI prints (`user_code` + `verification_uri`) plus the poll `interval` and
|
|
160
|
-
* `expires_in`.
|
|
161
|
-
*/
|
|
162
|
-
async deviceStart(opts = {}) {
|
|
163
|
-
return this.client.request("/agent/v1/operator/session/device", {
|
|
164
|
-
method: "POST",
|
|
165
|
-
body: opts.clientName ? { client_name: opts.clientName } : {},
|
|
166
|
-
withAuth: false,
|
|
167
|
-
context: "starting operator device authorization",
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Poll once for approval. Bypasses the kernel's error mapping on purpose: the
|
|
172
|
-
* RFC 8628 error codes (`authorization_pending`, `slow_down`, ...) are normal
|
|
173
|
-
* polling states returned as data, not exceptions. Only an unexpected
|
|
174
|
-
* response shape throws.
|
|
175
|
-
*/
|
|
176
|
-
async devicePoll(deviceCode) {
|
|
177
|
-
const url = `${this.client.apiBase}/agent/v1/operator/session/device/token`;
|
|
178
|
-
let res;
|
|
179
|
-
try {
|
|
180
|
-
res = await this.client.fetch(url, {
|
|
181
|
-
method: "POST",
|
|
182
|
-
headers: { "Content-Type": "application/json" },
|
|
183
|
-
body: JSON.stringify({ device_code: deviceCode }),
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
catch (err) {
|
|
187
|
-
throw new NetworkError(`Network error while polling operator device token: ${err.message}`, err, "polling operator device token");
|
|
188
|
-
}
|
|
189
|
-
const body = (await res.json().catch(() => null));
|
|
190
|
-
if (res.ok && body && typeof body.operator_session_token === "string") {
|
|
191
|
-
return { kind: "approved", session: body };
|
|
192
|
-
}
|
|
193
|
-
const error = body && typeof body.error === "string" ? body.error : null;
|
|
194
|
-
if (error && POLL_ERROR_CODES.has(error)) {
|
|
195
|
-
return { kind: error };
|
|
196
|
-
}
|
|
197
|
-
throw new ApiError(`Unexpected operator device-token response (HTTP ${res.status})`, res.status, body, "polling operator device token");
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Fetch the organization overview. With `opts.token` the request carries the
|
|
201
|
-
* operator-session bearer and returns the email-union; without it the request
|
|
202
|
-
* falls back to the credential provider's default auth (SIWX) and returns
|
|
203
|
-
* that wallet's slice. The CLI always passes a token (human-only surface); the
|
|
204
|
-
* SDK supports both because the gateway endpoint accepts both principals.
|
|
205
|
-
*/
|
|
206
|
-
async overview(opts = {}) {
|
|
207
|
-
if (opts.token) {
|
|
208
|
-
return this.client.request("/agent/v1/operator/overview", {
|
|
209
|
-
headers: { Authorization: `Bearer ${opts.token}` },
|
|
210
|
-
withAuth: false,
|
|
211
|
-
context: "fetching operator overview",
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
return this.client.request("/agent/v1/operator/overview", {
|
|
215
|
-
context: "fetching operator overview",
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Revoke the operator session server-side (the server half of
|
|
220
|
-
* `operator logout`). Idempotent on the gateway; returns 204. The local cache
|
|
221
|
-
* is cleared separately by the CLI.
|
|
222
|
-
*/
|
|
223
|
-
async revoke(opts) {
|
|
224
|
-
await this.client.request("/agent/v1/operator/session/revoke", {
|
|
225
|
-
method: "POST",
|
|
226
|
-
headers: { Authorization: `Bearer ${opts.token}` },
|
|
227
|
-
withAuth: false,
|
|
228
|
-
context: "revoking operator session",
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
// ── Loopback-PKCE write-login (v1.78, RFC 8252 §7.3) ──────────────────────
|
|
232
|
-
// The aws-sso-style write login: the CLI starts a `127.0.0.1` server, opens
|
|
233
|
-
// the browser to the authorize URL (the console runs the passkey ceremony +
|
|
234
|
-
// approves), receives the code on the loopback redirect, then exchanges it
|
|
235
|
-
// here for a write-capable, passkey-fresh control-plane session
|
|
236
|
-
// (`provenance=loopback_pkce`). PKCE generation + the loopback server live in
|
|
237
|
-
// the Node CLI; these two methods are the isomorphic SDK seam.
|
|
238
|
-
/**
|
|
239
|
-
* Build the loopback-PKCE authorize URL the CLI opens in the browser. Pure —
|
|
240
|
-
* no network, no Node APIs — so it is safe in any runtime. The caller
|
|
241
|
-
* generates `codeChallenge`/`state`/`nonce` and runs the redirect server.
|
|
242
|
-
*/
|
|
243
|
-
buildCliAuthorizeUrl(params) {
|
|
244
|
-
const q = new URLSearchParams({
|
|
245
|
-
redirect_uri: params.redirectUri,
|
|
246
|
-
code_challenge: params.codeChallenge,
|
|
247
|
-
code_challenge_method: "S256",
|
|
248
|
-
state: params.state,
|
|
249
|
-
nonce: params.nonce,
|
|
250
|
-
});
|
|
251
|
-
return `${this.client.apiBase}/agent/v1/control-plane/cli/authorize?${q.toString()}`;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Exchange the loopback authorization code (+ PKCE verifier) for a
|
|
255
|
-
* write-capable {@link ControlPlaneSession}. Unauthenticated — the code +
|
|
256
|
-
* verifier are the credential.
|
|
257
|
-
*/
|
|
258
|
-
async exchangeCliToken(params) {
|
|
259
|
-
return this.client.request("/agent/v1/control-plane/cli/token", {
|
|
260
|
-
method: "POST",
|
|
261
|
-
body: {
|
|
262
|
-
code: params.code,
|
|
263
|
-
code_verifier: params.codeVerifier,
|
|
264
|
-
redirect_uri: params.redirectUri,
|
|
265
|
-
state: params.state,
|
|
266
|
-
},
|
|
267
|
-
withAuth: false,
|
|
268
|
-
context: "exchanging CLI authorization code",
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
//# sourceMappingURL=operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator.js","sourceRoot":"","sources":["../../src/namespaces/operator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAiGxD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,uBAAuB;IACvB,WAAW;IACX,eAAe;IACf,eAAe;CAChB,CAAC,CAAC;AAgFH;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACI;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,uGAAuG;IACvG,KAAK,CAAC,SAAS,CAAC,KAA0B;QACxC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,UAAU,CAAC,8CAA8C,EAAE,uCAAuC,CAAC,CAAC;QAChH,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAiB,+CAA+C,EAAE;YAC1F,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;YAC9B,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC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