@naturali/sdk 0.162.1 → 0.162.2

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.mjs CHANGED
@@ -1197,7 +1197,7 @@ var Agents = class {
1197
1197
  /**
1198
1198
  * Delete an agent
1199
1199
  *
1200
- * Deletes an agent by ID. Fails with `409` if the agent has dependent generations or traces, unless `force=true` is passed, in which case those generations and traces are deleted along with the agent.
1200
+ * Deletes an agent by ID. Fails with `409` if the agent has dependent generations or traces, or another project has accepted a share of it, unless `force=true` is passed, in which case those generations and traces are deleted along with the agent and the shares are revoked. Every share of the agent is revoked when it is deleted.
1201
1201
  *
1202
1202
  */
1203
1203
  static deleteAgent(options) {
@@ -1209,7 +1209,8 @@ var Agents = class {
1209
1209
  /**
1210
1210
  * Get an agent
1211
1211
  *
1212
- * Returns a single agent by ID.
1212
+ * Returns a single agent by ID. A credential scoped to a project the agent is shared with, through an accepted share, reads its `id` and `name` only.
1213
+ *
1213
1214
  */
1214
1215
  static getAgent(options) {
1215
1216
  return (options.client ?? client).get({
@@ -1252,6 +1253,8 @@ var Agents = class {
1252
1253
  *
1253
1254
  * Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns `202 Accepted` with a `generation_id` to poll via `GET /v1/projects/{project_id}/generations/{generation_id}`. Pass `?wait=true` to block and receive the result inline, where client tools pause the generation and return `requires_action`. Streaming (`stream: true`) implies waiting. Pass `idempotency_key` to make a retry safe: a request whose key is already claimed runs nothing and answers `202` with the generation the key names.
1254
1255
  *
1256
+ * A credential scoped to a project the agent is shared with, through an accepted share, runs it in that project: on the publisher's configuration, recorded, metered and governed in the grantee project.
1257
+ *
1255
1258
  */
1256
1259
  static createAgentGeneration(options) {
1257
1260
  return (options.client ?? client).post({
@@ -4826,7 +4829,7 @@ var Tools = class {
4826
4829
  /**
4827
4830
  * Delete a tool
4828
4831
  *
4829
- * Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.
4832
+ * Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`, and so is one another project has accepted a share of, or one of its own project's ingestion rules converts with, until `force=true`. Every share of the tool is revoked when it is deleted; an ingestion rule keeps its `tool_id` and fails the documents it matches with `CONVERTER_FAILED` until repointed.
4830
4833
  */
4831
4834
  static deleteTool(options) {
4832
4835
  return (options.client ?? client).delete({
@@ -4837,7 +4840,8 @@ var Tools = class {
4837
4840
  /**
4838
4841
  * Get a tool
4839
4842
  *
4840
- * Returns a single tool by ID.
4843
+ * Returns a single tool by ID. A credential scoped to a project the tool is shared with, through an accepted share, reads its `id`, `name`, `description` and `parameters` only.
4844
+ *
4841
4845
  */
4842
4846
  static getTool(options) {
4843
4847
  return (options.client ?? client).get({
@@ -4868,6 +4872,8 @@ var Tools = class {
4868
4872
  * `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.
4869
4873
  * Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is.
4870
4874
  *
4875
+ * A credential scoped to a project the tool is shared with, through an accepted share, calls it in that project: the calling project's guardrails adjudicate it, it is metered there with `publisher_project_id`, and the tool receives the calling project as the `calling_project_id` tool context key.
4876
+ *
4871
4877
  */
4872
4878
  static callTool(options) {
4873
4879
  return (options.client ?? client).post({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.162.1",
3
+ "version": "0.162.2",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hey-api/openapi-ts": "^0.99.0",
34
- "@naturali/api": "0.162.1",
34
+ "@naturali/api": "0.162.2",
35
35
  "@ttoss/openapi-codegen": "^0.5.0",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",