@naturali/cli 0.55.1 → 0.56.1

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 +71 -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.55.1";
17
+ var version = "0.56.1";
18
18
  //#endregion
19
19
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
20
20
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
@@ -1349,6 +1349,22 @@ var Generations = class {
1349
1349
  });
1350
1350
  }
1351
1351
  /**
1352
+ * Purge a generation's content
1353
+ *
1354
+ * Clears the generation's content — `metadata`, `error`, `extraction` and the internal recovery state of a paused run — and stamps `content_redacted_at` as verifiable proof the content is gone.
1355
+ * The billing and audit skeleton is preserved: ids, timestamps, status, stop reason and the attribution fields (`action_id`, `trigger_id`) the usage ledger reads. A purged generation still reads back with `GET /v1/projects/{project_id}/generations/{generation_id}` — a `404` there would prove nothing about what was erased.
1356
+ * This is the narrow erasure, scoped to one model turn. It does **not** delete the parent trace's step payload, which holds this generation's content alongside its siblings'. To erase a whole run's content, purge the trace with `DELETE /v1/projects/{project_id}/traces/{trace_id}/content`, which cascades to every descendant trace and all of their generations.
1357
+ * Idempotent: purging an already-purged generation succeeds and leaves the original `content_redacted_at` in place.
1358
+ * A generation belonging to another project responds `404`, not `403`, and nothing is purged.
1359
+ *
1360
+ */
1361
+ static purgeGenerationContent(options) {
1362
+ return (options.client ?? client).delete({
1363
+ url: "/v1/projects/{project_id}/generations/{generation_id}/content",
1364
+ ...options
1365
+ });
1366
+ }
1367
+ /**
1352
1368
  * Get a generation's cost
1353
1369
  *
1354
1370
  * What this one generation cost, and the tokens it was charged on — the billing-grade receipt the runtime froze at write time, per model line item.
@@ -1819,7 +1835,9 @@ var Projects = class {
1819
1835
  /**
1820
1836
  * Update a project
1821
1837
  *
1822
- * Rename or archive a project. Archiving is reversible; resources are retained.
1838
+ * Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`). Archiving is reversible; resources are retained.
1839
+ * The two retention controls answer different questions. The window bounds how long content *stays* — a daily sweep purges anything past it, leaving auditable skeletons behind. `trace_content_mode: none` means content is never *written*, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.
1840
+ *
1823
1841
  */
1824
1842
  static updateProject(options) {
1825
1843
  return (options.client ?? client).patch({
@@ -3420,6 +3438,13 @@ const routes = {
3420
3438
  "required": false,
3421
3439
  "type": "object",
3422
3440
  "in": "body"
3441
+ },
3442
+ {
3443
+ "name": "trace_content_mode",
3444
+ "description": "Zero-retention opt-in for this agent. Omit or send `null` to inherit the project's setting; `none` means this agent's trace and generation content is never written. `full` under a zero-retention project is refused with `400 invalid_trace_content_mode` — an agent may tighten the project's floor but never loosen it.\n",
3445
+ "required": false,
3446
+ "type": "string",
3447
+ "in": "body"
3423
3448
  }
3424
3449
  ]
3425
3450
  },
@@ -3545,6 +3570,13 @@ const routes = {
3545
3570
  "type": "object",
3546
3571
  "in": "body"
3547
3572
  },
3573
+ {
3574
+ "name": "trace_content_mode",
3575
+ "description": "Change this agent's zero-retention setting. `null` falls back to inheriting the project's mode; `none` means content is never written. `full` under a zero-retention project is refused with `400 invalid_trace_content_mode`.\nTightening to `none` stops future writes; it does not erase content already recorded — purge that explicitly.\n",
3576
+ "required": false,
3577
+ "type": "string",
3578
+ "in": "body"
3579
+ },
3548
3580
  {
3549
3581
  "name": "status",
3550
3582
  "description": "",
@@ -4948,6 +4980,28 @@ const routes = {
4948
4980
  "in": "path"
4949
4981
  }]
4950
4982
  },
