@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,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `vouchers` namespace — redeem a promo code
|
|
2
|
+
* `vouchers` namespace — redeem a promo code into the organization's allowance.
|
|
3
3
|
*
|
|
4
|
-
* A promo code
|
|
5
|
-
*
|
|
6
|
-
* it with no on-chain payment.
|
|
4
|
+
* A promo code adds to your organization's allowance, which spends like any
|
|
5
|
+
* other allowance: a tier purchase settles from it with no on-chain payment.
|
|
7
6
|
*
|
|
8
7
|
* Two properties make this safe to call from anywhere in an agent's lifecycle:
|
|
9
8
|
*
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
* call a brand-new wallet makes (the organization is provisioned on demand),
|
|
12
11
|
* or long after `run402 init`. There is no init-before-redeem requirement.
|
|
13
12
|
* - **Retrying is safe.** A repeat by the same organization returns the ORIGINAL
|
|
14
|
-
* result with `already_redeemed: true` and never
|
|
13
|
+
* result with `already_redeemed: true` and never adds twice, so a call that
|
|
15
14
|
* times out client-side can simply be re-issued.
|
|
16
15
|
*
|
|
17
16
|
* This namespace is deliberately thin and semantically blind: it forwards an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vouchers.js","sourceRoot":"","sources":["../../src/namespaces/vouchers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vouchers.js","sourceRoot":"","sources":["../../src/namespaces/vouchers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAuCxD,MAAM,OAAO,QAAQ;IAIU;IAH7B,+BAA+B;IACtB,UAAU,CAAiD;IAEpE,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,wBAAwB,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAsB,0BAA0B,EAAE;YAC1E,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE;YACd,OAAO,EAAE,wBAAwB;SAClC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `wallets` namespace — server-side
|
|
2
|
+
* `wallets` namespace — the agent's local wallet and its server-side label.
|
|
3
|
+
*
|
|
4
|
+
* `status`, `create`, and `export` touch the local wallet file (`wallet.json`)
|
|
5
|
+
* through optional provider methods; sandbox providers that don't implement
|
|
6
|
+
* them report `{configured: false}` or throw a descriptive error. `faucet`
|
|
7
|
+
* requests testnet USDC into the wallet and works in any environment.
|
|
3
8
|
*
|
|
4
9
|
* The label is the cross-machine / WEB-visible human name for a wallet (e.g.
|
|
5
10
|
* "kychon"), stored server-side keyed by the wallet address and authenticated
|
|
6
|
-
* by the wallet's
|
|
11
|
+
* by the wallet's SIWX signature. It is display metadata only — never key
|
|
7
12
|
* material, no custody.
|
|
8
13
|
*
|
|
9
|
-
* Both methods are intentionally BEST-EFFORT: they swallow errors (including a
|
|
14
|
+
* Both label methods are intentionally BEST-EFFORT: they swallow errors (including a
|
|
10
15
|
* not-yet-deployed endpoint / 404 / offline) and return a null/`ok:false`
|
|
11
16
|
* sentinel instead of throwing. This lets `run402 wallets new|rename|import`
|
|
12
17
|
* stay fully functional locally and before the gateway endpoint ships — the
|
|
@@ -18,9 +23,73 @@
|
|
|
18
23
|
* label)` form is deprecated (see the `sdk-call-shape-conventions` change).
|
|
19
24
|
*/
|
|
20
25
|
import type { Client } from "../kernel.js";
|
|
26
|
+
export interface WalletStatusResult {
|
|
27
|
+
address: string;
|
|
28
|
+
created?: string;
|
|
29
|
+
/**
|
|
30
|
+
* True once the faucet has been invoked on this wallet. This tracks
|
|
31
|
+
* "faucet has been used," not "account can pay right now" — the two diverge
|
|
32
|
+
* once funds are spent or expire. Callers wanting a real pay-readiness
|
|
33
|
+
* check should call `wallets balance`.
|
|
34
|
+
*/
|
|
35
|
+
faucet_used?: boolean;
|
|
36
|
+
lastFaucet?: string;
|
|
37
|
+
path?: string;
|
|
38
|
+
/** The persisted payment rail (`x402` when unset). */
|
|
39
|
+
rail?: "x402" | "mpp" | "lightning";
|
|
40
|
+
/** The Lightning wallet, without its pairing secret. */
|
|
41
|
+
lightning?: {
|
|
42
|
+
wallet_id: string;
|
|
43
|
+
lightning_address: string | null;
|
|
44
|
+
budget_sats: number;
|
|
45
|
+
starter_sats: number;
|
|
46
|
+
custody: "run402_hub";
|
|
47
|
+
has_pairing: true;
|
|
48
|
+
minted_at: string;
|
|
49
|
+
};
|
|
50
|
+
/** true when the local provider holds a wallet, false otherwise. */
|
|
51
|
+
configured: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface WalletCreateResult {
|
|
54
|
+
address: string;
|
|
55
|
+
created: string;
|
|
56
|
+
path?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface FaucetResult {
|
|
59
|
+
/** Present on gateways that wait for on-chain confirmation. */
|
|
60
|
+
fundingStatus?: "confirmed";
|
|
61
|
+
transactionHash: string;
|
|
62
|
+
/** Display-formatted amount, e.g. `"0.25"`. Computed from `amountUsdMicros`. */
|
|
63
|
+
amount: string;
|
|
64
|
+
/** Raw amount in micro-USD (1_000_000 = $1.00). */
|
|
65
|
+
amountUsdMicros: number;
|
|
66
|
+
token: string;
|
|
67
|
+
network: string;
|
|
68
|
+
}
|
|
69
|
+
export interface FaucetOptions {
|
|
70
|
+
address?: string;
|
|
71
|
+
idempotencyKey?: string;
|
|
72
|
+
}
|
|
21
73
|
export declare class Wallets {
|
|
22
74
|
private readonly client;
|
|
23
75
|
constructor(client: Client);
|
|
76
|
+
/** Inspect the local wallet. Returns `{configured: false}` when absent. */
|
|
77
|
+
status(): Promise<WalletStatusResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Generate a new wallet keypair and persist it. Throws when the
|
|
80
|
+
* provider already holds a wallet (don't overwrite silently) or
|
|
81
|
+
* when the provider doesn't support local wallet management.
|
|
82
|
+
*/
|
|
83
|
+
create(): Promise<WalletCreateResult>;
|
|
84
|
+
/** Return the wallet address (safe to share). Throws if none is configured. */
|
|
85
|
+
export(): Promise<string>;
|
|
86
|
+
/**
|
|
87
|
+
* Request testnet USDC from the Run402 faucet. When `address` is omitted,
|
|
88
|
+
* the SDK uses the provider's local wallet address. Updates the
|
|
89
|
+
* wallet's internal `funded` marker on success (surfaced as
|
|
90
|
+
* `faucet_used` in `status()`).
|
|
91
|
+
*/
|
|
92
|
+
faucet(addressOrOptions?: string | FaucetOptions): Promise<FaucetResult>;
|
|
24
93
|
/**
|
|
25
94
|
* Read a wallet's server-side label, or null on any error (unset, 404,
|
|
26
95
|
* offline). Public read — no auth required.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/namespaces/wallets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/namespaces/wallets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C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,CAAC;IAkC3C;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA8B3C,+EAA+E;IACzE,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAe/B;;;;;OAKG;IACG,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IA8D9E;;;OAGG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAGxD;AAED;;;;GAIG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAU,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAxC,MAAM,EAAE,MAAM,EAAmB,OAAO,EAAE,MAAM;IAE7E,qDAAqD;IACrD,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIlC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;CAGlD"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `wallets` namespace — server-side
|
|
2
|
+
* `wallets` namespace — the agent's local wallet and its server-side label.
|
|
3
|
+
*
|
|
4
|
+
* `status`, `create`, and `export` touch the local wallet file (`wallet.json`)
|
|
5
|
+
* through optional provider methods; sandbox providers that don't implement
|
|
6
|
+
* them report `{configured: false}` or throw a descriptive error. `faucet`
|
|
7
|
+
* requests testnet USDC into the wallet and works in any environment.
|
|
3
8
|
*
|
|
4
9
|
* The label is the cross-machine / WEB-visible human name for a wallet (e.g.
|
|
5
10
|
* "kychon"), stored server-side keyed by the wallet address and authenticated
|
|
6
|
-
* by the wallet's
|
|
11
|
+
* by the wallet's SIWX signature. It is display metadata only — never key
|
|
7
12
|
* material, no custody.
|
|
8
13
|
*
|
|
9
|
-
* Both methods are intentionally BEST-EFFORT: they swallow errors (including a
|
|
14
|
+
* Both label methods are intentionally BEST-EFFORT: they swallow errors (including a
|
|
10
15
|
* not-yet-deployed endpoint / 404 / offline) and return a null/`ok:false`
|
|
11
16
|
* sentinel instead of throwing. This lets `run402 wallets new|rename|import`
|
|
12
17
|
* stay fully functional locally and before the gateway endpoint ships — the
|
|
@@ -17,6 +22,7 @@
|
|
|
17
22
|
* `.getLabel()` / `.setLabel(label)`. The two-string `r.wallets.setLabel(address,
|
|
18
23
|
* label)` form is deprecated (see the `sdk-call-shape-conventions` change).
|
|
19
24
|
*/
|
|
25
|
+
import { LocalError } from "../errors.js";
|
|
20
26
|
/** Shared read impl — used by both `Wallets.getLabel` and `ScopedWallet.getLabel`. */
|
|
21
27
|
async function readLabel(client, address) {
|
|
22
28
|
try {
|
|
@@ -42,6 +48,138 @@ export class Wallets {
|
|
|
42
48
|
constructor(client) {
|
|
43
49
|
this.client = client;
|
|
44
50
|
}
|
|
51
|
+
/** Inspect the local wallet. Returns `{configured: false}` when absent. */
|
|
52
|
+
async status() {
|
|
53
|
+
const reader = this.client.credentials.readWallet;
|
|
54
|
+
if (!reader) {
|
|
55
|
+
return { address: "", configured: false };
|
|
56
|
+
}
|
|
57
|
+
const data = await reader.call(this.client.credentials);
|
|
58
|
+
if (!data)
|
|
59
|
+
return { address: "", configured: false };
|
|
60
|
+
return {
|
|
61
|
+
address: data.address,
|
|
62
|
+
created: data.created,
|
|
63
|
+
// Map the on-disk `funded` marker (which only tracks faucet invocations)
|
|
64
|
+
// to `faucet_used` in the output. `!!` coerces undefined → false so
|
|
65
|
+
// callers can branch cleanly.
|
|
66
|
+
faucet_used: !!data.funded,
|
|
67
|
+
lastFaucet: data.lastFaucet,
|
|
68
|
+
path: this.client.credentials.getWalletPath?.call(this.client.credentials),
|
|
69
|
+
rail: data.rail ?? "x402",
|
|
70
|
+
...(data.lightning
|
|
71
|
+
? {
|
|
72
|
+
lightning: {
|
|
73
|
+
wallet_id: data.lightning.wallet_id,
|
|
74
|
+
lightning_address: data.lightning.lightning_address,
|
|
75
|
+
budget_sats: data.lightning.budget_sats,
|
|
76
|
+
starter_sats: data.lightning.starter_sats,
|
|
77
|
+
custody: data.lightning.custody,
|
|
78
|
+
has_pairing: true,
|
|
79
|
+
minted_at: data.lightning.minted_at,
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
: {}),
|
|
83
|
+
configured: true,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Generate a new wallet keypair and persist it. Throws when the
|
|
88
|
+
* provider already holds a wallet (don't overwrite silently) or
|
|
89
|
+
* when the provider doesn't support local wallet management.
|
|
90
|
+
*/
|
|
91
|
+
async create() {
|
|
92
|
+
const reader = this.client.credentials.readWallet;
|
|
93
|
+
const creator = this.client.credentials.createWallet;
|
|
94
|
+
const saver = this.client.credentials.saveWallet;
|
|
95
|
+
if (!creator || !saver) {
|
|
96
|
+
throw new LocalError("This credential provider does not support wallet creation. Use @run402/sdk/node for local wallet management.", "creating wallet");
|
|
97
|
+
}
|
|
98
|
+
if (reader) {
|
|
99
|
+
const existing = await reader.call(this.client.credentials);
|
|
100
|
+
if (existing) {
|
|
101
|
+
throw new LocalError(`Wallet already exists at ${this.client.credentials.getWalletPath?.call(this.client.credentials) ?? "(local path unknown)"}. Delete it manually to regenerate.`, "creating wallet");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const data = await creator.call(this.client.credentials);
|
|
105
|
+
await saver.call(this.client.credentials, data);
|
|
106
|
+
return {
|
|
107
|
+
address: data.address,
|
|
108
|
+
created: data.created ?? new Date().toISOString(),
|
|
109
|
+
path: this.client.credentials.getWalletPath?.call(this.client.credentials),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/** Return the wallet address (safe to share). Throws if none is configured. */
|
|
113
|
+
async export() {
|
|
114
|
+
const reader = this.client.credentials.readWallet;
|
|
115
|
+
if (!reader) {
|
|
116
|
+
throw new LocalError("This credential provider does not expose the local wallet.", "exporting wallet");
|
|
117
|
+
}
|
|
118
|
+
const data = await reader.call(this.client.credentials);
|
|
119
|
+
if (!data) {
|
|
120
|
+
throw new LocalError("No local wallet is configured.", "exporting wallet");
|
|
121
|
+
}
|
|
122
|
+
return data.address;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Request testnet USDC from the Run402 faucet. When `address` is omitted,
|
|
126
|
+
* the SDK uses the provider's local wallet address. Updates the
|
|
127
|
+
* wallet's internal `funded` marker on success (surfaced as
|
|
128
|
+
* `faucet_used` in `status()`).
|
|
129
|
+
*/
|
|
130
|
+
async faucet(addressOrOptions) {
|
|
131
|
+
const opts = typeof addressOrOptions === "string"
|
|
132
|
+
? { address: addressOrOptions }
|
|
133
|
+
: addressOrOptions ?? {};
|
|
134
|
+
let resolvedAddress = opts.address;
|
|
135
|
+
if (!resolvedAddress) {
|
|
136
|
+
const reader = this.client.credentials.readWallet;
|
|
137
|
+
if (!reader) {
|
|
138
|
+
throw new LocalError("No address provided and no local wallet is available.", "requesting faucet funds");
|
|
139
|
+
}
|
|
140
|
+
const data = await reader.call(this.client.credentials);
|
|
141
|
+
if (!data) {
|
|
142
|
+
throw new LocalError("No address provided and no local wallet is configured.", "requesting faucet funds");
|
|
143
|
+
}
|
|
144
|
+
resolvedAddress = data.address;
|
|
145
|
+
}
|
|
146
|
+
// Wire shape is snake_case (`transaction_hash`, `amount_usd_micros`);
|
|
147
|
+
// normalize to the typed camelCase surface.
|
|
148
|
+
const wire = await this.client.request("/faucet/v1", {
|
|
149
|
+
method: "POST",
|
|
150
|
+
...(opts.idempotencyKey ? { headers: { "Idempotency-Key": opts.idempotencyKey } } : {}),
|
|
151
|
+
body: { address: resolvedAddress },
|
|
152
|
+
withAuth: false,
|
|
153
|
+
context: "requesting faucet funds",
|
|
154
|
+
});
|
|
155
|
+
const result = {
|
|
156
|
+
...(wire.funding_status ? { fundingStatus: wire.funding_status } : {}),
|
|
157
|
+
transactionHash: wire.transaction_hash,
|
|
158
|
+
amountUsdMicros: wire.amount_usd_micros,
|
|
159
|
+
amount: (wire.amount_usd_micros / 1_000_000).toFixed(2),
|
|
160
|
+
token: wire.token,
|
|
161
|
+
network: wire.network,
|
|
162
|
+
};
|
|
163
|
+
// Best-effort update of the local wallet's funded/lastFaucet fields.
|
|
164
|
+
const reader = this.client.credentials.readWallet;
|
|
165
|
+
const saver = this.client.credentials.saveWallet;
|
|
166
|
+
if (reader && saver) {
|
|
167
|
+
try {
|
|
168
|
+
const data = await reader.call(this.client.credentials);
|
|
169
|
+
if (data) {
|
|
170
|
+
await saver.call(this.client.credentials, {
|
|
171
|
+
...data,
|
|
172
|
+
funded: true,
|
|
173
|
+
lastFaucet: new Date().toISOString(),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// non-fatal — the on-chain transfer succeeded
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
45
183
|
/**
|
|
46
184
|
* Read a wallet's server-side label, or null on any error (unset, 404,
|
|
47
185
|
* offline). Public read — no auth required.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.js","sourceRoot":"","sources":["../../src/namespaces/wallets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wallets.js","sourceRoot":"","sources":["../../src/namespaces/wallets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkE1C,sFAAsF;AACtF,KAAK,UAAU,SAAS,CAAC,MAAc,EAAE,OAAe;IACtD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,eAAe,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAClD,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,EAAE,CACrD,CAAC;QACF,OAAO,GAAG,E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,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,sEAAsE;IACtE,QAAQ,CAAC,KAAa;QACpB,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `writeApproval` — the passkey-signed, target-scoped credential a person
|
|
3
|
+
* signed in on the command line needs to provision, deploy, or write secrets
|
|
4
|
+
* without a wallet. Reached as `r.writeApproval.*`.
|
|
5
|
+
*
|
|
6
|
+
* The ceremony: {@link WriteApproval.requestChallenge} opens a passkey approval
|
|
7
|
+
* scoped to one `(action, target)` and returns a same-origin `confirm_url`; the
|
|
8
|
+
* person approves with their passkey in the browser; the confirm page redirects
|
|
9
|
+
* to the CLI's `127.0.0.1` loopback with a one-time `code`;
|
|
10
|
+
* {@link WriteApproval.exchangeClaimCode} (PKCE) mints the token. The token is
|
|
11
|
+
* sent as `X-Run402-Write-Approval: Bearer <write_approval_token>` beside the
|
|
12
|
+
* sign-in session bearer, and dies with that session. A write approval never
|
|
13
|
+
* satisfies step-up.
|
|
14
|
+
*
|
|
15
|
+
* Isomorphic seams — the loopback server and PKCE generation live in the Node
|
|
16
|
+
* CLI (`run402 approve`).
|
|
17
|
+
*/
|
|
18
|
+
import type { Client } from "../kernel.js";
|
|
19
|
+
import type { WriteApprovalCapability } from "../credentials.js";
|
|
20
|
+
/** Input to {@link WriteApproval.requestChallenge}. */
|
|
21
|
+
export interface WriteApprovalChallengeInput {
|
|
22
|
+
/** The capability to approve. Determines whether `orgId` or `projectId` is required. */
|
|
23
|
+
action: WriteApprovalCapability;
|
|
24
|
+
/** Required for `org.project.create`. */
|
|
25
|
+
orgId?: string;
|
|
26
|
+
/** Required for the project-scoped capabilities (`project.deploy`, `project.secret.write`, …). */
|
|
27
|
+
projectId?: string;
|
|
28
|
+
/** The CLI's loopback redirect, e.g. `http://127.0.0.1:54321/callback`. */
|
|
29
|
+
cliRedirectUri: string;
|
|
30
|
+
/** PKCE S256 challenge = base64url(sha256(verifier)). */
|
|
31
|
+
codeChallenge: string;
|
|
32
|
+
/** Opaque CSRF state echoed back on the loopback redirect. */
|
|
33
|
+
state: string;
|
|
34
|
+
/**
|
|
35
|
+
* The sign-in session bearer. Falls back to the client's default auth when
|
|
36
|
+
* omitted — pass it explicitly unless the client was constructed with
|
|
37
|
+
* sign-in session credentials.
|
|
38
|
+
*/
|
|
39
|
+
token?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Result of {@link WriteApproval.requestChallenge}. Forward-compatible. */
|
|
42
|
+
export interface WriteApprovalChallengeResult {
|
|
43
|
+
challenge_id: string;
|
|
44
|
+
confirm_url: string;
|
|
45
|
+
expires_at?: string;
|
|
46
|
+
action?: string;
|
|
47
|
+
org_id?: string | null;
|
|
48
|
+
project_id?: string | null;
|
|
49
|
+
delivery?: "cli_loopback" | "postmessage" | (string & {});
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
}
|
|
52
|
+
/** Input to {@link WriteApproval.exchangeClaimCode}. */
|
|
53
|
+
export interface WriteApprovalClaimInput {
|
|
54
|
+
/** Authorization code received on the loopback redirect. */
|
|
55
|
+
code: string;
|
|
56
|
+
/** The PKCE verifier whose hash was sent as `codeChallenge`. */
|
|
57
|
+
codeVerifier: string;
|
|
58
|
+
/** Must match the `state` used at challenge time. */
|
|
59
|
+
state: string;
|
|
60
|
+
}
|
|
61
|
+
/** One write approval's metadata as the gateway reports it (never the token). */
|
|
62
|
+
export interface WriteApprovalSessionInfo {
|
|
63
|
+
write_approval_session_id: string;
|
|
64
|
+
authenticator_class?: string;
|
|
65
|
+
org_id?: string | null;
|
|
66
|
+
project_id?: string | null;
|
|
67
|
+
capabilities?: string[];
|
|
68
|
+
risk_ceiling?: string;
|
|
69
|
+
/** ISO-8601 idle expiry — the token's usable life. */
|
|
70
|
+
idle_expires_at?: string;
|
|
71
|
+
/** ISO-8601 absolute expiry. */
|
|
72
|
+
absolute_expires_at?: string;
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
/** Minted write-approval token payload, returned ONCE. Forward-compatible. */
|
|
76
|
+
export interface WriteApprovalTokenResult {
|
|
77
|
+
write_approval_token: string;
|
|
78
|
+
/** Always `"write_approval"`. */
|
|
79
|
+
token_type?: string;
|
|
80
|
+
/** Always `"X-Run402-Write-Approval"`. */
|
|
81
|
+
header?: string;
|
|
82
|
+
session?: WriteApprovalSessionInfo | null;
|
|
83
|
+
[key: string]: unknown;
|
|
84
|
+
}
|
|
85
|
+
export declare class WriteApproval {
|
|
86
|
+
private readonly client;
|
|
87
|
+
constructor(client: Client);
|
|
88
|
+
/**
|
|
89
|
+
* Open a scoped approval (`POST /agent/v1/control-plane/write-approval/challenges`).
|
|
90
|
+
* Carries the sign-in session bearer; a `device`-grade session is refused.
|
|
91
|
+
*/
|
|
92
|
+
requestChallenge(input: WriteApprovalChallengeInput): Promise<WriteApprovalChallengeResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Exchange the loopback claim `code` (+ PKCE verifier + `state`) for the
|
|
95
|
+
* write-approval token (`POST …/write-approval/cli/token`). No `redirect_uri`
|
|
96
|
+
* — it is bound at challenge time. Unauthenticated (code + verifier are the
|
|
97
|
+
* credential); the minted token is still bound to the issuing sign-in session.
|
|
98
|
+
*/
|
|
99
|
+
exchangeClaimCode(input: WriteApprovalClaimInput): Promise<WriteApprovalTokenResult>;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=write-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-approval.d.ts","sourceRoot":"","sources":["../../src/namespaces/write-approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,E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AAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gCAAgC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,8EAA8E;AAC9E,MAAM,WAAW,wBAAwB;IACvC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;OAGG;IACG,gBAAgB,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAsBjG;;;;;OAKG;IACG,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAW3F"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `writeApproval` — the passkey-signed, target-scoped credential a person
|
|
3
|
+
* signed in on the command line needs to provision, deploy, or write secrets
|
|
4
|
+
* without a wallet. Reached as `r.writeApproval.*`.
|
|
5
|
+
*
|
|
6
|
+
* The ceremony: {@link WriteApproval.requestChallenge} opens a passkey approval
|
|
7
|
+
* scoped to one `(action, target)` and returns a same-origin `confirm_url`; the
|
|
8
|
+
* person approves with their passkey in the browser; the confirm page redirects
|
|
9
|
+
* to the CLI's `127.0.0.1` loopback with a one-time `code`;
|
|
10
|
+
* {@link WriteApproval.exchangeClaimCode} (PKCE) mints the token. The token is
|
|
11
|
+
* sent as `X-Run402-Write-Approval: Bearer <write_approval_token>` beside the
|
|
12
|
+
* sign-in session bearer, and dies with that session. A write approval never
|
|
13
|
+
* satisfies step-up.
|
|
14
|
+
*
|
|
15
|
+
* Isomorphic seams — the loopback server and PKCE generation live in the Node
|
|
16
|
+
* CLI (`run402 approve`).
|
|
17
|
+
*/
|
|
18
|
+
export class WriteApproval {
|
|
19
|
+
client;
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Open a scoped approval (`POST /agent/v1/control-plane/write-approval/challenges`).
|
|
25
|
+
* Carries the sign-in session bearer; a `device`-grade session is refused.
|
|
26
|
+
*/
|
|
27
|
+
async requestChallenge(input) {
|
|
28
|
+
const body = {
|
|
29
|
+
action: input.action,
|
|
30
|
+
cli_redirect_uri: input.cliRedirectUri,
|
|
31
|
+
code_challenge: input.codeChallenge,
|
|
32
|
+
state: input.state,
|
|
33
|
+
};
|
|
34
|
+
if (input.orgId !== undefined)
|
|
35
|
+
body.org_id = input.orgId;
|
|
36
|
+
if (input.projectId !== undefined)
|
|
37
|
+
body.project_id = input.projectId;
|
|
38
|
+
return this.client.request("/agent/v1/control-plane/write-approval/challenges", {
|
|
39
|
+
method: "POST",
|
|
40
|
+
body,
|
|
41
|
+
...(input.token
|
|
42
|
+
? { headers: { Authorization: `Bearer ${input.token}` }, withAuth: false }
|
|
43
|
+
: {}),
|
|
44
|
+
context: "requesting a write approval challenge",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Exchange the loopback claim `code` (+ PKCE verifier + `state`) for the
|
|
49
|
+
* write-approval token (`POST …/write-approval/cli/token`). No `redirect_uri`
|
|
50
|
+
* — it is bound at challenge time. Unauthenticated (code + verifier are the
|
|
51
|
+
* credential); the minted token is still bound to the issuing sign-in session.
|
|
52
|
+
*/
|
|
53
|
+
async exchangeClaimCode(input) {
|
|
54
|
+
return this.client.request("/agent/v1/control-plane/write-approval/cli/token", {
|
|
55
|
+
method: "POST",
|
|
56
|
+
body: { code: input.code, code_verifier: input.codeVerifier, state: input.state },
|
|
57
|
+
withAuth: false,
|
|
58
|
+
context: "exchanging a write approval claim code",
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=write-approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-approval.js","sourceRoot":"","sources":["../../src/namespaces/write-approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA2EH,MAAM,OAAO,aAAa;IACK;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CAAC,KAAkC;QACvD,MAAM,IAAI,GAA4B;YACpC,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,gBAAgB,EAAE,KAAK,CAAC,cAAc;YACtC,cAAc,EAAE,KAAK,CAAC,aAAa;YACnC,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC;QACF,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;QACzD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;YAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,mDAAmD,EACnD;YACE,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,GAAG,CAAC,KAAK,CAAC,KAAK;gBACb,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC1E,CAAC,CAAC,EAAE,CAAC;YACP,OAAO,EAAE,uCAAuC;SACjD,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CAAC,KAA8B;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,kDAAkD,EAClD;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE;YACjF,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,wCAAwC;SAClD,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -25,17 +25,17 @@ export declare class NodeActions implements Run402Actions {
|
|
|
25
25
|
up(input?: Omit<Run402UpActionInput, "type">, opts?: Run402ActionRunOptions): Promise<Run402ActionResult<Run402UpResult>>;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Slug a human project name into
|
|
28
|
+
* Slug a human project name into an addable `<name>.run402.com` label
|
|
29
29
|
* (3-63 chars, lowercase alphanumeric + hyphens), or null when it cannot be.
|
|
30
30
|
*/
|
|
31
31
|
export declare function subdomainSlugFromProjectName(name: string | null | undefined): string | null;
|
|
32
32
|
/**
|
|
33
33
|
* The `missing_public_origin` remedy: a path check cannot resolve without a
|
|
34
34
|
* public origin, and the fix is to bind a subdomain — either right now via
|
|
35
|
-
* `run402 subdomains
|
|
35
|
+
* `run402 subdomains add <name>` (which binds the live release with no
|
|
36
36
|
* further flags) or declaratively in the manifest's `subdomains.set`.
|
|
37
37
|
*/
|
|
38
|
-
export declare function
|
|
38
|
+
export declare function addSubdomainNextAction(projectName: string | null, checkId: string): Run402AppUpNextAction;
|
|
39
39
|
/** Resolve only local destination intent. Approval and global active state are never selectors. */
|
|
40
40
|
export declare function resolveDeploymentTarget(input: {
|
|
41
41
|
appRoot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-node.d.ts","sourceRoot":"","sources":["../../src/node/actions-node.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAIV,kBAAkB,EAClB,sBAA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