run402 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 +61 -59
- package/cli.mjs +40 -47
- package/core-dist/config.js +52 -18
- package/core-dist/control-plane-session.js +31 -6
- package/core-dist/keystore.js +7 -7
- package/core-dist/profiles.js +9 -7
- package/core-dist/{allowance-auth.js → wallet-auth.js} +15 -15
- package/{sdk/core-dist/allowance.js → core-dist/wallet.js} +20 -20
- package/{sdk/core-dist/write-auth-session.js → core-dist/write-approvals.js} +19 -19
- package/gitvault-surface.json +2 -2
- package/lib/admin.mjs +6 -6
- package/lib/agent.mjs +20 -18
- package/lib/ai.mjs +5 -5
- package/lib/approve.mjs +81 -0
- package/lib/apps.mjs +12 -12
- package/lib/archives.mjs +371 -8
- package/lib/argparse.mjs +5 -5
- package/lib/assets.mjs +14 -14
- package/lib/auth.mjs +34 -34
- package/lib/billing.mjs +6 -6
- package/lib/branches.mjs +7 -7
- package/lib/buzz-doctor.mjs +2 -2
- package/lib/buzz-notifications.mjs +5 -5
- package/lib/buzz.mjs +3 -3
- package/lib/buzz.test.mjs +1 -1
- package/lib/cache.mjs +1 -1
- package/lib/cdn.mjs +2 -2
- package/lib/ci.mjs +12 -12
- package/lib/claims.mjs +2 -2
- package/lib/cold-start.mjs +21 -21
- package/lib/command-manifest.mjs +55 -70
- package/lib/config.mjs +28 -28
- package/lib/contacts.mjs +16 -16
- package/lib/contracts.mjs +12 -12
- package/lib/credentials.mjs +33 -33
- package/lib/daemon-path.mjs +1 -1
- package/lib/delegates.mjs +14 -14
- package/lib/deliveries.mjs +6 -6
- package/lib/deploy-rehearse-discovery.test.mjs +7 -7
- package/lib/deploy-v2.mjs +241 -193
- package/lib/deploy.mjs +21 -53
- package/lib/dev.mjs +3 -3
- package/lib/doctor-source-scan.mjs +1 -1
- package/lib/doctor.mjs +63 -63
- package/lib/domains.mjs +27 -27
- package/lib/email.mjs +38 -38
- package/lib/errors.mjs +40 -24
- package/lib/escalations.mjs +5 -5
- package/lib/events.mjs +32 -25
- package/lib/feedback.mjs +12 -12
- package/lib/functions.mjs +34 -34
- package/lib/gitvault-daemon.mjs +1 -1
- package/lib/gitvault-scaffold.mjs +2 -2
- package/lib/gitvault.mjs +2 -2
- package/lib/grants.mjs +7 -7
- package/lib/image.mjs +10 -10
- package/lib/init.mjs +69 -69
- package/lib/jobs.mjs +15 -15
- package/lib/lightning-wallet.mjs +28 -28
- package/lib/live.mjs +1 -1
- package/lib/login.mjs +207 -0
- package/lib/logout.mjs +53 -0
- package/lib/logs.mjs +8 -8
- package/lib/messages.mjs +5 -5
- package/lib/next-actions.mjs +16 -16
- package/lib/org-context.mjs +13 -13
- package/lib/{org.mjs → orgs.mjs} +215 -167
- package/lib/pay.mjs +1 -1
- package/lib/projects.mjs +70 -84
- package/lib/redeem.mjs +7 -8
- package/lib/remote-helper-session.mjs +12 -12
- package/lib/repos.mjs +83 -83
- package/lib/rooms.mjs +105 -69
- package/lib/sdk-errors.mjs +10 -5
- package/lib/sdk.mjs +3 -3
- package/lib/secrets.mjs +13 -13
- package/lib/service.mjs +5 -5
- package/lib/session-proofs.mjs +21 -0
- package/lib/sign-in.mjs +296 -0
- package/lib/sites.mjs +22 -22
- package/lib/snapshots.mjs +10 -10
- package/lib/stats.mjs +2 -2
- package/lib/status.mjs +25 -25
- package/lib/subdomains.mjs +30 -30
- package/lib/subscriptions.mjs +10 -10
- package/lib/tier.mjs +29 -22
- package/lib/transfer.mjs +59 -86
- package/lib/up.mjs +14 -14
- package/lib/wallet-context.mjs +4 -4
- package/lib/wallet-context.test.mjs +3 -3
- package/lib/wallets.mjs +197 -32
- package/lib/webhook-secret.mjs +6 -6
- package/lib/webhooks.mjs +8 -8
- package/lib/whoami.mjs +102 -0
- package/package.json +1 -1
- package/sdk/core-dist/config.js +52 -18
- package/sdk/core-dist/control-plane-session.js +31 -6
- package/sdk/core-dist/keystore.js +7 -7
- package/sdk/core-dist/profiles.js +9 -7
- package/sdk/core-dist/{allowance-auth.js → wallet-auth.js} +15 -15
- package/{core-dist/allowance.js → sdk/core-dist/wallet.js} +20 -20
- package/{core-dist/write-auth-session.js → sdk/core-dist/write-approvals.js} +19 -19
- package/sdk/dist/actions.d.ts +4 -4
- package/sdk/dist/actions.d.ts.map +1 -1
- package/sdk/dist/app-up.d.ts +2 -2
- package/sdk/dist/app-up.d.ts.map +1 -1
- package/sdk/dist/config.d.ts +1 -2
- package/sdk/dist/config.d.ts.map +1 -1
- package/sdk/dist/config.js.map +1 -1
- package/sdk/dist/control-plane-credentials.d.ts +8 -8
- package/sdk/dist/control-plane-credentials.js +7 -7
- package/sdk/dist/credentials.d.ts +20 -20
- package/sdk/dist/credentials.d.ts.map +1 -1
- package/sdk/dist/credentials.js +1 -1
- package/sdk/dist/errors.d.ts +26 -28
- package/sdk/dist/errors.d.ts.map +1 -1
- package/sdk/dist/errors.js +35 -38
- package/sdk/dist/errors.js.map +1 -1
- package/sdk/dist/index.d.ts +29 -16
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +30 -17
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/kernel.d.ts +1 -1
- package/sdk/dist/kernel.d.ts.map +1 -1
- package/sdk/dist/kernel.js +10 -9
- package/sdk/dist/kernel.js.map +1 -1
- package/sdk/dist/namespaces/admin.d.ts +52 -121
- package/sdk/dist/namespaces/admin.d.ts.map +1 -1
- package/sdk/dist/namespaces/admin.js +41 -45
- package/sdk/dist/namespaces/admin.js.map +1 -1
- package/sdk/dist/namespaces/agent.d.ts +2 -2
- package/sdk/dist/namespaces/agent.d.ts.map +1 -1
- package/sdk/dist/namespaces/agent.js +2 -2
- package/sdk/dist/namespaces/agent.js.map +1 -1
- package/sdk/dist/namespaces/ai.d.ts +2 -2
- package/sdk/dist/namespaces/ai.js +3 -3
- package/sdk/dist/namespaces/ai.js.map +1 -1
- package/sdk/dist/namespaces/assets.js +1 -1
- package/sdk/dist/namespaces/assets.js.map +1 -1
- package/sdk/dist/namespaces/billing.d.ts +6 -3
- package/sdk/dist/namespaces/billing.d.ts.map +1 -1
- package/sdk/dist/namespaces/billing.js.map +1 -1
- package/sdk/dist/namespaces/buzz-notifications.types.d.ts +1 -1
- package/sdk/dist/namespaces/buzz.d.ts +2 -2
- package/sdk/dist/namespaces/buzz.d.ts.map +1 -1
- package/sdk/dist/namespaces/buzz.js +2 -2
- package/sdk/dist/namespaces/buzz.js.map +1 -1
- package/sdk/dist/namespaces/buzz.types.d.ts +2 -2
- package/sdk/dist/namespaces/buzz.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/ci.js +3 -3
- package/sdk/dist/namespaces/ci.js.map +1 -1
- package/sdk/dist/namespaces/credentials.types.d.ts +1 -1
- package/sdk/dist/namespaces/deploy.d.ts +1 -1
- package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
- package/sdk/dist/namespaces/deploy.js +31 -32
- package/sdk/dist/namespaces/deploy.js.map +1 -1
- package/sdk/dist/namespaces/deploy.types.d.ts +6 -6
- package/sdk/dist/namespaces/deploy.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/domains.d.ts +10 -2
- package/sdk/dist/namespaces/domains.d.ts.map +1 -1
- package/sdk/dist/namespaces/domains.js +10 -5
- package/sdk/dist/namespaces/domains.js.map +1 -1
- package/sdk/dist/namespaces/errors.js +1 -1
- package/sdk/dist/namespaces/escalations.d.ts +1 -1
- package/sdk/dist/namespaces/escalations.js +1 -1
- package/sdk/dist/namespaces/escalations.types.d.ts +2 -2
- package/sdk/dist/namespaces/escalations.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/events.types.d.ts +1 -1
- package/sdk/dist/namespaces/functions.d.ts +1 -1
- package/sdk/dist/namespaces/functions.js +2 -2
- package/sdk/dist/namespaces/functions.js.map +1 -1
- package/sdk/dist/namespaces/gitvault.crypto.d.ts +1 -1
- package/sdk/dist/namespaces/gitvault.d.ts +26 -26
- package/sdk/dist/namespaces/gitvault.d.ts.map +1 -1
- package/sdk/dist/namespaces/gitvault.js +113 -113
- package/sdk/dist/namespaces/gitvault.js.map +1 -1
- package/sdk/dist/namespaces/me.d.ts +120 -0
- package/sdk/dist/namespaces/me.d.ts.map +1 -0
- package/sdk/dist/namespaces/me.js +34 -0
- package/sdk/dist/namespaces/me.js.map +1 -0
- package/sdk/dist/namespaces/org.d.ts +108 -6
- package/sdk/dist/namespaces/org.d.ts.map +1 -1
- package/sdk/dist/namespaces/org.js +63 -7
- package/sdk/dist/namespaces/org.js.map +1 -1
- package/sdk/dist/namespaces/org.types.d.ts +29 -9
- package/sdk/dist/namespaces/org.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/pay.js +3 -3
- package/sdk/dist/namespaces/pay.js.map +1 -1
- package/sdk/dist/namespaces/projects.d.ts +9 -9
- package/sdk/dist/namespaces/projects.js +15 -15
- package/sdk/dist/namespaces/projects.js.map +1 -1
- package/sdk/dist/namespaces/projects.types.d.ts +28 -12
- package/sdk/dist/namespaces/projects.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/rooms.d.ts +7 -7
- package/sdk/dist/namespaces/rooms.js +17 -17
- package/sdk/dist/namespaces/rooms.js.map +1 -1
- package/sdk/dist/namespaces/rooms.types.d.ts +9 -9
- package/sdk/dist/namespaces/rooms.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/service.d.ts +1 -1
- package/sdk/dist/namespaces/service.js +1 -1
- package/sdk/dist/namespaces/{operator-session.d.ts → session.d.ts} +135 -51
- package/sdk/dist/namespaces/session.d.ts.map +1 -0
- package/sdk/dist/namespaces/{operator-session.js → session.js} +118 -30
- package/sdk/dist/namespaces/session.js.map +1 -0
- package/sdk/dist/namespaces/subdomains.d.ts +5 -5
- package/sdk/dist/namespaces/subdomains.d.ts.map +1 -1
- package/sdk/dist/namespaces/subdomains.js +6 -6
- package/sdk/dist/namespaces/subdomains.js.map +1 -1
- package/sdk/dist/namespaces/tier.d.ts +44 -21
- package/sdk/dist/namespaces/tier.d.ts.map +1 -1
- package/sdk/dist/namespaces/tier.js +7 -7
- package/sdk/dist/namespaces/tier.js.map +1 -1
- package/sdk/dist/namespaces/transfers.d.ts +119 -85
- package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
- package/sdk/dist/namespaces/transfers.js +31 -38
- package/sdk/dist/namespaces/transfers.js.map +1 -1
- package/sdk/dist/namespaces/vouchers.d.ts +9 -10
- package/sdk/dist/namespaces/vouchers.d.ts.map +1 -1
- package/sdk/dist/namespaces/vouchers.js +4 -5
- package/sdk/dist/namespaces/vouchers.js.map +1 -1
- package/sdk/dist/namespaces/wallets.d.ts +72 -3
- package/sdk/dist/namespaces/wallets.d.ts.map +1 -1
- package/sdk/dist/namespaces/wallets.js +141 -3
- package/sdk/dist/namespaces/wallets.js.map +1 -1
- package/sdk/dist/namespaces/write-approval.d.ts +101 -0
- package/sdk/dist/namespaces/write-approval.d.ts.map +1 -0
- package/sdk/dist/namespaces/write-approval.js +62 -0
- package/sdk/dist/namespaces/write-approval.js.map +1 -0
- package/sdk/dist/node/actions-node.d.ts +3 -3
- package/sdk/dist/node/actions-node.d.ts.map +1 -1
- package/sdk/dist/node/actions-node.js +44 -44
- package/sdk/dist/node/actions-node.js.map +1 -1
- package/sdk/dist/node/assets-node.js +6 -6
- package/sdk/dist/node/assets-node.js.map +1 -1
- package/sdk/dist/node/{bearer-claim-key.d.ts → bearer-redeem-key.d.ts} +12 -12
- package/sdk/dist/node/bearer-redeem-key.d.ts.map +1 -0
- package/sdk/dist/node/{bearer-claim-key.js → bearer-redeem-key.js} +21 -21
- package/sdk/dist/node/bearer-redeem-key.js.map +1 -0
- package/sdk/dist/node/ci.d.ts +1 -1
- package/sdk/dist/node/ci.d.ts.map +1 -1
- package/sdk/dist/node/ci.js +6 -6
- package/sdk/dist/node/ci.js.map +1 -1
- package/sdk/dist/node/credentials.d.ts +18 -17
- package/sdk/dist/node/credentials.d.ts.map +1 -1
- package/sdk/dist/node/credentials.js +29 -28
- package/sdk/dist/node/credentials.js.map +1 -1
- package/sdk/dist/node/deploy-manifest.d.ts +3 -5
- package/sdk/dist/node/deploy-manifest.d.ts.map +1 -1
- package/sdk/dist/node/deploy-manifest.js +3 -12
- package/sdk/dist/node/deploy-manifest.js.map +1 -1
- package/sdk/dist/node/funding-recovery.d.ts +1 -1
- package/sdk/dist/node/funding-recovery.d.ts.map +1 -1
- package/sdk/dist/node/funding-recovery.js +1 -1
- package/sdk/dist/node/funding-recovery.js.map +1 -1
- package/sdk/dist/node/gitvault-apply.d.ts +1 -1
- package/sdk/dist/node/gitvault-apply.d.ts.map +1 -1
- package/sdk/dist/node/gitvault-apply.js +1 -1
- package/sdk/dist/node/gitvault-apply.js.map +1 -1
- package/sdk/dist/node/gitvault-handoff.d.ts +22 -22
- package/sdk/dist/node/gitvault-handoff.d.ts.map +1 -1
- package/sdk/dist/node/gitvault-handoff.js +45 -45
- package/sdk/dist/node/gitvault-handoff.js.map +1 -1
- package/sdk/dist/node/gitvault-prewarm.js +7 -7
- package/sdk/dist/node/gitvault-prewarm.js.map +1 -1
- package/sdk/dist/node/gitvault-restore.d.ts +1 -1
- package/sdk/dist/node/gitvault-restore.js +1 -1
- package/sdk/dist/node/index.d.ts +16 -16
- package/sdk/dist/node/index.d.ts.map +1 -1
- package/sdk/dist/node/index.js +15 -15
- package/sdk/dist/node/index.js.map +1 -1
- package/sdk/dist/node/manifest-export.js +2 -2
- package/sdk/dist/node/manifest-export.js.map +1 -1
- package/sdk/dist/node/org-adopt.d.ts +49 -0
- package/sdk/dist/node/org-adopt.d.ts.map +1 -0
- package/sdk/dist/node/org-adopt.js +77 -0
- package/sdk/dist/node/org-adopt.js.map +1 -0
- package/sdk/dist/node/paid-fetch.d.ts +7 -7
- package/sdk/dist/node/paid-fetch.d.ts.map +1 -1
- package/sdk/dist/node/paid-fetch.js +54 -54
- package/sdk/dist/node/paid-fetch.js.map +1 -1
- package/sdk/dist/node/preflight.d.ts +1 -1
- package/sdk/dist/node/preflight.d.ts.map +1 -1
- package/sdk/dist/node/preflight.js +1 -1
- package/sdk/dist/node/preflight.js.map +1 -1
- package/sdk/dist/node/sites-node.js +1 -1
- package/sdk/dist/node/sites-node.js.map +1 -1
- package/sdk/dist/node/source-scan.d.ts +1 -1
- package/sdk/dist/node/source-scan.js +2 -2
- package/sdk/dist/node/source-scan.js.map +1 -1
- package/sdk/dist/scoped.d.ts +11 -11
- package/sdk/dist/scoped.d.ts.map +1 -1
- package/sdk/dist/scoped.js +5 -5
- package/sdk/dist/scoped.js.map +1 -1
- package/core-dist/operator-session.js +0 -154
- package/lib/allowance.mjs +0 -355
- package/lib/cloud.mjs +0 -256
- package/lib/core.mjs +0 -123
- package/lib/operator-proofs.mjs +0 -22
- package/lib/operator.mjs +0 -771
- package/sdk/core-dist/operator-session.js +0 -154
- package/sdk/dist/namespaces/allowance.d.ts +0 -79
- package/sdk/dist/namespaces/allowance.d.ts.map +0 -1
- package/sdk/dist/namespaces/allowance.js +0 -149
- package/sdk/dist/namespaces/allowance.js.map +0 -1
- package/sdk/dist/namespaces/operator-session.d.ts.map +0 -1
- package/sdk/dist/namespaces/operator-session.js.map +0 -1
- package/sdk/dist/namespaces/operator.d.ts +0 -359
- package/sdk/dist/namespaces/operator.d.ts.map +0 -1
- package/sdk/dist/namespaces/operator.js +0 -272
- package/sdk/dist/namespaces/operator.js.map +0 -1
- package/sdk/dist/node/bearer-claim-key.d.ts.map +0 -1
- package/sdk/dist/node/bearer-claim-key.js.map +0 -1
- package/sdk/dist/node/operator-claim.d.ts +0 -49
- package/sdk/dist/node/operator-claim.d.ts.map +0 -1
- package/sdk/dist/node/operator-claim.js +0 -77
- package/sdk/dist/node/operator-claim.js.map +0 -1
package/lib/assets.mjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* run402 assets — direct-to-S3 storage CLI.
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* run402 assets put <file> [files...] [--project <
|
|
6
|
-
* run402 assets get <key> --output <file> [--project <
|
|
7
|
-
* run402 assets ls [--project <
|
|
8
|
-
* run402 assets rm <key> [--project <
|
|
9
|
-
* run402 assets sign <key> [--project <
|
|
5
|
+
* run402 assets put <file> [files...] [--project <project_id>] [--key <dest>] [--content-type <mime>] [--private] [--immutable] [--concurrency N] [--no-resume]
|
|
6
|
+
* run402 assets get <key> --output <file> [--project <project_id>]
|
|
7
|
+
* run402 assets ls [--project <project_id>] [--prefix <p>] [--limit <n>]
|
|
8
|
+
* run402 assets rm <key> [--project <project_id>]
|
|
9
|
+
* run402 assets sign <key> [--project <project_id>] [--ttl <seconds>]
|
|
10
10
|
*
|
|
11
11
|
* For any file ≤ 5 GiB a single presigned PUT is used. Larger files use S3
|
|
12
12
|
* multipart uploads with 16 MiB parts (640 parts at 10 GiB; up to 10 000
|
|
@@ -45,7 +45,7 @@ Usage:
|
|
|
45
45
|
run402 assets diagnose <url> [options]
|
|
46
46
|
|
|
47
47
|
Options:
|
|
48
|
-
--project <
|
|
48
|
+
--project <project_id> Project ID (defaults to active project from 'run402 projects use')
|
|
49
49
|
--key <dest> Destination key (put only; defaults to file basename)
|
|
50
50
|
--content-type <mime> MIME override for blob put (defaults to extension inference)
|
|
51
51
|
--private Upload as private (not served by CDN; apikey required to read)
|
|
@@ -89,7 +89,7 @@ Arguments:
|
|
|
89
89
|
<file> Path to a file (or glob); pass multiple files to batch-upload
|
|
90
90
|
|
|
91
91
|
Options:
|
|
92
|
-
--project <
|
|
92
|
+
--project <project_id> Project ID (defaults to active project from 'run402 projects use')
|
|
93
93
|
--key <dest> Destination key; defaults to file basename. Use trailing '/' as prefix.
|
|
94
94
|
--content-type <mime> MIME override; defaults to inferring from the destination key extension
|
|
95
95
|
--private Upload as private (not served by CDN; apikey required to read)
|
|
@@ -124,7 +124,7 @@ Arguments:
|
|
|
124
124
|
|
|
125
125
|
Options:
|
|
126
126
|
--output <file> Local destination path (required)
|
|
127
|
-
--project <
|
|
127
|
+
--project <project_id> Project ID (defaults to active project)
|
|
128
128
|
|
|
129
129
|
Examples:
|
|
130
130
|
run402 assets get images/logo.png --output /tmp/logo.png --project prj_abc123
|
|
@@ -135,7 +135,7 @@ Usage:
|
|
|
135
135
|
run402 assets ls [options]
|
|
136
136
|
|
|
137
137
|
Options:
|
|
138
|
-
--project <
|
|
138
|
+
--project <project_id> Project ID (defaults to active project)
|
|
139
139
|
--prefix <p> Only list keys starting with this prefix
|
|
140
140
|
--limit <n> Max results (default 100, max 1000)
|
|
141
141
|
--sort <key> v1.50: key:asc (default) | createdAt:asc | createdAt:desc.
|
|
@@ -162,7 +162,7 @@ Arguments:
|
|
|
162
162
|
<key> Blob key to delete
|
|
163
163
|
|
|
164
164
|
Options:
|
|
165
|
-
--project <
|
|
165
|
+
--project <project_id> Project ID (defaults to active project)
|
|
166
166
|
|
|
167
167
|
Examples:
|
|
168
168
|
run402 assets rm images/logo.png --project prj_abc123
|
|
@@ -176,7 +176,7 @@ Arguments:
|
|
|
176
176
|
<key> Blob key to sign
|
|
177
177
|
|
|
178
178
|
Options:
|
|
179
|
-
--project <
|
|
179
|
+
--project <project_id> Project ID (defaults to active project)
|
|
180
180
|
--ttl <seconds> Signed-URL TTL (default 3600, min 60, max 604800)
|
|
181
181
|
|
|
182
182
|
Examples:
|
|
@@ -191,12 +191,12 @@ Arguments:
|
|
|
191
191
|
<url> Full blob URL (e.g. https://app.run402.com/_blob/avatar.png)
|
|
192
192
|
|
|
193
193
|
Options:
|
|
194
|
-
--project <
|
|
194
|
+
--project <project_id> Project ID (defaults to active project)
|
|
195
195
|
|
|
196
196
|
Output:
|
|
197
197
|
- Prints the JSON envelope on stdout (parseable by agent shell loops).
|
|
198
198
|
- Vantage caveat ("# probed once from gateway-us-east-1; not a global view")
|
|
199
|
-
on stderr — visible to TTY
|
|
199
|
+
on stderr — visible to a person at a TTY, ignored by piped consumers.
|
|
200
200
|
|
|
201
201
|
Exit codes:
|
|
202
202
|
0 observed SHA matches the gateway's expected SHA
|
|
@@ -575,7 +575,7 @@ async function diagnose(argv) {
|
|
|
575
575
|
const env = await getSdk().assets.diagnoseUrl(resolvedId, url);
|
|
576
576
|
// Always print the JSON envelope for agent consumption (parseable).
|
|
577
577
|
console.log(JSON.stringify(toCliDiagnoseEnvelope(env), null, 2));
|
|
578
|
-
// Vantage caveat to stderr so a TTY
|
|
578
|
+
// Vantage caveat to stderr so a person at a TTY sees it; agent shell loops
|
|
579
579
|
// that pipe stdout into another tool aren't affected.
|
|
580
580
|
process.stderr.write(
|
|
581
581
|
`\n# probed once from ${env.vantage}; not a global view\n`,
|
package/lib/auth.mjs
CHANGED
|
@@ -9,43 +9,43 @@ Usage:
|
|
|
9
9
|
run402 auth <subcommand> [args...]
|
|
10
10
|
|
|
11
11
|
Subcommands:
|
|
12
|
-
magic-link --email <addr> [--delivery link|code|both] [--redirect <url>] [--project <
|
|
12
|
+
magic-link --email <addr> [--delivery link|code|both] [--redirect <url>] [--project <project_id>]
|
|
13
13
|
Request passwordless email authentication. Link remains the default.
|
|
14
14
|
|
|
15
|
-
verify (--token <token> | --challenge-id <
|
|
15
|
+
verify (--token <token> | --challenge-id <challenge_id> --code <6 digits>) [--project <project_id>]
|
|
16
16
|
Exchange one email credential for access_token + refresh_token.
|
|
17
17
|
|
|
18
|
-
create-user --email <addr> [--admin <true|false>] [--invite] [--redirect <url>] [--project <
|
|
18
|
+
create-user --email <addr> [--admin <true|false>] [--invite] [--redirect <url>] [--project <project_id>]
|
|
19
19
|
Create or update a project auth user with the service key.
|
|
20
20
|
|
|
21
|
-
invite-user --email <addr> --redirect <url> [--admin <true|false>] [--project <
|
|
21
|
+
invite-user --email <addr> --redirect <url> [--admin <true|false>] [--project <project_id>]
|
|
22
22
|
Create/update a user and send a trusted invite magic link.
|
|
23
23
|
|
|
24
|
-
set-password --token <bearer> --new <password> [--current <password>] [--project <
|
|
24
|
+
set-password --token <bearer> --new <password> [--current <password>] [--project <project_id>]
|
|
25
25
|
Change, reset, or set a user's password. Requires the user's access_token.
|
|
26
26
|
|
|
27
|
-
settings [--allow-password-set <true|false>] [--preferred <method|null>] [--public-signup <policy>] [--require-admin-passkey <true|false>] [--allowed-email-domains <csv|none>] [--project <
|
|
27
|
+
settings [--allow-password-set <true|false>] [--preferred <method|null>] [--public-signup <policy>] [--require-admin-passkey <true|false>] [--allowed-email-domains <csv|none>] [--project <project_id>]
|
|
28
28
|
Update project auth settings (requires service_key).
|
|
29
29
|
|
|
30
|
-
passkey-register-options --token <bearer> --app-origin <origin> [--project <
|
|
30
|
+
passkey-register-options --token <bearer> --app-origin <origin> [--project <project_id>]
|
|
31
31
|
Create WebAuthn registration options for the authenticated user.
|
|
32
32
|
|
|
33
|
-
passkey-register-verify --token <bearer> --challenge <
|
|
33
|
+
passkey-register-verify --token <bearer> --challenge <challenge_id> --response <json> [--label <text>] [--project <project_id>]
|
|
34
34
|
Verify and store a passkey registration response.
|
|
35
35
|
|
|
36
|
-
passkey-login-options --app-origin <origin> [--email <addr>] [--project <
|
|
36
|
+
passkey-login-options --app-origin <origin> [--email <addr>] [--project <project_id>]
|
|
37
37
|
Create WebAuthn login options.
|
|
38
38
|
|
|
39
|
-
passkey-login-verify --challenge <
|
|
39
|
+
passkey-login-verify --challenge <challenge_id> --response <json> [--project <project_id>]
|
|
40
40
|
Verify a passkey login response and return session tokens.
|
|
41
41
|
|
|
42
|
-
passkeys --token <bearer> [--project <
|
|
42
|
+
passkeys --token <bearer> [--project <project_id>]
|
|
43
43
|
List the authenticated user's passkeys.
|
|
44
44
|
|
|
45
|
-
delete-passkey --token <bearer> --id <passkey_id> [--project <
|
|
45
|
+
delete-passkey --token <bearer> --id <passkey_id> [--project <project_id>]
|
|
46
46
|
Delete one authenticated-user passkey.
|
|
47
47
|
|
|
48
|
-
providers [--project <
|
|
48
|
+
providers [--project <project_id>]
|
|
49
49
|
List available auth providers for the project.
|
|
50
50
|
|
|
51
51
|
scaffold-roles [--table <name>] [--user-col <col>] [--role-col <col>] [--roles <csv>] [--cache-ttl <secs>]
|
|
@@ -73,7 +73,7 @@ Options:
|
|
|
73
73
|
--redirect <url> Required for link/both; optional for code
|
|
74
74
|
--intent <intent> signin (default), invite, claim, or recovery
|
|
75
75
|
--state <value> Optional client_state preserved through verification
|
|
76
|
-
--project <
|
|
76
|
+
--project <project_id> Project ID (defaults to active project)
|
|
77
77
|
|
|
78
78
|
Notes:
|
|
79
79
|
Acceptance does not prove delivery or disclose whether an account exists.
|
|
@@ -95,7 +95,7 @@ Options:
|
|
|
95
95
|
--invite Send a trusted invite magic link
|
|
96
96
|
--redirect <url> Required when --invite is used
|
|
97
97
|
--state <value> Optional client_state for the invite
|
|
98
|
-
--project <
|
|
98
|
+
--project <project_id> Project ID (defaults to active project)
|
|
99
99
|
|
|
100
100
|
Examples:
|
|
101
101
|
run402 auth create-user --email user@example.com
|
|
@@ -112,19 +112,19 @@ Options:
|
|
|
112
112
|
--redirect <url> Required: allowed auth redirect URL
|
|
113
113
|
--admin <bool> Optional: set project_admin status before inviting
|
|
114
114
|
--state <value> Optional client_state for the invite
|
|
115
|
-
--project <
|
|
115
|
+
--project <project_id> Project ID (defaults to active project)
|
|
116
116
|
`,
|
|
117
117
|
verify: `run402 auth verify — Exchange an email credential for session tokens
|
|
118
118
|
|
|
119
119
|
Usage:
|
|
120
120
|
run402 auth verify --token <token> [options]
|
|
121
|
-
run402 auth verify --challenge-id <
|
|
121
|
+
run402 auth verify --challenge-id <challenge_id> --code <6 digits> [options]
|
|
122
122
|
|
|
123
123
|
Options:
|
|
124
124
|
--token <token> Required: the one-time magic-link token
|
|
125
|
-
--challenge-id <
|
|
125
|
+
--challenge-id <challenge_id> Required with --code: opaque handle from magic-link request
|
|
126
126
|
--code <digits> Required with --challenge-id: six-digit email code
|
|
127
|
-
--project <
|
|
127
|
+
--project <project_id> Project ID (defaults to active project)
|
|
128
128
|
|
|
129
129
|
Notes:
|
|
130
130
|
Returns an access_token + refresh_token pair on success.
|
|
@@ -142,7 +142,7 @@ Options:
|
|
|
142
142
|
--token <bearer> Required: the user's access_token (Bearer token)
|
|
143
143
|
--new <password> Required: new password
|
|
144
144
|
--current <pwd> Current password (required when one is already set)
|
|
145
|
-
--project <
|
|
145
|
+
--project <project_id> Project ID (defaults to active project)
|
|
146
146
|
|
|
147
147
|
Examples:
|
|
148
148
|
run402 auth set-password --token eyJ... --new "new-pass" \\
|
|
@@ -159,7 +159,7 @@ Options:
|
|
|
159
159
|
--public-signup <policy> open, known_email, or invite_only
|
|
160
160
|
--require-admin-passkey <true|false> Require passkey auth for project_admin sessions
|
|
161
161
|
--allowed-email-domains <csv|none> Restrict hosted Google sign-in to these domains; 'none' clears (unrestricted)
|
|
162
|
-
--project <
|
|
162
|
+
--project <project_id> Project ID (defaults to active project)
|
|
163
163
|
|
|
164
164
|
Notes:
|
|
165
165
|
Requires the project's service_key (admin-level).
|
|
@@ -180,19 +180,19 @@ Usage:
|
|
|
180
180
|
Options:
|
|
181
181
|
--token <bearer> Required: authenticated user's access_token
|
|
182
182
|
--app-origin <origin> Required: exact app origin for WebAuthn
|
|
183
|
-
--project <
|
|
183
|
+
--project <project_id> Project ID (defaults to active project)
|
|
184
184
|
`,
|
|
185
185
|
"passkey-register-verify": `run402 auth passkey-register-verify — Verify passkey registration
|
|
186
186
|
|
|
187
187
|
Usage:
|
|
188
|
-
run402 auth passkey-register-verify --token <bearer> --challenge <
|
|
188
|
+
run402 auth passkey-register-verify --token <bearer> --challenge <challenge_id> --response <json> [options]
|
|
189
189
|
|
|
190
190
|
Options:
|
|
191
191
|
--token <bearer> Required: authenticated user's access_token
|
|
192
|
-
--challenge <
|
|
192
|
+
--challenge <challenge_id> Required: challenge_id returned by passkey-register-options
|
|
193
193
|
--response <json> Required: browser PublicKeyCredential JSON
|
|
194
194
|
--label <text> Optional passkey label
|
|
195
|
-
--project <
|
|
195
|
+
--project <project_id> Project ID (defaults to active project)
|
|
196
196
|
`,
|
|
197
197
|
"passkey-login-options": `run402 auth passkey-login-options — Create passkey login options
|
|
198
198
|
|
|
@@ -202,17 +202,17 @@ Usage:
|
|
|
202
202
|
Options:
|
|
203
203
|
--app-origin <origin> Required: exact app origin for WebAuthn
|
|
204
204
|
--email <addr> Optional email hint
|
|
205
|
-
--project <
|
|
205
|
+
--project <project_id> Project ID (defaults to active project)
|
|
206
206
|
`,
|
|
207
207
|
"passkey-login-verify": `run402 auth passkey-login-verify — Verify passkey login
|
|
208
208
|
|
|
209
209
|
Usage:
|
|
210
|
-
run402 auth passkey-login-verify --challenge <
|
|
210
|
+
run402 auth passkey-login-verify --challenge <challenge_id> --response <json> [options]
|
|
211
211
|
|
|
212
212
|
Options:
|
|
213
|
-
--challenge <
|
|
213
|
+
--challenge <challenge_id> Required: challenge_id returned by passkey-login-options
|
|
214
214
|
--response <json> Required: browser PublicKeyCredential JSON
|
|
215
|
-
--project <
|
|
215
|
+
--project <project_id> Project ID (defaults to active project)
|
|
216
216
|
`,
|
|
217
217
|
passkeys: `run402 auth passkeys — List passkeys
|
|
218
218
|
|
|
@@ -221,7 +221,7 @@ Usage:
|
|
|
221
221
|
|
|
222
222
|
Options:
|
|
223
223
|
--token <bearer> Required: authenticated user's access_token
|
|
224
|
-
--project <
|
|
224
|
+
--project <project_id> Project ID (defaults to active project)
|
|
225
225
|
`,
|
|
226
226
|
"delete-passkey": `run402 auth delete-passkey — Delete a passkey
|
|
227
227
|
|
|
@@ -231,7 +231,7 @@ Usage:
|
|
|
231
231
|
Options:
|
|
232
232
|
--token <bearer> Required: authenticated user's access_token
|
|
233
233
|
--id <passkey_id> Required: passkey ID to delete
|
|
234
|
-
--project <
|
|
234
|
+
--project <project_id> Project ID (defaults to active project)
|
|
235
235
|
`,
|
|
236
236
|
providers: `run402 auth providers — List available auth providers
|
|
237
237
|
|
|
@@ -239,7 +239,7 @@ Usage:
|
|
|
239
239
|
run402 auth providers [options]
|
|
240
240
|
|
|
241
241
|
Options:
|
|
242
|
-
--project <
|
|
242
|
+
--project <project_id> Project ID (defaults to active project)
|
|
243
243
|
|
|
244
244
|
Examples:
|
|
245
245
|
run402 auth providers
|
|
@@ -609,7 +609,7 @@ async function passkeyRegisterVerify(args) {
|
|
|
609
609
|
const label = parseFlag(args, "--label");
|
|
610
610
|
const projectId = resolveProjectId(parseFlag(args, "--project"));
|
|
611
611
|
if (!accessToken) fail({ code: "BAD_USAGE", message: "Missing --token <bearer_token>" });
|
|
612
|
-
if (!challengeId) fail({ code: "BAD_USAGE", message: "Missing --challenge <
|
|
612
|
+
if (!challengeId) fail({ code: "BAD_USAGE", message: "Missing --challenge <challenge_id>" });
|
|
613
613
|
const response = parseJsonFlag(args, "--response");
|
|
614
614
|
try {
|
|
615
615
|
const data = await getSdk().auth.verifyPasskeyRegistration(projectId, {
|
|
@@ -643,7 +643,7 @@ async function passkeyLoginOptions(args) {
|
|
|
643
643
|
async function passkeyLoginVerify(args) {
|
|
644
644
|
const challengeId = parseFlag(args, "--challenge");
|
|
645
645
|
const projectId = resolveProjectId(parseFlag(args, "--project"));
|
|
646
|
-
if (!challengeId) fail({ code: "BAD_USAGE", message: "Missing --challenge <
|
|
646
|
+
if (!challengeId) fail({ code: "BAD_USAGE", message: "Missing --challenge <challenge_id>" });
|
|
647
647
|
const response = parseJsonFlag(args, "--response");
|
|
648
648
|
try {
|
|
649
649
|
const data = await getSdk().auth.verifyPasskeyLogin(projectId, {
|
package/lib/billing.mjs
CHANGED
|
@@ -12,9 +12,9 @@ Subcommands:
|
|
|
12
12
|
create-email <email> Create an email organization
|
|
13
13
|
link-wallet [<org_id>] <wallet_address> Link a wallet to an email organization
|
|
14
14
|
checkout <identifier> --product <p> Create an org checkout
|
|
15
|
-
topup <identifier> --sats <n> [--wait] [--qr <file.png>] Top up the
|
|
15
|
+
topup <identifier> --sats <n> [--wait] [--qr <file.png>] Top up the allowance over Lightning (a bolt11 invoice; --qr also writes a scannable PNG)
|
|
16
16
|
auto-recharge [<org_id>] <on|off> [--threshold <n>]
|
|
17
|
-
balance <identifier>
|
|
17
|
+
balance <identifier> The allowance, by organization id (UUID), wallet (0x...), or email
|
|
18
18
|
history <identifier> [--limit <n>] Ledger history by organization id (UUID), wallet, or email
|
|
19
19
|
|
|
20
20
|
Examples:
|
|
@@ -79,14 +79,14 @@ Options:
|
|
|
79
79
|
|
|
80
80
|
Auth:
|
|
81
81
|
Requires SIWX from a wallet linked to the organization (signed automatically from
|
|
82
|
-
the local
|
|
82
|
+
the local wallet), or an admin key. Email lookups require an admin key.
|
|
83
83
|
|
|
84
84
|
Examples:
|
|
85
85
|
run402 billing history user@example.com
|
|
86
86
|
run402 billing history 0x1234... --limit 100
|
|
87
87
|
run402 billing history 00000000-0000-4000-8000-000000000001
|
|
88
88
|
`,
|
|
89
|
-
balance: `run402 billing balance — Show
|
|
89
|
+
balance: `run402 billing balance — Show an organization's allowance
|
|
90
90
|
|
|
91
91
|
Usage:
|
|
92
92
|
run402 billing balance <identifier>
|
|
@@ -97,7 +97,7 @@ Arguments:
|
|
|
97
97
|
|
|
98
98
|
Auth:
|
|
99
99
|
Requires SIWX from a wallet linked to the organization (signed automatically from
|
|
100
|
-
the local
|
|
100
|
+
the local wallet), or an admin key. Email lookups require an admin key.
|
|
101
101
|
|
|
102
102
|
Examples:
|
|
103
103
|
run402 billing balance user@example.com
|
|
@@ -262,7 +262,7 @@ async function topup(args) {
|
|
|
262
262
|
});
|
|
263
263
|
console.log(JSON.stringify(final, null, 2));
|
|
264
264
|
if (final.status === "paid" || final.status === "paid_late") {
|
|
265
|
-
console.error(`Received — ${final.amount_sats} sats
|
|
265
|
+
console.error(`Received — ${final.amount_sats} sats added $${(final.amount_usd_micros / 1_000_000).toFixed(2)} to the allowance${final.status === "paid_late" ? " (paid after the invoice expired; still credited)" : ""}.`);
|
|
266
266
|
} else if (final.status === "expired") {
|
|
267
267
|
console.error("No payment was observed before the invoice expired. If you already paid, it still credits on its own (the gateway keeps checking for an hour after expiry) — read the top-up again, or rerun with the same --idempotency-key. Otherwise mint a fresh one with the same command.");
|
|
268
268
|
process.exitCode = 2;
|
package/lib/branches.mjs
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
const HELP = `run402 branches — Contained project data branches
|
|
16
16
|
|
|
17
17
|
Usage:
|
|
18
|
-
run402 branches create [--project <
|
|
19
|
-
run402 branches list [--project <
|
|
20
|
-
run402 branches renew <
|
|
21
|
-
run402 branches delete <
|
|
18
|
+
run402 branches create [--project <project_id>] [--from-snapshot <snapshot_id>] [--name <label>] [--email-mode sandbox|off] [--enable-cron] [--ttl-days <n>] [--json]
|
|
19
|
+
run402 branches list [--project <project_id>] [--json]
|
|
20
|
+
run402 branches renew <branch_project_id> [--project <project_id>] [--ttl-days <n>] [--json]
|
|
21
|
+
run402 branches delete <branch_project_id> [--project <project_id>] [--json]
|
|
22
22
|
|
|
23
23
|
Legacy (still supported): a leading prj_... parent-project positional,
|
|
24
24
|
e.g. run402 branches renew prj_parent prj_branch. --project defaults to the
|
|
@@ -77,7 +77,7 @@ async function list(args) {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
async function renew(args) {
|
|
80
|
-
const { projectId, branchProjectId } = resolveProjectAndBranch(args, "run402 branches renew [
|
|
80
|
+
const { projectId, branchProjectId } = resolveProjectAndBranch(args, "run402 branches renew [project_id] <branch_project_id>");
|
|
81
81
|
const ttlDaysFlag = flagValue(args, "--ttl-days");
|
|
82
82
|
const ttlDays = ttlDaysFlag === null ? undefined : parseIntegerFlag("--ttl-days", ttlDaysFlag, { min: 1, max: 30 });
|
|
83
83
|
try {
|
|
@@ -91,7 +91,7 @@ async function renew(args) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
async function deleteBranch(args) {
|
|
94
|
-
const { projectId, branchProjectId } = resolveProjectAndBranch(args, "run402 branches delete [
|
|
94
|
+
const { projectId, branchProjectId } = resolveProjectAndBranch(args, "run402 branches delete [project_id] <branch_project_id>");
|
|
95
95
|
try {
|
|
96
96
|
await getSdk().branches.delete(projectId, branchProjectId);
|
|
97
97
|
console.log(JSON.stringify({ ok: true, project_id: projectId, branch_project_id: branchProjectId, deleted: true }, null, 2));
|
|
@@ -101,7 +101,7 @@ async function deleteBranch(args) {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
function resolveProjectAndBranch(args, usage) {
|
|
104
|
-
// Canonical: `<
|
|
104
|
+
// Canonical: `<branch_project_id> [--project <parent_project_id>]`. Branch ids are
|
|
105
105
|
// themselves prj_..., so a leading prj_ positional is only treated as the
|
|
106
106
|
// PARENT project when a second positional follows (requireRestPositional) —
|
|
107
107
|
// the legacy `renew prj_parent prj_branch` form.
|
package/lib/buzz-doctor.mjs
CHANGED
|
@@ -230,7 +230,7 @@ async function checkRun402Cli({ cwd, env, argv, run402Executable, updateCheck })
|
|
|
230
230
|
install_confidence: install.confidence,
|
|
231
231
|
package_manager: install.package_manager,
|
|
232
232
|
compatibility_source: "version_and_capability_probe",
|
|
233
|
-
required_capabilities: ["doctor --buzz", "doctor --buzz-agent", "wallets current", "
|
|
233
|
+
required_capabilities: ["doctor --buzz", "doctor --buzz-agent", "wallets current", "whoami", "identity link nostr"],
|
|
234
234
|
};
|
|
235
235
|
if (update?.status === "warning") {
|
|
236
236
|
const rawAction = update?.value?.next_actions?.[0];
|
|
@@ -689,7 +689,7 @@ function consoleRepair() {
|
|
|
689
689
|
type: "restore_run402_console_access",
|
|
690
690
|
surface: "buzz_settings",
|
|
691
691
|
command: "Open Buzz Desktop > Settings > Agents, select this agent, allow HTTPS access to https://console.run402.com, restart the agent, then rerun Run402 setup.",
|
|
692
|
-
why: "The no-terminal human adoption
|
|
692
|
+
why: "The no-terminal human adoption offer requires the Run402 console origin.",
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
|
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
const HELP = `run402 buzz notifications — route project events into a Buzz community channel
|
|
23
23
|
|
|
24
24
|
Usage:
|
|
25
|
-
run402 buzz notifications configure --org <uuid> --installation <buzzci_id> --name <route_name> --channel <uuid> (--project <
|
|
25
|
+
run402 buzz notifications configure --org <uuid> --installation <buzzci_id> --name <route_name> --channel <uuid> (--project <project_id> [--project <project_id> ...] | --all-projects) [--event-type <t> ...] [--event-class <c> ...] [--include-org-events] [--on-call <hex-pubkey> [--on-call-name <display>]]
|
|
26
26
|
--all-projects route every project the organization owns, present and future (project_scope org);
|
|
27
27
|
without it the route names its projects explicitly (--project, 1..50)
|
|
28
28
|
--include-org-events also deliver the org's own facts (the platform_payment_received receipt after a Lightning top-up) into the channel
|
|
29
|
-
run402 buzz notifications scope <buzzper_id> --org | --listed [--project <
|
|
29
|
+
run402 buzz notifications scope <buzzper_id> --org | --listed [--project <project_id> ...]
|
|
30
30
|
switch the route to the whole organization, or back to an explicit list (the stored list is kept;
|
|
31
31
|
--listed on a route with no stored list needs --project)
|
|
32
32
|
--on-call <hex> the Buzz agent (64-hex pubkey) a crash or platform incident pages with a p mention — the tag that wakes a managed Buzz agent
|
|
@@ -69,7 +69,7 @@ What can be routed:
|
|
|
69
69
|
Omitting --event-type/--event-class routes every registered type / every
|
|
70
70
|
non-forbidden class. There is no empty filter: the gateway rejects [].
|
|
71
71
|
|
|
72
|
-
Buzz is never a deadman channel: mandatory
|
|
72
|
+
Buzz is never a deadman channel: mandatory owner notifications keep their
|
|
73
73
|
human paths (email, Telegram) regardless of route state, and a Buzz delivery
|
|
74
74
|
acknowledges nothing.
|
|
75
75
|
|
|
@@ -228,7 +228,7 @@ async function projects(args) {
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
|
-
* `run402 buzz notifications scope <buzzper_id> --org | --listed [--project <
|
|
231
|
+
* `run402 buzz notifications scope <buzzper_id> --org | --listed [--project <project_id> ...]`
|
|
232
232
|
* — switch the route between the whole organization and an explicit list.
|
|
233
233
|
* The stored list survives the switch to `org`; `--listed` on a route with
|
|
234
234
|
* nothing stored needs `--project`.
|
|
@@ -238,7 +238,7 @@ async function scope(args) {
|
|
|
238
238
|
const valueFlags = ["--project"];
|
|
239
239
|
assertKnownFlags(a, [...valueFlags, "--org", "--listed", "--help", "-h"], valueFlags);
|
|
240
240
|
const positionals = requirePositionalCount(positionalArgs(a, valueFlags), valueFlags, {
|
|
241
|
-
min: 1, max: 1, command: "run402 buzz notifications scope <buzzper_id> --org | --listed [--project <
|
|
241
|
+
min: 1, max: 1, command: "run402 buzz notifications scope <buzzper_id> --org | --listed [--project <project_id> ...]", missing: "<buzzper_id>",
|
|
242
242
|
});
|
|
243
243
|
const [routeId] = positionals;
|
|
244
244
|
const org = a.includes("--org");
|
package/lib/buzz.mjs
CHANGED
|
@@ -23,7 +23,7 @@ The four independent states are:
|
|
|
23
23
|
Canonical workflows:
|
|
24
24
|
run402 buzz status
|
|
25
25
|
run402 buzz adopt offer --org <org_id> --identity-link <idlnk_id> [--deployment-context-file <json>]
|
|
26
|
-
--org the Run402 organization id as "run402
|
|
26
|
+
--org the Run402 organization id as "run402 whoami" returns it (a UUID)
|
|
27
27
|
--deployment-context-file JSON with exactly these five non-empty strings, and no others:
|
|
28
28
|
project_id, release_id, live_url, source_revision, verified_at
|
|
29
29
|
run402 buzz install --org <org_id> --community <buzz:community:host> [--authority <hex-pubkey>]
|
|
@@ -46,7 +46,7 @@ Explicit consent/decision commands:
|
|
|
46
46
|
run402 buzz revoke <buzzae_id>
|
|
47
47
|
|
|
48
48
|
Project-event routing into a Buzz channel (configure → authorize → test → live):
|
|
49
|
-
run402 buzz notifications configure --org <uuid> --installation <buzzci_id> --name <route_name> --channel <uuid> --project <
|
|
49
|
+
run402 buzz notifications configure --org <uuid> --installation <buzzci_id> --name <route_name> --channel <uuid> --project <project_id> [--event-type <t> ...] [--event-class <c> ...] [--include-org-events]
|
|
50
50
|
run402 buzz notifications status [--org <uuid> | <buzzper_id>]
|
|
51
51
|
run402 buzz notifications test <buzzper_id> [--wait]
|
|
52
52
|
run402 buzz notifications deliveries <buzzper_id> [--limit <n>] [--cursor <c>] [--delivery <buzzped_id>]
|
|
@@ -122,7 +122,7 @@ async function adopt(args) {
|
|
|
122
122
|
assertKnownFlags(a, values, values);
|
|
123
123
|
const [id] = requirePositionalCount(a, values, { min: 1, max: 1, command: "run402 buzz adopt complete <buzzha_id> --event-file <json>" });
|
|
124
124
|
const event = readJsonFile(requiredFlag(a, "--event-file"), "--event-file");
|
|
125
|
-
return invoke(() => getSdk({ authMode: "
|
|
125
|
+
return invoke(() => getSdk({ authMode: "session" }).buzz.humanAdoptions.complete(id, event, flagValue(a, "--idempotency-key") ?? undefined));
|
|
126
126
|
}
|
|
127
127
|
if (operation === "cancel") {
|
|
128
128
|
const a = normalizeArgv(rest);
|
package/lib/buzz.test.mjs
CHANGED
|
@@ -84,7 +84,7 @@ describe("run402 buzz CLI", () => {
|
|
|
84
84
|
return {
|
|
85
85
|
buzz_human_adoption_offer_id: `buzzhao_${"1".repeat(32)}`,
|
|
86
86
|
status: "available",
|
|
87
|
-
|
|
87
|
+
offer_url: `https://console.run402.com/buzz/adoptions/buzzhao_${"1".repeat(32)}`,
|
|
88
88
|
};
|
|
89
89
|
},
|
|
90
90
|
},
|
package/lib/cache.mjs
CHANGED
|
@@ -59,7 +59,7 @@ Subcommands:
|
|
|
59
59
|
Common flags:
|
|
60
60
|
--locale <code> (inspect only) Inspect a specific locale's row
|
|
61
61
|
(default: project's default locale)
|
|
62
|
-
--release-id <
|
|
62
|
+
--release-id <release_id> (inspect only) Inspect a specific release id
|
|
63
63
|
(default: project's active release)
|
|
64
64
|
|
|
65
65
|
Output:
|
package/lib/cdn.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* run402 cdn — CloudFront CDN diagnostics for public blob URLs.
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* run402 cdn wait-fresh <url> --sha <sha256> [--timeout <seconds>] [--project <
|
|
5
|
+
* run402 cdn wait-fresh <url> --sha <sha256> [--timeout <seconds>] [--project <project_id>]
|
|
6
6
|
*
|
|
7
7
|
* Wraps the SDK's `client.project(id).assets.waitFresh(...)`. Polls the gateway diagnose
|
|
8
8
|
* endpoint until the URL serves the expected SHA, then exits 0. On timeout,
|
|
@@ -45,7 +45,7 @@ Arguments:
|
|
|
45
45
|
Options:
|
|
46
46
|
--sha <hex> Expected hex SHA-256. Required.
|
|
47
47
|
--timeout <secs> Max wait in seconds. Default 60.
|
|
48
|
-
--project <
|
|
48
|
+
--project <project_id> Project ID (defaults to active project)
|
|
49
49
|
|
|
50
50
|
Output:
|
|
51
51
|
Prints a JSON result on stdout when polling ends:
|
package/lib/ci.mjs
CHANGED
|
@@ -21,8 +21,8 @@ const { version: RUN402_VERSION } = JSON.parse(
|
|
|
21
21
|
const HELP = `run402 ci — Manage CI/OIDC deploy bindings
|
|
22
22
|
|
|
23
23
|
Usage:
|
|
24
|
-
run402 ci link github [--project <
|
|
25
|
-
run402 ci list [--project <
|
|
24
|
+
run402 ci link github [--project <project_id>] [--manifest <path>] [--repo <owner/repo>] [--branch <name> | --environment <name>] [--repository-id <repository_id>] [--workflow <path>] [--expires-at <iso>] [--route-scope <pattern> ...] [--force]
|
|
25
|
+
run402 ci list [--project <project_id>]
|
|
26
26
|
run402 ci revoke <binding_id>
|
|
27
27
|
run402 ci set-asset-scopes <binding_id> <scope1> [<scope2> ...]
|
|
28
28
|
|
|
@@ -34,18 +34,18 @@ Subcommands:
|
|
|
34
34
|
`;
|
|
35
35
|
|
|
36
36
|
const SUB_HELP = {
|
|
37
|
-
link: `run402 ci link github — Link GitHub Actions OIDC for deploy
|
|
37
|
+
link: `run402 ci link github — Link GitHub Actions OIDC for run402 deploy
|
|
38
38
|
|
|
39
39
|
Usage:
|
|
40
|
-
run402 ci link github [--project <
|
|
40
|
+
run402 ci link github [--project <project_id>] [--manifest <path>] [--repo <owner/repo>] [--branch <name> | --environment <name>] [--repository-id <repository_id>] [--workflow <path>] [--expires-at <iso>] [--route-scope <pattern> ...] [--force]
|
|
41
41
|
|
|
42
42
|
Options:
|
|
43
|
-
--project <
|
|
43
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
44
44
|
--manifest <path> Manifest path used by the generated workflow (default: run402.deploy.json)
|
|
45
45
|
--repo <owner/repo> GitHub repo (default: inferred from origin remote)
|
|
46
46
|
--branch <name> Branch subject and push trigger (default: current branch)
|
|
47
47
|
--environment <name> GitHub environment subject; adds job.environment
|
|
48
|
-
--repository-id <
|
|
48
|
+
--repository-id <repository_id> Numeric GitHub repository id when API lookup is unavailable
|
|
49
49
|
--workflow <path> Workflow path (default: .github/workflows/run402-deploy.yml)
|
|
50
50
|
--expires-at <iso> Optional binding expiration timestamp
|
|
51
51
|
--route-scope <pattern> Optional exact path or final wildcard route scope, repeatable (examples: /admin, /api/*)
|
|
@@ -60,7 +60,7 @@ Notes:
|
|
|
60
60
|
list: `run402 ci list — List CI bindings
|
|
61
61
|
|
|
62
62
|
Usage:
|
|
63
|
-
run402 ci list [--project <
|
|
63
|
+
run402 ci list [--project <project_id>]
|
|
64
64
|
`,
|
|
65
65
|
revoke: `run402 ci revoke — Revoke a CI binding
|
|
66
66
|
|
|
@@ -245,7 +245,7 @@ ${environmentLine} steps:
|
|
|
245
245
|
- name: Deploy to run402
|
|
246
246
|
# Redirect stdin from /dev/null: a CI runner's stdin is a FIFO/file that
|
|
247
247
|
# older run402 CLIs counted as a second manifest source alongside --manifest.
|
|
248
|
-
run: npx --yes run402@${RUN402_VERSION} deploy
|
|
248
|
+
run: npx --yes run402@${RUN402_VERSION} deploy --manifest ${shellQuote(manifest)} --project ${shellQuote(projectId)} < /dev/null
|
|
249
249
|
`;
|
|
250
250
|
}
|
|
251
251
|
|
|
@@ -267,7 +267,7 @@ async function linkGithub(args) {
|
|
|
267
267
|
fail({
|
|
268
268
|
code: "BAD_USAGE",
|
|
269
269
|
message: "Missing provider: github.",
|
|
270
|
-
hint: "run402 ci link github [--project <
|
|
270
|
+
hint: "run402 ci link github [--project <project_id>]",
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
if (flags.branch && flags.environment) {
|
|
@@ -293,7 +293,7 @@ async function linkGithub(args) {
|
|
|
293
293
|
fail({
|
|
294
294
|
code: "GITHUB_REPOSITORY_ID_REQUIRED",
|
|
295
295
|
message: `Could not fetch the numeric GitHub repository id for ${repo}.`,
|
|
296
|
-
hint: "Set GITHUB_TOKEN/GH_TOKEN or pass --repository-id <
|
|
296
|
+
hint: "Set GITHUB_TOKEN/GH_TOKEN or pass --repository-id <repository_id>.",
|
|
297
297
|
details: { repo },
|
|
298
298
|
});
|
|
299
299
|
}
|
|
@@ -328,8 +328,8 @@ async function linkGithub(args) {
|
|
|
328
328
|
signedDelegation = signCiDelegation(values, { apiBase: API });
|
|
329
329
|
} catch (err) {
|
|
330
330
|
fail({
|
|
331
|
-
code: "
|
|
332
|
-
message: err?.message || "No local
|
|
331
|
+
code: "NO_WALLET",
|
|
332
|
+
message: err?.message || "No local wallet configured.",
|
|
333
333
|
hint: "Run: run402 init",
|
|
334
334
|
});
|
|
335
335
|
}
|
package/lib/claims.mjs
CHANGED
|
@@ -49,10 +49,10 @@ Advisory, always:
|
|
|
49
49
|
presence.
|
|
50
50
|
|
|
51
51
|
Room addressing:
|
|
52
|
-
Default room of the active project with no flags; --project <
|
|
52
|
+
Default room of the active project with no flags; --project <project_id> for another
|
|
53
53
|
project; --org <org_id> --room <key> (or RUN402_ROOM=<org_id>/<key>) for a
|
|
54
54
|
named org room. --room <key> alone works when the org resolves on its own
|
|
55
|
-
(--org / RUN402_ORG / the 'org' key of the nearest .run402.json / '
|
|
55
|
+
(--org / RUN402_ORG / the 'org' key of the nearest .run402.json / 'orgs use'),
|
|
56
56
|
and {"org":"...","room":"..."} in .run402.json binds a whole checkout.
|
|
57
57
|
|
|
58
58
|
Options:
|