run402 4.94.0 → 4.96.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 +23 -23
- package/cli.mjs +8 -40
- package/core-dist/keystore.js +1 -1
- package/git-remote-run402.mjs +6 -6
- package/lib/admin.mjs +5 -5
- package/lib/ai.mjs +5 -5
- package/lib/apps.mjs +9 -9
- package/lib/archives.mjs +371 -8
- package/lib/argparse.mjs +5 -5
- package/lib/assets.mjs +12 -12
- package/lib/auth.mjs +34 -34
- package/lib/branches.mjs +7 -7
- package/lib/buzz-doctor.mjs +1 -1
- package/lib/buzz-notifications.mjs +4 -4
- package/lib/buzz.mjs +2 -2
- package/lib/cache.mjs +1 -1
- package/lib/cdn.mjs +2 -2
- package/lib/ci.mjs +8 -8
- package/lib/claims.mjs +2 -2
- package/lib/cold-start.mjs +2 -2
- package/lib/command-manifest.mjs +37 -76
- package/lib/config.mjs +4 -4
- package/lib/contacts.mjs +3 -3
- package/lib/contracts.mjs +11 -11
- package/lib/credentials.mjs +32 -32
- package/lib/daemon-path.mjs +3 -3
- package/lib/delegates.mjs +13 -13
- package/lib/deliveries.mjs +2 -2
- package/lib/deploy-v2.mjs +26 -26
- package/lib/dev.mjs +3 -3
- package/lib/doctor.mjs +49 -58
- package/lib/domains.mjs +27 -27
- package/lib/email.mjs +38 -38
- package/lib/errors.mjs +40 -24
- package/lib/escalations.mjs +4 -4
- package/lib/events.mjs +32 -25
- package/lib/feedback.mjs +2 -2
- package/lib/functions.mjs +34 -34
- package/lib/grants.mjs +7 -7
- package/lib/image.mjs +7 -7
- package/lib/init.mjs +32 -32
- package/lib/jobs.mjs +15 -15
- package/lib/live.mjs +1 -1
- package/lib/logs.mjs +8 -8
- package/lib/messages.mjs +5 -5
- package/lib/next-actions.mjs +2 -2
- package/lib/org-context.mjs +22 -22
- package/lib/{org.mjs → orgs.mjs} +140 -179
- package/lib/path-lookup.mjs +7 -10
- package/lib/path-lookup.test.mjs +19 -21
- package/lib/projects.mjs +45 -56
- package/lib/remote-helper-session.mjs +93 -93
- package/lib/repos.mjs +196 -197
- package/lib/rooms-context.mjs +7 -7
- package/lib/rooms.mjs +2 -2
- package/lib/sdk-errors.mjs +1 -1
- package/lib/secrets.mjs +13 -13
- package/lib/sites.mjs +14 -14
- package/lib/snapshots.mjs +10 -10
- package/lib/subdomains.mjs +12 -12
- package/lib/subscriptions.mjs +2 -2
- package/lib/transfer.mjs +1 -1
- package/lib/up.mjs +21 -21
- package/lib/{gitvault-capabilities.mjs → vault-capabilities.mjs} +10 -14
- package/lib/{gitvault-daemon-run.mjs → vault-daemon-run.mjs} +2 -2
- package/lib/{gitvault-daemon.mjs → vault-daemon.mjs} +23 -23
- package/lib/{gitvault-scaffold.mjs → vault-scaffold.mjs} +14 -14
- package/lib/{gitvault-target.mjs → vault-target.mjs} +22 -17
- package/lib/wallet-context.mjs +1 -1
- package/lib/wallets.mjs +1 -1
- package/lib/webhooks.mjs +8 -8
- package/lib/whoami.mjs +32 -5
- package/package.json +2 -2
- package/sdk/core-dist/keystore.js +1 -1
- package/sdk/dist/actions.d.ts +3 -3
- 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/credentials.d.ts +1 -1
- package/sdk/dist/errors.d.ts +6 -6
- package/sdk/dist/errors.d.ts.map +1 -1
- package/sdk/dist/errors.js +1 -1
- package/sdk/dist/errors.js.map +1 -1
- package/sdk/dist/index.d.ts +9 -9
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +9 -9
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/namespaces/admin.d.ts +1 -1
- package/sdk/dist/namespaces/admin.d.ts.map +1 -1
- package/sdk/dist/namespaces/ai.d.ts +1 -1
- package/sdk/dist/namespaces/ai.js +2 -2
- 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/ci.js +3 -3
- package/sdk/dist/namespaces/ci.js.map +1 -1
- package/sdk/dist/namespaces/deploy.d.ts +5 -5
- package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
- package/sdk/dist/namespaces/deploy.js +45 -46
- package/sdk/dist/namespaces/deploy.js.map +1 -1
- package/sdk/dist/namespaces/deploy.types.d.ts +19 -19
- 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/functions.js +1 -1
- package/sdk/dist/namespaces/functions.js.map +1 -1
- package/sdk/dist/namespaces/org.d.ts +2 -2
- package/sdk/dist/namespaces/org.js +2 -2
- package/sdk/dist/namespaces/org.types.d.ts +3 -3
- package/sdk/dist/namespaces/pay.js +1 -1
- package/sdk/dist/namespaces/{gitvault.d.ts → repos.d.ts} +438 -451
- package/sdk/dist/namespaces/repos.d.ts.map +1 -0
- package/sdk/dist/namespaces/{gitvault.js → repos.js} +454 -462
- package/sdk/dist/namespaces/repos.js.map +1 -0
- package/sdk/dist/namespaces/rooms.js +2 -2
- package/sdk/dist/namespaces/rooms.js.map +1 -1
- package/sdk/dist/namespaces/session.d.ts +2 -2
- package/sdk/dist/namespaces/session.d.ts.map +1 -1
- package/sdk/dist/namespaces/session.js +2 -2
- package/sdk/dist/namespaces/session.js.map +1 -1
- package/sdk/dist/namespaces/tier.d.ts +4 -4
- package/sdk/dist/namespaces/tier.d.ts.map +1 -1
- package/sdk/dist/namespaces/transfers.d.ts +46 -15
- package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
- package/sdk/dist/namespaces/transfers.js.map +1 -1
- package/sdk/dist/namespaces/{gitvault.crypto.d.ts → vault.crypto.d.ts} +141 -141
- package/sdk/dist/namespaces/vault.crypto.d.ts.map +1 -0
- package/sdk/dist/namespaces/{gitvault.crypto.js → vault.crypto.js} +173 -173
- package/sdk/dist/namespaces/vault.crypto.js.map +1 -0
- package/sdk/dist/namespaces/{gitvault.types.d.ts → vault.types.d.ts} +136 -136
- package/sdk/dist/namespaces/vault.types.d.ts.map +1 -0
- package/sdk/dist/namespaces/{gitvault.types.js → vault.types.js} +4 -4
- package/sdk/dist/namespaces/vault.types.js.map +1 -0
- package/sdk/dist/node/actions-node.js +8 -8
- 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-redeem-key.d.ts +1 -1
- package/sdk/dist/node/bearer-redeem-key.js +5 -5
- package/sdk/dist/node/bearer-redeem-key.js.map +1 -1
- package/sdk/dist/node/ci.js +1 -1
- package/sdk/dist/node/ci.js.map +1 -1
- package/sdk/dist/node/credentials.d.ts +1 -1
- package/sdk/dist/node/credentials.js +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/http-dispatcher.js +5 -5
- package/sdk/dist/node/http-dispatcher.js.map +1 -1
- package/sdk/dist/node/index.d.ts +29 -29
- package/sdk/dist/node/index.d.ts.map +1 -1
- package/sdk/dist/node/index.js +39 -39
- 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.js +1 -1
- package/sdk/dist/node/org-adopt.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/{gitvault-address.d.ts → vault-address.d.ts} +42 -42
- package/sdk/dist/node/vault-address.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-address.js → vault-address.js} +43 -43
- package/sdk/dist/node/vault-address.js.map +1 -0
- package/sdk/dist/node/{gitvault-apply.d.ts → vault-apply.d.ts} +27 -27
- package/sdk/dist/node/vault-apply.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-apply.js → vault-apply.js} +38 -38
- package/sdk/dist/node/vault-apply.js.map +1 -0
- package/sdk/dist/node/vault-byo-config.d.ts +29 -0
- package/sdk/dist/node/vault-byo-config.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-byo-config.js → vault-byo-config.js} +18 -18
- package/sdk/dist/node/vault-byo-config.js.map +1 -0
- package/sdk/dist/node/vault-byo-probe.d.ts +20 -0
- package/sdk/dist/node/vault-byo-probe.d.ts.map +1 -0
- package/sdk/dist/node/vault-byo-probe.js +57 -0
- package/sdk/dist/node/vault-byo-probe.js.map +1 -0
- package/sdk/dist/node/{gitvault-creation-journal.d.ts → vault-creation-journal.d.ts} +69 -69
- package/sdk/dist/node/vault-creation-journal.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-creation-journal.js → vault-creation-journal.js} +54 -54
- package/sdk/dist/node/vault-creation-journal.js.map +1 -0
- package/sdk/dist/node/{gitvault-degraded-read.d.ts → vault-degraded-read.d.ts} +34 -34
- package/sdk/dist/node/vault-degraded-read.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-degraded-read.js → vault-degraded-read.js} +24 -24
- package/sdk/dist/node/vault-degraded-read.js.map +1 -0
- package/sdk/dist/node/{gitvault-deploy.d.ts → vault-deploy.d.ts} +67 -67
- package/sdk/dist/node/vault-deploy.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-deploy.js → vault-deploy.js} +27 -27
- package/sdk/dist/node/vault-deploy.js.map +1 -0
- package/sdk/dist/node/{gitvault-edge-fetch.d.ts → vault-edge-fetch.d.ts} +9 -9
- package/sdk/dist/node/vault-edge-fetch.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-edge-fetch.js → vault-edge-fetch.js} +11 -11
- package/sdk/dist/node/vault-edge-fetch.js.map +1 -0
- package/sdk/dist/node/{gitvault-handoff.d.ts → vault-handoff.d.ts} +9 -9
- package/sdk/dist/node/vault-handoff.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-handoff.js → vault-handoff.js} +24 -24
- package/sdk/dist/node/vault-handoff.js.map +1 -0
- package/sdk/dist/node/{gitvault-keystore.d.ts → vault-keystore.d.ts} +87 -77
- package/sdk/dist/node/vault-keystore.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-keystore.js → vault-keystore.js} +105 -68
- package/sdk/dist/node/vault-keystore.js.map +1 -0
- package/sdk/dist/node/{gitvault-member-bundle.d.ts → vault-member-bundle.d.ts} +17 -17
- package/sdk/dist/node/vault-member-bundle.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-member-bundle.js → vault-member-bundle.js} +11 -11
- package/sdk/dist/node/vault-member-bundle.js.map +1 -0
- package/sdk/dist/node/{gitvault-mirror-backend.d.ts → vault-mirror-backend.d.ts} +26 -26
- package/sdk/dist/node/vault-mirror-backend.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-mirror-backend.js → vault-mirror-backend.js} +25 -25
- package/sdk/dist/node/vault-mirror-backend.js.map +1 -0
- package/sdk/dist/node/{gitvault-mirror-config.d.ts → vault-mirror-config.d.ts} +23 -23
- package/sdk/dist/node/vault-mirror-config.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-mirror-config.js → vault-mirror-config.js} +16 -16
- package/sdk/dist/node/vault-mirror-config.js.map +1 -0
- package/sdk/dist/node/{gitvault-mirror.d.ts → vault-mirror.d.ts} +36 -36
- package/sdk/dist/node/vault-mirror.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-mirror.js → vault-mirror.js} +75 -75
- package/sdk/dist/node/vault-mirror.js.map +1 -0
- package/sdk/dist/node/{gitvault-native-crypto.d.ts → vault-native-crypto.d.ts} +10 -10
- package/sdk/dist/node/vault-native-crypto.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-native-crypto.js → vault-native-crypto.js} +16 -16
- package/sdk/dist/node/vault-native-crypto.js.map +1 -0
- package/sdk/dist/node/{gitvault-open-or-create.d.ts → vault-open-or-create.d.ts} +16 -16
- package/sdk/dist/node/vault-open-or-create.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-open-or-create.js → vault-open-or-create.js} +10 -10
- package/sdk/dist/node/vault-open-or-create.js.map +1 -0
- package/sdk/dist/node/{gitvault-prewarm.d.ts → vault-prewarm.d.ts} +13 -13
- package/sdk/dist/node/vault-prewarm.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-prewarm.js → vault-prewarm.js} +25 -25
- package/sdk/dist/node/vault-prewarm.js.map +1 -0
- package/sdk/dist/node/{gitvault-profile-scan.d.ts → vault-profile-scan.d.ts} +3 -3
- package/sdk/dist/node/vault-profile-scan.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-profile-scan.js → vault-profile-scan.js} +12 -12
- package/sdk/dist/node/vault-profile-scan.js.map +1 -0
- package/sdk/dist/node/{gitvault-prune.d.ts → vault-prune.d.ts} +61 -61
- package/sdk/dist/node/vault-prune.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-prune.js → vault-prune.js} +34 -34
- package/sdk/dist/node/vault-prune.js.map +1 -0
- package/sdk/dist/node/{gitvault-publication.d.ts → vault-publication.d.ts} +399 -399
- package/sdk/dist/node/vault-publication.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-publication.js → vault-publication.js} +584 -584
- package/sdk/dist/node/vault-publication.js.map +1 -0
- package/sdk/dist/node/{gitvault-push-to-create.d.ts → vault-push-to-create.d.ts} +16 -16
- package/sdk/dist/node/vault-push-to-create.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-push-to-create.js → vault-push-to-create.js} +9 -9
- package/sdk/dist/node/vault-push-to-create.js.map +1 -0
- package/sdk/dist/node/{gitvault-recover.d.ts → vault-recover.d.ts} +50 -50
- package/sdk/dist/node/vault-recover.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-recover.js → vault-recover.js} +84 -84
- package/sdk/dist/node/vault-recover.js.map +1 -0
- package/sdk/dist/node/{gitvault-restore.d.ts → vault-restore.d.ts} +8 -8
- package/sdk/dist/node/vault-restore.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-restore.js → vault-restore.js} +11 -11
- package/sdk/dist/node/vault-restore.js.map +1 -0
- package/sdk/dist/node/{gitvault-snapshot.d.ts → vault-snapshot.d.ts} +48 -48
- package/sdk/dist/node/vault-snapshot.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-snapshot.js → vault-snapshot.js} +61 -61
- package/sdk/dist/node/vault-snapshot.js.map +1 -0
- package/sdk/dist/node/{gitvault-writer-state.d.ts → vault-writer-state.d.ts} +8 -8
- package/sdk/dist/node/vault-writer-state.d.ts.map +1 -0
- package/sdk/dist/node/{gitvault-writer-state.js → vault-writer-state.js} +15 -15
- package/sdk/dist/node/vault-writer-state.js.map +1 -0
- package/sdk/dist/node/workflow-output.js +4 -4
- package/sdk/dist/node/workflow-output.js.map +1 -1
- package/sdk/dist/scoped.d.ts +8 -8
- package/sdk/dist/scoped.d.ts.map +1 -1
- package/sdk/dist/scoped.js +3 -3
- package/sdk/dist/scoped.js.map +1 -1
- package/vault-surface.json +40 -0
- package/gitvault-surface.json +0 -89
- package/lib/cloud.mjs +0 -256
- package/lib/core.mjs +0 -123
- package/lib/gitvault.mjs +0 -163
- package/lib/source-access.mjs +0 -70
- package/sdk/dist/namespaces/gitvault.crypto.d.ts.map +0 -1
- package/sdk/dist/namespaces/gitvault.crypto.js.map +0 -1
- package/sdk/dist/namespaces/gitvault.d.ts.map +0 -1
- package/sdk/dist/namespaces/gitvault.js.map +0 -1
- package/sdk/dist/namespaces/gitvault.types.d.ts.map +0 -1
- package/sdk/dist/namespaces/gitvault.types.js.map +0 -1
- package/sdk/dist/node/gitvault-address.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-address.js.map +0 -1
- package/sdk/dist/node/gitvault-apply.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-apply.js.map +0 -1
- package/sdk/dist/node/gitvault-byo-config.d.ts +0 -29
- package/sdk/dist/node/gitvault-byo-config.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-byo-config.js.map +0 -1
- package/sdk/dist/node/gitvault-byo-probe.d.ts +0 -20
- package/sdk/dist/node/gitvault-byo-probe.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-byo-probe.js +0 -57
- package/sdk/dist/node/gitvault-byo-probe.js.map +0 -1
- package/sdk/dist/node/gitvault-creation-journal.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-creation-journal.js.map +0 -1
- package/sdk/dist/node/gitvault-degraded-read.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-degraded-read.js.map +0 -1
- package/sdk/dist/node/gitvault-deploy.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-deploy.js.map +0 -1
- package/sdk/dist/node/gitvault-edge-fetch.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-edge-fetch.js.map +0 -1
- package/sdk/dist/node/gitvault-handoff.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-handoff.js.map +0 -1
- package/sdk/dist/node/gitvault-keystore.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-keystore.js.map +0 -1
- package/sdk/dist/node/gitvault-member-bundle.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-member-bundle.js.map +0 -1
- package/sdk/dist/node/gitvault-mirror-backend.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-mirror-backend.js.map +0 -1
- package/sdk/dist/node/gitvault-mirror-config.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-mirror-config.js.map +0 -1
- package/sdk/dist/node/gitvault-mirror.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-mirror.js.map +0 -1
- package/sdk/dist/node/gitvault-native-crypto.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-native-crypto.js.map +0 -1
- package/sdk/dist/node/gitvault-open-or-create.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-open-or-create.js.map +0 -1
- package/sdk/dist/node/gitvault-prewarm.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-prewarm.js.map +0 -1
- package/sdk/dist/node/gitvault-profile-scan.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-profile-scan.js.map +0 -1
- package/sdk/dist/node/gitvault-prune.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-prune.js.map +0 -1
- package/sdk/dist/node/gitvault-publication.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-publication.js.map +0 -1
- package/sdk/dist/node/gitvault-push-to-create.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-push-to-create.js.map +0 -1
- package/sdk/dist/node/gitvault-recover.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-recover.js.map +0 -1
- package/sdk/dist/node/gitvault-restore.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-restore.js.map +0 -1
- package/sdk/dist/node/gitvault-snapshot.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-snapshot.js.map +0 -1
- package/sdk/dist/node/gitvault-writer-state.d.ts.map +0 -1
- package/sdk/dist/node/gitvault-writer-state.js.map +0 -1
package/gitvault-surface.json
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"surface_version": "4.94.0",
|
|
3
|
-
"verbs": [
|
|
4
|
-
"repos create",
|
|
5
|
-
"repos list",
|
|
6
|
-
"repos view",
|
|
7
|
-
"repos rename",
|
|
8
|
-
"repos delete",
|
|
9
|
-
"repos snapshot",
|
|
10
|
-
"repos handoff",
|
|
11
|
-
"repos resume",
|
|
12
|
-
"repos invite",
|
|
13
|
-
"repos join",
|
|
14
|
-
"repos policy",
|
|
15
|
-
"repos mirror",
|
|
16
|
-
"repos fsck",
|
|
17
|
-
"repos gc",
|
|
18
|
-
"repos access",
|
|
19
|
-
"repos access repair",
|
|
20
|
-
"repos access revoke-key",
|
|
21
|
-
"repos access declare-exposure",
|
|
22
|
-
"repos access sync",
|
|
23
|
-
"repos recover",
|
|
24
|
-
"repos recovery-bundle"
|
|
25
|
-
],
|
|
26
|
-
"retired_spellings": [
|
|
27
|
-
{
|
|
28
|
-
"spelling": "gitvault init",
|
|
29
|
-
"successor": "moved to `repos create --project <id>`"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"spelling": "gitvault status",
|
|
33
|
-
"successor": "moved to `repos view`"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"spelling": "gitvault snapshot",
|
|
37
|
-
"successor": "moved to `repos snapshot`"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"spelling": "gitvault policy",
|
|
41
|
-
"successor": "moved to `repos policy`"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"spelling": "gitvault compact",
|
|
45
|
-
"successor": "moved to `repos gc`"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"spelling": "gitvault prune",
|
|
49
|
-
"successor": "moved to `repos gc`"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"spelling": "gitvault verify",
|
|
53
|
-
"successor": "moved to `repos fsck`"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"spelling": "gitvault mirror",
|
|
57
|
-
"successor": "moved to `repos mirror`"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"spelling": "gitvault recover",
|
|
61
|
-
"successor": "moved to `repos recover`"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"spelling": "gitvault push",
|
|
65
|
-
"successor": "removed — its one-release deprecation-alias window is over; `git push` / `repos snapshot`"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"spelling": "gitvault reconcile",
|
|
69
|
-
"successor": "removed — a workaround with no permanent successor; read `repos access` instead"
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"capabilities": {
|
|
73
|
-
"revocation_live": true,
|
|
74
|
-
"human_envelope_add_live": true,
|
|
75
|
-
"mirror_live": true,
|
|
76
|
-
"byo_live": true,
|
|
77
|
-
"recover_live": true,
|
|
78
|
-
"allocation": "create_immediate",
|
|
79
|
-
"snapshot_dirty_default": "refuse",
|
|
80
|
-
"handoff_live": true,
|
|
81
|
-
"handoff_dirty_default": "capture",
|
|
82
|
-
"invite_live": true,
|
|
83
|
-
"join_live": true,
|
|
84
|
-
"remote_schemes": [
|
|
85
|
-
"run402",
|
|
86
|
-
"kygit"
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
}
|
package/lib/cloud.mjs
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, resolve } from "node:path";
|
|
3
|
-
|
|
4
|
-
import { getSdk } from "./sdk.mjs";
|
|
5
|
-
import { fail, reportSdkError } from "./sdk-errors.mjs";
|
|
6
|
-
import { assertAllowedValue, assertKnownFlags, flagValue, hasHelp, normalizeArgv, parseIntegerFlag, positionalArgs, resolveProjectSelector, failUnknownSubcommand } from "./argparse.mjs";
|
|
7
|
-
|
|
8
|
-
const HELP = `run402 cloud — Run402 Cloud portability commands
|
|
9
|
-
|
|
10
|
-
Usage:
|
|
11
|
-
run402 cloud archives create [--project <id>] [options]
|
|
12
|
-
run402 cloud archives download <archive-id> --output <file> [--project <id>] [--json]
|
|
13
|
-
run402 cloud archives status <archive-id> [--project <id>] [--json]
|
|
14
|
-
|
|
15
|
-
Legacy (still supported): a leading prj_... positional selects the project,
|
|
16
|
-
e.g. run402 cloud archives download <project-id> <archive-id> --output <file>.
|
|
17
|
-
--project defaults to the active project.
|
|
18
|
-
|
|
19
|
-
Canonical agent path:
|
|
20
|
-
run402 cloud archives create prj_... \\
|
|
21
|
-
--scope portable-runtime-v1 --auth stubs --consistency pause-writes \\
|
|
22
|
-
--wait --output ./project.r402ar --json
|
|
23
|
-
|
|
24
|
-
Options for create:
|
|
25
|
-
--scope <scope> Archive scope. v1 supports portable-runtime-v1.
|
|
26
|
-
--auth <mode> Auth export mode: stubs (default) or none.
|
|
27
|
-
--consistency <mode> pause-writes (default) or cloud_write_pause_v1.
|
|
28
|
-
--idempotency-key <key> Retry-safe creation key.
|
|
29
|
-
--wait Poll until the archive is ready.
|
|
30
|
-
--output <file> Save archive bytes. Implies --wait.
|
|
31
|
-
--poll-interval <ms> Poll interval while waiting (default 1000).
|
|
32
|
-
--timeout <ms> Wait timeout (default 600000).
|
|
33
|
-
--json Emit final JSON on stdout.
|
|
34
|
-
--json-stream Emit NDJSON progress events on stdout.
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
const FLAG_VALUES = [
|
|
38
|
-
"--project",
|
|
39
|
-
"--scope",
|
|
40
|
-
"--auth",
|
|
41
|
-
"--consistency",
|
|
42
|
-
"--idempotency-key",
|
|
43
|
-
"--output",
|
|
44
|
-
"--poll-interval",
|
|
45
|
-
"--timeout",
|
|
46
|
-
];
|
|
47
|
-
const FLAGS = new Set([
|
|
48
|
-
...FLAG_VALUES,
|
|
49
|
-
"--wait",
|
|
50
|
-
"--json",
|
|
51
|
-
"--json-stream",
|
|
52
|
-
"--help",
|
|
53
|
-
"-h",
|
|
54
|
-
]);
|
|
55
|
-
|
|
56
|
-
export async function run(sub, args = []) {
|
|
57
|
-
const all = [sub, ...args].filter(Boolean);
|
|
58
|
-
if (hasHelp(all)) {
|
|
59
|
-
console.log(HELP);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (sub !== "archives") {
|
|
63
|
-
failUnknownSubcommand("cloud", sub, {
|
|
64
|
-
next_actions: [{ type: "run_command", command: "run402 cloud archives --help" }],
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
const action = args[0];
|
|
68
|
-
const rest = args.slice(1);
|
|
69
|
-
if (action === "create") return create(rest);
|
|
70
|
-
if (action === "download") return download(rest);
|
|
71
|
-
if (action === "status") return status(rest);
|
|
72
|
-
failUnknownSubcommand("cloud archives", action, {
|
|
73
|
-
next_actions: [{ type: "run_command", command: "run402 cloud archives --help" }],
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function create(rawArgs) {
|
|
78
|
-
const args = normalizeArgv(rawArgs);
|
|
79
|
-
assertKnownFlags(args, [...FLAGS], FLAG_VALUES);
|
|
80
|
-
const { projectId, rest } = resolveProjectSelector(args, { valueFlags: FLAG_VALUES });
|
|
81
|
-
const extraPos = positionalArgs(rest, FLAG_VALUES);
|
|
82
|
-
if (extraPos.length > 0) {
|
|
83
|
-
fail({ code: "BAD_USAGE", message: `Unexpected argument for cloud archives create: ${extraPos[0]}` });
|
|
84
|
-
}
|
|
85
|
-
const scope = flagValue(args, "--scope") ?? "portable-runtime-v1";
|
|
86
|
-
const auth = flagValue(args, "--auth") ?? "stubs";
|
|
87
|
-
const consistency = flagValue(args, "--consistency") ?? "pause-writes";
|
|
88
|
-
assertAllowedValue(scope, ["portable-runtime-v1"], "--scope");
|
|
89
|
-
assertAllowedValue(auth, ["stubs", "none"], "--auth");
|
|
90
|
-
assertAllowedValue(consistency, ["pause-writes", "cloud_write_pause_v1"], "--consistency");
|
|
91
|
-
|
|
92
|
-
const output = flagValue(args, "--output");
|
|
93
|
-
const wait = args.includes("--wait") || Boolean(output);
|
|
94
|
-
const jsonStream = args.includes("--json-stream");
|
|
95
|
-
const idempotencyKey = flagValue(args, "--idempotency-key") ?? undefined;
|
|
96
|
-
const pollIntervalMs = parseIntegerFlag("--poll-interval", flagValue(args, "--poll-interval"), { min: 100, def: 1000 });
|
|
97
|
-
const timeoutMs = parseIntegerFlag("--timeout", flagValue(args, "--timeout"), { min: 1000, def: 600000 });
|
|
98
|
-
const emit = (event) => {
|
|
99
|
-
if (jsonStream) console.log(JSON.stringify(event));
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
const sdk = getSdk();
|
|
104
|
-
const created = await sdk.archives.create(projectId, {
|
|
105
|
-
scope,
|
|
106
|
-
auth,
|
|
107
|
-
consistency,
|
|
108
|
-
idempotencyKey,
|
|
109
|
-
});
|
|
110
|
-
emit(progressEvent("archive_export_created", "create", projectId, created));
|
|
111
|
-
|
|
112
|
-
let archive = created;
|
|
113
|
-
let outputPath = null;
|
|
114
|
-
let bytesWritten = 0;
|
|
115
|
-
if (wait) {
|
|
116
|
-
archive = created.status === "ready"
|
|
117
|
-
? created
|
|
118
|
-
: await sdk.archives.wait(projectId, created.archive_id, {
|
|
119
|
-
pollIntervalMs,
|
|
120
|
-
timeoutMs,
|
|
121
|
-
onProgress: emit,
|
|
122
|
-
});
|
|
123
|
-
if (archive.status !== "ready") {
|
|
124
|
-
const result = finalCreateResult({ projectId, created, archive, outputPath, bytesWritten });
|
|
125
|
-
printJson(result, jsonStream);
|
|
126
|
-
process.exit(1);
|
|
127
|
-
}
|
|
128
|
-
if (output) {
|
|
129
|
-
const download = await sdk.archives.download(projectId, archive.archive_id);
|
|
130
|
-
outputPath = resolve(output);
|
|
131
|
-
mkdirSync(dirname(outputPath), { recursive: true });
|
|
132
|
-
writeFileSync(outputPath, download.bytes);
|
|
133
|
-
bytesWritten = download.bytes.byteLength;
|
|
134
|
-
emit({
|
|
135
|
-
...progressEvent("archive_export_downloaded", "download", projectId, archive),
|
|
136
|
-
context: { output_path: outputPath, bytes_written: bytesWritten },
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const result = finalCreateResult({ projectId, created, archive, outputPath, bytesWritten });
|
|
142
|
-
if (jsonStream) {
|
|
143
|
-
console.log(JSON.stringify({
|
|
144
|
-
event: "archive_export_complete",
|
|
145
|
-
stage: "complete",
|
|
146
|
-
resource_type: "project_archive",
|
|
147
|
-
resource_id: archive.archive_id,
|
|
148
|
-
project_id: projectId,
|
|
149
|
-
status: archive.status === "ready" ? "complete" : archive.status,
|
|
150
|
-
completed_units: archive.status === "ready" ? 1 : 0,
|
|
151
|
-
total_units: 1,
|
|
152
|
-
code: null,
|
|
153
|
-
message: archive.status === "ready" ? "Archive export complete." : "Archive export did not complete.",
|
|
154
|
-
next_action: archive.next_action,
|
|
155
|
-
retryable: false,
|
|
156
|
-
result,
|
|
157
|
-
}));
|
|
158
|
-
} else {
|
|
159
|
-
console.log(JSON.stringify(result, null, 2));
|
|
160
|
-
}
|
|
161
|
-
if (archive.status !== "ready") process.exit(1);
|
|
162
|
-
} catch (err) {
|
|
163
|
-
reportSdkError(err);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
async function download(rawArgs) {
|
|
168
|
-
const args = normalizeArgv(rawArgs);
|
|
169
|
-
assertKnownFlags(args, ["--project", "--output", "--json", "--help", "-h"], ["--project", "--output"]);
|
|
170
|
-
const { projectId, rest } = resolveProjectSelector(args, { valueFlags: ["--project", "--output"] });
|
|
171
|
-
const pos = positionalArgs(rest, ["--project", "--output"]);
|
|
172
|
-
const [archiveId] = pos;
|
|
173
|
-
const output = flagValue(args, "--output");
|
|
174
|
-
if (!archiveId || pos.length > 1 || !output) {
|
|
175
|
-
fail({ code: "BAD_USAGE", message: "Usage: run402 cloud archives download <archive-id> --output <file> [--project <id>] [--json]" });
|
|
176
|
-
}
|
|
177
|
-
try {
|
|
178
|
-
const download = await getSdk().archives.download(projectId, archiveId);
|
|
179
|
-
const outputPath = resolve(output);
|
|
180
|
-
mkdirSync(dirname(outputPath), { recursive: true });
|
|
181
|
-
writeFileSync(outputPath, download.bytes);
|
|
182
|
-
console.log(JSON.stringify({
|
|
183
|
-
ok: true,
|
|
184
|
-
project_id: projectId,
|
|
185
|
-
archive_id: archiveId,
|
|
186
|
-
output_path: outputPath,
|
|
187
|
-
bytes_written: download.bytes.byteLength,
|
|
188
|
-
sha256: download.archive.sha256,
|
|
189
|
-
verify_command: `run402 archives verify ${JSON.stringify(outputPath)} --json`,
|
|
190
|
-
import_command: `run402 core projects import ${JSON.stringify(outputPath)} --name imported-project --env-file ./required.env --json`,
|
|
191
|
-
archive: download.archive,
|
|
192
|
-
}, null, 2));
|
|
193
|
-
} catch (err) {
|
|
194
|
-
reportSdkError(err);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
async function status(rawArgs) {
|
|
199
|
-
const args = normalizeArgv(rawArgs);
|
|
200
|
-
assertKnownFlags(args, ["--project", "--json", "--help", "-h"], ["--project"]);
|
|
201
|
-
const { projectId, rest } = resolveProjectSelector(args, { valueFlags: ["--project"] });
|
|
202
|
-
const pos = positionalArgs(rest, ["--project"]);
|
|
203
|
-
const [archiveId] = pos;
|
|
204
|
-
if (!archiveId || pos.length > 1) {
|
|
205
|
-
fail({ code: "BAD_USAGE", message: "Usage: run402 cloud archives status <archive-id> [--project <id>] [--json]" });
|
|
206
|
-
}
|
|
207
|
-
try {
|
|
208
|
-
const archive = await getSdk().archives.get(projectId, archiveId);
|
|
209
|
-
console.log(JSON.stringify({ archive }, null, 2));
|
|
210
|
-
} catch (err) {
|
|
211
|
-
reportSdkError(err);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function finalCreateResult({ projectId, created, archive, outputPath, bytesWritten }) {
|
|
216
|
-
return {
|
|
217
|
-
ok: archive.status === "ready",
|
|
218
|
-
project_id: projectId,
|
|
219
|
-
archive_id: archive.archive_id,
|
|
220
|
-
operation_id: archive.operation_id,
|
|
221
|
-
created_archive_id: created.archive_id,
|
|
222
|
-
archive_status: archive.status,
|
|
223
|
-
output_path: outputPath,
|
|
224
|
-
bytes_written: bytesWritten,
|
|
225
|
-
sha256: archive.sha256,
|
|
226
|
-
byte_count: archive.byte_count,
|
|
227
|
-
expires_at: archive.expires_at,
|
|
228
|
-
verify_command: outputPath ? `run402 archives verify ${JSON.stringify(outputPath)} --json` : null,
|
|
229
|
-
import_command: outputPath ? `run402 core projects import ${JSON.stringify(outputPath)} --name imported-project --env-file ./required.env --json` : null,
|
|
230
|
-
next_action: archive.next_action,
|
|
231
|
-
portability_report: archive.portability_report,
|
|
232
|
-
export_report: archive.export_report,
|
|
233
|
-
archive,
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
function progressEvent(event, stage, projectId, archive) {
|
|
238
|
-
return {
|
|
239
|
-
event,
|
|
240
|
-
stage,
|
|
241
|
-
resource_type: "project_archive",
|
|
242
|
-
resource_id: archive.archive_id,
|
|
243
|
-
project_id: projectId,
|
|
244
|
-
status: archive.status,
|
|
245
|
-
completed_units: archive.status === "ready" || archive.status === "failed" || archive.status === "expired" ? 1 : 0,
|
|
246
|
-
total_units: 1,
|
|
247
|
-
code: archive.status === "failed" ? archive.error?.code ?? "ARCHIVE_EXPORT_FAILED" : null,
|
|
248
|
-
message: `Archive export status: ${archive.status}`,
|
|
249
|
-
next_action: archive.next_action,
|
|
250
|
-
retryable: archive.status === "running",
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
function printJson(result, alreadyStreamed) {
|
|
255
|
-
if (!alreadyStreamed) console.log(JSON.stringify(result, null, 2));
|
|
256
|
-
}
|
package/lib/core.mjs
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { importArchiveToCore } from "#sdk/node";
|
|
2
|
-
import { fail, reportSdkError } from "./sdk-errors.mjs";
|
|
3
|
-
import { assertKnownFlags, flagValue, hasHelp, normalizeArgv, positionalArgs, failUnknownSubcommand } from "./argparse.mjs";
|
|
4
|
-
|
|
5
|
-
const HELP = `run402 core — Local Run402 Core commands
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
run402 core projects import <archive-path> --name <project-name> [options]
|
|
9
|
-
run402 core projects apply <archive-path> --name <project-name> [options]
|
|
10
|
-
|
|
11
|
-
Options:
|
|
12
|
-
--name <name> New Core project name (default imported-project)
|
|
13
|
-
--env-file <path> Env file satisfying required archive secrets.
|
|
14
|
-
--secret KEY=VALUE Inline secret value; repeatable. Overrides --env-file.
|
|
15
|
-
--core-url <url> Core gateway URL (default RUN402_CORE_URL or http://127.0.0.1:4020)
|
|
16
|
-
--dry-run Verify and plan without creating a Core project.
|
|
17
|
-
--require-runnable Block import unless required secrets are supplied.
|
|
18
|
-
--json Emit final JSON.
|
|
19
|
-
--json-stream Emit NDJSON progress events and final result event.
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
const FLAG_VALUES = ["--name", "--env-file", "--secret", "--core-url"];
|
|
23
|
-
const FLAGS = new Set([...FLAG_VALUES, "--dry-run", "--require-runnable", "--json", "--json-stream", "--help", "-h"]);
|
|
24
|
-
|
|
25
|
-
export async function run(sub, args = []) {
|
|
26
|
-
const all = [sub, ...args].filter(Boolean);
|
|
27
|
-
if (hasHelp(all)) {
|
|
28
|
-
console.log(HELP);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (sub !== "projects") {
|
|
32
|
-
failUnknownSubcommand("core", sub);
|
|
33
|
-
}
|
|
34
|
-
const action = args[0];
|
|
35
|
-
if (action === "import" || action === "apply") return importProject(args.slice(1));
|
|
36
|
-
failUnknownSubcommand("core projects", action, { extraSubcommands: ["apply"] });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async function importProject(rawArgs) {
|
|
40
|
-
const args = normalizeArgv(rawArgs);
|
|
41
|
-
assertKnownFlags(args, [...FLAGS], FLAG_VALUES);
|
|
42
|
-
const archivePath = positionalArgs(args, FLAG_VALUES)[0];
|
|
43
|
-
if (!archivePath) {
|
|
44
|
-
fail({ code: "BAD_USAGE", message: "Usage: run402 core projects import <archive-path> --name <project-name> [options]" });
|
|
45
|
-
}
|
|
46
|
-
const jsonStream = args.includes("--json-stream");
|
|
47
|
-
const secretValues = parseSecrets(args);
|
|
48
|
-
const name = flagValue(args, "--name") ?? "imported-project";
|
|
49
|
-
const coreUrl = flagValue(args, "--core-url") ?? undefined;
|
|
50
|
-
const startedEvent = {
|
|
51
|
-
event: "core_archive_import_started",
|
|
52
|
-
stage: "verify",
|
|
53
|
-
resource_type: "project_archive",
|
|
54
|
-
resource_id: archivePath,
|
|
55
|
-
status: "running",
|
|
56
|
-
completed_units: 0,
|
|
57
|
-
total_units: 1,
|
|
58
|
-
code: null,
|
|
59
|
-
message: "Verifying archive locally before Core import.",
|
|
60
|
-
next_action: { type: "none" },
|
|
61
|
-
retryable: false,
|
|
62
|
-
context: { archive_path: archivePath, core_url: coreUrl ?? null, project_name: name },
|
|
63
|
-
};
|
|
64
|
-
if (jsonStream) console.log(JSON.stringify(startedEvent));
|
|
65
|
-
try {
|
|
66
|
-
const result = await importArchiveToCore({
|
|
67
|
-
archivePath,
|
|
68
|
-
name,
|
|
69
|
-
coreUrl,
|
|
70
|
-
envFile: flagValue(args, "--env-file") ?? undefined,
|
|
71
|
-
secretValues,
|
|
72
|
-
dryRun: args.includes("--dry-run"),
|
|
73
|
-
requireRunnable: args.includes("--require-runnable"),
|
|
74
|
-
});
|
|
75
|
-
if (jsonStream) {
|
|
76
|
-
console.log(JSON.stringify({
|
|
77
|
-
event: "core_archive_import_complete",
|
|
78
|
-
stage: "complete",
|
|
79
|
-
resource_type: "project_archive",
|
|
80
|
-
resource_id: archivePath,
|
|
81
|
-
status: result.status,
|
|
82
|
-
completed_units: result.status === "imported" || result.status === "dry_run" ? 1 : 0,
|
|
83
|
-
total_units: 1,
|
|
84
|
-
code: firstDiagnosticCode(result),
|
|
85
|
-
message: `Core archive import status: ${result.status}`,
|
|
86
|
-
next_action: result.next_action,
|
|
87
|
-
retryable: result.status === "failed" && result.diagnostics.some((d) => d.retryable),
|
|
88
|
-
result,
|
|
89
|
-
}));
|
|
90
|
-
} else {
|
|
91
|
-
console.log(JSON.stringify({ ok: result.status === "imported" || result.status === "dry_run", import: result }, null, 2));
|
|
92
|
-
}
|
|
93
|
-
if (result.status !== "imported" && result.status !== "dry_run") process.exit(1);
|
|
94
|
-
} catch (err) {
|
|
95
|
-
reportSdkError(err);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function parseSecrets(args) {
|
|
100
|
-
const out = {};
|
|
101
|
-
for (let i = 0; i < args.length; i += 1) {
|
|
102
|
-
if (args[i] !== "--secret") continue;
|
|
103
|
-
const value = args[i + 1];
|
|
104
|
-
if (!value || value.startsWith("--")) {
|
|
105
|
-
fail({ code: "BAD_FLAG", message: "--secret requires KEY=VALUE" });
|
|
106
|
-
}
|
|
107
|
-
const eq = value.indexOf("=");
|
|
108
|
-
if (eq <= 0) {
|
|
109
|
-
fail({ code: "BAD_FLAG", message: "--secret requires KEY=VALUE", details: { value } });
|
|
110
|
-
}
|
|
111
|
-
const key = value.slice(0, eq);
|
|
112
|
-
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) {
|
|
113
|
-
fail({ code: "BAD_FLAG", message: `Invalid secret env var name: ${key}` });
|
|
114
|
-
}
|
|
115
|
-
out[key] = value.slice(eq + 1);
|
|
116
|
-
i += 1;
|
|
117
|
-
}
|
|
118
|
-
return out;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function firstDiagnosticCode(result) {
|
|
122
|
-
return result.diagnostics.find((d) => d.severity === "blocking")?.code ?? null;
|
|
123
|
-
}
|
package/lib/gitvault.mjs
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `run402 gitvault` — retired from the CLI; every spelling answers a
|
|
3
|
-
* structured error naming its `repos`/git successor.
|
|
4
|
-
*
|
|
5
|
-
* Every spelling answers a proper stderr JSON error envelope: typed
|
|
6
|
-
* `next_actions`, non-zero exit, EMPTY stdout — never silence, never new
|
|
7
|
-
* behavior. Renamed verbs answer `COMMAND_MOVED` naming their `repos`
|
|
8
|
-
* successor; verbs with no behavioral successor answer `COMMAND_REMOVED`
|
|
9
|
-
* (never a `COMMAND_MOVED` that would lie about equivalence). The freed
|
|
10
|
-
* spellings are never re-pointed at different behavior.
|
|
11
|
-
*
|
|
12
|
-
* `gitvault` itself survives only as protocol/infrastructure language: the
|
|
13
|
-
* SDK keeps `r.gitvault.*` ("gitvault is what the thing IS; repos is what
|
|
14
|
-
* the user HAS"). This module's one surviving export,
|
|
15
|
-
* `printKeystoreLocation`, is a shared print helper `cli/lib/repos.mjs`
|
|
16
|
-
* still composes — moving it there instead would make repos.mjs restate
|
|
17
|
-
* logic this file already owns for zero benefit.
|
|
18
|
-
*/
|
|
19
|
-
import { fail } from "./sdk-errors.mjs";
|
|
20
|
-
import { hasHelp } from "./argparse.mjs";
|
|
21
|
-
|
|
22
|
-
export const HELP = `run402 gitvault — RETIRED (repo-surface-consolidation)
|
|
23
|
-
|
|
24
|
-
Usage:
|
|
25
|
-
run402 gitvault <anything> — answers a structured error naming its repos/git successor; see below.
|
|
26
|
-
|
|
27
|
-
Every "run402 gitvault <verb>" spelling has moved to "run402 repos <verb>",
|
|
28
|
-
except "reconcile" and "push", which are REMOVED outright (see below). Each
|
|
29
|
-
one answers a structured COMMAND_MOVED/COMMAND_REMOVED error for exactly one
|
|
30
|
-
release; after that the spelling is reserved and answers nothing at all.
|
|
31
|
-
|
|
32
|
-
Moved:
|
|
33
|
-
gitvault init -> repos create --project <id> (or repos create <name> for a NEW project)
|
|
34
|
-
gitvault status -> repos view
|
|
35
|
-
gitvault snapshot -> repos snapshot
|
|
36
|
-
gitvault policy -> repos policy
|
|
37
|
-
gitvault compact -> repos gc
|
|
38
|
-
gitvault prune -> repos gc
|
|
39
|
-
gitvault verify -> repos fsck
|
|
40
|
-
gitvault mirror -> repos mirror
|
|
41
|
-
gitvault recover -> repos recover
|
|
42
|
-
|
|
43
|
-
Removed, no successor:
|
|
44
|
-
gitvault push -> git push (its one-release alias window is over); repos snapshot is the capture lane
|
|
45
|
-
gitvault reconcile -> repos access (read-only inspection; the workaround it approximated is gone, not renamed)
|
|
46
|
-
|
|
47
|
-
Run \`run402 repos --help\` for the current surface.
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
|
-
/** Renamed verbs: `gitvault <key>` -> the exact `repos` command that means the same thing now. */
|
|
51
|
-
const MOVED = {
|
|
52
|
-
init: { command: "run402 repos create --project <id>", why: "repos create absorbs allocation — pass --project to adopt an existing project, or a name to provision a new one." },
|
|
53
|
-
status: { command: "run402 repos view", why: "repos view is the side-effect-free repo inspection command; it never materializes refs the way status --refs used to." },
|
|
54
|
-
snapshot: { command: "run402 repos snapshot", why: "same verb, new noun." },
|
|
55
|
-
policy: { command: "run402 repos policy", why: "same verb, new noun." },
|
|
56
|
-
compact: { command: "run402 repos gc", why: "gc is git gc's own two halves — checkpoint publication and prune planning — in one verb." },
|
|
57
|
-
prune: { command: "run402 repos gc", why: "gc is git gc's own two halves — checkpoint publication and prune planning — in one verb." },
|
|
58
|
-
verify: { command: "run402 repos fsck", why: "fsck is git fsck's own job: walk the object graph and fail closed on corruption." },
|
|
59
|
-
mirror: { command: "run402 repos mirror", why: "one flag-driven verb replaces the five mirror subcommands (set/remove/status/sync/verify)." },
|
|
60
|
-
recover: { command: "run402 repos recover", why: "same verb, new noun." },
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/** Verbs with NO behavioral successor — a lying COMMAND_MOVED would be worse than an honest COMMAND_REMOVED. */
|
|
64
|
-
const REMOVED = {
|
|
65
|
-
push: {
|
|
66
|
-
message: "`run402 gitvault push` was a deprecation-warning alias for exactly one release, and that release is over.",
|
|
67
|
-
hint: "`push` now means exactly one thing everywhere: `git push`. The capture lane is `run402 repos snapshot`.",
|
|
68
|
-
next_actions: [
|
|
69
|
-
{ type: "use_moved_command", command: "git push", why: "Publish your branches and tags the ordinary way." },
|
|
70
|
-
{ type: "use_moved_command", command: "run402 repos snapshot", why: "The capture lane: publish the protocol-owned deploy ref outside a deploy." },
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
reconcile: {
|
|
74
|
-
message: "`run402 gitvault reconcile` is removed. It was a workaround — its own help text said so — a newly-wrapped member got the vault's entire history under a single fixed epoch, not real epoch rotation, and a temporary mechanism does not get a permanent verb.",
|
|
75
|
-
hint: "`run402 repos access` reports what the read surface has today (recipients, coverage, this machine's local TOFU pins). `repos access repair` will replace the mutating half once real epoch rotation ships — it does not exist yet either.",
|
|
76
|
-
next_actions: [{ type: "use_moved_command", command: "run402 repos access", why: "Inspect recipients and coverage — there is no equivalent mutating successor yet." }],
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
function movedResponse(sub) {
|
|
81
|
-
const m = MOVED[sub];
|
|
82
|
-
fail({
|
|
83
|
-
code: "COMMAND_MOVED",
|
|
84
|
-
message: `run402 gitvault ${sub} moved to ${m.command}.`,
|
|
85
|
-
hint: m.why,
|
|
86
|
-
details: { was: `gitvault ${sub}`, now: m.command },
|
|
87
|
-
next_actions: [{ type: "use_moved_command", command: m.command, why: m.why }],
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function removedResponse(sub) {
|
|
92
|
-
const r = REMOVED[sub];
|
|
93
|
-
fail({
|
|
94
|
-
code: "COMMAND_REMOVED",
|
|
95
|
-
message: r.message,
|
|
96
|
-
hint: r.hint,
|
|
97
|
-
details: { was: `gitvault ${sub}` },
|
|
98
|
-
next_actions: r.next_actions,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Where the keystore lives — for verbs whose payload is not a `view`.
|
|
104
|
-
* Exported: `repos create` and `repos snapshot` print the same line after
|
|
105
|
-
* allocating/publishing, and must not restate this logic.
|
|
106
|
-
*/
|
|
107
|
-
export async function printKeystoreLocation() {
|
|
108
|
-
try {
|
|
109
|
-
const { getGitvaultKeystoreRoot } = await import("#sdk/node");
|
|
110
|
-
console.error(`keystore: ${getGitvaultKeystoreRoot()} — back this up; whole-keystore loss is terminal for repo history`);
|
|
111
|
-
} catch {
|
|
112
|
-
// Never let a diagnostic line fail a command that already succeeded.
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export async function run(sub, args) {
|
|
117
|
-
const argv = Array.isArray(args) ? args : [];
|
|
118
|
-
if (!sub || hasHelp([sub, ...argv])) {
|
|
119
|
-
console.log(HELP);
|
|
120
|
-
process.exit(0);
|
|
121
|
-
}
|
|
122
|
-
switch (sub) {
|
|
123
|
-
case "init":
|
|
124
|
-
movedResponse("init");
|
|
125
|
-
break;
|
|
126
|
-
case "status":
|
|
127
|
-
movedResponse("status");
|
|
128
|
-
break;
|
|
129
|
-
case "snapshot":
|
|
130
|
-
movedResponse("snapshot");
|
|
131
|
-
break;
|
|
132
|
-
case "policy":
|
|
133
|
-
movedResponse("policy");
|
|
134
|
-
break;
|
|
135
|
-
case "compact":
|
|
136
|
-
movedResponse("compact");
|
|
137
|
-
break;
|
|
138
|
-
case "prune":
|
|
139
|
-
movedResponse("prune");
|
|
140
|
-
break;
|
|
141
|
-
case "verify":
|
|
142
|
-
movedResponse("verify");
|
|
143
|
-
break;
|
|
144
|
-
case "mirror":
|
|
145
|
-
movedResponse("mirror");
|
|
146
|
-
break;
|
|
147
|
-
case "recover":
|
|
148
|
-
movedResponse("recover");
|
|
149
|
-
break;
|
|
150
|
-
case "push":
|
|
151
|
-
removedResponse("push");
|
|
152
|
-
break;
|
|
153
|
-
case "reconcile":
|
|
154
|
-
removedResponse("reconcile");
|
|
155
|
-
break;
|
|
156
|
-
default:
|
|
157
|
-
fail({
|
|
158
|
-
code: "UNKNOWN_SUBCOMMAND",
|
|
159
|
-
message: `run402 gitvault ${sub}: unknown, and gitvault itself is retired.`,
|
|
160
|
-
hint: "Run `run402 repos --help` for the current surface.",
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|