run402-mcp 2.41.1 → 2.43.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 +2 -2
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/tools/list-projects.d.ts +8 -2
- package/dist/tools/list-projects.d.ts.map +1 -1
- package/dist/tools/list-projects.js +40 -14
- package/dist/tools/list-projects.js.map +1 -1
- package/dist/tools/orgs.d.ts +38 -12
- package/dist/tools/orgs.d.ts.map +1 -1
- package/dist/tools/orgs.js +97 -20
- package/dist/tools/orgs.js.map +1 -1
- package/dist/tools/provision.d.ts +2 -0
- package/dist/tools/provision.d.ts.map +1 -1
- package/dist/tools/provision.js +5 -0
- package/dist/tools/provision.js.map +1 -1
- package/dist/tools/rename-project.d.ts +16 -0
- package/dist/tools/rename-project.d.ts.map +1 -0
- package/dist/tools/rename-project.js +26 -0
- package/dist/tools/rename-project.js.map +1 -0
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +4 -1
- package/dist/tools/status.js.map +1 -1
- package/package.json +1 -1
- package/sdk/dist/control-plane-credentials.d.ts +1 -1
- package/sdk/dist/control-plane-credentials.js +1 -1
- package/sdk/dist/index.d.ts +16 -7
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +19 -8
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/namespaces/operator.d.ts +101 -0
- package/sdk/dist/namespaces/operator.d.ts.map +1 -1
- package/sdk/dist/namespaces/operator.js +60 -1
- package/sdk/dist/namespaces/operator.js.map +1 -1
- package/sdk/dist/namespaces/org.d.ts +73 -35
- package/sdk/dist/namespaces/org.d.ts.map +1 -1
- package/sdk/dist/namespaces/org.js +122 -71
- package/sdk/dist/namespaces/org.js.map +1 -1
- package/sdk/dist/namespaces/org.types.d.ts +51 -17
- package/sdk/dist/namespaces/org.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/org.types.js +7 -4
- package/sdk/dist/namespaces/org.types.js.map +1 -1
- package/sdk/dist/namespaces/projects.d.ts +44 -16
- package/sdk/dist/namespaces/projects.d.ts.map +1 -1
- package/sdk/dist/namespaces/projects.js +72 -28
- package/sdk/dist/namespaces/projects.js.map +1 -1
- package/sdk/dist/namespaces/projects.types.d.ts +98 -10
- package/sdk/dist/namespaces/projects.types.d.ts.map +1 -1
- package/sdk/dist/node/index.d.ts +3 -1
- package/sdk/dist/node/index.d.ts.map +1 -1
- package/sdk/dist/node/index.js +2 -1
- package/sdk/dist/node/index.js.map +1 -1
- package/sdk/dist/node/operator-claim.d.ts +49 -0
- package/sdk/dist/node/operator-claim.d.ts.map +1 -0
- package/sdk/dist/node/operator-claim.js +77 -0
- package/sdk/dist/node/operator-claim.js.map +1 -0
- package/sdk/dist/scoped.d.ts +3 -2
- package/sdk/dist/scoped.d.ts.map +1 -1
- package/sdk/dist/scoped.js +5 -2
- package/sdk/dist/scoped.js.map +1 -1
|
@@ -1,149 +1,200 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `org` namespace — the org-owned control plane (gateway v1.77
|
|
3
|
-
*
|
|
4
|
-
* invites (owner-gated), and read the control-plane audit trail. All routes use
|
|
5
|
-
* the existing SIWX auth; authorization is a membership lookup, never
|
|
6
|
-
* `wallet == signer`.
|
|
2
|
+
* `org` namespace — the org-owned control plane (gateway v1.77+, first-class in
|
|
3
|
+
* v1.82). Mirrors the `r.projects` / `r.project(id)` idiom:
|
|
7
4
|
*
|
|
8
|
-
*
|
|
9
|
-
* `r.org
|
|
10
|
-
*
|
|
5
|
+
* - `r.orgs` — collection + identity: `create`, `list`, `whoami`.
|
|
6
|
+
* - `r.org(id)` — a resource-scoped sub-client (id pre-bound): `get`,
|
|
7
|
+
* `rename`, `members.*`, `invites.*`, `audit`.
|
|
8
|
+
*
|
|
9
|
+
* All routes use the existing SIWX (or control-plane-session) auth; authorization
|
|
10
|
+
* is a membership lookup, never `wallet == signer`. Mutations (`create`,
|
|
11
|
+
* `rename`, member/invite changes) are step-up gated server-side and may return
|
|
12
|
+
* `STEP_UP_REQUIRED` when driven by a stale control-plane session.
|
|
11
13
|
*/
|
|
12
14
|
import { LocalError } from "../errors.js";
|
|
13
|
-
|
|
14
|
-
if (!billingAccountId) {
|
|
15
|
-
throw new LocalError(`${method} requires a billing_account_id`, context);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/** Member management — `r.org.members.*`. */
|
|
15
|
+
/** Member management — `r.org(id).members.*`. The org id is bound at construction. */
|
|
19
16
|
export class OrgMembers {
|
|
20
17
|
client;
|
|
21
|
-
|
|
18
|
+
orgId;
|
|
19
|
+
constructor(client, orgId) {
|
|
22
20
|
this.client = client;
|
|
21
|
+
this.orgId = orgId;
|
|
23
22
|
}
|
|
24
|
-
/** List members of
|
|
25
|
-
async list(
|
|
26
|
-
|
|
27
|
-
const res = await this.client.request(`/orgs/v1/${encodeURIComponent(billingAccountId)}/members`, { context: "listing org members" });
|
|
23
|
+
/** List members of the org (`GET /orgs/v1/:org_id/members`). Any active member. */
|
|
24
|
+
async list() {
|
|
25
|
+
const res = await this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/members`, { context: "listing org members" });
|
|
28
26
|
return res.members ?? [];
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
|
-
* Add a member by wallet (`POST /orgs/v1/:
|
|
32
|
-
*
|
|
33
|
-
*
|
|
29
|
+
* Add a member by wallet (`POST /orgs/v1/:org_id/members`). Requires an active
|
|
30
|
+
* `owner` membership. A brand-new wallet is provisioned as a `human` principal;
|
|
31
|
+
* `role` defaults to `"developer"` server-side.
|
|
34
32
|
*/
|
|
35
|
-
async add(
|
|
36
|
-
requireBa(billingAccountId, "org.members.add", "adding org member");
|
|
33
|
+
async add(input) {
|
|
37
34
|
if (!input?.wallet) {
|
|
38
|
-
throw new LocalError("org
|
|
35
|
+
throw new LocalError("org members.add requires { wallet }", "adding org member");
|
|
39
36
|
}
|
|
40
37
|
const body = { wallet: input.wallet };
|
|
41
38
|
if (input.role !== undefined)
|
|
42
39
|
body.role = input.role;
|
|
43
|
-
return this.client.request(`/orgs/v1/${encodeURIComponent(
|
|
40
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/members`, { method: "POST", body, context: "adding org member" });
|
|
44
41
|
}
|
|
45
42
|
/**
|
|
46
43
|
* Change a member's role (`PATCH …/members/:principal_id`). Requires `owner`;
|
|
47
44
|
* demoting the org's only active owner fails with `409 LAST_OWNER`.
|
|
48
45
|
*/
|
|
49
|
-
async setRole(
|
|
50
|
-
requireBa(billingAccountId, "org.members.setRole", "setting member role");
|
|
46
|
+
async setRole(principalId, role) {
|
|
51
47
|
if (!principalId)
|
|
52
|
-
throw new LocalError("org
|
|
48
|
+
throw new LocalError("org members.setRole requires a principalId", "setting member role");
|
|
53
49
|
if (!role)
|
|
54
|
-
throw new LocalError("org
|
|
55
|
-
return this.client.request(`/orgs/v1/${encodeURIComponent(
|
|
50
|
+
throw new LocalError("org members.setRole requires a role", "setting member role");
|
|
51
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/members/${encodeURIComponent(principalId)}`, { method: "PATCH", body: { role }, context: "setting member role" });
|
|
56
52
|
}
|
|
57
53
|
/**
|
|
58
54
|
* Revoke a member (`DELETE …/members/:principal_id`) — one row, status
|
|
59
55
|
* `revoked`, no key rotation. Requires `owner`; revoking the org's only active
|
|
60
56
|
* owner fails with `409 LAST_OWNER`.
|
|
61
57
|
*/
|
|
62
|
-
async revoke(
|
|
63
|
-
requireBa(billingAccountId, "org.members.revoke", "revoking org member");
|
|
58
|
+
async revoke(principalId) {
|
|
64
59
|
if (!principalId)
|
|
65
|
-
throw new LocalError("org
|
|
66
|
-
return this.client.request(`/orgs/v1/${encodeURIComponent(
|
|
60
|
+
throw new LocalError("org members.revoke requires a principalId", "revoking org member");
|
|
61
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/members/${encodeURIComponent(principalId)}`, { method: "DELETE", context: "revoking org member" });
|
|
67
62
|
}
|
|
68
63
|
}
|
|
69
|
-
/** Email-invite management — `r.org.invites.*`. */
|
|
64
|
+
/** Email-invite management — `r.org(id).invites.*`. The org id is bound at construction. */
|
|
70
65
|
export class OrgInvites {
|
|
71
66
|
client;
|
|
72
|
-
|
|
67
|
+
orgId;
|
|
68
|
+
constructor(client, orgId) {
|
|
73
69
|
this.client = client;
|
|
70
|
+
this.orgId = orgId;
|
|
74
71
|
}
|
|
75
|
-
/** List pending email invites (`GET /orgs/v1/:
|
|
76
|
-
async list(
|
|
77
|
-
|
|
78
|
-
const res = await this.client.request(`/orgs/v1/${encodeURIComponent(billingAccountId)}/invites`, { context: "listing org invites" });
|
|
72
|
+
/** List pending email invites (`GET /orgs/v1/:org_id/invites`). Any active member. */
|
|
73
|
+
async list() {
|
|
74
|
+
const res = await this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/invites`, { context: "listing org invites" });
|
|
79
75
|
return res.invites ?? [];
|
|
80
76
|
}
|
|
81
77
|
/**
|
|
82
78
|
* Invite a person by email (`POST …/invites`); claimed at their first login.
|
|
83
79
|
* Requires `owner` (plus step-up when driven by a control-plane session).
|
|
84
80
|
*/
|
|
85
|
-
async create(
|
|
86
|
-
requireBa(billingAccountId, "org.invites.create", "creating org invite");
|
|
81
|
+
async create(input) {
|
|
87
82
|
if (!input?.email)
|
|
88
|
-
throw new LocalError("org
|
|
83
|
+
throw new LocalError("org invites.create requires { email }", "creating org invite");
|
|
89
84
|
if (!input?.role)
|
|
90
|
-
throw new LocalError("org
|
|
85
|
+
throw new LocalError("org invites.create requires { role }", "creating org invite");
|
|
91
86
|
const body = { email: input.email, role: input.role };
|
|
92
87
|
if (input.inviteTtlHours !== undefined)
|
|
93
88
|
body.invite_ttl_hours = input.inviteTtlHours;
|
|
94
|
-
return this.client.request(`/orgs/v1/${encodeURIComponent(
|
|
89
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/invites`, { method: "POST", body, context: "creating org invite" });
|
|
95
90
|
}
|
|
96
91
|
/** Revoke a pending invite by its pending principal id (`DELETE …/invites/:principal_id`). Requires `owner`. */
|
|
97
|
-
async revoke(
|
|
98
|
-
requireBa(billingAccountId, "org.invites.revoke", "revoking org invite");
|
|
92
|
+
async revoke(principalId) {
|
|
99
93
|
if (!principalId)
|
|
100
|
-
throw new LocalError("org
|
|
101
|
-
return this.client.request(`/orgs/v1/${encodeURIComponent(
|
|
94
|
+
throw new LocalError("org invites.revoke requires a principalId", "revoking org invite");
|
|
95
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}/invites/${encodeURIComponent(principalId)}`, { method: "DELETE", context: "revoking org invite" });
|
|
102
96
|
}
|
|
103
97
|
}
|
|
104
|
-
|
|
98
|
+
/**
|
|
99
|
+
* A resource-scoped org sub-client returned by `r.org(id)`. The org id is bound
|
|
100
|
+
* at construction; instance operations take no repeated id argument. Mirrors the
|
|
101
|
+
* project-scoped `r.project(id)` shape (narrower scope).
|
|
102
|
+
*/
|
|
103
|
+
export class ScopedOrg {
|
|
105
104
|
client;
|
|
106
|
-
/** Member management (`r.org.members.*`). */
|
|
105
|
+
/** Member management (`r.org(id).members.*`). */
|
|
107
106
|
members;
|
|
108
|
-
/** Email-invite management (`r.org.invites.*`). */
|
|
107
|
+
/** Email-invite management (`r.org(id).invites.*`). */
|
|
109
108
|
invites;
|
|
110
|
-
|
|
109
|
+
/** The org id this sub-client is bound to. Read-only. */
|
|
110
|
+
orgId;
|
|
111
|
+
constructor(client, orgId) {
|
|
111
112
|
this.client = client;
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
if (!orgId)
|
|
114
|
+
throw new LocalError("r.org(id) requires an org id", "scoping client to org");
|
|
115
|
+
this.orgId = orgId;
|
|
116
|
+
this.members = new OrgMembers(client, orgId);
|
|
117
|
+
this.invites = new OrgInvites(client, orgId);
|
|
114
118
|
}
|
|
115
119
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
120
|
+
* Read this org (`GET /orgs/v1/:org_id`) — `{ org_id, display_name, tier, role }`.
|
|
121
|
+
* Any active member may view; a non-member (including a guessed id) gets the
|
|
122
|
+
* same non-revealing `403`.
|
|
119
123
|
*/
|
|
120
|
-
async
|
|
121
|
-
return this.client.request(
|
|
122
|
-
context: "
|
|
124
|
+
async get() {
|
|
125
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}`, {
|
|
126
|
+
context: "reading org",
|
|
123
127
|
});
|
|
124
128
|
}
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Rename this org (`PATCH /orgs/v1/:org_id`). Owner-only + step-up gated. Pass
|
|
131
|
+
* `null` or `""` to clear the label. Returns the updated `{ org_id,
|
|
132
|
+
* display_name, tier }`.
|
|
133
|
+
*/
|
|
134
|
+
async rename(displayName) {
|
|
135
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(this.orgId)}`, {
|
|
136
|
+
method: "PATCH",
|
|
137
|
+
body: { display_name: displayName },
|
|
138
|
+
context: "renaming org",
|
|
129
139
|
});
|
|
130
|
-
return res.orgs ?? [];
|
|
131
140
|
}
|
|
132
141
|
/**
|
|
133
|
-
* Control-plane audit trail for
|
|
142
|
+
* Control-plane audit trail for this org (`GET /orgs/v1/:org_id/audit`).
|
|
134
143
|
* admin+. Newest-first; page with the `before` cursor.
|
|
135
144
|
*/
|
|
136
|
-
async audit(
|
|
137
|
-
requireBa(billingAccountId, "org.audit", "reading org audit trail");
|
|
145
|
+
async audit(opts = {}) {
|
|
138
146
|
const parts = [];
|
|
139
147
|
if (opts.limit !== undefined)
|
|
140
148
|
parts.push(`limit=${encodeURIComponent(String(opts.limit))}`);
|
|
141
149
|
if (opts.before !== undefined)
|
|
142
150
|
parts.push(`before=${encodeURIComponent(opts.before)}`);
|
|
143
151
|
const q = parts.join("&");
|
|
144
|
-
const base = `/orgs/v1/${encodeURIComponent(
|
|
152
|
+
const base = `/orgs/v1/${encodeURIComponent(this.orgId)}/audit`;
|
|
145
153
|
const res = await this.client.request(q ? `${base}?${q}` : base, { context: "reading org audit trail" });
|
|
146
154
|
return res.events ?? res.audit_events ?? [];
|
|
147
155
|
}
|
|
148
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Org collection + identity — `r.orgs.*`. Operations that are not bound to a
|
|
159
|
+
* single org: create a new org, list the caller's orgs, resolve the principal.
|
|
160
|
+
*/
|
|
161
|
+
export class Orgs {
|
|
162
|
+
client;
|
|
163
|
+
constructor(client) {
|
|
164
|
+
this.client = client;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Create an empty org on the `prototype` tier (`POST /orgs/v1`); the caller
|
|
168
|
+
* becomes `owner`. Accepts only an optional `displayName` — there is no tier at
|
|
169
|
+
* create (paid tiers are a separate flow). Step-up gated; the soft per-owner
|
|
170
|
+
* free-org cap may return `FREE_ORG_OWNER_LIMIT_EXCEEDED`.
|
|
171
|
+
*/
|
|
172
|
+
async create(input = {}) {
|
|
173
|
+
const body = {};
|
|
174
|
+
if (input.displayName !== undefined)
|
|
175
|
+
body.display_name = input.displayName;
|
|
176
|
+
return this.client.request("/orgs/v1", {
|
|
177
|
+
method: "POST",
|
|
178
|
+
body,
|
|
179
|
+
context: "creating organization",
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/** List the orgs the caller is an active member of (`GET /orgs/v1`), as memberships. */
|
|
183
|
+
async list() {
|
|
184
|
+
const res = await this.client.request("/orgs/v1", {
|
|
185
|
+
context: "listing organizations",
|
|
186
|
+
});
|
|
187
|
+
return res.orgs ?? [];
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Resolve the caller's control-plane principal and its org memberships
|
|
191
|
+
* (`GET /agent/v1/whoami`). This is the REMOTE identity; for the local,
|
|
192
|
+
* network-free wallet/profile identity use `r.whoami()`.
|
|
193
|
+
*/
|
|
194
|
+
async whoami() {
|
|
195
|
+
return this.client.request("/agent/v1/whoami", {
|
|
196
|
+
context: "resolving principal identity",
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
149
200
|
//# sourceMappingURL=org.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/namespaces/org.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/namespaces/org.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAmB1C,sFAAsF;AACtF,MAAM,OAAO,UAAU;IACQ;IAAiC;IAA9D,YAA6B,MAAc,EAAmB,KAAa;QAA9C,WAAM,GAAN,MAAM,CAAQ;QAAmB,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAE/E,mFAAmF;IACnF,KAAK,CAAC,IAAI;QACR,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACnC,YAAY,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EACpD,EAAE,OAAO,EAAE,qBAAqB,EAAE,CACnC,CAAC;QACF,OAAO,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAC,KAAqB;QAC7B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,UAAU,CAAC,qCAAqC,EAAE,mBAAmB,CAAC,CAAC;QACnF,CAAC;QACD,MAAM,IAAI,GAA4B,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;QAC/D,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACrD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,YAAY,kBAAkB,CAAC,IAAI,CAAC,KAAK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,MAAM;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAe,kBAAkB,EAAE;YAC3D,OAAO,EAAE,8BAA8B;SACxC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Request/response types for the
|
|
3
|
-
* (gateway v1.77+ / `
|
|
2
|
+
* Request/response types for the org namespace — the org-owned control plane
|
|
3
|
+
* (gateway v1.77+ / v1.82 `first-class-orgs`). A wallet *authenticates* (SIWX
|
|
4
4
|
* resolves it to a control-plane principal); *authorization* is an org
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* membership in the role lattice below, or a per-project grant. These shapes map
|
|
6
|
+
* to `/agent/v1/whoami` and `/orgs/v1*`.
|
|
7
|
+
*
|
|
8
|
+
* Public vocabulary is `org` / `org_id` (v1.82): the internal `billing_account`
|
|
9
|
+
* substrate never appears on the wire.
|
|
7
10
|
*/
|
|
8
|
-
/** Org
|
|
11
|
+
/** Org role lattice: `owner > admin > developer > billing > viewer`. */
|
|
9
12
|
export type OrgRole = "owner" | "admin" | "developer" | "billing" | "viewer";
|
|
10
13
|
/**
|
|
11
14
|
* A resolved control-plane principal. `type` is the principal kind
|
|
@@ -31,16 +34,21 @@ export interface Principal {
|
|
|
31
34
|
/**
|
|
32
35
|
* A principal's membership in an org. `status` is the membership lifecycle
|
|
33
36
|
* (`"active"` is the only state that authorizes; `"invited"` / `"suspended"` /
|
|
34
|
-
* `"revoked"` do not). Returned by {@link
|
|
37
|
+
* `"revoked"` do not). Returned by {@link Orgs.whoami} and {@link Orgs.list}.
|
|
38
|
+
*
|
|
39
|
+
* v1.82: carries `org_id` + `display_name` (the public vocabulary), replacing
|
|
40
|
+
* the pre-v1.82 `billing_account_id`.
|
|
35
41
|
*/
|
|
36
42
|
export interface OrgMembership {
|
|
37
|
-
|
|
43
|
+
org_id: string;
|
|
44
|
+
/** The org's free-text label; `null` when the org has no display name. */
|
|
45
|
+
display_name: string | null;
|
|
38
46
|
role: OrgRole;
|
|
39
47
|
status: string;
|
|
40
48
|
[key: string]: unknown;
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
|
-
* Result of {@link
|
|
51
|
+
* Result of {@link Orgs.whoami} (`GET /agent/v1/whoami`) — the remote, gateway-
|
|
44
52
|
* resolved identity. Distinct from the local, network-free `r.whoami()` (wallet
|
|
45
53
|
* address + profile label): this returns the control-plane principal and every
|
|
46
54
|
* org it is a member of.
|
|
@@ -48,10 +56,37 @@ export interface OrgMembership {
|
|
|
48
56
|
export interface WhoAmIResult {
|
|
49
57
|
principal: Principal;
|
|
50
58
|
memberships: OrgMembership[];
|
|
51
|
-
authenticator_id: string;
|
|
59
|
+
authenticator_id: string | null;
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
/** Input to {@link Orgs.create} — create an empty org on the prototype tier. */
|
|
63
|
+
export interface CreateOrgInput {
|
|
64
|
+
/**
|
|
65
|
+
* Optional free-text label (e.g. "Kychee"). Non-unique, not an identifier,
|
|
66
|
+
* validated server-side. Omit for an unlabeled org. No `tier` — paid tiers are
|
|
67
|
+
* a separate flow.
|
|
68
|
+
*/
|
|
69
|
+
displayName?: string | null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* An org summary as returned by {@link Orgs.create} and {@link ScopedOrg.rename}
|
|
73
|
+
* (`{ org_id, display_name, tier }`). `display_name` is `null` when unset.
|
|
74
|
+
*/
|
|
75
|
+
export interface OrgSummary {
|
|
76
|
+
org_id: string;
|
|
77
|
+
display_name: string | null;
|
|
78
|
+
tier: string;
|
|
52
79
|
[key: string]: unknown;
|
|
53
80
|
}
|
|
54
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* A single-org read from {@link ScopedOrg.get} (`GET /orgs/v1/:org_id`) — the
|
|
83
|
+
* {@link OrgSummary} plus the caller's `role` (`null` for an admin who is not a
|
|
84
|
+
* member).
|
|
85
|
+
*/
|
|
86
|
+
export interface OrgDetail extends OrgSummary {
|
|
87
|
+
role: OrgRole | null;
|
|
88
|
+
}
|
|
89
|
+
/** A member row from {@link OrgMembers.list} (`GET /orgs/v1/:org_id/members`). */
|
|
55
90
|
export interface OrgMember {
|
|
56
91
|
principal_id: string;
|
|
57
92
|
role: OrgRole;
|
|
@@ -59,9 +94,8 @@ export interface OrgMember {
|
|
|
59
94
|
[key: string]: unknown;
|
|
60
95
|
}
|
|
61
96
|
/**
|
|
62
|
-
* Input to {@link
|
|
63
|
-
*
|
|
64
|
-
* the separate Layer-2 `passkey-principals-onboarding` flow, not yet a route.)
|
|
97
|
+
* Input to {@link OrgMembers.add}. Membership-add is *by wallet* — the gateway
|
|
98
|
+
* resolves/provisions the wallet to a principal.
|
|
65
99
|
*/
|
|
66
100
|
export interface AddMemberInput {
|
|
67
101
|
/** EVM address (or named wallet) to add. */
|
|
@@ -69,7 +103,7 @@ export interface AddMemberInput {
|
|
|
69
103
|
/** Initial role. Defaults to `"developer"` server-side when omitted. */
|
|
70
104
|
role?: OrgRole;
|
|
71
105
|
}
|
|
72
|
-
/** Result of {@link
|
|
106
|
+
/** Result of {@link OrgMembers.add} / {@link OrgMembers.setRole} (`{ status:"ok", principal_id, role }`). */
|
|
73
107
|
export interface MemberMutationResult {
|
|
74
108
|
status: string;
|
|
75
109
|
principal_id: string;
|
|
@@ -90,7 +124,7 @@ export interface CreateInviteInput {
|
|
|
90
124
|
inviteTtlHours?: number;
|
|
91
125
|
}
|
|
92
126
|
/**
|
|
93
|
-
* A pending email invite from {@link OrgInvites.list} (`GET /orgs/v1/:
|
|
127
|
+
* A pending email invite from {@link OrgInvites.list} (`GET /orgs/v1/:org_id/invites`).
|
|
94
128
|
* Represented by a pending `principal_id` — pass it to {@link OrgInvites.revoke}.
|
|
95
129
|
*/
|
|
96
130
|
export interface OrgInvite {
|
|
@@ -107,14 +141,14 @@ export interface OrgInviteRevokeResult {
|
|
|
107
141
|
principal_id: string;
|
|
108
142
|
[key: string]: unknown;
|
|
109
143
|
}
|
|
110
|
-
/** Options for {@link
|
|
144
|
+
/** Options for {@link ScopedOrg.audit}. */
|
|
111
145
|
export interface AuditOptions {
|
|
112
146
|
/** Page size; gateway default applies when omitted. */
|
|
113
147
|
limit?: number;
|
|
114
148
|
/** Cursor — return events before this opaque marker. */
|
|
115
149
|
before?: string;
|
|
116
150
|
}
|
|
117
|
-
/** One control-plane audit event from {@link
|
|
151
|
+
/** One control-plane audit event from {@link ScopedOrg.audit}. Shape is gateway-owned (forward-compatible). */
|
|
118
152
|
export interface AuditEvent {
|
|
119
153
|
[key: string]: unknown;
|
|
120
154
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/org.types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"org.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/org.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,wEAAwE;AACxE,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7E;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,+GAA+G;IAC/G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,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B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,+EAA+E;AAC/E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,2CAA2C;AAC3C,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,+GAA+G;AAC/G,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Request/response types for the
|
|
3
|
-
* (gateway v1.77+ / `
|
|
2
|
+
* Request/response types for the org namespace — the org-owned control plane
|
|
3
|
+
* (gateway v1.77+ / v1.82 `first-class-orgs`). A wallet *authenticates* (SIWX
|
|
4
4
|
* resolves it to a control-plane principal); *authorization* is an org
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* membership in the role lattice below, or a per-project grant. These shapes map
|
|
6
|
+
* to `/agent/v1/whoami` and `/orgs/v1*`.
|
|
7
|
+
*
|
|
8
|
+
* Public vocabulary is `org` / `org_id` (v1.82): the internal `billing_account`
|
|
9
|
+
* substrate never appears on the wire.
|
|
7
10
|
*/
|
|
8
11
|
export {};
|
|
9
12
|
//# sourceMappingURL=org.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.types.js","sourceRoot":"","sources":["../../src/namespaces/org.types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"org.types.js","sourceRoot":"","sources":["../../src/namespaces/org.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import type { Client } from "../kernel.js";
|
|
14
14
|
import type { ProjectKeys } from "../credentials.js";
|
|
15
15
|
import type { ExposeManifest } from "./deploy.types.js";
|
|
16
|
-
import type { ExposeManifestValidationInput, ExposeManifestValidationResult, ListProjectsResult, ProjectInfo, ProjectRestOptions, ProjectRestResponse, ProvisionOptions, ProvisionResult, QuoteResult, SchemaReport, UsageReport, ValidateExposeOptions } from "./projects.types.js";
|
|
16
|
+
import type { ExposeManifestValidationInput, ExposeManifestValidationResult, ListProjectsOptions, ListProjectsResult, ProjectInfo, ProjectRestOptions, ProjectRestResponse, ProvisionOptions, ProvisionResult, QuoteResult, RenameProjectResult, SchemaReport, UsageReport, ValidateExposeOptions } from "./projects.types.js";
|
|
17
17
|
export declare class Projects {
|
|
18
18
|
private readonly client;
|
|
19
19
|
readonly schema: (id: string) => Promise<SchemaReport>;
|
|
@@ -42,22 +42,50 @@ export declare class Projects {
|
|
|
42
42
|
*/
|
|
43
43
|
delete(id: string): Promise<void>;
|
|
44
44
|
/**
|
|
45
|
-
* List
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
45
|
+
* List projects in the named, domain-aware inventory (gateway
|
|
46
|
+
* `project-findability`). Each row carries `name`, `site_url`,
|
|
47
|
+
* `custom_domains`, `billing_account_id` (the owning org), `status`, and
|
|
48
|
+
* `created_at`.
|
|
49
|
+
*
|
|
50
|
+
* Membership-scoped by default (`GET /projects/v1`): returns every project
|
|
51
|
+
* owned by an org the caller's principal is an active member of. This is the
|
|
52
|
+
* cold-start lone-agent path — `list()` with no options, authenticated with
|
|
53
|
+
* SIWX wallet auth from the credential provider.
|
|
54
|
+
*
|
|
55
|
+
* - `{ org }` narrows to one owning org (authorize-before-reveal: a non-member
|
|
56
|
+
* or guessed id is a 403, a non-UUID id a 400).
|
|
57
|
+
* - `{ all: true }` reads the operator email-union inventory across every
|
|
58
|
+
* wallet controlling the operator's verified email
|
|
59
|
+
* (`GET /agent/v1/operator/projects`). Pass `{ all: true, token }` with an
|
|
60
|
+
* operator-session token for the cross-wallet union; without `token`, `all`
|
|
61
|
+
* uses SIWX wallet auth and returns only that wallet's slice. The response
|
|
62
|
+
* echoes the resolved `scope` (`"email"` or `"wallet"`) and is unpaged.
|
|
63
|
+
* - `{ limit, cursor }` paginate the membership-scoped read (server default
|
|
64
|
+
* 50, max 200).
|
|
65
|
+
*
|
|
66
|
+
* @throws {Run402Error} with `context: "listing projects"` on the usual
|
|
67
|
+
* auth/network failures (e.g. `Unauthorized` when no allowance is
|
|
68
|
+
* configured and the gateway rejects the missing SIWX header).
|
|
69
|
+
*/
|
|
70
|
+
list(opts?: ListProjectsOptions): Promise<ListProjectsResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Rename a project (gateway `project-findability`, `PATCH /projects/v1/:id`).
|
|
73
|
+
* Surfaces the project's `name` so a human can fix an auto-generated label.
|
|
74
|
+
*
|
|
75
|
+
* Authorization is org-membership based (`admin`+ on the owning org, or a
|
|
76
|
+
* `project:write` grant) and authorize-before-reveal — an unauthorized caller
|
|
77
|
+
* (including a guessed id) gets the same `Unauthorized` as a real-but-
|
|
78
|
+
* unauthorized project, never a not-found oracle. The server validates the
|
|
79
|
+
* name (non-empty, ≤ 200 chars, no control characters).
|
|
80
|
+
*
|
|
81
|
+
* Uses the caller's SIWX wallet auth (or a control-plane session) from the
|
|
82
|
+
* credential provider — not a project service key — so it works without the
|
|
83
|
+
* project being in the local keystore.
|
|
84
|
+
*
|
|
85
|
+
* @throws {Unauthorized} when the caller is not authorized for the project.
|
|
86
|
+
* @throws {ApiError} (HTTP 400) when the new name is invalid.
|
|
59
87
|
*/
|
|
60
|
-
|
|
88
|
+
rename(projectId: string, name: string): Promise<RenameProjectResult>;
|
|
61
89
|
/**
|
|
62
90
|
* Get usage metrics for a project — API calls, storage, tier limits,
|
|
63
91
|
* lease expiry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/namespaces/projects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/namespaces/projects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,QAAQ;IAOP,OAAO,CAAC,QAAQ,CAAC,MA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