@cadenya/cadenya 0.66.0 → 0.68.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 (267) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +42 -81
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +42 -81
  6. package/client.d.ts.map +1 -1
  7. package/client.js +24 -63
  8. package/client.js.map +1 -1
  9. package/client.mjs +24 -63
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/account.d.mts +18 -22
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +18 -22
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/account.js +2 -6
  17. package/resources/account.js.map +1 -1
  18. package/resources/account.mjs +2 -6
  19. package/resources/account.mjs.map +1 -1
  20. package/resources/agents/agents.d.mts +34 -21
  21. package/resources/agents/agents.d.mts.map +1 -1
  22. package/resources/agents/agents.d.ts +34 -21
  23. package/resources/agents/agents.d.ts.map +1 -1
  24. package/resources/agents/agents.js +17 -16
  25. package/resources/agents/agents.js.map +1 -1
  26. package/resources/agents/agents.mjs +17 -16
  27. package/resources/agents/agents.mjs.map +1 -1
  28. package/resources/agents/feedback.d.mts +15 -15
  29. package/resources/agents/feedback.d.mts.map +1 -1
  30. package/resources/agents/feedback.d.ts +15 -15
  31. package/resources/agents/feedback.d.ts.map +1 -1
  32. package/resources/agents/feedback.js +4 -8
  33. package/resources/agents/feedback.js.map +1 -1
  34. package/resources/agents/feedback.mjs +4 -8
  35. package/resources/agents/feedback.mjs.map +1 -1
  36. package/resources/agents/index.d.mts +1 -1
  37. package/resources/agents/index.d.mts.map +1 -1
  38. package/resources/agents/index.d.ts +1 -1
  39. package/resources/agents/index.d.ts.map +1 -1
  40. package/resources/agents/index.js.map +1 -1
  41. package/resources/agents/index.mjs.map +1 -1
  42. package/resources/agents/schedules.d.mts +44 -26
  43. package/resources/agents/schedules.d.mts.map +1 -1
  44. package/resources/agents/schedules.d.ts +44 -26
  45. package/resources/agents/schedules.d.ts.map +1 -1
  46. package/resources/agents/schedules.js +20 -19
  47. package/resources/agents/schedules.js.map +1 -1
  48. package/resources/agents/schedules.mjs +20 -19
  49. package/resources/agents/schedules.mjs.map +1 -1
  50. package/resources/agents/variations.d.mts +88 -43
  51. package/resources/agents/variations.d.mts.map +1 -1
  52. package/resources/agents/variations.d.ts +88 -43
  53. package/resources/agents/variations.d.ts.map +1 -1
  54. package/resources/agents/variations.js +31 -32
  55. package/resources/agents/variations.js.map +1 -1
  56. package/resources/agents/variations.mjs +31 -32
  57. package/resources/agents/variations.mjs.map +1 -1
  58. package/resources/agents/webhook-deliveries.d.mts +10 -11
  59. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  60. package/resources/agents/webhook-deliveries.d.ts +10 -11
  61. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  62. package/resources/agents/webhook-deliveries.js +4 -8
  63. package/resources/agents/webhook-deliveries.js.map +1 -1
  64. package/resources/agents/webhook-deliveries.mjs +4 -8
  65. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  66. package/resources/api-keys.d.mts +48 -28
  67. package/resources/api-keys.d.mts.map +1 -1
  68. package/resources/api-keys.d.ts +48 -28
  69. package/resources/api-keys.d.ts.map +1 -1
  70. package/resources/api-keys.js +21 -17
  71. package/resources/api-keys.js.map +1 -1
  72. package/resources/api-keys.mjs +21 -17
  73. package/resources/api-keys.mjs.map +1 -1
  74. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
  75. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
  76. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
  77. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  78. package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
  79. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  80. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
  81. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  82. package/resources/bulk-workspace-resources/index.d.mts +1 -1
  83. package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
  84. package/resources/bulk-workspace-resources/index.d.ts +1 -1
  85. package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
  86. package/resources/bulk-workspace-resources/index.js.map +1 -1
  87. package/resources/bulk-workspace-resources/index.mjs.map +1 -1
  88. package/resources/bulk-workspace-resources/results.d.mts +30 -35
  89. package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
  90. package/resources/bulk-workspace-resources/results.d.ts +30 -35
  91. package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
  92. package/resources/bulk-workspace-resources/results.js +6 -10
  93. package/resources/bulk-workspace-resources/results.js.map +1 -1
  94. package/resources/bulk-workspace-resources/results.mjs +6 -10
  95. package/resources/bulk-workspace-resources/results.mjs.map +1 -1
  96. package/resources/index.d.mts +9 -9
  97. package/resources/index.d.mts.map +1 -1
  98. package/resources/index.d.ts +9 -9
  99. package/resources/index.d.ts.map +1 -1
  100. package/resources/index.js.map +1 -1
  101. package/resources/index.mjs +1 -1
  102. package/resources/index.mjs.map +1 -1
  103. package/resources/memory-layers/entries.d.mts +40 -33
  104. package/resources/memory-layers/entries.d.mts.map +1 -1
  105. package/resources/memory-layers/entries.d.ts +40 -33
  106. package/resources/memory-layers/entries.d.ts.map +1 -1
  107. package/resources/memory-layers/entries.js +19 -23
  108. package/resources/memory-layers/entries.js.map +1 -1
  109. package/resources/memory-layers/entries.mjs +19 -23
  110. package/resources/memory-layers/entries.mjs.map +1 -1
  111. package/resources/memory-layers/index.d.mts +1 -1
  112. package/resources/memory-layers/index.d.mts.map +1 -1
  113. package/resources/memory-layers/index.d.ts +1 -1
  114. package/resources/memory-layers/index.d.ts.map +1 -1
  115. package/resources/memory-layers/index.js.map +1 -1
  116. package/resources/memory-layers/index.mjs.map +1 -1
  117. package/resources/memory-layers/memory-layers.d.mts +33 -22
  118. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  119. package/resources/memory-layers/memory-layers.d.ts +33 -22
  120. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  121. package/resources/memory-layers/memory-layers.js +17 -20
  122. package/resources/memory-layers/memory-layers.js.map +1 -1
  123. package/resources/memory-layers/memory-layers.mjs +17 -20
  124. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  125. package/resources/models.d.mts +18 -12
  126. package/resources/models.d.mts.map +1 -1
  127. package/resources/models.d.ts +18 -12
  128. package/resources/models.d.ts.map +1 -1
  129. package/resources/models.js +14 -13
  130. package/resources/models.js.map +1 -1
  131. package/resources/models.mjs +14 -13
  132. package/resources/models.mjs.map +1 -1
  133. package/resources/objectives/feedback.d.mts +19 -8
  134. package/resources/objectives/feedback.d.mts.map +1 -1
  135. package/resources/objectives/feedback.d.ts +19 -8
  136. package/resources/objectives/feedback.d.ts.map +1 -1
  137. package/resources/objectives/feedback.js +9 -4
  138. package/resources/objectives/feedback.js.map +1 -1
  139. package/resources/objectives/feedback.mjs +9 -4
  140. package/resources/objectives/feedback.mjs.map +1 -1
  141. package/resources/objectives/index.d.mts +1 -1
  142. package/resources/objectives/index.d.mts.map +1 -1
  143. package/resources/objectives/index.d.ts +1 -1
  144. package/resources/objectives/index.d.ts.map +1 -1
  145. package/resources/objectives/index.js.map +1 -1
  146. package/resources/objectives/index.mjs.map +1 -1
  147. package/resources/objectives/objectives.d.mts +63 -44
  148. package/resources/objectives/objectives.d.mts.map +1 -1
  149. package/resources/objectives/objectives.d.ts +63 -44
  150. package/resources/objectives/objectives.d.ts.map +1 -1
  151. package/resources/objectives/objectives.js +31 -16
  152. package/resources/objectives/objectives.js.map +1 -1
  153. package/resources/objectives/objectives.mjs +31 -16
  154. package/resources/objectives/objectives.mjs.map +1 -1
  155. package/resources/objectives/tasks.d.mts +7 -2
  156. package/resources/objectives/tasks.d.mts.map +1 -1
  157. package/resources/objectives/tasks.d.ts +7 -2
  158. package/resources/objectives/tasks.d.ts.map +1 -1
  159. package/resources/objectives/tasks.js +5 -4
  160. package/resources/objectives/tasks.js.map +1 -1
  161. package/resources/objectives/tasks.mjs +5 -4
  162. package/resources/objectives/tasks.mjs.map +1 -1
  163. package/resources/objectives/tool-calls.d.mts +18 -9
  164. package/resources/objectives/tool-calls.d.mts.map +1 -1
  165. package/resources/objectives/tool-calls.d.ts +18 -9
  166. package/resources/objectives/tool-calls.d.ts.map +1 -1
  167. package/resources/objectives/tool-calls.js +7 -12
  168. package/resources/objectives/tool-calls.js.map +1 -1
  169. package/resources/objectives/tool-calls.mjs +7 -12
  170. package/resources/objectives/tool-calls.mjs.map +1 -1
  171. package/resources/objectives/tools.d.mts +5 -1
  172. package/resources/objectives/tools.d.mts.map +1 -1
  173. package/resources/objectives/tools.d.ts +5 -1
  174. package/resources/objectives/tools.d.ts.map +1 -1
  175. package/resources/objectives/tools.js +3 -2
  176. package/resources/objectives/tools.js.map +1 -1
  177. package/resources/objectives/tools.mjs +3 -2
  178. package/resources/objectives/tools.mjs.map +1 -1
  179. package/resources/search.d.mts +1 -1
  180. package/resources/search.d.mts.map +1 -1
  181. package/resources/search.d.ts +1 -1
  182. package/resources/search.d.ts.map +1 -1
  183. package/resources/search.js +6 -2
  184. package/resources/search.js.map +1 -1
  185. package/resources/search.mjs +6 -2
  186. package/resources/search.mjs.map +1 -1
  187. package/resources/tool-sets/index.d.mts +1 -1
  188. package/resources/tool-sets/index.d.mts.map +1 -1
  189. package/resources/tool-sets/index.d.ts +1 -1
  190. package/resources/tool-sets/index.d.ts.map +1 -1
  191. package/resources/tool-sets/index.js.map +1 -1
  192. package/resources/tool-sets/index.mjs.map +1 -1
  193. package/resources/tool-sets/tool-sets.d.mts +66 -43
  194. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  195. package/resources/tool-sets/tool-sets.d.ts +66 -43
  196. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  197. package/resources/tool-sets/tool-sets.js +23 -23
  198. package/resources/tool-sets/tool-sets.js.map +1 -1
  199. package/resources/tool-sets/tool-sets.mjs +23 -23
  200. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  201. package/resources/tool-sets/tools.d.mts +50 -31
  202. package/resources/tool-sets/tools.d.mts.map +1 -1
  203. package/resources/tool-sets/tools.d.ts +50 -31
  204. package/resources/tool-sets/tools.d.ts.map +1 -1
  205. package/resources/tool-sets/tools.js +22 -21
  206. package/resources/tool-sets/tools.js.map +1 -1
  207. package/resources/tool-sets/tools.mjs +22 -21
  208. package/resources/tool-sets/tools.mjs.map +1 -1
  209. package/resources/uploads.d.mts +21 -19
  210. package/resources/uploads.d.mts.map +1 -1
  211. package/resources/uploads.d.ts +21 -19
  212. package/resources/uploads.d.ts.map +1 -1
  213. package/resources/uploads.js +8 -11
  214. package/resources/uploads.js.map +1 -1
  215. package/resources/uploads.mjs +8 -11
  216. package/resources/uploads.mjs.map +1 -1
  217. package/resources/workspace-secrets.d.mts +33 -13
  218. package/resources/workspace-secrets.d.mts.map +1 -1
  219. package/resources/workspace-secrets.d.ts +33 -13
  220. package/resources/workspace-secrets.d.ts.map +1 -1
  221. package/resources/workspace-secrets.js +16 -13
  222. package/resources/workspace-secrets.js.map +1 -1
  223. package/resources/workspace-secrets.mjs +16 -13
  224. package/resources/workspace-secrets.mjs.map +1 -1
  225. package/resources/workspaces.d.mts +2 -6
  226. package/resources/workspaces.d.mts.map +1 -1
  227. package/resources/workspaces.d.ts +2 -6
  228. package/resources/workspaces.d.ts.map +1 -1
  229. package/resources/workspaces.js +2 -6
  230. package/resources/workspaces.js.map +1 -1
  231. package/resources/workspaces.mjs +2 -6
  232. package/resources/workspaces.mjs.map +1 -1
  233. package/src/client.ts +54 -63
  234. package/src/resources/account.ts +18 -22
  235. package/src/resources/agents/agents.ts +49 -24
  236. package/src/resources/agents/feedback.ts +18 -16
  237. package/src/resources/agents/index.ts +2 -0
  238. package/src/resources/agents/schedules.ts +69 -37
  239. package/src/resources/agents/variations.ts +141 -73
  240. package/src/resources/agents/webhook-deliveries.ts +13 -12
  241. package/src/resources/api-keys.ts +67 -32
  242. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
  243. package/src/resources/bulk-workspace-resources/index.ts +1 -0
  244. package/src/resources/bulk-workspace-resources/results.ts +33 -36
  245. package/src/resources/index.ts +22 -1
  246. package/src/resources/memory-layers/entries.ts +67 -44
  247. package/src/resources/memory-layers/index.ts +2 -0
  248. package/src/resources/memory-layers/memory-layers.ts +53 -25
  249. package/src/resources/models.ts +28 -13
  250. package/src/resources/objectives/feedback.ts +29 -11
  251. package/src/resources/objectives/index.ts +1 -0
  252. package/src/resources/objectives/objectives.ts +100 -50
  253. package/src/resources/objectives/tasks.ts +16 -5
  254. package/src/resources/objectives/tool-calls.ts +33 -20
  255. package/src/resources/objectives/tools.ts +9 -3
  256. package/src/resources/search.ts +6 -1
  257. package/src/resources/tool-sets/index.ts +2 -0
  258. package/src/resources/tool-sets/tool-sets.ts +88 -50
  259. package/src/resources/tool-sets/tools.ts +75 -42
  260. package/src/resources/uploads.ts +25 -20
  261. package/src/resources/workspace-secrets.ts +60 -19
  262. package/src/resources/workspaces.ts +2 -6
  263. package/src/version.ts +1 -1
  264. package/version.d.mts +1 -1
  265. package/version.d.ts +1 -1
  266. package/version.js +1 -1
  267. package/version.mjs +1 -1
