@cadenya/cadenya 0.43.0 → 0.45.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 (78) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +27 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +27 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +27 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +27 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +2 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +2 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +5 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +2 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/memory-layers/entries.d.mts +241 -0
  20. package/resources/memory-layers/entries.d.mts.map +1 -0
  21. package/resources/memory-layers/entries.d.ts +241 -0
  22. package/resources/memory-layers/entries.d.ts.map +1 -0
  23. package/resources/memory-layers/entries.js +63 -0
  24. package/resources/memory-layers/entries.js.map +1 -0
  25. package/resources/memory-layers/entries.mjs +59 -0
  26. package/resources/memory-layers/entries.mjs.map +1 -0
  27. package/resources/memory-layers/index.d.mts +3 -0
  28. package/resources/memory-layers/index.d.mts.map +1 -0
  29. package/resources/memory-layers/index.d.ts +3 -0
  30. package/resources/memory-layers/index.d.ts.map +1 -0
  31. package/resources/memory-layers/index.js +9 -0
  32. package/resources/memory-layers/index.js.map +1 -0
  33. package/resources/memory-layers/index.mjs +4 -0
  34. package/resources/memory-layers/index.mjs.map +1 -0
  35. package/resources/memory-layers/memory-layers.d.mts +140 -0
  36. package/resources/memory-layers/memory-layers.d.mts.map +1 -0
  37. package/resources/memory-layers/memory-layers.d.ts +140 -0
  38. package/resources/memory-layers/memory-layers.d.ts.map +1 -0
  39. package/resources/memory-layers/memory-layers.js +65 -0
  40. package/resources/memory-layers/memory-layers.js.map +1 -0
  41. package/resources/memory-layers/memory-layers.mjs +60 -0
  42. package/resources/memory-layers/memory-layers.mjs.map +1 -0
  43. package/resources/memory-layers.d.mts +2 -0
  44. package/resources/memory-layers.d.mts.map +1 -0
  45. package/resources/memory-layers.d.ts +2 -0
  46. package/resources/memory-layers.d.ts.map +1 -0
  47. package/resources/memory-layers.js +6 -0
  48. package/resources/memory-layers.js.map +1 -0
  49. package/resources/memory-layers.mjs +3 -0
  50. package/resources/memory-layers.mjs.map +1 -0
  51. package/resources/objectives/tasks.d.mts +1 -1
  52. package/resources/objectives/tasks.d.ts +1 -1
  53. package/resources/objectives/tool-calls.d.mts +3 -2
  54. package/resources/objectives/tool-calls.d.mts.map +1 -1
  55. package/resources/objectives/tool-calls.d.ts +3 -2
  56. package/resources/objectives/tool-calls.d.ts.map +1 -1
  57. package/resources/uploads.d.mts +97 -0
  58. package/resources/uploads.d.mts.map +1 -0
  59. package/resources/uploads.d.ts +97 -0
  60. package/resources/uploads.d.ts.map +1 -0
  61. package/resources/uploads.js +33 -0
  62. package/resources/uploads.js.map +1 -0
  63. package/resources/uploads.mjs +29 -0
  64. package/resources/uploads.mjs.map +1 -0
  65. package/src/client.ts +61 -0
  66. package/src/resources/index.ts +11 -0
  67. package/src/resources/memory-layers/entries.ts +325 -0
  68. package/src/resources/memory-layers/index.ts +27 -0
  69. package/src/resources/memory-layers/memory-layers.ts +225 -0
  70. package/src/resources/memory-layers.ts +3 -0
  71. package/src/resources/objectives/tasks.ts +1 -1
  72. package/src/resources/objectives/tool-calls.ts +3 -2
  73. package/src/resources/uploads.ts +128 -0
  74. package/src/version.ts +1 -1
  75. package/version.d.mts +1 -1
  76. package/version.d.ts +1 -1
  77. package/version.js +1 -1
  78. package/version.mjs +1 -1
@@ -96,13 +96,14 @@ export interface ToolCallListParams extends CursorPaginationParams {
96
96
  }
97
97
  export interface ToolCallApproveParams {
98
98
  /**
99
- * The ID of the objective. Supports "eid:" prefix for external IDs.
99
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
100
100
  */
101
101
  objectiveId: string;
102
102
  }
