run402 4.94.0 → 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 +20 -20
- package/cli.mjs +7 -19
- package/gitvault-surface.json +2 -2
- 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/command-manifest.mjs +35 -36
- package/lib/config.mjs +4 -4
- package/lib/contacts.mjs +3 -3
- package/lib/contracts.mjs +11 -11
- package/lib/credentials.mjs +31 -31
- package/lib/delegates.mjs +13 -13
- package/lib/deliveries.mjs +2 -2
- package/lib/deploy-v2.mjs +9 -9
- package/lib/dev.mjs +3 -3
- package/lib/doctor.mjs +6 -6
- 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/gitvault-scaffold.mjs +2 -2
- package/lib/gitvault.mjs +2 -2
- package/lib/grants.mjs +7 -7
- package/lib/image.mjs +7 -7
- package/lib/init.mjs +3 -3
- 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 +1 -1
- package/lib/org-context.mjs +13 -13
- package/lib/{org.mjs → orgs.mjs} +124 -163
- package/lib/projects.mjs +45 -56
- package/lib/repos.mjs +23 -23
- 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 +7 -7
- 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 +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 +2 -2
- 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.js +1 -1
- 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.map +1 -1
- package/sdk/dist/namespaces/deploy.js +26 -27
- package/sdk/dist/namespaces/deploy.js.map +1 -1
- package/sdk/dist/namespaces/deploy.types.d.ts +2 -2
- 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/gitvault.d.ts +2 -2
- package/sdk/dist/namespaces/gitvault.js +4 -4
- package/sdk/dist/namespaces/gitvault.js.map +1 -1
- package/sdk/dist/namespaces/tier.d.ts +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/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/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/gitvault-apply.js +1 -1
- package/sdk/dist/node/gitvault-apply.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/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/lib/cloud.mjs +0 -256
- package/lib/core.mjs +0 -123
package/lib/org-context.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* organization named directly outranks one derived from a project named in that
|
|
12
12
|
* same class:
|
|
13
13
|
*
|
|
14
|
-
* 1. flag --org <org_id> else --project <
|
|
14
|
+
* 1. flag --org <org_id> else --project <project_id> -> its org
|
|
15
15
|
* 2. environment RUN402_ORG, else the org else RUN402_PROJECT_ID -> its org
|
|
16
16
|
* half of RUN402_ROOM
|
|
17
17
|
* 3. binding the `org` key of the nearest .run402(.local).json
|
|
@@ -57,7 +57,7 @@ export const ROOM_ENV = "RUN402_ROOM";
|
|
|
57
57
|
export const PROJECT_ENV = "RUN402_PROJECT_ID";
|
|
58
58
|
|
|
59
59
|
/** Command groups that must stay usable while selection is ambiguous. */
|
|
60
|
-
const CONFLICT_EXEMPT = new Set(["
|
|
60
|
+
const CONFLICT_EXEMPT = new Set(["orgs", "wallets", "doctor"]);
|
|
61
61
|
|
|
62
62
|
/** `org_id` is a UUID at every API boundary (`uuidParam` on every route). */
|
|
63
63
|
const ORG_ID_RE = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
@@ -78,7 +78,7 @@ function assertOrgIdShape(orgId, origin) {
|
|
|
78
78
|
fail({
|
|
79
79
|
code: "BAD_ORG_ID",
|
|
80
80
|
message: `Invalid organization id ${JSON.stringify(describeRejectedValue(orgId))} (from ${origin}).`,
|
|
81
|
-
hint: "An org_id is a UUID. Run 'run402
|
|
81
|
+
hint: "An org_id is a UUID. Run 'run402 orgs list' to see the organizations you belong to.",
|
|
82
82
|
details: { org_id: describeRejectedValue(orgId), origin },
|
|
83
83
|
next_actions: [listOrgsAction()],
|
|
84
84
|
});
|
|
@@ -118,7 +118,7 @@ async function readGitvaultPinnedOrgId(cwd) {
|
|
|
118
118
|
|
|
119
119
|
function listOrgsAction() {
|
|
120
120
|
return nextAction("edit_request", {
|
|
121
|
-
command: "run402
|
|
121
|
+
command: "run402 orgs list",
|
|
122
122
|
why: "List the organizations this wallet belongs to.",
|
|
123
123
|
});
|
|
124
124
|
}
|
|
@@ -126,7 +126,7 @@ function listOrgsAction() {
|
|
|
126
126
|
function orgRequiredActions() {
|
|
127
127
|
return [
|
|
128
128
|
nextAction("edit_request", {
|
|
129
|
-
command: "run402
|
|
129
|
+
command: "run402 orgs use <org_id>",
|
|
130
130
|
why: "Select a current organization for this wallet profile.",
|
|
131
131
|
}),
|
|
132
132
|
listOrgsAction(),
|
|
@@ -266,7 +266,7 @@ export async function resolveOrg(input = {}, opts = {}) {
|
|
|
266
266
|
// --- Class 4: profile state ----------------------------------------------
|
|
267
267
|
const selected = trimmed(coreGetActiveOrgId());
|
|
268
268
|
if (selected) {
|
|
269
|
-
return { orgId: assertOrgIdShape(selected, "
|
|
269
|
+
return { orgId: assertOrgIdShape(selected, "orgs use"), source: "profile", sourceDetail: "orgs use" };
|
|
270
270
|
}
|
|
271
271
|
const activeProject = trimmed(getActiveProjectId());
|
|
272
272
|
if (activeProject) {
|
|
@@ -278,7 +278,7 @@ export async function resolveOrg(input = {}, opts = {}) {
|
|
|
278
278
|
fail({
|
|
279
279
|
code: "ORG_REQUIRED",
|
|
280
280
|
message: "No organization specified and no current organization set.",
|
|
281
|
-
hint: `Pass --org <org_id>, set ${ORG_ENV}, bind this directory in .run402.json, or run: run402
|
|
281
|
+
hint: `Pass --org <org_id>, set ${ORG_ENV}, bind this directory in .run402.json, or run: run402 orgs use <org_id>`,
|
|
282
282
|
next_actions: orgRequiredActions(),
|
|
283
283
|
});
|
|
284
284
|
return null; // unreachable — fail() exits
|
|
@@ -301,17 +301,17 @@ export async function resolveOrgId(a, opts = {}) {
|
|
|
301
301
|
* Every Org-Scoped Command").
|
|
302
302
|
*
|
|
303
303
|
* `<org_id>` is optional sugar on every verb that acts on an organization —
|
|
304
|
-
* `
|
|
304
|
+
* `orgs get`, `orgs members add`, `billing link-wallet`, … A leading positional
|
|
305
305
|
* that IS an org id (a UUID) addresses that org; anything else is the verb's
|
|
306
306
|
* own next positional (a wallet, an email, a principal) and the org comes from
|
|
307
307
|
* the shared chain: `--org`, then `RUN402_ORG`, then the `.run402.json`
|
|
308
|
-
* binding, then `
|
|
309
|
-
* `run402
|
|
308
|
+
* binding, then `orgs use`. So inside a bound checkout the two-agent case reads
|
|
309
|
+
* `run402 orgs members add 0xB… --role developer` with nothing else to know.
|
|
310
310
|
*
|
|
311
311
|
* Naming the org twice with different values (positional AND `--org`) is
|
|
312
312
|
* `AMBIGUOUS_ORG`, never a silent pick — the same refusal the env-vs-binding
|
|
313
313
|
* pair gets. A non-org first positional with no chain answer fails
|
|
314
|
-
* `ORG_REQUIRED` and NAMES the rejected value, so `
|
|
314
|
+
* `ORG_REQUIRED` and NAMES the rejected value, so `orgs get foo` says why `foo`
|
|
315
315
|
* did not count rather than reporting a bare "no organization".
|
|
316
316
|
*
|
|
317
317
|
* Returns the org id with provenance plus the REMAINING positionals; bound
|
|
@@ -350,7 +350,7 @@ export async function takeOrgPositional(a, valueFlags = [], opts = {}) {
|
|
|
350
350
|
message: typeof first === "string"
|
|
351
351
|
? `No organization specified and no current organization set (${JSON.stringify(first)} is not an org_id — an org_id is a UUID).`
|
|
352
352
|
: "No organization specified and no current organization set.",
|
|
353
|
-
hint: `Pass --org <org_id> (or a leading <org_id> positional), set ${ORG_ENV}, bind this directory in .run402.json, or run: run402
|
|
353
|
+
hint: `Pass --org <org_id> (or a leading <org_id> positional), set ${ORG_ENV}, bind this directory in .run402.json, or run: run402 orgs use <org_id>`,
|
|
354
354
|
...(typeof first === "string" ? { details: { rejected_positional: first } } : {}),
|
|
355
355
|
next_actions: orgRequiredActions(),
|
|
356
356
|
});
|
|
@@ -388,7 +388,7 @@ export function getSelectedOrgId() {
|
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
/** Record the profile's selected organization. */
|
|
391
|
-
export function setSelectedOrgId(orgId, origin = "
|
|
391
|
+
export function setSelectedOrgId(orgId, origin = "orgs use") {
|
|
392
392
|
coreSetActiveOrgId(assertOrgIdShape(orgId, origin));
|
|
393
393
|
}
|
|
394
394
|
|