4983
+ "purge-generation-content": {
4984
+ serviceClass: "Generations",
4985
+ operationId: "purgeGenerationContent",
4986
+ description: "Clears the generation's content — `metadata`, `error`, `extraction` and the internal recovery state of a paused run — and stamps `content_redacted_at` as verifiable proof the content is gone. The billing and audit skeleton is preserved: ids, timestamps, status, stop reason and the attribution fields (`action_id`, `trigger_id`) the usage ledger reads. A purged generation still reads back with `GET /v1/projects/{project_id}/generations/{generation_id}` — a `404` there would prove nothing about what was erased. This is the narrow erasure, scoped to one model turn. It does **not** delete the parent trace's step payload, which holds this generation's content alongside its siblings'. To erase a whole run's content, purge the trace with `DELETE /v1/projects/{project_id}/traces/{trace_id}/content`, which cascades to every descendant trace and all of their generations. Idempotent: purging an already-purged generation succeeds and leaves the original `content_redacted_at` in place. A generation belonging to another project responds `404`, not `403`, and nothing is purged.",
4987
+ moduleDocsUrl: "https://docs.naturali.ai/docs/modules/generations",
4988
+ httpMethod: "delete",
4989
+ pathParams: ["project_id", "generation_id"],
4990
+ queryParams: [],
4991
+ flags: [{
4992
+ "name": "project_id",
4993
+ "description": "Project public ID (proj_ prefix).",
4994
+ "required": true,
4995
+ "type": "string",
4996
+ "in": "path"
4997
+ }, {
4998
+ "name": "generation_id",
4999
+ "description": "Generation public ID (gen_ prefix).",
5000
+ "required": true,
5001
+ "type": "string",
5002
+ "in": "path"
5003
+ }]
5004
+ },
4951
5005
  "get-generation-usage": {
4952
5006
  serviceClass: "Generations",
4953
5007
  operationId: "getGenerationUsage",
@@ -6192,7 +6246,7 @@ const routes = {
6192
6246
  "update-project": {
6193
6247
  serviceClass: "Projects",
6194
6248
  operationId: "updateProject",
6195
- description: "Rename or archive a project. Archiving is reversible; resources are retained.",
6249
+ description: "Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`). Archiving is reversible; resources are retained. The two retention controls answer different questions. The window bounds how long content *stays* — a daily sweep purges anything past it, leaving auditable skeletons behind. `trace_content_mode: none` means content is never *written*, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.",
6196
6250
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/projects",
6197
6251
  httpMethod: "patch",
6198
6252
  pathParams: ["project_id"],
@@ -6218,6 +6272,20 @@ const routes = {
6218
6272
  "required": false,
6219
6273
  "type": "string",
6220
6274
  "in": "body"
6275
+ },
6276
+ {
6277
+ "name": "trace_content_retention_days",
6278
+ "description": "Days of trace and generation content retention before the daily sweep purges it. Send `null` to disable retention (content is then kept until purged on demand). Omitting the field leaves the current window unchanged — `null` and absent are different instructions.\n",
6279
+ "required": false,
6280
+ "type": "integer",
6281
+ "in": "body"
6282
+ },
6283
+ {
6284
+ "name": "trace_content_mode",
6285
+ "description": "Set `none` for zero-retention: content is never written for any agent in this project. Tightening to `none` does not erase content already on disk — purge it explicitly, or set a retention window to have the sweep do it.\n",
6286
+ "required": false,
6287
+ "type": "string",
6288
+ "in": "body"
6221
6289
  }
6222
6290
  ]
6223
6291
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.55.1",
3
+ "version": "0.56.1",
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.55.1"
33
+ "@naturali/sdk": "0.56.1"
34
34
  },
35
35
  "scripts": {
36
36
  "generate": "tsx scripts/generate.ts",