103
103
  export interface ToolCallDenyParams {
104
104
  /**
105
- * Path param: The ID of the objective. Supports "eid:" prefix for external IDs.
105
+ * Path param: The ID of the objective. Supports "external_id:" prefix for external
106
+ * IDs.
106
107
  */
107
108
  objectiveId: string;
108
109
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool-calls.d.ts","sourceRoot":"","sources":["../../src/resources/objectives/tool-calls.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,KAAK,aAAa;OAClB,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAC9D,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CACF,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kCAAkC,EAAE,iBAAiB,CAAC;IAQrE;;;OAGG;IACH,OAAO,CACL,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAQhC;;;;OAIG;IACH,IAAI,CACF,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;CAOjC;AAED,MAAM,MAAM,kCAAkC,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAE5B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC;IAEnC;;OAEG;IACH,MAAM,EACF,8BA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AAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,97 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import * as AccountAPI from "./account.mjs";
3
+ import * as Shared from "./shared.mjs";
4
+ import { APIPromise } from "../core/api-promise.mjs";
5
+ import { RequestOptions } from "../internal/request-options.mjs";
6
+ /**
7
+ * UploadService issues short-lived presigned URLs for direct client-to-object-
8
+ * storage uploads at the WORKSPACE level. Created uploads can be referenced by
9
+ * id when creating or updating resources that accept binary content (e.g.,
10
+ * MemoryEntry).
11
+ *
12
+ * Authentication: Bearer token (JWT)
13
+ * Scope: Workspace-level operations
14
+ */
15
+ export declare class Uploads extends APIResource {
16
+ /**
17
+ * Issues a short-lived presigned URL for direct upload to object storage. The
18
+ * returned id is used to reference the upload from resources that accept binary
19
+ * content.
20
+ */
21
+ create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
22
+ /**
23
+ * Retrieves the current state of an upload, including its lifecycle status
24
+ */
25
+ retrieve(id: string, options?: RequestOptions): APIPromise<Upload>;
26
+ }
27
+ /**
28
+ * Upload is a workspace-scoped handle representing a single file upload flow.
29
+ * Clients call CreateUpload to receive a short-lived presigned URL, PUT the file
30
+ * directly to object storage, then reference the upload by id when creating or
31
+ * updating resources that accept binary content.
32
+ *
33
+ * Uploads are one-shot: once consumed by a creating or updating resource, the
34
+ * upload transitions to UPLOAD_STATUS_CONSUMED and cannot be reused. Unused
35
+ * uploads expire and are garbage-collected by the runtime.
36
+ */
37
+ export interface Upload {
38
+ info: UploadInfo;
39
+ /**
40
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
41
+ */
42
+ metadata: Shared.ResourceMetadata;
43
+ spec: UploadSpec;
44
+ }
45
+ export interface UploadInfo {
46
+ /**
47
+ * Profile represents a human user at the account level. Profiles are
48
+ * account-scoped resources that can be associated with multiple workspaces through
49
+ * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
50
+ */
51
+ createdBy?: AccountAPI.Profile;
52
+ /**
53
+ * Lifecycle state. Transitions PENDING → COMPLETE (storage confirms the object
54
+ * exists) → CONSUMED (a resource referenced this upload), or → EXPIRED (URL
55
+ * elapsed without a PUT).
56
+ */
57
+ status?: 'UPLOAD_STATUS_UNSPECIFIED' | 'UPLOAD_STATUS_PENDING' | 'UPLOAD_STATUS_COMPLETE' | 'UPLOAD_STATUS_CONSUMED' | 'UPLOAD_STATUS_EXPIRED';
58
+ /**
59
+ * Presigned PUT URL. Short-lived. The client must PUT with the exact Content-Type
60
+ * declared in the spec, and the body length must match size_bytes.
61
+ */
62
+ uploadUrl?: string;
63
+ /**
64
+ * Absolute time at which upload_url stops working.
65
+ */
66
+ uploadUrlExpiresAt?: string;
67
+ }
68
+ export interface UploadSpec {
69
+ /**
70
+ * MIME type the client will send. Baked into the presigned URL's signature — the
71
+ * PUT must match exactly or object storage will reject it.
72
+ */
73
+ contentType: string;
74
+ /**
75
+ * Client-supplied filename. Used for audit and display only; does not control the
76
+ * object's storage path.
77
+ */
78
+ filename: string;
79
+ /**
80
+ * Expected size of the upload in bytes. Baked into the presigned URL as a
81
+ * Content-Length constraint.
82
+ */
83
+ sizeBytes: string;
84
+ }
85
+ export interface UploadCreateParams {
86
+ /**
87
+ * CreateResourceMetadata contains the user-provided fields for creating a
88
+ * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
89
+ * profile_id, created_at) are excluded since they are set by the server.
90
+ */
91
+ metadata: Shared.CreateResourceMetadata;
92
+ spec: UploadSpec;
93
+ }
94
+ export declare namespace Uploads {
95
+ export { type Upload as Upload, type UploadInfo as UploadInfo, type UploadSpec as UploadSpec, type UploadCreateParams as UploadCreateParams, };
96
+ }
97
+ //# sourceMappingURL=uploads.d.mts.map
@@ -0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AED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,97 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import * as AccountAPI from "./account.js";
3
+ import * as Shared from "./shared.js";
4
+ import { APIPromise } from "../core/api-promise.js";
5
+ import { RequestOptions } from "../internal/request-options.js";
6
+ /**
7
+ * UploadService issues short-lived presigned URLs for direct client-to-object-
8
+ * storage uploads at the WORKSPACE level. Created uploads can be referenced by
9
+ * id when creating or updating resources that accept binary content (e.g.,
10
+ * MemoryEntry).
11
+ *
12
+ * Authentication: Bearer token (JWT)
13
+ * Scope: Workspace-level operations
14
+ */
15
+ export declare class Uploads extends APIResource {
16
+ /**
17
+ * Issues a short-lived presigned URL for direct upload to object storage. The
18
+ * returned id is used to reference the upload from resources that accept binary
19
+ * content.
20
+ */
21
+ create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload>;
22
+ /**
23
+ * Retrieves the current state of an upload, including its lifecycle status
24
+ */
25
+ retrieve(id: string, options?: RequestOptions): APIPromise<Upload>;
26
+ }
27
+ /**
28
+ * Upload is a workspace-scoped handle representing a single file upload flow.
29
+ * Clients call CreateUpload to receive a short-lived presigned URL, PUT the file
30
+ * directly to object storage, then reference the upload by id when creating or
31
+ * updating resources that accept binary content.
32
+ *
33
+ * Uploads are one-shot: once consumed by a creating or updating resource, the
34
+ * upload transitions to UPLOAD_STATUS_CONSUMED and cannot be reused. Unused
35
+ * uploads expire and are garbage-collected by the runtime.
36
+ */
37
+ export interface Upload {
38
+ info: UploadInfo;
39
+ /**
40
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
41
+ */
42
+ metadata: Shared.ResourceMetadata;
43
+ spec: UploadSpec;
44
+ }
45
+ export interface UploadInfo {
46
+ /**
47
+ * Profile represents a human user at the account level. Profiles are
48
+ * account-scoped resources that can be associated with multiple workspaces through
49
+ * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
50
+ */
51
+ createdBy?: AccountAPI.Profile;
52
+ /**
53
+ * Lifecycle state. Transitions PENDING → COMPLETE (storage confirms the object
54
+ * exists) → CONSUMED (a resource referenced this upload), or → EXPIRED (URL
55
+ * elapsed without a PUT).
56
+ */
57
+ status?: 'UPLOAD_STATUS_UNSPECIFIED' | 'UPLOAD_STATUS_PENDING' | 'UPLOAD_STATUS_COMPLETE' | 'UPLOAD_STATUS_CONSUMED' | 'UPLOAD_STATUS_EXPIRED';
58
+ /**
59
+ * Presigned PUT URL. Short-lived. The client must PUT with the exact Content-Type
60
+ * declared in the spec, and the body length must match size_bytes.
61
+ */
62
+ uploadUrl?: string;
63
+ /**
64
+ * Absolute time at which upload_url stops working.
65
+ */
66
+ uploadUrlExpiresAt?: string;
67
+ }
68
+ export interface UploadSpec {
69
+ /**
70
+ * MIME type the client will send. Baked into the presigned URL's signature — the
71
+ * PUT must match exactly or object storage will reject it.
72
+ */
73
+ contentType: string;
74
+ /**
75
+ * Client-supplied filename. Used for audit and display only; does not control the
76
+ * object's storage path.
77
+ */
78
+ filename: string;
79
+ /**
80
+ * Expected size of the upload in bytes. Baked into the presigned URL as a
81
+ * Content-Length constraint.
82
+ */
83
+ sizeBytes: string;
84
+ }
85
+ export interface UploadCreateParams {
86
+ /**
87
+ * CreateResourceMetadata contains the user-provided fields for creating a
88
+ * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
89
+ * profile_id, created_at) are excluded since they are set by the server.
90
+ */
91
+ metadata: Shared.CreateResourceMetadata;
92
+ spec: UploadSpec;
93
+ }
94
+ export declare namespace Uploads {
95
+ export { type Upload as Upload, type UploadInfo as UploadInfo, type UploadSpec as UploadSpec, type UploadCreateParams as UploadCreateParams, };
96
+ }
97
+ //# sourceMappingURL=uploads.d.ts.map
@@ -0,0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,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Uploads = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ /**
8
+ * UploadService issues short-lived presigned URLs for direct client-to-object-
9
+ * storage uploads at the WORKSPACE level. Created uploads can be referenced by
10
+ * id when creating or updating resources that accept binary content (e.g.,
11
+ * MemoryEntry).
12
+ *
13
+ * Authentication: Bearer token (JWT)
14
+ * Scope: Workspace-level operations
15
+ */
16
+ class Uploads extends resource_1.APIResource {
17
+ /**
18
+ * Issues a short-lived presigned URL for direct upload to object storage. The
19
+ * returned id is used to reference the upload from resources that accept binary
20
+ * content.
21
+ */
22
+ create(body, options) {
23
+ return this._client.post('/v1/uploads', { body, ...options });
24
+ }
25
+ /**
26
+ * Retrieves the current state of an upload, including its lifecycle status
27
+ */
28
+ retrieve(id, options) {
29
+ return this._client.get((0, path_1.path) `/v1/uploads/${id}`, options);
30
+ }
31
+ }
32
+ exports.Uploads = Uploads;
33
+ //# sourceMappingURL=uploads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,oDAA8C;AAE9C;;;;;;;;GAQG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF;AAhBD,0BAgBC"}
@@ -0,0 +1,29 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ /**
5
+ * UploadService issues short-lived presigned URLs for direct client-to-object-
6
+ * storage uploads at the WORKSPACE level. Created uploads can be referenced by
7
+ * id when creating or updating resources that accept binary content (e.g.,
8
+ * MemoryEntry).
9
+ *
10
+ * Authentication: Bearer token (JWT)
11
+ * Scope: Workspace-level operations
12
+ */
13
+ export class Uploads extends APIResource {
14
+ /**
15
+ * Issues a short-lived presigned URL for direct upload to object storage. The
16
+ * returned id is used to reference the upload from resources that accept binary
17
+ * content.
18
+ */
19
+ create(body, options) {
20
+ return this._client.post('/v1/uploads', { body, ...options });
21
+ }
22
+ /**
23
+ * Retrieves the current state of an upload, including its lifecycle status
24
+ */
25
+ retrieve(id, options) {
26
+ return this._client.get(path `/v1/uploads/${id}`, options);
27
+ }
28
+ }
29
+ //# sourceMappingURL=uploads.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,IAAI,EAAE;AAEf;;;;;;;;GAQG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -73,6 +73,13 @@ import {
73
73
  SearchSearchToolsOrToolSetsParams,
74
74
  SearchSearchToolsOrToolSetsResponse,
75
75
  } from './resources/search';