@@ -5,23 +5,17 @@ import { APIPromise } from "../../core/api-promise.js";
5
5
  import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
6
6
  import { RequestOptions } from "../../internal/request-options.js";
7
7
  /**
8
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
9
- * Layers are named containers that can be composed into an objective's memory
10
- * stack; entries are the keyed values within a layer.
11
- *
12
- * All operations are implicitly scoped to the workspace determined by the JWT
13
- * token. System-managed layers (e.g., episodic layers created by the runtime)
14
- * cannot be mutated through this API.
15
- *
16
- * Authentication: Bearer token (JWT)
17
- * Scope: Workspace-level operations
8
+ * Manage memory layers and their entries. Layers are named containers that can
9
+ * be composed into an objective's memory stack; entries are the keyed values
10
+ * within a layer. System-managed layers (e.g., episodic layers created by the
11
+ * runtime) cannot be mutated through this API.
18
12
  */
19
13
  export declare class Entries extends APIResource {
20
14
  /**
21
15
  * Creates a new entry in a memory layer. Returns the detail view, including the
22
16
  * resolved content body.
23
17
  */
24
- create(memoryLayerID: string, body: EntryCreateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
18
+ create(memoryLayerID: string, params: EntryCreateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
25
19
  /**
26
20
  * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
27
21
  * including the content body.
@@ -35,7 +29,7 @@ export declare class Entries extends APIResource {
35
29
  /**
36
30
  * Lists all entries in a memory layer
37
31
  */
38
- list(memoryLayerID: string, query?: EntryListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryEntriesCursorPagination, MemoryEntry>;
32
+ list(memoryLayerID: string, params: EntryListParams, options?: RequestOptions): PagePromise<MemoryEntriesCursorPagination, MemoryEntry>;
39
33
  /**
40
34
  * Deletes a memory entry from a memory layer
41
35
  */
@@ -114,9 +108,9 @@ export interface MemoryEntryDetail {
114
108
  }
115
109
  export interface MemoryEntryInfo {
116
110
  /**
117
- * Profile represents a human user at the account level. Profiles are
118
- * account-scoped resources that can be associated with multiple workspaces through
119
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
111
+ * A profile identifies a user or non-human principal (such as an API key) at the
112
+ * account level. Profiles are account-scoped and can be granted access to multiple
113
+ * workspaces.
120
114
  */
121
115
  createdBy?: AccountAPI.Profile;
122
116
  /**
@@ -171,29 +165,38 @@ export interface MemoryEntryUpdateSpec {
171
165
  }
172
166
  export interface EntryCreateParams {
173
167
  /**
174
- * CreateResourceMetadata contains the user-provided fields for creating a
175
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
176
- * profile_id, created_at) are excluded since they are set by the server.
168
+ * Path param
169
+ */
170
+ workspaceId: string;
171
+ /**
172
+ * Body param: CreateResourceMetadata contains the user-provided fields for
173
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
174
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
175
+ * server.
177
176
  */
178
177
  metadata: Shared.CreateResourceMetadata;
179
178
  /**
180
- * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
181
- * either inline content or a reference to a completed Upload; exactly one of the
182
- * two must be set.
179
+ * Body param: MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It
180
+ * accepts either inline content or a reference to a completed Upload; exactly one
181
+ * of the two must be set.
183
182
  */
184
183
  spec: MemoryEntryCreateSpec;
185
184
  }
186
185
  export interface EntryRetrieveParams {
186
+ workspaceId: string;
187
187
  /**
188
- * Memory layer ID (from path). Accepts canonical memlyr\_… form or
189
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
188
+ * Memory layer ID. Accepts canonical memlyr\_… form or external_id:<value> form.
190
189
  */
191
190
  memoryLayerId: string;
192
191
  }
193
192
  export interface EntryUpdateParams {
194
193
  /**
195
- * Path param: Memory layer ID (from path). Accepts canonical memlyr\_… form or
196
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
194
+ * Path param
195
+ */
196
+ workspaceId: string;
197
+ /**
198
+ * Path param: Memory layer ID. Accepts canonical memlyr\_… form or
199
+ * external_id:<value> form.
197
200
  */
198
201
  memoryLayerId: string;
199
202
  /**
@@ -217,31 +220,35 @@ export interface EntryUpdateParams {
217
220
  }
218
221
  export interface EntryListParams extends CursorPaginationParams {
219
222
  /**
220
- * Filter by bundle_key — return only resources owned by this bundle.
223
+ * Path param
224
+ */
225
+ workspaceId: string;
226
+ /**
227
+ * Query param: Filter by bundle_key — return only resources owned by this bundle.
221
228
  */
222
229
  bundleKey?: string;
223
230
  /**
224
- * When set to true you may use more of your alloted API rate-limit
231
+ * Query param: When set to true you may use more of your alloted API rate-limit
225
232
  */
226
233
  includeInfo?: boolean;
227
234
  /**
228
- * Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that
229
- * hierarchy). Matches against the entry's key, not its name.
235
+ * Query param: Filter by key prefix (e.g., "skills/postmortem/" to list all
236
+ * entries under that hierarchy). Matches against the entry's key, not its name.
230
237
  */
231
238
  prefix?: string;
232
239
  /**
233
- * Free-form search query
240
+ * Query param: Free-form search query
234
241
  */
235
242
  query?: string;
236
243
  /**
237
- * Sort order for results (asc or desc by creation time)
244
+ * Query param: Sort order for results (asc or desc by creation time)
238
245
  */
239
246
  sortOrder?: string;
240
247
  }
241
248
  export interface EntryDeleteParams {
249
+ workspaceId: string;
242
250
  /**
243
- * Memory layer ID (from path). Accepts canonical memlyr\_… form or
244
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
251
+ * Memory layer ID. Accepts canonical memlyr\_… form or external_id:<value> form.
245
252
  */
246
253
  memoryLayerId: string;
247
254
  }
@@ -1 +1 @@
1
- {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;GAWG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAIhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAK1G;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAi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AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -7,56 +7,52 @@ const pagination_1 = require("../../core/pagination.js");
7
7
  const headers_1 = require("../../internal/headers.js");
8
8
  const path_1 = require("../../internal/utils/path.js");
9
9
  /**
10
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
11
- * Layers are named containers that can be composed into an objective's memory
12
- * stack; entries are the keyed values within a layer.
13
- *
14
- * All operations are implicitly scoped to the workspace determined by the JWT
15
- * token. System-managed layers (e.g., episodic layers created by the runtime)
16
- * cannot be mutated through this API.
17
- *
18
- * Authentication: Bearer token (JWT)
19
- * Scope: Workspace-level operations
10
+ * Manage memory layers and their entries. Layers are named containers that can
11
+ * be composed into an objective's memory stack; entries are the keyed values
12
+ * within a layer. System-managed layers (e.g., episodic layers created by the
13
+ * runtime) cannot be mutated through this API.
20
14
  */
21
15
  class Entries extends resource_1.APIResource {
22
16
  /**
23
17
  * Creates a new entry in a memory layer. Returns the detail view, including the
24
18
  * resolved content body.
25
19
  */
26
- create(memoryLayerID, body, options) {
27
- return this._client.post((0, path_1.path) `/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
20
+ create(memoryLayerID, params, options) {
21
+ const { workspaceId, ...body } = params;
22
+ return this._client.post((0, path_1.path) `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`, {
23
+ body,
24
+ ...options,
25
+ });
28
26
  }
29
27
  /**
30
28
  * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
31
29
  * including the content body.
32
30
  */
33
31
  retrieve(id, params, options) {
34
- const { memoryLayerId } = params;
35
- return this._client.get((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
32
+ const { workspaceId, memoryLayerId } = params;
33
+ return this._client.get((0, path_1.path) `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`, options);
36
34
  }
37
35
  /**
38
36
  * Updates a memory entry in a memory layer. Returns the detail view, including the
39
37
  * resolved content body.
40
38
  */
41
39
  update(id, params, options) {
42
- const { memoryLayerId, ...body } = params;
43
- return this._client.patch((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
40
+ const { workspaceId, memoryLayerId, ...body } = params;
41
+ return this._client.patch((0, path_1.path) `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
44
42
  }
45
43
  /**
46
44
  * Lists all entries in a memory layer
47
45
  */
48
- list(memoryLayerID, query = {}, options) {
49
- return this._client.getAPIList((0, path_1.path) `/v1/memory_layers/${memoryLayerID}/entries`, (pagination_1.CursorPagination), { query, ...options });
46
+ list(memoryLayerID, params, options) {
47
+ const { workspaceId, ...query } = params;
48
+ return this._client.getAPIList((0, path_1.path) `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`, (pagination_1.CursorPagination), { query, ...options });
50
49
  }
51
50
  /**
52
51
  * Deletes a memory entry from a memory layer
53
52
  */
54
53
  delete(id, params, options) {
55
- const { memoryLayerId } = params;
56
- return this._client.delete((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, {
57
- ...options,
58
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
59
- });
54
+ const { workspaceId, memoryLayerId } = params;
55
+ return this._client.delete((0, path_1.path) `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`, { ...options, headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]) });
60
56
  }
61
57
  }
62
58
  exports.Entries = Entries;
@@ -1 +1 @@
1
- {"version":3,"file":"entries.js","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;;GAWG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,MAAM,CACJ,aAAqB,EACrB,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,aAAa,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,EAAU,EAAE,MAA2B,EAAE,OAAwB;QACxE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,aAAa,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,MAAyB,EAAE,OAAwB;QACpE,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,qBAAqB,aAAa,YAAY,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED;;OAEG;IACH,IAAI,CACF,aAAqB,EACrB,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,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/headers.mjs";
5
5
  import { path } from "../../internal/utils/path.mjs";
6
6
  /**
7
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
8
- * Layers are named containers that can be composed into an objective's memory
9
- * stack; entries are the keyed values within a layer.
10
- *
11
- * All operations are implicitly scoped to the workspace determined by the JWT
12
- * token. System-managed layers (e.g., episodic layers created by the runtime)
13
- * cannot be mutated through this API.
14
- *
15
- * Authentication: Bearer token (JWT)
16
- * Scope: Workspace-level operations
7
+ * Manage memory layers and their entries. Layers are named containers that can
8
+ * be composed into an objective's memory stack; entries are the keyed values
9
+ * within a layer. System-managed layers (e.g., episodic layers created by the
10
+ * runtime) cannot be mutated through this API.
17
11
  */
18
12
  export class Entries extends APIResource {
19
13
  /**
20
14
  * Creates a new entry in a memory layer. Returns the detail view, including the
21
15
  * resolved content body.
22
16
  */
23
- create(memoryLayerID, body, options) {
24
- return this._client.post(path `/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
17
+ create(memoryLayerID, params, options) {
18
+ const { workspaceId, ...body } = params;
19
+ return this._client.post(path `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`, {
20
+ body,
21
+ ...options,
22
+ });
25
23
  }
26
24
  /**
27
25
  * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
28
26
  * including the content body.
29
27
  */
30
28
  retrieve(id, params, options) {
31
- const { memoryLayerId } = params;
32
- return this._client.get(path `/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
29
+ const { workspaceId, memoryLayerId } = params;
30
+ return this._client.get(path `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`, options);
33
31
  }
34
32
  /**
35
33
  * Updates a memory entry in a memory layer. Returns the detail view, including the
36
34
  * resolved content body.
37
35
  */
38
36
  update(id, params, options) {
39
- const { memoryLayerId, ...body } = params;
40
- return this._client.patch(path `/v1/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
37
+ const { workspaceId, memoryLayerId, ...body } = params;
38
+ return this._client.patch(path `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
41
39
  }
42
40
  /**
43
41
  * Lists all entries in a memory layer
44
42
  */
45
- list(memoryLayerID, query = {}, options) {
46
- return this._client.getAPIList(path `/v1/memory_layers/${memoryLayerID}/entries`, (CursorPagination), { query, ...options });
43
+ list(memoryLayerID, params, options) {
44
+ const { workspaceId, ...query } = params;
45
+ return this._client.getAPIList(path `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`, (CursorPagination), { query, ...options });
47
46
  }
48
47
  /**
49
48
  * Deletes a memory entry from a memory layer
50
49
  */
51
50
  delete(id, params, options) {
52
- const { memoryLayerId } = params;
53
- return this._client.delete(path `/v1/memory_layers/${memoryLayerId}/entries/${id}`, {
54
- ...options,
55
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
56
- });
51
+ const { workspaceId, memoryLayerId } = params;
52
+ return this._client.delete(path `/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`, { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) });
57
53
  }
58
54
  }
59
55
  //# sourceMappingURL=entries.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"entries.mjs","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,gBAAgB,EAA4C;OAC9D,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CACJ,aAAqB,EACrB,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,aAAa,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;OAGG;IACH,QAAQ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AC1E,CAAA,gBAA6B,CAAA,EAC7B,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,MAAyB,EAAE,OAAwB;QACpE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CACxB,IAAI,CAAA,kBAAkB,WAAW,kBAAkB,aAAa,YAAY,EAAE,EAAE,EAChF,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAC7E,CAAC;IACJ,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
1
  export { Entries, type MemoryEntry, type MemoryEntryCreateSpec, type MemoryEntryDetail, type MemoryEntryInfo, type MemoryEntrySpec, type MemoryEntryUpdateSpec, type EntryCreateParams, type EntryRetrieveParams, type EntryUpdateParams, type EntryListParams, type EntryDeleteParams, type MemoryEntriesCursorPagination, } from "./entries.mjs";
2
- export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayersCursorPagination, } from "./memory-layers.mjs";
2
+ export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerRetrieveParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayerDeleteParams, type MemoryLayersCursorPagination, } from "./memory-layers.mjs";
3
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,GACnC;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,GAClC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,GACnC;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,GAClC"}
@@ -1,3 +1,3 @@
1
1
  export { Entries, type MemoryEntry, type MemoryEntryCreateSpec, type MemoryEntryDetail, type MemoryEntryInfo, type MemoryEntrySpec, type MemoryEntryUpdateSpec, type EntryCreateParams, type EntryRetrieveParams, type EntryUpdateParams, type EntryListParams, type EntryDeleteParams, type MemoryEntriesCursorPagination, } from "./entries.js";
2
- export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayersCursorPagination, } from "./memory-layers.js";
2
+ export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerRetrieveParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayerDeleteParams, type MemoryLayersCursorPagination, } from "./memory-layers.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,GACnC;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,GAClC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,GACnC;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,GAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAcmB;AAbjB,kGAAA,OAAO,OAAA;AAcT,oDASyB;AARvB,6GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAcmB;AAbjB,kGAAA,OAAO,OAAA;AAcT,oDAWyB;AAVvB,6GAAA,YAAY,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAaR;OACM,EACL,YAAY,GAQb"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/memory-layers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAaR;OACM,EACL,YAAY,GAUb"}
@@ -7,39 +7,33 @@ import { APIPromise } from "../../core/api-promise.mjs";
7
7
  import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs";
8
8
  import { RequestOptions } from "../../internal/request-options.mjs";
9
9
  /**
10
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
11
- * Layers are named containers that can be composed into an objective's memory
12
- * stack; entries are the keyed values within a layer.
13
- *
14
- * All operations are implicitly scoped to the workspace determined by the JWT
15
- * token. System-managed layers (e.g., episodic layers created by the runtime)
16
- * cannot be mutated through this API.
17
- *
18
- * Authentication: Bearer token (JWT)
19
- * Scope: Workspace-level operations
10
+ * Manage memory layers and their entries. Layers are named containers that can
11
+ * be composed into an objective's memory stack; entries are the keyed values
12
+ * within a layer. System-managed layers (e.g., episodic layers created by the
13
+ * runtime) cannot be mutated through this API.
20
14
  */
21
15
  export declare class MemoryLayers extends APIResource {
22
16
  entries: EntriesAPI.Entries;
23
17
  /**
24
18
  * Creates a new memory layer in the workspace
25
19
  */
26
- create(body: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
20
+ create(workspaceID: string, body: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
27
21
  /**
28
22
  * Retrieves a memory layer by ID from the workspace
29
23
  */
30
- retrieve(id: string, options?: RequestOptions): APIPromise<MemoryLayer>;
24
+ retrieve(id: string, params: MemoryLayerRetrieveParams, options?: RequestOptions): APIPromise<MemoryLayer>;
31
25
  /**
32
26
  * Updates a memory layer in the workspace
33
27
  */
34
- update(id: string, body: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
28
+ update(id: string, params: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
35
29
  /**
36
30
  * Lists all memory layers in the workspace
37
31
  */
38
- list(query?: MemoryLayerListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryLayersCursorPagination, MemoryLayer>;
32
+ list(workspaceID: string, query?: MemoryLayerListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryLayersCursorPagination, MemoryLayer>;
39
33
  /**
40
34
  * Deletes a memory layer from the workspace
41
35
  */
42
- delete(id: string, options?: RequestOptions): APIPromise<void>;
36
+ delete(id: string, params: MemoryLayerDeleteParams, options?: RequestOptions): APIPromise<void>;
43
37
  }
44
38
  export type MemoryLayersCursorPagination = CursorPagination<MemoryLayer>;
45
39
  /**
@@ -60,9 +54,9 @@ export interface MemoryLayer {
60
54
  }
61
55
  export interface MemoryLayerInfo {
62
56
  /**
63
- * Profile represents a human user at the account level. Profiles are
64
- * account-scoped resources that can be associated with multiple workspaces through
65
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
57
+ * A profile identifies a user or non-human principal (such as an API key) at the
58
+ * account level. Profiles are account-scoped and can be granted access to multiple
59
+ * workspaces.
66
60
  */
67
61
  createdBy?: AccountAPI.Profile;
68
62
  /**
@@ -104,14 +98,28 @@ export interface MemoryLayerCreateParams {
104
98
  metadata: Shared.CreateResourceMetadata;
105
99
  spec: MemoryLayerSpec;
106
100
  }
101
+ export interface MemoryLayerRetrieveParams {
102
+ workspaceId: string;
103
+ }
107
104
  export interface MemoryLayerUpdateParams {
108
105
  /**
109
- * UpdateResourceMetadata contains the user-provided fields for updating a
110
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
111
- * profile_id, created_at) are excluded since they are set by the server.
106
+ * Path param
107
+ */
108
+ workspaceId: string;
109
+ /**
110
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
111
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
112
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
113
+ * server.
112
114
  */
113
115
  metadata?: Shared.UpdateResourceMetadata;
116
+ /**
117
+ * Body param
118
+ */
114
119
  spec?: MemoryLayerSpec;
120
+ /**
121
+ * Body param
122
+ */
115
123
  updateMask?: string;
116
124
  }
117
125
  export interface MemoryLayerListParams extends CursorPaginationParams {
@@ -140,8 +148,11 @@ export interface MemoryLayerListParams extends CursorPaginationParams {
140
148
  */
141
149
  type?: 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
142
150
  }
151
+ export interface MemoryLayerDeleteParams {
152
+ workspaceId: string;
153
+ }
143
154
  export declare namespace MemoryLayers {
144
- export { type MemoryLayer as MemoryLayer, type MemoryLayerInfo as MemoryLayerInfo, type MemoryLayerSpec as MemoryLayerSpec, type MemoryLayersCursorPagination as MemoryLayersCursorPagination, type MemoryLayerCreateParams as MemoryLayerCreateParams, type MemoryLayerUpdateParams as MemoryLayerUpdateParams, type MemoryLayerListParams as MemoryLayerListParams, };
155
+ export { type MemoryLayer as MemoryLayer, type MemoryLayerInfo as MemoryLayerInfo, type MemoryLayerSpec as MemoryLayerSpec, type MemoryLayersCursorPagination as MemoryLayersCursorPagination, type MemoryLayerCreateParams as MemoryLayerCreateParams, type MemoryLayerRetrieveParams as MemoryLayerRetrieveParams, type MemoryLayerUpdateParams as MemoryLayerUpdateParams, type MemoryLayerListParams as MemoryLayerListParams, type MemoryLayerDeleteParams as MemoryLayerDeleteParams, };
145
156
  export { Entries as Entries, type MemoryEntry as MemoryEntry, type MemoryEntryCreateSpec as MemoryEntryCreateSpec, type MemoryEntryDetail as MemoryEntryDetail, type MemoryEntryInfo as MemoryEntryInfo, type MemoryEntrySpec as MemoryEntrySpec, type MemoryEntryUpdateSpec as MemoryEntryUpdateSpec, type MemoryEntriesCursorPagination as MemoryEntriesCursorPagination, type EntryCreateParams as EntryCreateParams, type EntryRetrieveParams as EntryRetrieveParams, type EntryUpdateParams as EntryUpdateParams, type EntryListParams as EntryListParams, type EntryDeleteParams as EntryDeleteParams, };
146
157
  }
147
158
  //# sourceMappingURL=memory-layers.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory-layers.d.mts","sourceRoot":"","sources":["../../src/resources/memory-layers/memory-layers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EACL,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,6BAA6B,EAC7B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,EACtB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;GAWG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,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C3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
1
+ {"version":3,"file":"memory-layers.d.mts","sourceRoot":"","sources":["../../src/resources/memory-layers/memory-layers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EACL,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,6BAA6B,EAC7B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,EACtB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;OAEG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;IAI1B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAK1G;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAKtG;;OAEG;IACH,IAAI,CACF,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,c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EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -7,39 +7,33 @@ import { APIPromise } from "../../core/api-promise.js";
7
7
  import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
8
8
  import { RequestOptions } from "../../internal/request-options.js";
9
9
  /**
10
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
11
- * Layers are named containers that can be composed into an objective's memory
12
- * stack; entries are the keyed values within a layer.
13
- *
14
- * All operations are implicitly scoped to the workspace determined by the JWT
15
- * token. System-managed layers (e.g., episodic layers created by the runtime)
16
- * cannot be mutated through this API.
17
- *
18
- * Authentication: Bearer token (JWT)
19
- * Scope: Workspace-level operations
10
+ * Manage memory layers and their entries. Layers are named containers that can
11
+ * be composed into an objective's memory stack; entries are the keyed values
12
+ * within a layer. System-managed layers (e.g., episodic layers created by the
13
+ * runtime) cannot be mutated through this API.
20
14
  */
21
15
  export declare class MemoryLayers extends APIResource {
22
16
  entries: EntriesAPI.Entries;
23
17
  /**
24
18
  * Creates a new memory layer in the workspace
25
19
  */
26
- create(body: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
20
+ create(workspaceID: string, body: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
27
21
  /**
28
22
  * Retrieves a memory layer by ID from the workspace
29
23
  */
30
- retrieve(id: string, options?: RequestOptions): APIPromise<MemoryLayer>;
24
+ retrieve(id: string, params: MemoryLayerRetrieveParams, options?: RequestOptions): APIPromise<MemoryLayer>;
31
25
  /**
32
26
  * Updates a memory layer in the workspace
33
27
  */
34
- update(id: string, body: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
28
+ update(id: string, params: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer>;
35
29
  /**
36
30
  * Lists all memory layers in the workspace
37
31
  */
38
- list(query?: MemoryLayerListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryLayersCursorPagination, MemoryLayer>;
32
+ list(workspaceID: string, query?: MemoryLayerListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryLayersCursorPagination, MemoryLayer>;
39
33
  /**
40
34
  * Deletes a memory layer from the workspace
41
35
  */
42
- delete(id: string, options?: RequestOptions): APIPromise<void>;
36
+ delete(id: string, params: MemoryLayerDeleteParams, options?: RequestOptions): APIPromise<void>;
43
37
  }
44
38
  export type MemoryLayersCursorPagination = CursorPagination<MemoryLayer>;
45
39
  /**
@@ -60,9 +54,9 @@ export interface MemoryLayer {
60
54
  }
61
55
  export interface MemoryLayerInfo {
62
56
  /**
63
- * Profile represents a human user at the account level. Profiles are
64
- * account-scoped resources that can be associated with multiple workspaces through
65
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
57
+ * A profile identifies a user or non-human principal (such as an API key) at the
58
+ * account level. Profiles are account-scoped and can be granted access to multiple
59
+ * workspaces.
66
60
  */
67
61
  createdBy?: AccountAPI.Profile;
68
62
  /**
@@ -104,14 +98,28 @@ export interface MemoryLayerCreateParams {
104
98
  metadata: Shared.CreateResourceMetadata;
105
99
  spec: MemoryLayerSpec;
106
100
  }
101
+ export interface MemoryLayerRetrieveParams {
102
+ workspaceId: string;
103
+ }
107
104
  export interface MemoryLayerUpdateParams {
108
105
  /**
109
- * UpdateResourceMetadata contains the user-provided fields for updating a
110
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
111
- * profile_id, created_at) are excluded since they are set by the server.
106
+ * Path param
107
+ */
108
+ workspaceId: string;
109
+ /**
110
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
111
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
112
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
113
+ * server.
112
114
  */
113
115
  metadata?: Shared.UpdateResourceMetadata;
116
+ /**
117
+ * Body param
118
+ */
114
119
  spec?: MemoryLayerSpec;
120
+ /**
121
+ * Body param
122
+ */
115
123
  updateMask?: string;
116
124
  }
117
125
  export interface MemoryLayerListParams extends CursorPaginationParams {
@@ -140,8 +148,11 @@ export interface MemoryLayerListParams extends CursorPaginationParams {
140
148
  */
141
149
  type?: 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
142
150
  }
151
+ export interface MemoryLayerDeleteParams {
152
+ workspaceId: string;
153
+ }
143
154
  export declare namespace MemoryLayers {
144
- export { type MemoryLayer as MemoryLayer, type MemoryLayerInfo as MemoryLayerInfo, type MemoryLayerSpec as MemoryLayerSpec, type MemoryLayersCursorPagination as MemoryLayersCursorPagination, type MemoryLayerCreateParams as MemoryLayerCreateParams, type MemoryLayerUpdateParams as MemoryLayerUpdateParams, type MemoryLayerListParams as MemoryLayerListParams, };
155
+ export { type MemoryLayer as MemoryLayer, type MemoryLayerInfo as MemoryLayerInfo, type MemoryLayerSpec as MemoryLayerSpec, type MemoryLayersCursorPagination as MemoryLayersCursorPagination, type MemoryLayerCreateParams as MemoryLayerCreateParams, type MemoryLayerRetrieveParams as MemoryLayerRetrieveParams, type MemoryLayerUpdateParams as MemoryLayerUpdateParams, type MemoryLayerListParams as MemoryLayerListParams, type MemoryLayerDeleteParams as MemoryLayerDeleteParams, };
145
156
  export { Entries as Entries, type MemoryEntry as MemoryEntry, type MemoryEntryCreateSpec as MemoryEntryCreateSpec, type MemoryEntryDetail as MemoryEntryDetail, type MemoryEntryInfo as MemoryEntryInfo, type MemoryEntrySpec as MemoryEntrySpec, type MemoryEntryUpdateSpec as MemoryEntryUpdateSpec, type MemoryEntriesCursorPagination as MemoryEntriesCursorPagination, type EntryCreateParams as EntryCreateParams, type EntryRetrieveParams as EntryRetrieveParams, type EntryUpdateParams as EntryUpdateParams, type EntryListParams as EntryListParams, type EntryDeleteParams as EntryDeleteParams, };
146
157
  }
147
158
  //# sourceMappingURL=memory-layers.d.ts.map