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/email.mjs
CHANGED
|
@@ -74,51 +74,51 @@ Usage:
|
|
|
74
74
|
run402 email <subcommand> [args...]
|
|
75
75
|
|
|
76
76
|
Subcommands:
|
|
77
|
-
create <slug> [--project <
|
|
78
|
-
mailboxes [--project <
|
|
77
|
+
create <slug> [--project <project_id>] Create a project-scoped mailbox local part
|
|
78
|
+
mailboxes [--project <project_id>] List mailboxes with default-role metadata
|
|
79
79
|
and gateway next_actions
|
|
80
|
-
defaults [--outbound <slug|id>] [--auth-sender <slug|id>] [--project <
|
|
80
|
+
defaults [--outbound <slug|id>] [--auth-sender <slug|id>] [--project <project_id>]
|
|
81
81
|
Show or set mailbox defaults. With no
|
|
82
82
|
flags, prints current settings/candidates.
|
|
83
|
-
update [<slug|id>] --footer-policy <run402_transparency|none> [--project <
|
|
83
|
+
update [<slug|id>] --footer-policy <run402_transparency|none> [--project <project_id>]
|
|
84
84
|
Update per-mailbox settings
|
|
85
|
-
info [--project <
|
|
86
|
-
status [--project <
|
|
85
|
+
info [--project <project_id>] Show mailbox info, including footer policy
|
|
86
|
+
status [--project <project_id>] Alias for 'info' (prefer 'info')
|
|
87
87
|
send --to <email> [mode flags] Send an email (template or raw HTML)
|
|
88
|
-
list [--limit <n>] [--after <cursor>] [--direction <inbound|outbound>] [--project <
|
|
88
|
+
list [--limit <n>] [--after <cursor>] [--direction <inbound|outbound>] [--project <project_id>]
|
|
89
89
|
List messages (paginated). Returns BOTH
|
|
90
90
|
sent + received by default; --direction
|
|
91
91
|
inbound is the reconciliation backstop.
|
|
92
|
-
get <message_id> [--project <
|
|
93
|
-
get-raw <message_id> --output <file> [--project <
|
|
92
|
+
get <message_id> [--project <project_id>] Get a message with replies
|
|
93
|
+
get-raw <message_id> --output <file> [--project <project_id>]
|
|
94
94
|
Fetch raw RFC-822 bytes (inbound only).
|
|
95
95
|
--output is required: bytes are written
|
|
96
96
|
to the file; stdout receives a JSON
|
|
97
97
|
envelope { message_id, bytes, output }.
|
|
98
|
-
reply <message_id> --html "..." [--text "..."] [--subject "..."] [--from-name "..."] [--project <
|
|
98
|
+
reply <message_id> --html "..." [--text "..."] [--subject "..."] [--from-name "..."] [--project <project_id>]
|
|
99
99
|
Reply to an inbound message (threads via In-Reply-To)
|
|
100
|
-
delete [<slug|mailbox_id>] --confirm [--project <
|
|
100
|
+
delete [<slug|mailbox_id>] --confirm [--project <project_id>]
|
|
101
101
|
Delete the project's mailbox (irreversible)
|
|
102
102
|
webhooks <action> [args...] Manage webhooks (see below)
|
|
103
103
|
|
|
104
104
|
Webhook subcommands:
|
|
105
|
-
webhooks list [--project <
|
|
106
|
-
webhooks get <webhook_id> [--project <
|
|
107
|
-
webhooks delete <webhook_id> [--project <
|
|
108
|
-
webhooks update <webhook_id> [--url <url>] [--events <e1,e2>] [--project <
|
|
105
|
+
webhooks list [--project <project_id>] List webhooks
|
|
106
|
+
webhooks get <webhook_id> [--project <project_id>] Get a webhook
|
|
107
|
+
webhooks delete <webhook_id> [--project <project_id>] Delete a webhook
|
|
108
|
+
webhooks update <webhook_id> [--url <url>] [--events <e1,e2>] [--project <project_id>]
|
|
109
109
|
Update a webhook
|
|
110
|
-
webhooks register --url <url> --events <e1,e2> [--project <
|
|
110
|
+
webhooks register --url <url> --events <e1,e2> [--project <project_id>]
|
|
111
111
|
Register a new webhook
|
|
112
|
-
webhooks deliveries [--status <s>] [--project <
|
|
112
|
+
webhooks deliveries [--status <s>] [--project <project_id>]
|
|
113
113
|
List durable delivery rows (DLQ visibility)
|
|
114
|
-
webhooks redrive <delivery_id> [--project <
|
|
114
|
+
webhooks redrive <delivery_id> [--project <project_id>]
|
|
115
115
|
Re-queue a dead-lettered delivery
|
|
116
116
|
|
|
117
117
|
Send modes:
|
|
118
118
|
Template: --template <name> --var key=value [--var ...] OR --vars '{"k":"v",...}'
|
|
119
119
|
Raw HTML: --subject "..." --html "..." [--text "..."] (both --subject and --html required)
|
|
120
120
|
Raw HTML also supports: --attach <path>[:content-type] (repeatable; max 5, 7 MB total)
|
|
121
|
-
Both modes support: --from-name "Display Name" --project <
|
|
121
|
+
Both modes support: --from-name "Display Name" --project <project_id>
|
|
122
122
|
|
|
123
123
|
Choosing a mailbox:
|
|
124
124
|
--mailbox <slug|id> Target a specific mailbox. Accepted by send, list, get,
|
|
@@ -185,12 +185,12 @@ Options:
|
|
|
185
185
|
extension when the :content-type suffix is omitted.
|
|
186
186
|
--from-name "..." Display name for the From header
|
|
187
187
|
--mailbox <slug|id> Target mailbox. Omit to use default_outbound_mailbox_id.
|
|
188
|
-
--project <
|
|
188
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
189
189
|
`,
|
|
190
190
|
list: `run402 email list — List messages in the mailbox
|
|
191
191
|
|
|
192
192
|
Usage:
|
|
193
|
-
run402 email list [--mailbox <slug|id>] [--limit <n>] [--after <cursor>] [--project <
|
|
193
|
+
run402 email list [--mailbox <slug|id>] [--limit <n>] [--after <cursor>] [--project <project_id>]
|
|
194
194
|
`,
|
|
195
195
|
reply: `run402 email reply — Reply to an inbound message (threaded via In-Reply-To)
|
|
196
196
|
|
|
@@ -200,17 +200,17 @@ Usage:
|
|
|
200
200
|
delete: `run402 email delete — Delete the project's mailbox (irreversible)
|
|
201
201
|
|
|
202
202
|
Usage:
|
|
203
|
-
run402 email delete [<slug|mailbox_id>] --confirm [--project <
|
|
203
|
+
run402 email delete [<slug|mailbox_id>] --confirm [--project <project_id>]
|
|
204
204
|
`,
|
|
205
205
|
info: `run402 email info — Show mailbox info, including footer policy
|
|
206
206
|
|
|
207
207
|
Usage:
|
|
208
|
-
run402 email info [--project <
|
|
208
|
+
run402 email info [--project <project_id>]
|
|
209
209
|
`,
|
|
210
210
|
status: `run402 email status — Alias for 'run402 email info' (prefer 'info')
|
|
211
211
|
|
|
212
212
|
Usage:
|
|
213
|
-
run402 email status [--project <
|
|
213
|
+
run402 email status [--project <project_id>]
|
|
214
214
|
|
|
215
215
|
See 'run402 email info --help' for details. 'status' is kept for backward
|
|
216
216
|
compatibility; new code should use 'info'.
|
|
@@ -218,7 +218,7 @@ compatibility; new code should use 'info'.
|
|
|
218
218
|
"get-raw": `run402 email get-raw — Fetch raw RFC-822 bytes for an inbound message
|
|
219
219
|
|
|
220
220
|
Usage:
|
|
221
|
-
run402 email get-raw <message_id> --output <file> [--project <
|
|
221
|
+
run402 email get-raw <message_id> --output <file> [--project <project_id>]
|
|
222
222
|
|
|
223
223
|
Arguments:
|
|
224
224
|
<message_id> Inbound message ID
|
|
@@ -228,14 +228,14 @@ Options:
|
|
|
228
228
|
stdout receives a JSON envelope
|
|
229
229
|
{ message_id, bytes, output } — the MIME body is never
|
|
230
230
|
written to stdout, so the CLI stays pipeable.
|
|
231
|
-
--project <
|
|
231
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
232
232
|
--mailbox <slug|id> Target a specific mailbox (required when the project
|
|
233
233
|
has more than one)
|
|
234
234
|
`,
|
|
235
235
|
create: `run402 email create — Create a project mailbox
|
|
236
236
|
|
|
237
237
|
Usage:
|
|
238
|
-
run402 email create <slug> [--project <
|
|
238
|
+
run402 email create <slug> [--project <project_id>]
|
|
239
239
|
|
|
240
240
|
Arguments:
|
|
241
241
|
<slug> Mailbox slug (3-63 chars, lowercase alphanumeric +
|
|
@@ -244,7 +244,7 @@ Arguments:
|
|
|
244
244
|
<slug>@<project-mail-host>.mail.run402.com.
|
|
245
245
|
|
|
246
246
|
Options:
|
|
247
|
-
--project <
|
|
247
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
248
248
|
|
|
249
249
|
Notes:
|
|
250
250
|
- Up to 5 mailboxes per project; the same slug may be used by another project
|
|
@@ -256,7 +256,7 @@ Examples:
|
|
|
256
256
|
mailboxes: `run402 email mailboxes — List project mailboxes
|
|
257
257
|
|
|
258
258
|
Usage:
|
|
259
|
-
run402 email mailboxes [--project <
|
|
259
|
+
run402 email mailboxes [--project <project_id>]
|
|
260
260
|
|
|
261
261
|
Returns JSON: { mailboxes, mailbox_settings?, next_actions? }. Mailbox rows
|
|
262
262
|
include default-role/readiness metadata when the gateway provides it.
|
|
@@ -264,41 +264,41 @@ include default-role/readiness metadata when the gateway provides it.
|
|
|
264
264
|
defaults: `run402 email defaults — Show or set mailbox defaults
|
|
265
265
|
|
|
266
266
|
Usage:
|
|
267
|
-
run402 email defaults [--project <
|
|
268
|
-
run402 email defaults --outbound <slug|mbx_id> [--auth-sender <slug|mbx_id>] [--project <
|
|
269
|
-
run402 email defaults --auth-sender <slug|mbx_id> [--project <
|
|
267
|
+
run402 email defaults [--project <project_id>]
|
|
268
|
+
run402 email defaults --outbound <slug|mbx_id> [--auth-sender <slug|mbx_id>] [--project <project_id>]
|
|
269
|
+
run402 email defaults --auth-sender <slug|mbx_id> [--project <project_id>]
|
|
270
270
|
|
|
271
271
|
Options:
|
|
272
272
|
--outbound <slug|mbx_id> Set default_outbound_mailbox_id
|
|
273
273
|
--auth-sender <slug|mbx_id> Set auth_sender_mailbox_id
|
|
274
274
|
--clear-outbound Clear default_outbound_mailbox_id
|
|
275
275
|
--clear-auth-sender Clear auth_sender_mailbox_id
|
|
276
|
-
--project <
|
|
276
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
277
277
|
`,
|
|
278
278
|
update: `run402 email update — Update per-mailbox settings
|
|
279
279
|
|
|
280
280
|
Usage:
|
|
281
|
-
run402 email update [<slug|mbx_id>] --footer-policy <run402_transparency|none> [--project <
|
|
282
|
-
run402 email update --mailbox <slug|mbx_id> --footer-policy <run402_transparency|none> [--project <
|
|
281
|
+
run402 email update [<slug|mbx_id>] --footer-policy <run402_transparency|none> [--project <project_id>]
|
|
282
|
+
run402 email update --mailbox <slug|mbx_id> --footer-policy <run402_transparency|none> [--project <project_id>]
|
|
283
283
|
|
|
284
284
|
Options:
|
|
285
285
|
--footer-policy <policy> Outbound footer policy. Use run402_transparency or none.
|
|
286
286
|
Prototype projects are locked to run402_transparency;
|
|
287
287
|
attempts to set none return FOOTER_POLICY_TIER_REQUIRED.
|
|
288
288
|
--mailbox <slug|id> Target mailbox; omit only when the project has one mailbox.
|
|
289
|
-
--project <
|
|
289
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
290
290
|
`,
|
|
291
291
|
get: `run402 email get — Get a message with replies
|
|
292
292
|
|
|
293
293
|
Usage:
|
|
294
|
-
run402 email get <message_id> [--mailbox <slug|id>] [--project <
|
|
294
|
+
run402 email get <message_id> [--mailbox <slug|id>] [--project <project_id>]
|
|
295
295
|
|
|
296
296
|
Arguments:
|
|
297
297
|
<message_id> Message ID to fetch
|
|
298
298
|
|
|
299
299
|
Options:
|
|
300
300
|
--mailbox <slug|id> Target mailbox. Omit to use default_outbound_mailbox_id.
|
|
301
|
-
--project <
|
|
301
|
+
--project <project_id> Project ID (defaults to the active project)
|
|
302
302
|
|
|
303
303
|
Examples:
|
|
304
304
|
run402 email get msg_abc123 --mailbox support
|
package/lib/errors.mjs
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
normalizeArgv,
|
|
31
31
|
parseIntegerFlag,
|
|
32
32
|
positionalArgs,
|
|
33
|
+
failUnknownSubcommand,
|
|
33
34
|
} from "./argparse.mjs";
|
|
34
35
|
|
|
35
36
|
/** Wire `kind` vocabulary (mirrors the gateway's KINDS set). */
|
|
@@ -43,10 +44,10 @@ export const DEFAULT_INTERVAL_MS = 15000;
|
|
|
43
44
|
const HELP = `run402 errors — grouped error fingerprints + a promote/revert verdict
|
|
44
45
|
|
|
45
46
|
Usage:
|
|
46
|
-
run402 errors [--project <
|
|
47
|
-
run402 errors <fingerprint_id> [--project <
|
|
48
|
-
run402 errors --new-in <release_id|active> --fail-on-new [--human]
|
|
49
|
-
run402 errors --new-in <release_id|active> --watch <dur> [--fail-on-new]
|
|
47
|
+
run402 errors list [--project <project_id>] [filters] [--human]
|
|
48
|
+
run402 errors get <fingerprint_id> [--project <project_id>] [--human]
|
|
49
|
+
run402 errors list --new-in <release_id|active> --fail-on-new [--human]
|
|
50
|
+
run402 errors list --new-in <release_id|active> --watch <dur> [--fail-on-new]
|
|
50
51
|
|
|
51
52
|
What this is:
|
|
52
53
|
A "fingerprint" is one error IDENTITY — errors with the same normalized
|
|
@@ -66,12 +67,12 @@ What this is:
|
|
|
66
67
|
under that release; "active" resolves the project's live release.
|
|
67
68
|
|
|
68
69
|
Filters (each maps 1:1 to a query param):
|
|
69
|
-
--project <
|
|
70
|
+
--project <project_id> Project to read (defaults to the active project)
|
|
70
71
|
--since <iso> Window start (ISO-8601). Default: 24h before --until
|
|
71
72
|
--until <iso> Window end (ISO-8601). Default: now
|
|
72
73
|
--function <name> Only this function's fingerprints
|
|
73
74
|
--kind <kind> One of: ${KINDS.join(", ")}
|
|
74
|
-
--fingerprint <
|
|
75
|
+
--fingerprint <fingerprint_id> Only this fingerprint id (exact)
|
|
75
76
|
--new-in <rel|active> Only identities first seen under this release
|
|
76
77
|
(a release id, or the literal "active" for live)
|
|
77
78
|
--limit <n> Page size (default 50, max 200)
|
|
@@ -115,30 +116,38 @@ Auth:
|
|
|
115
116
|
leaks existence). Read-only; never lifecycle-gated.
|
|
116
117
|
|
|
117
118
|
The golden path — gate a promote:
|
|
118
|
-
run402 deploy promote
|
|
119
|
-
run402 errors --project <
|
|
119
|
+
run402 deploy promote <release_id> --project <project_id>
|
|
120
|
+
run402 errors list --project <project_id> --new-in <release_id> --watch 10m --fail-on-new
|
|
120
121
|
# exit 0 -> the new release is clean; exit 1 -> revert, drill in via logs.
|
|
121
122
|
# (a promote response already hands you this exact command in next_actions
|
|
122
123
|
# as the "watch_errors" action — copy it verbatim.)
|
|
123
124
|
|
|
124
125
|
Examples:
|
|
125
|
-
run402 errors
|
|
126
|
-
run402 errors --function checkout --kind uncaught
|
|
127
|
-
run402 errors --since 2026-07-11T00:00:00Z --limit 200
|
|
128
|
-
run402 errors fp_9b21fa
|
|
129
|
-
run402 errors --new-in active
|
|
130
|
-
run402 errors --new-in rel_01JX --fail-on-new # one-shot gate (CI)
|
|
131
|
-
run402 errors --new-in rel_01JX --watch 10m --interval 30s --fail-on-new
|
|
126
|
+
run402 errors list # last 24h, verdict + groups
|
|
127
|
+
run402 errors list --function checkout --kind uncaught
|
|
128
|
+
run402 errors list --since 2026-07-11T00:00:00Z --limit 200
|
|
129
|
+
run402 errors get fp_9b21fa # one fingerprint, all samples
|
|
130
|
+
run402 errors list --new-in active # what's new under the live release
|
|
131
|
+
run402 errors list --new-in rel_01JX --fail-on-new # one-shot gate (CI)
|
|
132
|
+
run402 errors list --new-in rel_01JX --watch 10m --interval 30s --fail-on-new
|
|
132
133
|
`;
|
|
133
134
|
|
|
134
135
|
export async function run(sub, args = []) {
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
136
|
+
const rest = Array.isArray(args) ? args : [];
|
|
137
|
+
if (sub === undefined || sub === null || sub === "--help" || sub === "-h" || rest.includes("--help") || rest.includes("-h")) {
|
|
137
138
|
console.log(HELP);
|
|
138
139
|
process.exit(0);
|
|
139
140
|
}
|
|
141
|
+
switch (sub) {
|
|
142
|
+
case "list": return runErrors("list", rest);
|
|
143
|
+
case "get": return runErrors("get", rest);
|
|
144
|
+
default:
|
|
145
|
+
failUnknownSubcommand("errors", sub);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
140
148
|
|
|
141
|
-
|
|
149
|
+
async function runErrors(mode, args) {
|
|
150
|
+
const a = normalizeArgv(args);
|
|
142
151
|
const valueFlags = [
|
|
143
152
|
"--project", "--since", "--until", "--function", "--kind",
|
|
144
153
|
"--fingerprint", "--new-in", "--limit", "--cursor", "--watch", "--interval",
|
|
@@ -147,14 +156,21 @@ export async function run(sub, args = []) {
|
|
|
147
156
|
assertKnownFlags(a, [...valueFlags, ...boolFlags], valueFlags);
|
|
148
157
|
|
|
149
158
|
const positionals = positionalArgs(a, valueFlags);
|
|
150
|
-
if (positionals.length >
|
|
159
|
+
if (mode === "list" && positionals.length > 0) {
|
|
160
|
+
fail({
|
|
161
|
+
code: "BAD_USAGE",
|
|
162
|
+
message: `Unexpected argument for errors list: ${positionals[0]}`,
|
|
163
|
+
hint: "Read one fingerprint with `run402 errors get <fingerprint_id>`. Run `run402 errors --help`.",
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (mode === "get" && positionals.length !== 1) {
|
|
151
167
|
fail({
|
|
152
168
|
code: "BAD_USAGE",
|
|
153
|
-
message: `Unexpected extra argument: ${positionals[1]}`,
|
|
154
|
-
hint: "
|
|
169
|
+
message: positionals.length === 0 ? "Missing <fingerprint_id>." : `Unexpected extra argument: ${positionals[1]}`,
|
|
170
|
+
hint: "Usage: run402 errors get <fingerprint_id> [--project <project_id>] [--human]",
|
|
155
171
|
});
|
|
156
172
|
}
|
|
157
|
-
const fingerprintId = positionals[0]
|
|
173
|
+
const fingerprintId = mode === "get" ? positionals[0] : null;
|
|
158
174
|
// Output contract (cli-output-shape): JSON is ALWAYS the default. `--json`
|
|
159
175
|
// is a universally-accepted no-op; human rendering is the `--human`
|
|
160
176
|
// opt-out, matching `run402 up`. Never gate stdout shape on `--json`.
|
|
@@ -183,8 +199,8 @@ export async function run(sub, args = []) {
|
|
|
183
199
|
if (offending) {
|
|
184
200
|
fail({
|
|
185
201
|
code: "BAD_USAGE",
|
|
186
|
-
message: `${offending} is not valid with
|
|
187
|
-
hint: "
|
|
202
|
+
message: `${offending} is not valid with errors get <fingerprint_id>.`,
|
|
203
|
+
hint: "errors get accepts only --project and --human. Use `run402 errors list` to list + get a verdict.",
|
|
188
204
|
});
|
|
189
205
|
}
|
|
190
206
|
const projectId = resolveProjectId(project);
|
package/lib/escalations.mjs
CHANGED
|
@@ -29,7 +29,7 @@ const ORG_FLAGS = ["--org", "--project"];
|
|
|
29
29
|
const HELP = `run402 escalations — page a human when you judge you need one
|
|
30
30
|
|
|
31
31
|
Usage:
|
|
32
|
-
run402 escalations raise <reason> [--severity high] [--wait] [--project <
|
|
32
|
+
run402 escalations raise <reason> [--severity high] [--wait] [--project <project_id>]
|
|
33
33
|
run402 escalations list [--status open] [--limit <n>] [--cursor <c>]
|
|
34
34
|
run402 escalations get <escalation_id> [--delivery]
|
|
35
35
|
run402 escalations ack <escalation_id>
|
|
@@ -48,12 +48,12 @@ WHEN TO RAISE — the judgement is yours, and that is the product:
|
|
|
48
48
|
|
|
49
49
|
The flow: judge -> raise -> wait -> proceed-or-stand-down.
|
|
50
50
|
\`--wait\` blocks until a human acknowledges (polls for you). Without it,
|
|
51
|
-
poll \`run402 escalations get <
|
|
51
|
+
poll \`run402 escalations get <escalation_id>\` yourself. \`acknowledged\` means a NAMED
|
|
52
52
|
human owns it — then do what they say, or stand down. Silence is not consent.
|
|
53
53
|
|
|
54
54
|
Addressing:
|
|
55
55
|
(default) The active project's organization — a checkout needs no flags.
|
|
56
|
-
--project <
|
|
56
|
+
--project <project_id> Resolve the org from another project.
|
|
57
57
|
--org <org_id> Explicit organization.
|
|
58
58
|
|
|
59
59
|
Delivery:
|
|
@@ -65,7 +65,7 @@ Delivery:
|
|
|
65
65
|
|
|
66
66
|
Contacts are attention policy, never authorization — adding someone says
|
|
67
67
|
"page this human", never "this human may do anything". Owner + passkey
|
|
68
|
-
step-up to change. An address with no verified
|
|
68
|
+
step-up to change. An address with no verified contact email is accepted
|
|
69
69
|
with a warning rather than rejected (the person you most want on a level-2
|
|
70
70
|
chain may hold no platform credential at all).
|
|
71
71
|
|
|
@@ -235,7 +235,7 @@ async function contacts(args) {
|
|
|
235
235
|
fail({
|
|
236
236
|
code: "COMMAND_REMOVED",
|
|
237
237
|
message: "`run402 escalations contacts` moved to `run402 contacts`.",
|
|
238
|
-
hint: sub === "remove" ? "run402 contacts rm <
|
|
238
|
+
hint: sub === "remove" ? "run402 contacts rm <contact_id>" : `run402 contacts ${sub ?? "list"}`,
|
|
239
239
|
details: {
|
|
240
240
|
was: `escalations contacts${sub ? ` ${sub}` : ""}`,
|
|
241
241
|
now: "contacts",
|
package/lib/events.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* since I last looked": deploy activations, mailbox suspensions, transfers,
|
|
5
5
|
* lifecycle cliffs, verification outcomes — each with platform-synthesized
|
|
6
6
|
* next_actions drill-downs. The feed also carries app-emitted business
|
|
7
|
-
*
|
|
7
|
+
* events (a deployed function's own `events.emit(...)` calls) alongside the
|
|
8
8
|
* platform's own events — filter with --source/--type.
|
|
9
9
|
*
|
|
10
10
|
* JSON envelope to stdout (pipe contract); flags map 1:1 to the HTTP query.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { resolveProjectId } from "./config.mjs";
|
|
16
16
|
import { getSdk } from "./sdk.mjs";
|
|
17
17
|
import { reportSdkError, fail } from "./sdk-errors.mjs";
|
|
18
|
-
import { assertAllowedValue, assertKnownFlags, flagValue, normalizeArgv, positionalArgs } from "./argparse.mjs";
|
|
18
|
+
import { assertAllowedValue, assertKnownFlags, flagValue, normalizeArgv, positionalArgs, failUnknownSubcommand } from "./argparse.mjs";
|
|
19
19
|
|
|
20
20
|
/** Wire `source` vocabulary (mirrors the gateway's app/platform dichotomy). */
|
|
21
21
|
export const SOURCES = ["app", "platform"];
|
|
@@ -23,15 +23,15 @@ export const SOURCES = ["app", "platform"];
|
|
|
23
23
|
const HELP = `run402 events — what happened to your project since you last looked
|
|
24
24
|
|
|
25
25
|
Usage:
|
|
26
|
-
run402 events [--project <project_id>] [--cursor <cursor>] [--limit <n>]
|
|
27
|
-
|
|
28
|
-
run402 events --org <org_id> [--cursor <cursor>] [--limit <n>]
|
|
29
|
-
|
|
26
|
+
run402 events list [--project <project_id>] [--cursor <cursor>] [--limit <n>]
|
|
27
|
+
[--source <app|platform>] [--type <name[,name]>]
|
|
28
|
+
run402 events list --org <org_id> [--cursor <cursor>] [--limit <n>]
|
|
29
|
+
[--source <app|platform>] [--type <name[,name]>]
|
|
30
30
|
|
|
31
31
|
Options:
|
|
32
|
-
--project <
|
|
33
|
-
--org <
|
|
34
|
-
feeds: it also carries org-level
|
|
32
|
+
--project <project_id> Project to read (defaults to the active project)
|
|
33
|
+
--org <org_id> Read the org-wide feed instead — a SUPERSET of the project
|
|
34
|
+
feeds: it also carries org-level events (project_id null)
|
|
35
35
|
--cursor <cursor> Opaque cursor from a previous response. Returns events strictly
|
|
36
36
|
after it. Omit on first contact to start from the earliest
|
|
37
37
|
retained event.
|
|
@@ -45,7 +45,7 @@ App events vs platform events:
|
|
|
45
45
|
operational record (deploy activations, mailbox suspensions, transfers,
|
|
46
46
|
lifecycle cliffs, verification outcomes, ...) — the platform's internal
|
|
47
47
|
producers (gateway, email-lambda, ...) all collapse under this one value.
|
|
48
|
-
"app" is business
|
|
48
|
+
"app" is business events a deployed function emitted itself via
|
|
49
49
|
\`events.emit(type, payload?, {idempotencyKey?})\` from @run402/functions —
|
|
50
50
|
e.g. "signature_completed" or "booking_created". Consumers should key on
|
|
51
51
|
the PAIR (source, event_type) together: app event_type names are free-form
|
|
@@ -58,7 +58,7 @@ The cursor model — an id is not a cursor:
|
|
|
58
58
|
your repo, a memory note — wherever you keep state) and pass it back as
|
|
59
59
|
--cursor next time. One call then returns everything you missed.
|
|
60
60
|
- Two opaque tokens, and they are different things. An event's "id" names a
|
|
61
|
-
|
|
61
|
+
EVENT: the same event has the same id in the project feed and the org feed,
|
|
62
62
|
which is how you dedup across both. The page "cursor" names a POSITION,
|
|
63
63
|
and a position only means something inside the row set it came from.
|
|
64
64
|
- So a cursor is NOT portable. Replaying a --project cursor against --org,
|
|
@@ -84,9 +84,9 @@ When your cursor is unusable (reset semantics):
|
|
|
84
84
|
Event shape:
|
|
85
85
|
{ "id", "project_id", "event_type", "class", "occurred_at", "payload",
|
|
86
86
|
"next_actions" }
|
|
87
|
-
project_id is what the
|
|
87
|
+
project_id is what the event is ABOUT. It is null for an org-level event —
|
|
88
88
|
one that belongs to the org and to no project, visible only via --org. It
|
|
89
|
-
may also name a project that no longer exists:
|
|
89
|
+
may also name a project that no longer exists: an event outlives the project
|
|
90
90
|
it describes, so deleting a project no longer erases its history.
|
|
91
91
|
event_type is flat snake_case: deploy_activated, mailbox_suspended,
|
|
92
92
|
project_transfer_completed, organization_past_due, verification_failed,
|
|
@@ -107,30 +107,37 @@ own deploy_activated event — poll once after deploying to establish your
|
|
|
107
107
|
cursor, then catch up next session in one call.
|
|
108
108
|
|
|
109
109
|
Examples:
|
|
110
|
-
run402 events # active project, from the earliest retained event
|
|
111
|
-
run402 events --cursor evc_1a2b # everything since last time
|
|
112
|
-
run402 events --project prj_abc --limit 200
|
|
113
|
-
run402 events --org 00000000-0000-0000-0000-aaaaaaaaaaaa --cursor evc_9z
|
|
114
|
-
run402 events --source app # just this project's own emitted business
|
|
115
|
-
run402 events --source app --type signature_completed,booking_created
|
|
116
|
-
run402 events --source platform # just the platform's operational record
|
|
110
|
+
run402 events list # active project, from the earliest retained event
|
|
111
|
+
run402 events list --cursor evc_1a2b # everything since last time
|
|
112
|
+
run402 events list --project prj_abc --limit 200
|
|
113
|
+
run402 events list --org 00000000-0000-0000-0000-aaaaaaaaaaaa --cursor evc_9z
|
|
114
|
+
run402 events list --source app # just this project's own emitted business events
|
|
115
|
+
run402 events list --source app --type signature_completed,booking_created
|
|
116
|
+
run402 events list --source platform # just the platform's operational record
|
|
117
117
|
`;
|
|
118
118
|
|
|
119
119
|
export async function run(sub, args) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (argv.includes("--help") || argv.includes("-h")) {
|
|
120
|
+
const rest = Array.isArray(args) ? args : [];
|
|
121
|
+
if (sub === undefined || sub === null || sub === "--help" || sub === "-h" || rest.includes("--help") || rest.includes("-h")) {
|
|
123
122
|
console.log(HELP);
|
|
124
123
|
process.exit(0);
|
|
125
124
|
}
|
|
126
|
-
|
|
125
|
+
switch (sub) {
|
|
126
|
+
case "list": return list(rest);
|
|
127
|
+
default:
|
|
128
|
+
failUnknownSubcommand("events", sub);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function list(args) {
|
|
133
|
+
const a = normalizeArgv(args);
|
|
127
134
|
const valueFlags = ["--project", "--org", "--cursor", "--limit", "--source", "--type"];
|
|
128
135
|
assertKnownFlags(a, [...valueFlags, "--help", "-h"], valueFlags);
|
|
129
136
|
const extra = positionalArgs(a, valueFlags);
|
|
130
137
|
if (extra.length > 0) {
|
|
131
138
|
fail({
|
|
132
139
|
code: "BAD_USAGE",
|
|
133
|
-
message: `Unexpected argument for events: ${extra[0]}`,
|
|
140
|
+
message: `Unexpected argument for events list: ${extra[0]}`,
|
|
134
141
|
hint: "Run `run402 events --help` for usage.",
|
|
135
142
|
});
|
|
136
143
|
}
|
package/lib/feedback.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { walletAuthHeaders } from "./config.mjs";
|
|
2
2
|
import { getSdk } from "./sdk.mjs";
|
|
3
3
|
import { reportSdkError, fail } from "./sdk-errors.mjs";
|
|
4
4
|
import { assertKnownFlags, normalizeArgv, failUnknownSubcommand, flagValue, positionalArgs } from "./argparse.mjs";
|
|
@@ -13,14 +13,14 @@ Notes:
|
|
|
13
13
|
answer from a human, raise an escalation instead:
|
|
14
14
|
run402 escalations raise "<what you need>" --severity high
|
|
15
15
|
- Requires an active tier (run402 tier set <tier>)
|
|
16
|
-
- Requires
|
|
16
|
+
- Requires a wallet (run402 init)
|
|
17
17
|
- Messages are capped at 8 KB (8192 bytes UTF-8) to keep the developer
|
|
18
18
|
inbox useful and prevent payload-dump misuse. Trim or summarize long
|
|
19
19
|
content (e.g. stack traces) before sending.
|
|
20
20
|
|
|
21
21
|
Finishing a deploy — the promotion consent flow:
|
|
22
22
|
When a commit or promote response reaches status "ready" with a public
|
|
23
|
-
site, it carries a next_actions entry of type
|
|
23
|
+
site, it carries a next_actions entry of type hand_to_member. That is
|
|
24
24
|
Run402 asking, through you, whether it may promote what your human built
|
|
25
25
|
on @run402com — for free, credited to your presence name (credited_as)
|
|
26
26
|
and to your human. Show your human both links (urls.site, urls.console),
|
|
@@ -56,8 +56,8 @@ Arguments:
|
|
|
56
56
|
joined with spaces if multiple are provided)
|
|
57
57
|
|
|
58
58
|
Flags:
|
|
59
|
-
--project <
|
|
60
|
-
promotion consent (the
|
|
59
|
+
--project <project_id> Project this feedback concerns. Required to relay a
|
|
60
|
+
promotion consent (the hand_to_member next action
|
|
61
61
|
from a deploy response) — the server resolves the
|
|
62
62
|
project's site URL, org, and your presence name for
|
|
63
63
|
the delivered message.
|
|
@@ -67,14 +67,14 @@ Flags:
|
|
|
67
67
|
|
|
68
68
|
Notes:
|
|
69
69
|
- Requires an active tier (run402 tier set <tier>)
|
|
70
|
-
- Requires
|
|
70
|
+
- Requires a wallet (run402 init)
|
|
71
71
|
- Messages are capped at 8 KB (8192 bytes UTF-8) to keep the developer
|
|
72
72
|
inbox useful and prevent payload-dump misuse.
|
|
73
73
|
- Finishing a deploy: when a commit/promote response carries a
|
|
74
|
-
|
|
74
|
+
hand_to_member next action, show your human urls.site and
|
|
75
75
|
urls.console, relay that Run402 would like to promote what they built
|
|
76
76
|
on @run402com for free (credited to credited_as and to them), and ask
|
|
77
|
-
yes or no. On yes: run402 feedback send "promote: yes" --project <
|
|
77
|
+
yes or no. On yes: run402 feedback send "promote: yes" --project <project_id>
|
|
78
78
|
[--handle <handle>]
|
|
79
79
|
|
|
80
80
|
Examples:
|
|
@@ -90,8 +90,8 @@ async function send(args) {
|
|
|
90
90
|
if (!text) {
|
|
91
91
|
fail({ code: "BAD_USAGE", message: "Missing message text." });
|
|
92
92
|
}
|
|
93
|
-
// Cap check runs BEFORE the
|
|
94
|
-
// a structured size error instead of being masked by a missing-
|
|
93
|
+
// Cap check runs BEFORE the wallet check so oversized payloads surface
|
|
94
|
+
// a structured size error instead of being masked by a missing-wallet
|
|
95
95
|
// exit.
|
|
96
96
|
const bytes = Buffer.byteLength(text, "utf-8");
|
|
97
97
|
if (bytes > MESSAGE_MAX_BYTES) {
|
|
@@ -111,8 +111,8 @@ async function send(args) {
|
|
|
111
111
|
details: { flag: "--handle", length: handle.length, max: 64 },
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
// Preserve the aggressive early exit when no
|
|
115
|
-
|
|
114
|
+
// Preserve the aggressive early exit when no local wallet is configured.
|
|
115
|
+
walletAuthHeaders("/feedback/v1");
|
|
116
116
|
|
|
117
117
|
const opts = {};
|
|
118
118
|
if (projectId) opts.project_id = projectId;
|