@naturali/sdk 0.312.0 → 0.314.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/dist/index.cjs CHANGED
@@ -5206,7 +5206,7 @@ var Playbooks = class {
5206
5206
  /**
5207
5207
  * Create a case
5208
5208
  *
5209
- * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case.
5209
+ * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case. A request serving an actor (a session turn of the actor, an `On-Behalf-Of` assertion naming it) creates only that actor's cases: an `actor_id` absent or naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
5210
5210
  */
5211
5211
  static createPlaybookCase(options) {
5212
5212
  return (options.client ?? client).post({
package/dist/index.d.cts CHANGED
@@ -7890,14 +7890,18 @@ type McpServerToolEntry = {
7890
7890
  description: string | null;
7891
7891
  };
7892
7892
  /**
7893
- * Who may connect. `oauth` without `issuer` signs callers in by naturali login, with `mode` `members` (project members) or `allowlist` (the listed emails, verified); `oauth` with `issuer` accepts tokens of the tenant's authorization server; `header` (holders of a key from [`POST /v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys`](/docs/api/mcp-servers/create-mcp-server-key), sent in `header_name`, default `Authorization`); `none` (anyone).
7893
+ * Who may connect. `oauth` without `issuer` signs callers in at the server's own issuer, with `mode` `members` (project members, by naturali login), `allowlist` (the listed emails, verified, by naturali login) or `actors` (the project's actors, by an emailed code; see `sign_up`); `oauth` with `issuer` accepts tokens of the tenant's authorization server; `header` (holders of a key from [`POST /v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys`](/docs/api/mcp-servers/create-mcp-server-key), sent in `header_name`, default `Authorization`); `none` (anyone).
7894
7894
  */
7895
7895
  type McpServerAuthWrite = {
7896
7896
  type: 'oauth' | 'header' | 'none';
7897
7897
  /**
7898
7898
  * `oauth` without `issuer` only, required.
7899
7899
  */
7900
- mode?: 'members' | 'allowlist';
7900
+ mode?: 'members' | 'allowlist' | 'actors';
7901
+ /**
7902
+ * `mode: actors` only. `existing` signs in only an address that is already an actor's (`external_id` `email:<address>`); `open` creates the actor on its first sign-in.
7903
+ */
7904
+ sign_up?: 'existing' | 'open';
7901
7905
  /**
7902
7906
  * The tenant's authorization server (an `https` issuer identifier). A token is accepted when its signature verifies against `jwks_uri` and its `iss` is this value, `exp` is in the future, `aud` names the server's `url` or one of `audiences`, and its `scope` holds every one of `scopes`.
7903
7907
  */
@@ -7955,7 +7959,8 @@ type McpCallerActor = {
7955
7959
  */
7956
7960
  type McpServerAuth = {
7957
7961
  type: 'oauth' | 'header' | 'none';
7958
- mode?: 'members' | 'allowlist';
7962
+ mode?: 'members' | 'allowlist' | 'actors';
7963
+ sign_up?: 'existing' | 'open';
7959
7964
  issuer?: string;
7960
7965
  jwks_uri?: string;
7961
7966
  scopes?: Array<string>;
@@ -8094,11 +8099,11 @@ type McpServerUsage = {
8094
8099
  day: Date;
8095
8100
  caller: {
8096
8101
  /**
8097
- * `key` on a `header` server, `account` on an `oauth` server by naturali login, `subject` on one with `auth.issuer`, `anonymous` on a `none` one.
8102
+ * `key` on a `header` server, `account` on an `oauth` server by naturali login, `actor` on one with `mode: actors`, `subject` on one with `auth.issuer`, `anonymous` on a `none` one.
8098
8103
  */
8099
- type: 'key' | 'account' | 'subject' | 'anonymous';
8104
+ type: 'key' | 'account' | 'actor' | 'subject' | 'anonymous';
8100
8105
  /**
8101
- * The key's ID (mcpk_ prefix), the naturali account's, or the token's `sub`; `null` for `anonymous`.
8106
+ * The key's ID (mcpk_ prefix), the naturali account's, the actor's, or the token's `sub`; `null` for `anonymous`.
8102
8107
  */
8103
8108
  id: string | null;
8104
8109
  /**
@@ -8106,7 +8111,7 @@ type McpServerUsage = {
8106
8111
  */
8107
8112
  issuer: string | null;
8108
8113
  /**
8109
- * The project actor the caller's calls named (`auth.actor`); `null` for none.
8114
+ * The project actor the caller's calls named (`mode: actors` or `auth.actor`); `null` for none.
8110
8115
  */
8111
8116
  actor_id: string | null;
8112
8117
  };
@@ -31907,7 +31912,7 @@ type ListPlaybookCasesData = {
31907
31912
  */
31908
31913
  playbook_id?: string;
31909
31914
  /**
31910
- * Only the cases that belong to this actor. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent lists the cases of the end user it serves only.
31915
+ * Only the cases that belong to this actor. A request serving an actor lists that actor's cases only, given or not; naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
31911
31916
  */
31912
31917
  actor_id?: string;
31913
31918
  /**
@@ -42654,7 +42659,7 @@ export declare class Playbooks {
42654
42659
  /**
42655
42660
  * Create a case
42656
42661
  *
42657
- * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case.
42662
+ * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case. A request serving an actor (a session turn of the actor, an `On-Behalf-Of` assertion naming it) creates only that actor's cases: an `actor_id` absent or naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
42658
42663
  */
42659
42664
  static createPlaybookCase<ThrowOnError extends boolean = false>(options: Options<CreatePlaybookCaseData, ThrowOnError>): RequestResult<CreatePlaybookCaseResponses, CreatePlaybookCaseErrors, ThrowOnError>;
42660
42665
  /**
package/dist/index.d.mts CHANGED
@@ -7890,14 +7890,18 @@ type McpServerToolEntry = {
7890
7890
  description: string | null;
7891
7891
  };
7892
7892
  /**
7893
- * Who may connect. `oauth` without `issuer` signs callers in by naturali login, with `mode` `members` (project members) or `allowlist` (the listed emails, verified); `oauth` with `issuer` accepts tokens of the tenant's authorization server; `header` (holders of a key from [`POST /v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys`](/docs/api/mcp-servers/create-mcp-server-key), sent in `header_name`, default `Authorization`); `none` (anyone).
7893
+ * Who may connect. `oauth` without `issuer` signs callers in at the server's own issuer, with `mode` `members` (project members, by naturali login), `allowlist` (the listed emails, verified, by naturali login) or `actors` (the project's actors, by an emailed code; see `sign_up`); `oauth` with `issuer` accepts tokens of the tenant's authorization server; `header` (holders of a key from [`POST /v1/projects/{project_id}/mcp-servers/{mcp_server_id}/keys`](/docs/api/mcp-servers/create-mcp-server-key), sent in `header_name`, default `Authorization`); `none` (anyone).
7894
7894
  */
7895
7895
  type McpServerAuthWrite = {
7896
7896
  type: 'oauth' | 'header' | 'none';
7897
7897
  /**
7898
7898
  * `oauth` without `issuer` only, required.
7899
7899
  */
7900
- mode?: 'members' | 'allowlist';
7900
+ mode?: 'members' | 'allowlist' | 'actors';
7901
+ /**
7902
+ * `mode: actors` only. `existing` signs in only an address that is already an actor's (`external_id` `email:<address>`); `open` creates the actor on its first sign-in.
7903
+ */
7904
+ sign_up?: 'existing' | 'open';
7901
7905
  /**
7902
7906
  * The tenant's authorization server (an `https` issuer identifier). A token is accepted when its signature verifies against `jwks_uri` and its `iss` is this value, `exp` is in the future, `aud` names the server's `url` or one of `audiences`, and its `scope` holds every one of `scopes`.
7903
7907
  */
@@ -7955,7 +7959,8 @@ type McpCallerActor = {
7955
7959
  */
7956
7960
  type McpServerAuth = {
7957
7961
  type: 'oauth' | 'header' | 'none';
7958
- mode?: 'members' | 'allowlist';
7962
+ mode?: 'members' | 'allowlist' | 'actors';
7963
+ sign_up?: 'existing' | 'open';
7959
7964
  issuer?: string;
7960
7965
  jwks_uri?: string;
7961
7966
  scopes?: Array<string>;
@@ -8094,11 +8099,11 @@ type McpServerUsage = {
8094
8099
  day: Date;
8095
8100
  caller: {
8096
8101
  /**
8097
- * `key` on a `header` server, `account` on an `oauth` server by naturali login, `subject` on one with `auth.issuer`, `anonymous` on a `none` one.
8102
+ * `key` on a `header` server, `account` on an `oauth` server by naturali login, `actor` on one with `mode: actors`, `subject` on one with `auth.issuer`, `anonymous` on a `none` one.
8098
8103
  */
8099
- type: 'key' | 'account' | 'subject' | 'anonymous';
8104
+ type: 'key' | 'account' | 'actor' | 'subject' | 'anonymous';
8100
8105
  /**
8101
- * The key's ID (mcpk_ prefix), the naturali account's, or the token's `sub`; `null` for `anonymous`.
8106
+ * The key's ID (mcpk_ prefix), the naturali account's, the actor's, or the token's `sub`; `null` for `anonymous`.
8102
8107
  */
8103
8108
  id: string | null;
8104
8109
  /**
@@ -8106,7 +8111,7 @@ type McpServerUsage = {
8106
8111
  */
8107
8112
  issuer: string | null;
8108
8113
  /**
8109
- * The project actor the caller's calls named (`auth.actor`); `null` for none.
8114
+ * The project actor the caller's calls named (`mode: actors` or `auth.actor`); `null` for none.
8110
8115
  */
8111
8116
  actor_id: string | null;
8112
8117
  };
@@ -31907,7 +31912,7 @@ type ListPlaybookCasesData = {
31907
31912
  */
31908
31913
  playbook_id?: string;
31909
31914
  /**
31910
- * Only the cases that belong to this actor. Pin it in a tool's `preset_parameters` as `{{context:actor_id}}` so an agent lists the cases of the end user it serves only.
31915
+ * Only the cases that belong to this actor. A request serving an actor lists that actor's cases only, given or not; naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
31911
31916
  */
31912
31917
  actor_id?: string;
31913
31918
  /**
@@ -42654,7 +42659,7 @@ export declare class Playbooks {
42654
42659
  /**
42655
42660
  * Create a case
42656
42661
  *
42657
- * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case.
42662
+ * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case. A request serving an actor (a session turn of the actor, an `On-Behalf-Of` assertion naming it) creates only that actor's cases: an `actor_id` absent or naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
42658
42663
  */
42659
42664
  static createPlaybookCase<ThrowOnError extends boolean = false>(options: Options<CreatePlaybookCaseData, ThrowOnError>): RequestResult<CreatePlaybookCaseResponses, CreatePlaybookCaseErrors, ThrowOnError>;
42660
42665
  /**
package/dist/index.mjs CHANGED
@@ -5205,7 +5205,7 @@ var Playbooks = class {
5205
5205
  /**
5206
5206
  * Create a case
5207
5207
  *
5208
- * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case.
5208
+ * Creates a case for one subject on the playbook's current version. The case stays on that version however the playbook changes later. A playbook that declares `upstreams` needs each bound to a case of the declared playbook, in the same project, of the same `actor_id`, that the caller may read (`playbooks:GetPlaybookCase`); anything else is `400 PLAYBOOK_CASE_UPSTREAM_INVALID`. The binding is fixed for the life of the case. A request serving an actor (a session turn of the actor, an `On-Behalf-Of` assertion naming it) creates only that actor's cases: an `actor_id` absent or naming another actor is `400 PLAYBOOK_CASE_ACTOR_MISMATCH`.
5209
5209
  */
5210
5210
  static createPlaybookCase(options) {
5211
5211
  return (options.client ?? client).post({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.312.0",
3
+ "version": "0.314.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.312.0",
41
+ "@naturali/api": "0.314.0",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",