@naturali/sdk 0.162.0 → 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.cjs CHANGED
@@ -1198,7 +1198,7 @@ var Agents = class {
1198
1198
  /**
1199
1199
  * Delete an agent
1200
1200
  *
1201
- * 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.
1201
+ * 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.
1202
1202
  *
1203
1203
  */
1204
1204
  static deleteAgent(options) {
@@ -1210,7 +1210,8 @@ var Agents = class {
1210
1210
  /**
1211
1211
  * Get an agent
1212
1212
  *
1213
- * Returns a single agent by ID.
1213
+ * 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.
1214
+ *
1214
1215
  */
1215
1216
  static getAgent(options) {
1216
1217
  return (options.client ?? client).get({
@@ -1253,6 +1254,8 @@ var Agents = class {
1253
1254
  *
1254
1255
  * 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.
1255
1256
  *
1257
+ * 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.
1258
+ *
1256
1259
  */
1257
1260
  static createAgentGeneration(options) {
1258
1261
  return (options.client ?? client).post({
@@ -4827,7 +4830,7 @@ var Tools = class {
4827
4830
  /**
4828
4831
  * Delete a tool
4829
4832
  *
4830
- * Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.
4833
+ * 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.
4831
4834
  */
4832
4835
  static deleteTool(options) {
4833
4836
  return (options.client ?? client).delete({
@@ -4838,7 +4841,8 @@ var Tools = class {
4838
4841
  /**
4839
4842
  * Get a tool
4840
4843
  *
4841
- * Returns a single tool by ID.
4844
+ * 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.
4845
+ *
4842
4846
  */
4843
4847
  static getTool(options) {
4844
4848
  return (options.client ?? client).get({
@@ -4869,6 +4873,8 @@ var Tools = class {
4869
4873
  * `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.
4870
4874
  * 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.
4871
4875
  *
4876
+ * 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.
4877
+ *
4872
4878
  */
4873
4879
  static callTool(options) {
4874
4880
  return (options.client ?? client).post({