run402 3.2.0 → 3.3.1
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/lib/admin.mjs +5 -5
- package/lib/allowance.mjs +1 -1
- package/lib/billing.mjs +3 -3
- package/lib/operator.mjs +1 -1
- package/lib/projects.mjs +2 -2
- package/lib/transfer.mjs +70 -77
- package/package.json +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/billing.d.ts +7 -7
- package/sdk/dist/namespaces/billing.d.ts.map +1 -1
- package/sdk/dist/namespaces/billing.js +8 -8
- package/sdk/dist/namespaces/billing.js.map +1 -1
- package/sdk/dist/namespaces/org.types.d.ts +1 -1
- package/sdk/dist/namespaces/projects.d.ts +1 -1
- package/sdk/dist/namespaces/projects.js +1 -1
- package/sdk/dist/namespaces/projects.types.d.ts +2 -2
- package/sdk/dist/namespaces/projects.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/tier.d.ts +1 -1
- package/sdk/dist/namespaces/tier.d.ts.map +1 -1
- package/sdk/dist/namespaces/transfers.d.ts +160 -128
- package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
- package/sdk/dist/namespaces/transfers.js +99 -88
- package/sdk/dist/namespaces/transfers.js.map +1 -1
|
@@ -1,67 +1,87 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `transfers` namespace —
|
|
2
|
+
* `transfers` namespace — the unified project-transfer noun (v1.93+).
|
|
3
3
|
*
|
|
4
|
-
* Exposed as `r.admin.transfers.*`.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* persistent `secrets_rotation_advised` advisory.
|
|
4
|
+
* Exposed as `r.admin.transfers.*`. Project transfer is ONE capability,
|
|
5
|
+
* body-discriminated by recipient kind: a wallet recipient (`toWallet`, SIWX
|
|
6
|
+
* bilateral signing) or an email recipient (`toEmail`, the recipient claims
|
|
7
|
+
* into an org). Both ride the same `/transfers` surface — there is no separate
|
|
8
|
+
* `/handoffs` noun (the gateway removed it in `unify-project-transfer-surface`).
|
|
10
9
|
*
|
|
11
10
|
* Gateway endpoints:
|
|
12
|
-
* POST /projects/v1/:project_id/transfers —
|
|
13
|
-
* GET /agent/v1/transfers/incoming —
|
|
14
|
-
* GET /agent/v1/transfers/outgoing —
|
|
15
|
-
* GET /agent/v1/transfers/:transfer_id — preview (
|
|
16
|
-
* POST /agent/v1/transfers/:transfer_id/accept —
|
|
17
|
-
* POST /agent/v1/transfers/:transfer_id/
|
|
11
|
+
* POST /projects/v1/:project_id/transfers — initiate; body { to_wallet } XOR { to_email }
|
|
12
|
+
* GET /agent/v1/transfers/incoming — inbox (both kinds, unioned)
|
|
13
|
+
* GET /agent/v1/transfers/outgoing — outbox (both kinds, unioned)
|
|
14
|
+
* GET /agent/v1/transfers/:transfer_id — preview (kind-agnostic)
|
|
15
|
+
* POST /agent/v1/transfers/:transfer_id/accept — WALLET completion (recipient SIWX-signs)
|
|
16
|
+
* POST /agent/v1/transfers/:transfer_id/claim — EMAIL completion (recipient claims into an org)
|
|
17
|
+
* POST /agent/v1/transfers/:transfer_id/cancel — cancel (kind-agnostic)
|
|
18
18
|
*
|
|
19
19
|
* Owner-side mutations against a project with a pending transfer return
|
|
20
20
|
* 409 `PROJECT_HAS_PENDING_TRANSFER`. The SDK kernel surfaces that as
|
|
21
|
-
* {@link TransferFreezeError} so agents can guide the user to cancel.
|
|
21
|
+
* {@link TransferFreezeError} so agents can guide the user to cancel. Calling
|
|
22
|
+
* the wrong completion for a row's kind (e.g. `accept` on an email row) returns
|
|
23
|
+
* 409 `WRONG_COMPLETION_FOR_TRANSFER_KIND`; the thrown error exposes
|
|
24
|
+
* `nextActions` pointing at the sibling completion on the SAME `transfer_id`.
|
|
22
25
|
*/
|
|
26
|
+
import { LocalError } from "../errors.js";
|
|
23
27
|
// ─── Class ───────────────────────────────────────────────────────────────────
|
|
24
28
|
export class Transfers {
|
|
25
29
|
client;
|
|
26
30
|
constructor(client) {
|
|
27
31
|
this.client = client;
|
|
28
32
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Initiate a two-party project transfer. Caller must currently own
|
|
31
|
-
* `projectId` (gateway re-reads owner from DB, not cache). Creates a
|
|
32
|
-
* `pending` row with a 72h expiry and freezes owner-side mutations on
|
|
33
|
-
* the project until the transfer is accepted, cancelled, or expires.
|
|
34
|
-
*/
|
|
35
33
|
async initiate(input) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
const toWallet = "toWallet" in input ? input.toWallet : undefined;
|
|
35
|
+
const toEmail = "toEmail" in input ? input.toEmail : undefined;
|
|
36
|
+
const hasWallet = typeof toWallet === "string" && toWallet.length > 0;
|
|
37
|
+
const hasEmail = typeof toEmail === "string" && toEmail.length > 0;
|
|
38
|
+
if (hasWallet === hasEmail) {
|
|
39
|
+
throw new LocalError("Provide exactly one of toWallet or toEmail.", "initiating project transfer", { code: "VALIDATION_ERROR", details: { fields: ["toWallet", "toEmail"] } });
|
|
40
|
+
}
|
|
41
|
+
const path = `/projects/v1/${encodeURIComponent(input.projectId)}/transfers`;
|
|
42
|
+
if (hasEmail) {
|
|
43
|
+
const body = { to_email: toEmail };
|
|
44
|
+
if (input.message !== undefined)
|
|
45
|
+
body.message = input.message;
|
|
46
|
+
const retain = input.retainCollaborator;
|
|
47
|
+
if (retain !== undefined)
|
|
48
|
+
body.retain_collaborator = retain;
|
|
49
|
+
return this.client.request(path, {
|
|
50
|
+
method: "POST",
|
|
51
|
+
body,
|
|
52
|
+
context: "initiating project transfer",
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const w = input;
|
|
56
|
+
const body = { to_wallet: toWallet };
|
|
57
|
+
if (w.billingPolicy !== undefined)
|
|
58
|
+
body.billing_policy = w.billingPolicy;
|
|
59
|
+
if (w.message !== undefined)
|
|
60
|
+
body.message = w.message;
|
|
61
|
+
if (w.kysignedRecordId !== undefined)
|
|
62
|
+
body.kysigned_record_id = w.kysignedRecordId;
|
|
63
|
+
return this.client.request(path, {
|
|
44
64
|
method: "POST",
|
|
45
65
|
body,
|
|
46
66
|
context: "initiating project transfer",
|
|
47
67
|
});
|
|
48
68
|
}
|
|
49
69
|
/**
|
|
50
|
-
* Fetch the preview document for a pending or terminal transfer
|
|
51
|
-
* caller must be
|
|
52
|
-
*
|
|
53
|
-
* domains, functions, CI bindings
|
|
54
|
-
* the billing implications
|
|
70
|
+
* Fetch the preview document for a pending or terminal transfer of either
|
|
71
|
+
* kind. The caller must be a party to it (wallet signer, addressed-email
|
|
72
|
+
* principal, or offering-org member); other callers receive 403. Preview
|
|
73
|
+
* lists secret NAMES (not values), custom domains, functions, CI bindings
|
|
74
|
+
* that will be revoked at completion, the billing implications, and — on
|
|
75
|
+
* email rows — the `retain_collaborator` offer.
|
|
55
76
|
*/
|
|
56
77
|
async preview(transferId) {
|
|
57
78
|
return this.client.request(`/agent/v1/transfers/${encodeURIComponent(transferId)}`, { context: "previewing project transfer" });
|
|
58
79
|
}
|
|
59
80
|
/**
|
|
60
|
-
* Accept an incoming transfer. The caller's wallet must equal the
|
|
61
|
-
* transfer's `to_wallet`. The accept transaction atomically flips
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* `secrets_rotation_advised` advisory on the project.
|
|
81
|
+
* Accept an incoming WALLET transfer. The caller's wallet must equal the
|
|
82
|
+
* transfer's `to_wallet`. The accept transaction atomically flips ownership,
|
|
83
|
+
* revokes A's CI bindings on the project, enqueues notifications to both
|
|
84
|
+
* parties, and stamps the persistent `secrets_rotation_advised` advisory.
|
|
65
85
|
*/
|
|
66
86
|
async accept(transferId) {
|
|
67
87
|
const result = await this.client.request(`/agent/v1/transfers/${encodeURIComponent(transferId)}/accept`, {
|
|
@@ -86,9 +106,45 @@ export class Transfers {
|
|
|
86
106
|
return result;
|
|
87
107
|
}
|
|
88
108
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
109
|
+
* Claim an incoming EMAIL transfer into an org. Omit `organizationId` to claim
|
|
110
|
+
* into a brand-new org. The claim atomically flips ownership (the email analog
|
|
111
|
+
* of {@link Transfers.accept}) and returns the new owner's project keys, which
|
|
112
|
+
* `claim` persists to the keystore — symmetric with `accept` (#428 /
|
|
113
|
+
* `project-transfer-claim-credentials`) — so the claimant can operate the
|
|
114
|
+
* project immediately. Note the claim auth model is principal-based (a
|
|
115
|
+
* control-plane session or a verified-email SIWX match), so — unlike `accept`
|
|
116
|
+
* — a wallet is not assumed to be present.
|
|
117
|
+
*/
|
|
118
|
+
async claim(transferId, opts = {}) {
|
|
119
|
+
const body = {};
|
|
120
|
+
if (opts.organizationId !== undefined)
|
|
121
|
+
body.org_id = opts.organizationId;
|
|
122
|
+
if (opts.acceptRetainedCollaborator !== undefined) {
|
|
123
|
+
body.accept_retained_collaborator = opts.acceptRetainedCollaborator;
|
|
124
|
+
}
|
|
125
|
+
const result = await this.client.request(`/agent/v1/transfers/${encodeURIComponent(transferId)}/claim`, { method: "POST", body, context: "claiming project transfer" });
|
|
126
|
+
// Persist the new owner's keys so the claimant can operate the project
|
|
127
|
+
// immediately, mirroring `accept`. Keys are returned only after the
|
|
128
|
+
// ownership flip commits, to the authorized claimant.
|
|
129
|
+
if (result.anon_key && result.service_key) {
|
|
130
|
+
const creds = this.client.credentials;
|
|
131
|
+
if (creds.saveProject) {
|
|
132
|
+
await creds.saveProject(result.project_id, {
|
|
133
|
+
anon_key: result.anon_key,
|
|
134
|
+
service_key: result.service_key,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (creds.setActiveProject) {
|
|
138
|
+
await creds.setActiveProject(result.project_id);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Cancel a pending transfer of either kind. The caller must be authorized for
|
|
145
|
+
* the row's kind (a wallet signer, or an owner/admin of the offering org /
|
|
146
|
+
* the addressed-email principal). Already-processed transfers return 409
|
|
147
|
+
* `TRANSFER_ALREADY_PROCESSED`.
|
|
92
148
|
*/
|
|
93
149
|
async cancel(transferId, reason) {
|
|
94
150
|
const body = {};
|
|
@@ -100,7 +156,7 @@ export class Transfers {
|
|
|
100
156
|
context: "cancelling project transfer",
|
|
101
157
|
});
|
|
102
158
|
}
|
|
103
|
-
/** Pending transfers OFFERED TO the
|
|
159
|
+
/** Pending transfers OFFERED TO the caller — both wallet- and email-addressed. */
|
|
104
160
|
async listIncoming(opts = {}) {
|
|
105
161
|
const q = buildPagination(opts);
|
|
106
162
|
const path = q ? `/agent/v1/transfers/incoming?${q}` : "/agent/v1/transfers/incoming";
|
|
@@ -109,7 +165,7 @@ export class Transfers {
|
|
|
109
165
|
});
|
|
110
166
|
return res.transfers;
|
|
111
167
|
}
|
|
112
|
-
/** Pending transfers INITIATED BY the
|
|
168
|
+
/** Pending transfers INITIATED BY the caller — both wallet- and email-addressed. */
|
|
113
169
|
async listOutgoing(opts = {}) {
|
|
114
170
|
const q = buildPagination(opts);
|
|
115
171
|
const path = q ? `/agent/v1/transfers/outgoing?${q}` : "/agent/v1/transfers/outgoing";
|
|
@@ -118,51 +174,6 @@ export class Transfers {
|
|
|
118
174
|
});
|
|
119
175
|
return res.transfers;
|
|
120
176
|
}
|
|
121
|
-
// ── Email→org handoff (v1.78) ─────────────────────────────────────────────
|
|
122
|
-
// Same transfer rail, but the recipient is an EMAIL (resolved to an org at
|
|
123
|
-
// claim time) rather than a wallet. The caller must own the project; the
|
|
124
|
-
// recipient claims into an org they own (or a brand-new one). Exposed under
|
|
125
|
-
// the same `transfer` noun on the CLI (`transfer init --to <email>`).
|
|
126
|
-
/**
|
|
127
|
-
* Initiate an email→org handoff of `projectId` to `toEmail`. Like a wallet
|
|
128
|
-
* transfer, freezes owner-side mutations until the recipient claims, the
|
|
129
|
-
* sender cancels, or it expires.
|
|
130
|
-
*/
|
|
131
|
-
async initiateHandoff(input) {
|
|
132
|
-
const body = { to_email: input.toEmail };
|
|
133
|
-
if (input.message !== undefined)
|
|
134
|
-
body.message = input.message;
|
|
135
|
-
if (input.retainCollaborator !== undefined)
|
|
136
|
-
body.retain_collaborator = input.retainCollaborator;
|
|
137
|
-
return this.client.request(`/projects/v1/${encodeURIComponent(input.projectId)}/handoffs`, { method: "POST", body, context: "initiating project handoff" });
|
|
138
|
-
}
|
|
139
|
-
/** Pending handoffs addressed to the authenticated principal's email. */
|
|
140
|
-
async listIncomingHandoffs() {
|
|
141
|
-
const res = await this.client.request("/agent/v1/handoffs/incoming", { context: "listing incoming handoffs" });
|
|
142
|
-
return res.handoffs ?? res.transfers ?? [];
|
|
143
|
-
}
|
|
144
|
-
/** Preview a handoff (sender, or the addressed recipient). */
|
|
145
|
-
async previewHandoff(transferId) {
|
|
146
|
-
return this.client.request(`/agent/v1/handoffs/${encodeURIComponent(transferId)}`, { context: "previewing project handoff" });
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Claim an incoming handoff into an org. Omit `organizationId` to claim
|
|
150
|
-
* into a brand-new org. The claim atomically flips ownership (the handoff
|
|
151
|
-
* analog of {@link Transfers.accept}).
|
|
152
|
-
*/
|
|
153
|
-
async claimHandoff(transferId, input = {}) {
|
|
154
|
-
const body = {};
|
|
155
|
-
if (input.organizationId !== undefined)
|
|
156
|
-
body.organization_id = input.organizationId;
|
|
157
|
-
if (input.acceptRetainedCollaborator !== undefined) {
|
|
158
|
-
body.accept_retained_collaborator = input.acceptRetainedCollaborator;
|
|
159
|
-
}
|
|
160
|
-
return this.client.request(`/agent/v1/handoffs/${encodeURIComponent(transferId)}/claim`, { method: "POST", body, context: "claiming project handoff" });
|
|
161
|
-
}
|
|
162
|
-
/** Cancel a pending handoff (sender or recipient). */
|
|
163
|
-
async cancelHandoff(transferId) {
|
|
164
|
-
return this.client.request(`/agent/v1/handoffs/${encodeURIComponent(transferId)}/cancel`, { method: "POST", body: {}, context: "cancelling project handoff" });
|
|
165
|
-
}
|
|
166
177
|
}
|
|
167
178
|
function buildPagination(opts) {
|
|
168
179
|
const parts = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfers.js","sourceRoot":"","sources":["../../src/namespaces/transfers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"transfers.js","sourceRoot":"","sources":["../../src/namespaces/transfers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6R1C,gFAAgF;AAEhF,MAAM,OAAO,SAAS;IACS;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAW/C,KAAK,CAAC,QAAQ,CACZ,KAA4B;QAE5B,MAAM,QAAQ,GAAG,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,MAAM,OAAO,GAAG,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/D,MAAM,SAAS,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QACtE,MAAM,QAAQ,GAAG,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACnE,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC3B,MAAM,IAAI,UAAU,CAClB,6CAA6C,EAC7C,6BAA6B,EAC7B,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,EAAE,CAC3E,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,gBAAgB,kBA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