run402 4.102.0 → 4.104.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/cli.mjs +0 -23
- package/lib/command-manifest.mjs +0 -24
- package/lib/contacts.mjs +6 -6
- package/lib/escalations.mjs +0 -25
- package/lib/image.mjs +2 -2
- package/lib/projects.mjs +0 -27
- package/lib/remote-helper-session.mjs +1 -1
- package/lib/subscriptions.mjs +1 -1
- package/package.json +1 -1
- package/sdk/dist/namespaces/ai.d.ts +2 -2
- package/sdk/dist/namespaces/ai.d.ts.map +1 -1
- package/sdk/dist/namespaces/ai.js +4 -4
- package/sdk/dist/namespaces/ai.js.map +1 -1
- package/sdk/dist/namespaces/identity-links.types.d.ts +4 -4
- package/sdk/dist/namespaces/identity-links.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/repos.d.ts +3 -3
- package/sdk/dist/namespaces/repos.js +5 -5
- package/sdk/dist/namespaces/repos.js.map +1 -1
- package/sdk/dist/namespaces/vouchers.d.ts +1 -1
- package/sdk/dist/namespaces/vouchers.d.ts.map +1 -1
- package/sdk/dist/node/vault-byo-config.js +1 -1
- package/sdk/dist/node/vault-deploy.d.ts +2 -2
- package/sdk/dist/node/vault-deploy.js +2 -2
- package/sdk/dist/node/vault-mirror.js +3 -3
- package/sdk/dist/node/vault-mirror.js.map +1 -1
- package/vault-surface.json +1 -1
- package/lib/notifications.mjs +0 -70
package/cli.mjs
CHANGED
|
@@ -384,24 +384,6 @@ switch (cmd) {
|
|
|
384
384
|
await run(sub, rest);
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
|
-
// `message` is RESERVED, not merely renamed: it is being kept free for
|
|
388
|
-
// addressed agent/human messaging. Aliasing it to feedback would cement the
|
|
389
|
-
// old meaning on the exact noun that is about to mean something else.
|
|
390
|
-
case "message": {
|
|
391
|
-
const { fail } = await import("./lib/sdk-errors.mjs");
|
|
392
|
-
fail({
|
|
393
|
-
code: "COMMAND_REMOVED",
|
|
394
|
-
message: "`run402 message` was renamed to `run402 feedback`.",
|
|
395
|
-
hint: "run402 feedback send \"<text>\"",
|
|
396
|
-
details: { was: "message", now: "feedback", reserved: "the `message` noun is reserved for addressed agent/human messaging" },
|
|
397
|
-
next_actions: [
|
|
398
|
-
{ type: "edit_request", command: "run402 feedback send \"<text>\"", why: "Send feedback to the Run402 developers." },
|
|
399
|
-
{ type: "edit_request", command: "run402 messages send \"<text>\"", why: "Message the other agents working in this room." },
|
|
400
|
-
{ type: "edit_request", command: "run402 escalations raise \"<text>\"", why: "Page a human and wait for a named one to take it." },
|
|
401
|
-
],
|
|
402
|
-
});
|
|
403
|
-
break;
|
|
404
|
-
}
|
|
405
387
|
case "agent": {
|
|
406
388
|
const { run } = await import("./lib/agent.mjs");
|
|
407
389
|
await run(sub, rest);
|
|
@@ -472,11 +454,6 @@ switch (cmd) {
|
|
|
472
454
|
await run(sub, rest);
|
|
473
455
|
break;
|
|
474
456
|
}
|
|
475
|
-
case "notifications": {
|
|
476
|
-
const { run } = await import("./lib/notifications.mjs");
|
|
477
|
-
await run(sub, rest);
|
|
478
|
-
break;
|
|
479
|
-
}
|
|
480
457
|
case "webhook-secret": {
|
|
481
458
|
const { run } = await import("./lib/webhook-secret.mjs");
|
|
482
459
|
await run(sub, rest);
|
package/lib/command-manifest.mjs
CHANGED
|
@@ -484,28 +484,4 @@ export const COMMAND_MANIFEST = [
|
|
|
484
484
|
// completeness check against cli.mjs's dispatch switch.
|
|
485
485
|
export const SKIPPED_FAMILIES = {
|
|
486
486
|
"dev": "interactive wrapper that spawns `astro dev`",
|
|
487
|
-
// RESERVED, not dispatched: every `run402 message …` fails with
|
|
488
|
-
// COMMAND_REMOVED pointing at `feedback send` / `messages send` /
|
|
489
|
-
// `escalations raise`. It has no subcommands to manifest because it takes
|
|
490
|
-
// none — the noun is being held for addressed agent/human messaging.
|
|
491
|
-
"message": "reserved noun; fails with COMMAND_REMOVED (renamed to `feedback`)",
|
|
492
|
-
// Split into `deliveries` / `contacts` / `subscriptions`; every subcommand
|
|
493
|
-
// answers COMMAND_REMOVED naming its successor.
|
|
494
|
-
"notifications": "reserved group; split by legible-cli-surface",
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* SUBCOMMAND spellings kept alive only to answer `COMMAND_REMOVED`.
|
|
499
|
-
*
|
|
500
|
-
* A retired spelling still needs a `case` branch — that branch IS the redirect,
|
|
501
|
-
* and without it a caller gets a generic "unknown subcommand" instead of being
|
|
502
|
-
* told where the verb went. But it is not a command: it dispatches nothing and
|
|
503
|
-
* belongs in no capability mapping, so the inventory gate must not demand one.
|
|
504
|
-
*
|
|
505
|
-
* The family-level equivalent is SKIPPED_FAMILIES above. This exists because
|
|
506
|
-
* some spellings are retired INSIDE a family rather than as a whole family,
|
|
507
|
-
* which the family list cannot express.
|
|
508
|
-
*/
|
|
509
|
-
export const RESERVED_SUBCOMMANDS = {
|
|
510
|
-
"escalations:contacts": "merged into `contacts` — the ladder and Telegram channels are one question",
|
|
511
487
|
};
|
package/lib/contacts.mjs
CHANGED
|
@@ -83,7 +83,7 @@ async function preferences(args) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
if (positionals[0] !== "set") {
|
|
86
|
-
fail({ code: "BAD_USAGE", message: "Usage: run402
|
|
86
|
+
fail({ code: "BAD_USAGE", message: "Usage: run402 contacts preferences [set <key>=<value> ...]" });
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// SET — parse remaining positional args as key=value
|
|
@@ -171,7 +171,7 @@ async function channelsConnect(args) {
|
|
|
171
171
|
if (positionals.length === 0) {
|
|
172
172
|
fail({
|
|
173
173
|
code: "BAD_USAGE",
|
|
174
|
-
message: "Usage: run402
|
|
174
|
+
message: "Usage: run402 contacts connect telegram [--label <name>]",
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
if (positionals[0] !== "telegram") {
|
|
@@ -209,7 +209,7 @@ async function channelsConnect(args) {
|
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
console.error("Timed out waiting for you to tap the link — the connect code has expired.");
|
|
212
|
-
console.error("Run `run402
|
|
212
|
+
console.error("Run `run402 contacts connect telegram` again for a fresh link.");
|
|
213
213
|
console.log(JSON.stringify({ ...pending, connected: false, timed_out: true }, null, 2));
|
|
214
214
|
process.exit(1);
|
|
215
215
|
}
|
|
@@ -229,7 +229,7 @@ async function channelsRevoke(args) {
|
|
|
229
229
|
const [bindingId] = requirePositionalCount(a, [], {
|
|
230
230
|
min: 1,
|
|
231
231
|
max: 1,
|
|
232
|
-
command: "run402
|
|
232
|
+
command: "run402 contacts rm <contact_id>",
|
|
233
233
|
missing: "Missing <binding_id>.",
|
|
234
234
|
});
|
|
235
235
|
walletAuthHeaders("/agent/v1/notifications/channels/telegram");
|
|
@@ -264,8 +264,8 @@ async function runChannels(args) {
|
|
|
264
264
|
await channelsRevoke(rest);
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
|
-
failUnknownSubcommand("
|
|
268
|
-
hint: "Run `run402
|
|
267
|
+
failUnknownSubcommand("contacts", channelsAction, {
|
|
268
|
+
hint: "Run `run402 contacts --help` for usage.",
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
|
package/lib/escalations.mjs
CHANGED
|
@@ -226,24 +226,6 @@ async function resolveCmd(args) {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
async function contacts(args) {
|
|
230
|
-
// Merged into `run402 contacts` (legible-cli-surface D4): the escalation
|
|
231
|
-
// ladder and Telegram channels were the same idea — "where a human is
|
|
232
|
-
// reachable" — under two names, and neither spelling suggested the other
|
|
233
|
-
// existed. Reserved, not aliased.
|
|
234
|
-
const [sub] = Array.isArray(args) ? args : [];
|
|
235
|
-
fail({
|
|
236
|
-
code: "COMMAND_REMOVED",
|
|
237
|
-
message: "`run402 escalations contacts` moved to `run402 contacts`.",
|
|
238
|
-
hint: sub === "remove" ? "run402 contacts rm <contact_id>" : `run402 contacts ${sub ?? "list"}`,
|
|
239
|
-
details: {
|
|
240
|
-
was: `escalations contacts${sub ? ` ${sub}` : ""}`,
|
|
241
|
-
now: "contacts",
|
|
242
|
-
why: "the paging ladder and Telegram channels are one question — where a human is reachable",
|
|
243
|
-
},
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
|
|
247
229
|
export async function run(sub, args) {
|
|
248
230
|
const argv = Array.isArray(args) ? args : [];
|
|
249
231
|
if (!sub || hasHelp([sub, ...argv])) {
|
|
@@ -266,15 +248,8 @@ export async function run(sub, args) {
|
|
|
266
248
|
case "resolve":
|
|
267
249
|
await resolveCmd(argv);
|
|
268
250
|
break;
|
|
269
|
-
case "contacts":
|
|
270
|
-
await contacts(argv);
|
|
271
|
-
break;
|
|
272
251
|
default:
|
|
273
252
|
failUnknownSubcommand("escalations", sub, {
|
|
274
|
-
// `contacts` is a nested group, so it has no manifest row of its own —
|
|
275
|
-
// without this it would be missing from the suggestion list a lost
|
|
276
|
-
// agent reads.
|
|
277
|
-
extraSubcommands: ["contacts"],
|
|
278
253
|
hint: "Run `run402 escalations --help` for usage.",
|
|
279
254
|
});
|
|
280
255
|
}
|
package/lib/image.mjs
CHANGED
|
@@ -145,14 +145,14 @@ function reportOrgSelectionError(err, org) {
|
|
|
145
145
|
const code = err?.code;
|
|
146
146
|
const details = err?.details && typeof err.details === "object" ? err.details : {};
|
|
147
147
|
if (code === "ORGANIZATION_SELECTION_REQUIRED") {
|
|
148
|
-
const ids = Array.isArray(details.
|
|
148
|
+
const ids = Array.isArray(details.org_ids) ? details.org_ids : [];
|
|
149
149
|
fail({
|
|
150
150
|
code,
|
|
151
151
|
message: err.message,
|
|
152
152
|
hint:
|
|
153
153
|
`Pass --org <org_id> (one of: ${ids.join(", ") || "run402 orgs list"}) or select a current organization with ` +
|
|
154
154
|
"run402 orgs use <org_id>. Only the Lightning rail needs it; x402 ignores it.",
|
|
155
|
-
details: { ...details,
|
|
155
|
+
details: { ...details, org_ids: ids, org_source: org?.source ?? null, org_source_detail: org?.sourceDetail ?? null },
|
|
156
156
|
next_actions: err.nextActions ?? [
|
|
157
157
|
nextAction("edit_request", { command: 'run402 image generate "<prompt>" --org <org_id>', why: "Name the paying organization on this call." }),
|
|
158
158
|
nextAction("edit_request", { command: "run402 orgs use <org_id>", why: "Select a current organization for this profile." }),
|
package/lib/projects.mjs
CHANGED
|
@@ -653,31 +653,6 @@ async function current() {
|
|
|
653
653
|
console.log(JSON.stringify(out, null, 2));
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
-
function commandMoved(name) {
|
|
657
|
-
fail({
|
|
658
|
-
code: "COMMAND_MOVED",
|
|
659
|
-
message: `run402 projects ${name} moved to the explicit local credential-cache surface.`,
|
|
660
|
-
hint: "Use `run402 credentials project-keys status/export --project <project_id>`.",
|
|
661
|
-
details: {
|
|
662
|
-
old_command: `projects ${name}`,
|
|
663
|
-
new_command: name === "keys" ? "credentials project-keys export --reveal" : "credentials project-keys status",
|
|
664
|
-
source: "local_cache",
|
|
665
|
-
},
|
|
666
|
-
next_actions: [
|
|
667
|
-
{
|
|
668
|
-
type: "run_command",
|
|
669
|
-
command: "run402 credentials project-keys status --project <project_id>",
|
|
670
|
-
why: "Inspect cached key presence without revealing secrets.",
|
|
671
|
-
},
|
|
672
|
-
{
|
|
673
|
-
type: "run_command",
|
|
674
|
-
command: "run402 credentials project-keys export --project <project_id> --reveal",
|
|
675
|
-
why: "Reveal cached project keys only when you explicitly need secret material.",
|
|
676
|
-
},
|
|
677
|
-
],
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
|
|
681
656
|
async function sqlCmd(projectId, args = []) {
|
|
682
657
|
let file = null;
|
|
683
658
|
let query = null;
|
|
@@ -970,8 +945,6 @@ export async function run(sub, args) {
|
|
|
970
945
|
case "rename": { const { projectId, rest } = resolveProjectSelector(args, { rejectBareFirst: true, valueFlags: FLAGS_BY_SUB.rename.values }); await rename(projectId, rest); break; }
|
|
971
946
|
case "tenant-payments": { const { projectId, rest } = resolveProjectSelector(args, { rejectBareFirst: true, valueFlags: FLAGS_BY_SUB["tenant-payments"].values }); await tenantPayments(projectId, rest); break; }
|
|
972
947
|
case "get": { const { projectId } = resolveProjectSelector(args, { rejectBareFirst: true }); await get(projectId); break; }
|
|
973
|
-
case "info": commandMoved("info"); break;
|
|
974
|
-
case "keys": commandMoved("keys"); break;
|
|
975
948
|
case "sql": { const { projectId, rest } = resolveProjectSelector(args, { maxBarePositionals: 1, valueFlags: FLAGS_BY_SUB.sql.values, rejectBareFirstWhenFlagPresent: ["--file"] }); await sqlCmd(projectId, rest); break; }
|
|
976
949
|
case "rest": { const { projectId, rest: restArgs } = resolveProjectSelector(args, { valueFlags: FLAGS_BY_SUB.rest.values }); await rest(projectId, restArgs); break; }
|
|
977
950
|
case "usage": { const { projectId } = resolveProjectSelector(args, { rejectBareFirst: true }); await usage(projectId); break; }
|
|
@@ -1080,7 +1080,7 @@ async function main(argv, { onBackgroundWork } = {}) {
|
|
|
1080
1080
|
sharedListSession = null;
|
|
1081
1081
|
if (verbosity >= 1) note(`published generation ${published.generation} (${published.form})`);
|
|
1082
1082
|
// The copies push()/deploy() make after a generation lands — the
|
|
1083
|
-
// opt-in mirror
|
|
1083
|
+
// opt-in mirror write and a BYO vault's signed-chain copy into the
|
|
1084
1084
|
// customer bucket. Best-effort: never alters the push above, one
|
|
1085
1085
|
// stderr line per outcome worth knowing.
|
|
1086
1086
|
const copies = await getCachedSdk().repos.postPublishCopies?.({ repo_id: vault.repoId, keystore: vault.keystore }).catch(() => null);
|
package/lib/subscriptions.mjs
CHANGED
|
@@ -119,7 +119,7 @@ async function rulesRm(args) {
|
|
|
119
119
|
const [ruleId] = requirePositionalCount(a, [], {
|
|
120
120
|
min: 1,
|
|
121
121
|
max: 1,
|
|
122
|
-
command: "run402
|
|
122
|
+
command: "run402 subscriptions rm <subscription_id>",
|
|
123
123
|
missing: "Missing <rule_id>.",
|
|
124
124
|
});
|
|
125
125
|
walletAuthHeaders("/agent/v1/notifications/rules");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "run402",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.104.0",
|
|
4
4
|
"description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@ export interface GenerateImageOptions {
|
|
|
38
38
|
*
|
|
39
39
|
* When omitted and the gateway answers `ORGANIZATION_SELECTION_REQUIRED`,
|
|
40
40
|
* the SDK retries ONCE with the one candidate from
|
|
41
|
-
* `details.
|
|
41
|
+
* `details.org_ids` that matches a local context — the
|
|
42
42
|
* provider's active organization (`run402 orgs use`) or the active
|
|
43
43
|
* project's cached owning org, else any locally stored project's owning
|
|
44
44
|
* org. Zero or several matches surface the error with the candidate ids
|
|
@@ -49,7 +49,7 @@ export interface GenerateImageOptions {
|
|
|
49
49
|
}
|
|
50
50
|
/** The gateway's answer when a multi-org principal names no paying org on the Lightning rail. */
|
|
51
51
|
export declare const ORGANIZATION_SELECTION_REQUIRED = "ORGANIZATION_SELECTION_REQUIRED";
|
|
52
|
-
/** `details.
|
|
52
|
+
/** `details.org_ids` off an `ORGANIZATION_SELECTION_REQUIRED` error, else `[]`. */
|
|
53
53
|
export declare function organizationCandidatesFromError(err: unknown): string[];
|
|
54
54
|
export interface GenerateImageResult {
|
|
55
55
|
/** Base64-encoded bytes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/namespaces/ai.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAK9D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE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C,eAAe,CAAC;IAepF,mFAAmF;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAWxE,8DAA8D;IACxD,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAStD;;;;;OAKG;IACG,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAoB9E"}
|
|
@@ -7,13 +7,13 @@ import { requireProjectCredentials } from "../project-credentials.js";
|
|
|
7
7
|
const IMAGE_ASPECTS = ["square", "landscape", "portrait"];
|
|
8
8
|
/** The gateway's answer when a multi-org principal names no paying org on the Lightning rail. */
|
|
9
9
|
export const ORGANIZATION_SELECTION_REQUIRED = "ORGANIZATION_SELECTION_REQUIRED";
|
|
10
|
-
/** `details.
|
|
10
|
+
/** `details.org_ids` off an `ORGANIZATION_SELECTION_REQUIRED` error, else `[]`. */
|
|
11
11
|
export function organizationCandidatesFromError(err) {
|
|
12
12
|
if (!isRun402Error(err) || err.code !== ORGANIZATION_SELECTION_REQUIRED)
|
|
13
13
|
return [];
|
|
14
14
|
const details = err.details;
|
|
15
15
|
const ids = details && typeof details === "object" && !Array.isArray(details)
|
|
16
|
-
? details.
|
|
16
|
+
? details.org_ids
|
|
17
17
|
: undefined;
|
|
18
18
|
return Array.isArray(ids) ? ids.filter((id) => typeof id === "string" && id.length > 0) : [];
|
|
19
19
|
}
|
|
@@ -163,7 +163,7 @@ function organizationSelectionError(err, candidates, matches) {
|
|
|
163
163
|
{
|
|
164
164
|
type: "edit_request",
|
|
165
165
|
command: "run402 image generate \"<prompt>\" --org <org_id>",
|
|
166
|
-
why: "Name the paying organization on this call (SDK: generateImage({ orgId })). Candidates are in details.
|
|
166
|
+
why: "Name the paying organization on this call (SDK: generateImage({ orgId })). Candidates are in details.org_ids.",
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
type: "edit_request",
|
|
@@ -176,7 +176,7 @@ function organizationSelectionError(err, candidates, matches) {
|
|
|
176
176
|
...envelope,
|
|
177
177
|
message,
|
|
178
178
|
code: ORGANIZATION_SELECTION_REQUIRED,
|
|
179
|
-
details: { ...details,
|
|
179
|
+
details: { ...details, org_ids: candidates, matched_org_ids: matches },
|
|
180
180
|
next_actions: nextActions,
|
|
181
181
|
}, "generating image");
|
|
182
182
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/namespaces/ai.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAgCtE,MAAM,aAAa,GAA2B,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAqBlF,iGAAiG;AACjG,MAAM,CAAC,MAAM,+BAA+B,GAAG,iCAAiC,CAAC;AAEjF,
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/namespaces/ai.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAgCtE,MAAM,aAAa,GAA2B,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAqBlF,iGAAiG;AACjG,MAAM,CAAC,MAAM,+BAA+B,GAAG,iCAAiC,CAAC;AAEjF,mFAAmF;AACnF,MAAM,UAAU,+BAA+B,CAAC,GAAY;IAC1D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,+BAA+B;QAAE,OAAO,EAAE,CAAC;IACnF,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC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AC;AACJ,CAAC"}
|
|
@@ -41,25 +41,25 @@ export interface PrincipalSnapshot {
|
|
|
41
41
|
}
|
|
42
42
|
export type AuthoritySnapshot = {
|
|
43
43
|
kind: "organization_membership";
|
|
44
|
-
|
|
44
|
+
org_id: string;
|
|
45
45
|
membership_id: string;
|
|
46
46
|
role: string;
|
|
47
47
|
} | {
|
|
48
48
|
kind: "project_grant";
|
|
49
|
-
|
|
49
|
+
org_id: string;
|
|
50
50
|
project_id: string;
|
|
51
51
|
grant_id: string;
|
|
52
52
|
scope: string[];
|
|
53
53
|
} | {
|
|
54
54
|
kind: "grant_key";
|
|
55
|
-
|
|
55
|
+
org_id: string;
|
|
56
56
|
project_id: string;
|
|
57
57
|
grant_id: string;
|
|
58
58
|
grant_key_id: string;
|
|
59
59
|
scope: string[];
|
|
60
60
|
} | {
|
|
61
61
|
kind: "ci";
|
|
62
|
-
|
|
62
|
+
org_id: string;
|
|
63
63
|
project_id: string;
|
|
64
64
|
credential_id: string;
|
|
65
65
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-links.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/identity-links.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EACV,+BAA+B,GAC/B,qCAAqC,GACrC,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAClB,IAAI,EAAE,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,gBAAgB,EAAE,QAAQ,GAAG,SAAS,GAAG,oBAAoB,CAAC;IAC9D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACpE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iBAAiB,EAAE,4BAA4B,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,iCAAiC;IAChD,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACpE,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,4BAA4B,EAAE,sBAAsB,EAAE,CAAC;CACxD;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,yBAAyB,CAAC;IAAC,
|
|
1
|
+
{"version":3,"file":"identity-links.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/identity-links.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EACV,+BAA+B,GAC/B,qCAAqC,G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GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;KACrE,CAAC;IACF,mBAAmB,EAAE;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;KACrE,CAAC;IACF,WAAW,EAAE,YAAY,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,cAAc,EAAE,+BAA+B,CAAC;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,sCAAsC;IACrD,cAAc,EAAE,CAAC,CAAC;IAClB,kBAAkB,EAAE,uBAAuB,GAAG,qBAAqB,CAAC;IACpE,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,cAAc,EAAE,iBAAiB,GAAG,wBAAwB,CAAC;IAC7D,aAAa,EAAE,iBAAiB,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,cAAc,EAAE,qCAAqC,CAAC;IACtD,cAAc,EAAE,IAAI,CAAC;IACrB,gBAAgB,EAAE,IAAI,CAAC;IACvB,sBAAsB,EAAE,sCAAsC,CAAC;CAChE;AAED,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG,sBAAsB,CAAC;AAEhF,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,4BAA4B,EAAE,CAAC;IAC/C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
|
@@ -1785,7 +1785,7 @@ export declare class Repos {
|
|
|
1785
1785
|
/**
|
|
1786
1786
|
* The capture-time copies a plain `git push` through the remote helper
|
|
1787
1787
|
* owes exactly as {@link capture} and {@link deploy} do: the opt-in mirror
|
|
1788
|
-
*
|
|
1788
|
+
* mirror write and, on a BYO vault, the signed-chain copy into the customer
|
|
1789
1789
|
* bucket (vault-byo-primary-bucket task 3.3). The helper publishes
|
|
1790
1790
|
* through `Vault.push` directly, so it calls this right after a
|
|
1791
1791
|
* generation lands. Same contract as the private hooks it composes:
|
|
@@ -2128,7 +2128,7 @@ export declare class Repos {
|
|
|
2128
2128
|
*/
|
|
2129
2129
|
access(options?: VaultHandleOptions): Promise<VaultAccessResult>;
|
|
2130
2130
|
/**
|
|
2131
|
-
* The
|
|
2131
|
+
* The vault-gated deploy: both lanes under one fresh `capture_id`, resolving
|
|
2132
2132
|
* to exactly one of five outcomes — `DEPLOYED_AND_VAULTED`,
|
|
2133
2133
|
* `DEPLOY_BLOCKED_PUSH_FAILED`, `DEPLOY_FAILED_VAULTED`,
|
|
2134
2134
|
* `DEPLOY_FAILED_UNVAULTED`, `DEPLOYED_UNVAULTED_OVERRIDE`.
|
|
@@ -2139,7 +2139,7 @@ export declare class Repos {
|
|
|
2139
2139
|
*
|
|
2140
2140
|
* `run402 deploy` is design D5's PRIMARY envelope-recipient reconcile hook
|
|
2141
2141
|
* ("the same 'one command every agent runs' argument that decided
|
|
2142
|
-
* deploy-implies-capture") and design D6's primary
|
|
2142
|
+
* deploy-implies-capture") and design D6's primary mirror-write trigger
|
|
2143
2143
|
* — both fire HERE, not inside {@link runVaultDeploy} itself, mirroring
|
|
2144
2144
|
* {@link capture}'s exact non-blocking contract: best-effort, NEVER throw,
|
|
2145
2145
|
* NEVER alter the deploy outcome already resolved above, reported BESIDE it
|
|
@@ -1582,7 +1582,7 @@ export class Repos {
|
|
|
1582
1582
|
...(options.checkpoint ? { checkpoint: true } : {}),
|
|
1583
1583
|
};
|
|
1584
1584
|
const result = await handle.vault.push(push).catch((e) => { throw this.#enrichEpochRotationRequired(e, handle.repo_id); });
|
|
1585
|
-
// Capture-time
|
|
1585
|
+
// Capture-time mirror-write hook: fires only when a
|
|
1586
1586
|
// mirror is configured; NEVER throws, NEVER alters the vault outcome
|
|
1587
1587
|
// above (already returned/committed) — a mirror failure is a named
|
|
1588
1588
|
// pending finding reported BESIDE the vault result, on its own field.
|
|
@@ -2682,7 +2682,7 @@ export class Repos {
|
|
|
2682
2682
|
next_actions: nextActions,
|
|
2683
2683
|
};
|
|
2684
2684
|
}
|
|
2685
|
-
/** Best-effort
|
|
2685
|
+
/** Best-effort mirror write: catches EVERYTHING, including the lazy module import itself, so a mirror problem can never surface as a `capture()` throw. */
|
|
2686
2686
|
/**
|
|
2687
2687
|
* `EPOCH_ROTATION_REQUIRED` (D193) is left THROWN — never swallowed into a
|
|
2688
2688
|
* silent auto-rotation — because this call site cannot legally decide the
|
|
@@ -2723,7 +2723,7 @@ export class Repos {
|
|
|
2723
2723
|
/**
|
|
2724
2724
|
* The capture-time copies a plain `git push` through the remote helper
|
|
2725
2725
|
* owes exactly as {@link capture} and {@link deploy} do: the opt-in mirror
|
|
2726
|
-
*
|
|
2726
|
+
* mirror write and, on a BYO vault, the signed-chain copy into the customer
|
|
2727
2727
|
* bucket (vault-byo-primary-bucket task 3.3). The helper publishes
|
|
2728
2728
|
* through `Vault.push` directly, so it calls this right after a
|
|
2729
2729
|
* generation lands. Same contract as the private hooks it composes:
|
|
@@ -3888,7 +3888,7 @@ export class Repos {
|
|
|
3888
3888
|
};
|
|
3889
3889
|
}
|
|
3890
3890
|
/**
|
|
3891
|
-
* The
|
|
3891
|
+
* The vault-gated deploy: both lanes under one fresh `capture_id`, resolving
|
|
3892
3892
|
* to exactly one of five outcomes — `DEPLOYED_AND_VAULTED`,
|
|
3893
3893
|
* `DEPLOY_BLOCKED_PUSH_FAILED`, `DEPLOY_FAILED_VAULTED`,
|
|
3894
3894
|
* `DEPLOY_FAILED_UNVAULTED`, `DEPLOYED_UNVAULTED_OVERRIDE`.
|
|
@@ -3899,7 +3899,7 @@ export class Repos {
|
|
|
3899
3899
|
*
|
|
3900
3900
|
* `run402 deploy` is design D5's PRIMARY envelope-recipient reconcile hook
|
|
3901
3901
|
* ("the same 'one command every agent runs' argument that decided
|
|
3902
|
-
* deploy-implies-capture") and design D6's primary
|
|
3902
|
+
* deploy-implies-capture") and design D6's primary mirror-write trigger
|
|
3903
3903
|
* — both fire HERE, not inside {@link runVaultDeploy} itself, mirroring
|
|
3904
3904
|
* {@link capture}'s exact non-blocking contract: best-effort, NEVER throw,
|
|
3905
3905
|
* NEVER alter the deploy outcome already resolved above, reported BESIDE it
|