76
+ import {
77
+ Upload,
78
+ UploadCreateParams,
79
+ UploadInfo,
80
+ UploadSpec,
81
+ Uploads as UploadsAPIUploads,
82
+ } from './resources/uploads';
76
83
  import { UnsafeUnwrapWebhookEvent, UnwrapWebhookEvent, Webhooks } from './resources/webhooks';
77
84
  import {
78
85
  WorkspaceSecret,
@@ -102,6 +109,16 @@ import {
102
109
  AgentsCursorPagination,
103
110
  Page,
104
111
  } from './resources/agents/agents';
112
+ import {
113
+ MemoryLayer,
114
+ MemoryLayerCreateParams,
115
+ MemoryLayerInfo,
116
+ MemoryLayerListParams,
117
+ MemoryLayerSpec,
118
+ MemoryLayerUpdateParams,
119
+ MemoryLayers,
120
+ MemoryLayersCursorPagination,
121
+ } from './resources/memory-layers/memory-layers';
105
122
  import {
106
123
  AssistantMessage,
107
124
  AssistantToolCall,
@@ -917,6 +934,29 @@ export class Cadenya {
917
934
  agents: API.Agents = new API.Agents(this);
918
935
  agentVariations: API.AgentVariations = new API.AgentVariations(this);
919
936
  objectives: API.Objectives = new API.Objectives(this);
937
+ /**
938
+ * MemoryService manages memory layers and their entries at the WORKSPACE level.
939
+ * Layers are named containers that can be composed into an objective's memory
940
+ * stack; entries are the keyed values within a layer.
941
+ *
942
+ * All operations are implicitly scoped to the workspace determined by the JWT
943
+ * token. System-managed layers (e.g., episodic layers created by the runtime)
944
+ * cannot be mutated through this API.
945
+ *
946
+ * Authentication: Bearer token (JWT)
947
+ * Scope: Workspace-level operations
948
+ */
949
+ memoryLayers: API.MemoryLayers = new API.MemoryLayers(this);
950
+ /**
951
+ * UploadService issues short-lived presigned URLs for direct client-to-object-
952
+ * storage uploads at the WORKSPACE level. Created uploads can be referenced by
953
+ * id when creating or updating resources that accept binary content (e.g.,
954
+ * MemoryEntry).
955
+ *
956
+ * Authentication: Bearer token (JWT)
957
+ * Scope: Workspace-level operations
958
+ */
959
+ uploads: API.Uploads = new API.Uploads(this);
920
960
  /**
921
961
  * ModelService manages LLM models at the WORKSPACE level.
922
962
  * Models represent available LLM providers and families (e.g., "anthropic/claude-sonnet-4.6").
@@ -965,6 +1005,8 @@ Cadenya.AccountResource = AccountResource;
965
1005
  Cadenya.Agents = Agents;
966
1006
  Cadenya.AgentVariations = AgentVariations;
967
1007
  Cadenya.Objectives = Objectives;
1008
+ Cadenya.MemoryLayers = MemoryLayers;
1009
+ Cadenya.Uploads = UploadsAPIUploads;
968
1010
  Cadenya.Models = Models;
969
1011
  Cadenya.Search = Search;
970
1012
  Cadenya.ToolSets = ToolSets;
@@ -1067,6 +1109,25 @@ export declare namespace Cadenya {
1067
1109
  type ObjectiveListEventsParams as ObjectiveListEventsParams,
1068
1110
  };
1069
1111
 
1112
+ export {
1113
+ MemoryLayers as MemoryLayers,
1114
+ type MemoryLayer as MemoryLayer,
1115
+ type MemoryLayerInfo as MemoryLayerInfo,
1116
+ type MemoryLayerSpec as MemoryLayerSpec,
1117
+ type MemoryLayersCursorPagination as MemoryLayersCursorPagination,
1118
+ type MemoryLayerCreateParams as MemoryLayerCreateParams,
1119
+ type MemoryLayerUpdateParams as MemoryLayerUpdateParams,
1120
+ type MemoryLayerListParams as MemoryLayerListParams,
1121
+ };
1122
+
1123
+ export {
1124
+ UploadsAPIUploads as Uploads,
1125
+ type Upload as Upload,
1126
+ type UploadInfo as UploadInfo,
1127
+ type UploadSpec as UploadSpec,
1128
+ type UploadCreateParams as UploadCreateParams,
1129
+ };
1130
+
1070
1131
  export {
1071
1132
  Models as Models,
1072
1133
  type Model as Model,
@@ -53,6 +53,16 @@ export {
53
53
  type AgentListParams,
54
54
  type AgentsCursorPagination,
55
55
  } from './agents/agents';
56
+ export {
57
+ MemoryLayers,
58
+ type MemoryLayer,
59
+ type MemoryLayerInfo,
60
+ type MemoryLayerSpec,
61
+ type MemoryLayerCreateParams,
62
+ type MemoryLayerUpdateParams,
63
+ type MemoryLayerListParams,
64
+ type MemoryLayersCursorPagination,
65
+ } from './memory-layers/memory-layers';
56
66
  export {
57
67
  Models,
58
68
  type Model,
@@ -126,6 +136,7 @@ export {
126
136
  type ToolSetsCursorPagination,
127
137
  type ToolSetEventsCursorPagination,
128
138
  } from './tool-sets/tool-sets';
139
+ export { Uploads, type Upload, type UploadInfo, type UploadSpec, type UploadCreateParams } from './uploads';
129
140
  export { Webhooks, type UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent } from './webhooks';
130
141
  export {
131
142
  WorkspaceSecrets,