@naturali/cli 0.121.1 → 0.123.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.
Files changed (2) hide show
  1. package/dist/index.mjs +145 -3
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
14
14
  };
15
15
  //#endregion
16
16
  //#region package.json
17
- var version = "0.121.1";
17
+ var version = "0.123.0";
18
18
  //#endregion
19
19
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
20
20
  const serializeFormDataPair = (data, key, value) => {
@@ -3560,7 +3560,7 @@ var Projects = class {
3560
3560
  * List project members
3561
3561
  *
3562
3562
  * Lists who may act in the project, and with what role. Readable by every member, including a read-only `member`: who else is in the project is not a privileged fact, and hiding it makes "why can that person see my agents?" unanswerable.
3563
- * Read-only for now — adding and removing members arrives with the invitation flow, since an invitee may not have an account yet.
3563
+ * Somebody invited who has never signed in is listed too, with status `pending` — the invitation is already a grant, so hiding it until they arrive would hide access that exists.
3564
3564
  *
3565
3565
  */
3566
3566
  static listProjectMembers(options) {
@@ -3570,6 +3570,62 @@ var Projects = class {
3570
3570
  });
3571
3571
  }
3572
3572
  /**
3573
+ * Add a project member
3574
+ *
3575
+ * Adds a colleague to the project by email address. Free and uncapped on every plan: a member adds no run, no channel, no trigger and no byte, so every cost they cause is already billed through the project's owner. Members are counted nowhere.
3576
+ *
3577
+ * **The address does not need an account.** Inviting one that has none creates it unverified and records the membership beside it, so the invitee is already a member with status `pending`. Their first sign-in code — which they request themselves, from the link in the invitation — is what makes them `active`. There is no separate acceptance step and no invitation to expire: the address is the credential, and the invitation reached it.
3578
+ *
3579
+ * An `owner` may grant `admin` or `member`; an `admin` may grant `member` only, so administration cannot hand out its own authority. `role: owner` is refused — that is the billing owner, and transferring it is a different act.
3580
+ *
3581
+ * The invitation email is a courtesy, not the grant: if it cannot be sent the membership still stands, and the response still says `pending`. Requires an account-wide credential — a project-scoped key cannot grant access that would outlive its own revocation.
3582
+ *
3583
+ */
3584
+ static addProjectMember(options) {
3585
+ return (options.client ?? client).post({
3586
+ url: "/v1/projects/{project_id}/members",
3587
+ ...options,
3588
+ headers: {
3589
+ "Content-Type": "application/json",
3590
+ ...options.headers
3591
+ }
3592
+ });
3593
+ }
3594
+ /**
3595
+ * Remove a project member
3596
+ *
3597
+ * Removes a member, or leaves the project yourself.
3598
+ *
3599
+ * **Anyone may remove themselves**, whatever their role: a colleague who no longer wants access should not have to ask for it, and leaving takes nothing from anybody else. Removing *somebody else* needs authority — an `owner` may remove anyone, an `admin` may remove a read-only `member` and not another `admin`.
3600
+ *
3601
+ * The owner's own row is refused: a project with no owner is unreachable, and the row names who pays.
3602
+ *
3603
+ */
3604
+ static removeProjectMember(options) {
3605
+ return (options.client ?? client).delete({
3606
+ url: "/v1/projects/{project_id}/members/{member_id}",
3607
+ ...options
3608
+ });
3609
+ }
3610
+ /**
3611
+ * Change a member's role
3612
+ *
3613
+ * Moves a member between `admin` and `member`. The project `owner` only: promoting somebody to `admin` hands them every write in the project, and an `admin` who could do that could erase the difference between the two roles for themselves.
3614
+ *
3615
+ * The owner's own row is refused in either direction — it names who pays, so changing it is a transfer rather than a role change.
3616
+ *
3617
+ */
3618
+ static updateProjectMember(options) {
3619
+ return (options.client ?? client).patch({
3620
+ url: "/v1/projects/{project_id}/members/{member_id}",
3621
+ ...options,
3622
+ headers: {
3623
+ "Content-Type": "application/json",
3624
+ ...options.headers
3625
+ }
3626
+ });
3627
+ }
3628
+ /**
3573
3629
  * Get per-project usage
3574
3630
  *
3575
3631
  * The per-project meter — the re-billing view (A11/C12/P3). Aggregates the project's usage over an optional [from, to] window, bucketed by a single dimension. Costs are the billing-grade cost_usd the runtime freezes at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced (on the runtime), so cost reflects managed usage; BYOK usage carries no LLM cost.
@@ -13418,7 +13474,7 @@ const routes = {
13418
13474
  "list-project-members": {
13419
13475
  serviceClass: "Projects",
13420
13476
  operationId: "listProjectMembers",
13421
- description: "Lists who may act in the project, and with what role. Readable by every member, including a read-only `member`: who else is in the project is not a privileged fact, and hiding it makes \"why can that person see my agents?\" unanswerable. Read-only for now — adding and removing members arrives with the invitation flow, since an invitee may not have an account yet.",
13477
+ description: "Lists who may act in the project, and with what role. Readable by every member, including a read-only `member`: who else is in the project is not a privileged fact, and hiding it makes \"why can that person see my agents?\" unanswerable. Somebody invited who has never signed in is listed too, with status `pending` — the invitation is already a grant, so hiding it until they arrive would hide access that exists.",
13422
13478
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/projects",
13423
13479
  httpMethod: "get",
13424
13480
  pathParams: ["project_id"],
@@ -13431,6 +13487,92 @@ const routes = {
13431
13487
  "in": "path"
13432
13488
  }]
13433
13489
  },
13490
+ "add-project-member": {
13491
+ serviceClass: "Projects",
13492
+ operationId: "addProjectMember",
13493
+ description: "Adds a colleague to the project by email address. Free and uncapped on every plan: a member adds no run, no channel, no trigger and no byte, so every cost they cause is already billed through the project's owner. Members are counted nowhere. **The address does not need an account.** Inviting one that has none creates it unverified and records the membership beside it, so the invitee is already a member with status `pending`. Their first sign-in code — which they request themselves, from the link in the invitation — is what makes them `active`. There is no separate acceptance step and no invitation to expire: the address is the credential, and the invitation reached it. An `owner` may grant `admin` or `member`; an `admin` may grant `member` only, so administration cannot hand out its own authority. `role: owner` is refused — that is the billing owner, and transferring it is a different act. The invitation email is a courtesy, not the grant: if it cannot be sent the membership still stands, and the response still says `pending`. Requires an account-wide credential — a project-scoped key cannot grant access that would outlive its own revocation.",
13494
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/projects",
13495
+ httpMethod: "post",
13496
+ pathParams: ["project_id"],
13497
+ queryParams: [],
13498
+ flags: [
13499
+ {
13500
+ "name": "project_id",
13501
+ "description": "Project public ID (proj_ prefix).",
13502
+ "required": true,
13503
+ "type": "string",
13504
+ "in": "path"
13505
+ },
13506
+ {
13507
+ "name": "email",
13508
+ "description": "The colleague's address, lower-cased before lookup. It does not need an account yet.\n",
13509
+ "required": true,
13510
+ "type": "string",
13511
+ "in": "body"
13512
+ },
13513
+ {
13514
+ "name": "role",
13515
+ "description": "The roles a membership write may name. `owner` is absent by construction: it is the billing owner, so granting it would change who pays, and transferring that is a different act with its own decision.\n",
13516
+ "required": true,
13517
+ "type": "string",
13518
+ "in": "body"
13519
+ }
13520
+ ]
13521
+ },
13522
+ "update-project-member": {
13523
+ serviceClass: "Projects",
13524
+ operationId: "updateProjectMember",
13525
+ description: "Moves a member between `admin` and `member`. The project `owner` only: promoting somebody to `admin` hands them every write in the project, and an `admin` who could do that could erase the difference between the two roles for themselves. The owner's own row is refused in either direction — it names who pays, so changing it is a transfer rather than a role change.",
13526
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/projects",
13527
+ httpMethod: "patch",
13528
+ pathParams: ["project_id", "member_id"],
13529
+ queryParams: [],
13530
+ flags: [
13531
+ {
13532
+ "name": "project_id",
13533
+ "description": "Project public ID (proj_ prefix).",
13534
+ "required": true,
13535
+ "type": "string",
13536
+ "in": "path"
13537
+ },
13538
+ {
13539
+ "name": "member_id",
13540
+ "description": "The membership ID (`pmem_` prefix), not the user ID.",
13541
+ "required": true,
13542
+ "type": "string",
13543
+ "in": "path"
13544
+ },
13545
+ {
13546
+ "name": "role",
13547
+ "description": "The roles a membership write may name. `owner` is absent by construction: it is the billing owner, so granting it would change who pays, and transferring that is a different act with its own decision.\n",
13548
+ "required": true,
13549
+ "type": "string",
13550
+ "in": "body"
13551
+ }
13552
+ ]
13553
+ },
13554
+ "remove-project-member": {
13555
+ serviceClass: "Projects",
13556
+ operationId: "removeProjectMember",
13557
+ description: "Removes a member, or leaves the project yourself. **Anyone may remove themselves**, whatever their role: a colleague who no longer wants access should not have to ask for it, and leaving takes nothing from anybody else. Removing *somebody else* needs authority — an `owner` may remove anyone, an `admin` may remove a read-only `member` and not another `admin`. The owner's own row is refused: a project with no owner is unreachable, and the row names who pays.",
13558
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/projects",
13559
+ httpMethod: "delete",
13560
+ pathParams: ["project_id", "member_id"],
13561
+ queryParams: [],
13562
+ flags: [{
13563
+ "name": "project_id",
13564
+ "description": "Project public ID (proj_ prefix).",
13565
+ "required": true,
13566
+ "type": "string",
13567
+ "in": "path"
13568
+ }, {
13569
+ "name": "member_id",
13570
+ "description": "The membership ID (`pmem_` prefix), not the user ID.",
13571
+ "required": true,
13572
+ "type": "string",
13573
+ "in": "path"
13574
+ }]
13575
+ },
13434
13576
  "get-project-usage": {
13435
13577
  serviceClass: "Projects",
13436
13578
  operationId: "getProjectUsage",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.121.1",
3
+ "version": "0.123.0",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "tsx": "^4.23.1",
31
31
  "typescript": "~6.0.3",
32
32
  "vitest": "^4.1.10",
33
- "@naturali/sdk": "0.121.1"
33
+ "@naturali/sdk": "0.123.0"
34
34
  },
35
35
  "scripts": {
36
36
  "generate": "tsx scripts/generate.ts",