@cadenya/cadenya 0.44.0 → 0.46.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 (98) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +31 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +31 -4
  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/agent-variations.d.mts +79 -1
  12. package/resources/agent-variations.d.mts.map +1 -1
  13. package/resources/agent-variations.d.ts +79 -1
  14. package/resources/agent-variations.d.ts.map +1 -1
  15. package/resources/agent-variations.js +31 -0
  16. package/resources/agent-variations.js.map +1 -1
  17. package/resources/agent-variations.mjs +31 -0
  18. package/resources/agent-variations.mjs.map +1 -1
  19. package/resources/agents/webhook-deliveries.d.mts +2 -2
  20. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  21. package/resources/agents/webhook-deliveries.d.ts +2 -2
  22. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  23. package/resources/index.d.mts +4 -2
  24. package/resources/index.d.mts.map +1 -1
  25. package/resources/index.d.ts +4 -2
  26. package/resources/index.d.ts.map +1 -1
  27. package/resources/index.js +5 -1
  28. package/resources/index.js.map +1 -1
  29. package/resources/index.mjs +2 -0
  30. package/resources/index.mjs.map +1 -1
  31. package/resources/memory-layers/entries.d.mts +241 -0
  32. package/resources/memory-layers/entries.d.mts.map +1 -0
  33. package/resources/memory-layers/entries.d.ts +241 -0
  34. package/resources/memory-layers/entries.d.ts.map +1 -0
  35. package/resources/memory-layers/entries.js +63 -0
  36. package/resources/memory-layers/entries.js.map +1 -0
  37. package/resources/memory-layers/entries.mjs +59 -0
  38. package/resources/memory-layers/entries.mjs.map +1 -0
  39. package/resources/memory-layers/index.d.mts +3 -0
  40. package/resources/memory-layers/index.d.mts.map +1 -0
  41. package/resources/memory-layers/index.d.ts +3 -0
  42. package/resources/memory-layers/index.d.ts.map +1 -0
  43. package/resources/memory-layers/index.js +9 -0
  44. package/resources/memory-layers/index.js.map +1 -0
  45. package/resources/memory-layers/index.mjs +4 -0
  46. package/resources/memory-layers/index.mjs.map +1 -0
  47. package/resources/memory-layers/memory-layers.d.mts +139 -0
  48. package/resources/memory-layers/memory-layers.d.mts.map +1 -0
  49. package/resources/memory-layers/memory-layers.d.ts +139 -0
  50. package/resources/memory-layers/memory-layers.d.ts.map +1 -0
  51. package/resources/memory-layers/memory-layers.js +65 -0
  52. package/resources/memory-layers/memory-layers.js.map +1 -0
  53. package/resources/memory-layers/memory-layers.mjs +60 -0
  54. package/resources/memory-layers/memory-layers.mjs.map +1 -0
  55. package/resources/memory-layers.d.mts +2 -0
  56. package/resources/memory-layers.d.mts.map +1 -0
  57. package/resources/memory-layers.d.ts +2 -0
  58. package/resources/memory-layers.d.ts.map +1 -0
  59. package/resources/memory-layers.js +6 -0
  60. package/resources/memory-layers.js.map +1 -0
  61. package/resources/memory-layers.mjs +3 -0
  62. package/resources/memory-layers.mjs.map +1 -0
  63. package/resources/objectives/index.d.mts +1 -1
  64. package/resources/objectives/index.d.mts.map +1 -1
  65. package/resources/objectives/index.d.ts +1 -1
  66. package/resources/objectives/index.d.ts.map +1 -1
  67. package/resources/objectives/index.js.map +1 -1
  68. package/resources/objectives/index.mjs.map +1 -1
  69. package/resources/objectives/objectives.d.mts +76 -1
  70. package/resources/objectives/objectives.d.mts.map +1 -1
  71. package/resources/objectives/objectives.d.ts +76 -1
  72. package/resources/objectives/objectives.d.ts.map +1 -1
  73. package/resources/objectives/objectives.js.map +1 -1
  74. package/resources/objectives/objectives.mjs.map +1 -1
  75. package/resources/uploads.d.mts +97 -0
  76. package/resources/uploads.d.mts.map +1 -0
  77. package/resources/uploads.d.ts +97 -0
  78. package/resources/uploads.d.ts.map +1 -0
  79. package/resources/uploads.js +33 -0
  80. package/resources/uploads.js.map +1 -0
  81. package/resources/uploads.mjs +29 -0
  82. package/resources/uploads.mjs.map +1 -0
  83. package/src/client.ts +73 -0
  84. package/src/resources/agent-variations.ts +124 -0
  85. package/src/resources/agents/webhook-deliveries.ts +4 -2
  86. package/src/resources/index.ts +17 -0
  87. package/src/resources/memory-layers/entries.ts +325 -0
  88. package/src/resources/memory-layers/index.ts +27 -0
  89. package/src/resources/memory-layers/memory-layers.ts +224 -0
  90. package/src/resources/memory-layers.ts +3 -0
  91. package/src/resources/objectives/index.ts +2 -0
  92. package/src/resources/objectives/objectives.ts +85 -0
  93. package/src/resources/uploads.ts +128 -0
  94. package/src/version.ts +1 -1
  95. package/version.d.mts +1 -1
  96. package/version.d.ts +1 -1
  97. package/version.js +1 -1
  98. package/version.mjs +1 -1
@@ -4,10 +4,12 @@ export { APIKeys, } from "./api-keys.mjs";
4
4
  export { AccountResource, } from "./account.mjs";
5
5
  export { AgentVariations, } from "./agent-variations.mjs";
6
6
  export { Agents, } from "./agents/agents.mjs";
7
+ export { MemoryLayers, } from "./memory-layers/memory-layers.mjs";
7
8
  export { Models, } from "./models.mjs";
8
9
  export { Objectives, } from "./objectives/objectives.mjs";
9
10
  export { Search, } from "./search.mjs";
10
11
  export { ToolSets, } from "./tool-sets/tool-sets.mjs";
12
+ export { Uploads } from "./uploads.mjs";
11
13
  export { Webhooks } from "./webhooks.mjs";
12
14
  export { WorkspaceSecrets, } from "./workspace-secrets.mjs";
13
15
  export { Workspaces, } from "./workspaces.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAQR;OACM,EACL,eAAe,GAMhB;OACM,EACL,eAAe,GAqBhB;OACM,EACL,MAAM,GASP;OACM,EACL,MAAM,GAMP;OACM,EACL,UAAU,GAqCX;OACM,EACL,MAAM,GAGP;OACM,EACL,QAAQ,GAmBT;OACM,EAAE,QAAQ,EAA0D;OACpE,EACL,gBAAgB,GAQjB;OACM,EACL,UAAU,GAKX"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAQR;OACM,EACL,eAAe,GAMhB;OACM,EACL,eAAe,GAyBhB;OACM,EACL,MAAM,GASP;OACM,EACL,YAAY,GAQb;OACM,EACL,MAAM,GAMP;OACM,EACL,UAAU,GAuCX;OACM,EACL,MAAM,GAGP;OACM,EACL,QAAQ,GAmBT;OACM,EAAE,OAAO,EAA0E;OACnF,EAAE,QAAQ,EAA0D;OACpE,EACL,gBAAgB,GAQjB;OACM,EACL,UAAU,GAKX"}
@@ -0,0 +1,241 @@
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 { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs";
6
+ import { RequestOptions } from "../../internal/request-options.mjs";
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
18
+ */
19
+ export declare class Entries extends APIResource {
20
+ /**
21
+ * Creates a new entry in a memory layer. Returns the detail view, including the
22
+ * resolved content body.
23
+ */
24
+ create(memoryLayerID: string, body: EntryCreateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
25
+ /**
26
+ * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
27
+ * including the content body.
28
+ */
29
+ retrieve(id: string, params: EntryRetrieveParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
30
+ /**
31
+ * Updates a memory entry in a memory layer. Returns the detail view, including the
32
+ * resolved content body.
33
+ */
34
+ update(id: string, params: EntryUpdateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
35
+ /**
36
+ * Lists all entries in a memory layer
37
+ */
38
+ list(memoryLayerID: string, query?: EntryListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryEntriesCursorPagination, MemoryEntry>;
39
+ /**
40
+ * Deletes a memory entry from a memory layer
41
+ */
42
+ delete(id: string, params: EntryDeleteParams, options?: RequestOptions): APIPromise<void>;
43
+ }
44
+ export type MemoryEntriesCursorPagination = CursorPagination<MemoryEntry>;
45
+ /**
46
+ * MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
47
+ * by their key, which follows the S3 object key safe-character convention (see
48
+ * MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
49
+ * the same key may appear in multiple layers, in which case the LIFO stack-walk
50
+ * determines which one wins for a given objective.
51
+ *
52
+ * MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
53
+ * carry the entry body — callers that need the body must fetch the entry
54
+ * individually via GetMemoryEntry, which returns a MemoryEntryDetail.
55
+ */
56
+ export interface MemoryEntry {
57
+ /**
58
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
59
+ */
60
+ metadata: Shared.ResourceMetadata;
61
+ /**
62
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that identify
63
+ * and describe it, without the body. It appears on both the summary (MemoryEntry)
64
+ * and detail (MemoryEntryDetail) views.
65
+ */
66
+ spec: MemoryEntrySpec;
67
+ info?: MemoryEntryInfo;
68
+ }
69
+ /**
70
+ * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
71
+ * either inline content or a reference to a completed Upload; exactly one of the
72
+ * two must be set.
73
+ */
74
+ export interface MemoryEntryCreateSpec {
75
+ /**
76
+ * See MemoryEntrySpec.key for the full rule set. Same constraints apply here.
77
+ */
78
+ key: string;
79
+ /**
80
+ * Inline content, written directly into the entry.
81
+ */
82
+ content?: string;
83
+ description?: string;
84
+ title?: string;
85
+ /**
86
+ * ID of a COMPLETE Upload. The server reads the object from storage, copies its
87
+ * bytes into the entry, and marks the upload consumed.
88
+ */
89
+ uploadId?: string;
90
+ }
91
+ /**
92
+ * MemoryEntryDetail is the full representation of an entry, including the resolved
93
+ * content body. Returned by GetMemoryEntry, CreateMemoryEntry, and
94
+ * UpdateMemoryEntry.
95
+ */
96
+ export interface MemoryEntryDetail {
97
+ /**
98
+ * The resolved body of the entry. For entries created or updated via an upload_id,
99
+ * this is the ingested content, not the original upload handle. May be empty; an
100
+ * entry with only a key, title, and description is valid (e.g., a stub skill being
101
+ * drafted, or an entry where the frontmatter alone is the payload).
102
+ */
103
+ content: string;
104
+ /**
105
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
106
+ */
107
+ metadata: Shared.ResourceMetadata;
108
+ /**
109
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that identify
110
+ * and describe it, without the body. It appears on both the summary (MemoryEntry)
111
+ * and detail (MemoryEntryDetail) views.
112
+ */
113
+ spec: MemoryEntrySpec;
114
+ info?: MemoryEntryInfo;
115
+ }
116
+ export interface MemoryEntryInfo {
117
+ /**
118
+ * Profile represents a human user at the account level. Profiles are
119
+ * account-scoped resources that can be associated with multiple workspaces through
120
+ * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
121
+ */
122
+ createdBy?: AccountAPI.Profile;
123
+ /**
124
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
125
+ */
126
+ memoryLayer?: Shared.ResourceMetadata;
127
+ }
128
+ /**
129
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that identify
130
+ * and describe it, without the body. It appears on both the summary (MemoryEntry)
131
+ * and detail (MemoryEntryDetail) views.
132
+ */
133
+ export interface MemoryEntrySpec {
134
+ /**
135
+ * The lookup key for this entry within its layer. Must conform to the S3 object
136
+ * key safe-characters spec: ASCII alphanumerics and the special characters !, -,
137
+ * \_, ., \*, ', (, ), and /. Forward slashes may be used to suggest hierarchy
138
+ * (e.g., "skills/postmortem/write"), but lookups are flat — the key is a single
139
+ * opaque string, not a path.
140
+ *
141
+ * Additional rules enforced by the service:
142
+ *
143
+ * - May not begin or end with /
144
+ * - May not contain consecutive slashes (//)
145
+ * - May not begin with reserved prefixes (cadenya/, system/)
146
+ * - Case-sensitive
147
+ * - Unique within the parent layer
148
+ *
149
+ * For skills entries, this key is also the id the model passes to
150
+ * memory_load_skill when it decides to load the entry's content.
151
+ */
152
+ key: string;
153
+ /**
154
+ * One-line "when to use this" hint shown in the frontmatter manifest for skills
155
+ * entries. The model uses this to decide whether to load the body, so it should be
156
+ * written for the model as the audience. Ignored for layer types that do not
157
+ * advertise frontmatter.
158
+ */
159
+ description?: string;
160
+ /**
161
+ * Short human/LLM-readable title shown in the frontmatter manifest for skills
162
+ * entries. Ignored for layer types that do not advertise frontmatter.
163
+ */
164
+ title?: string;
165
+ }
166
+ /**
167
+ * MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry. Fields present
168
+ * in the request's update_mask are applied; unset fields are left alone. The
169
+ * source oneof is optional for updates — omit it to leave the body untouched, or
170
+ * set exactly one branch to replace it.
171
+ */
172
+ export interface MemoryEntryUpdateSpec {
173
+ content?: string;
174
+ description?: string;
175
+ key?: string;
176
+ title?: string;
177
+ uploadId?: string;
178
+ }
179
+ export interface EntryCreateParams {
180
+ /**
181
+ * CreateResourceMetadata contains the user-provided fields for creating a
182
+ * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
183
+ * profile_id, created_at) are excluded since they are set by the server.
184
+ */
185
+ metadata: Shared.CreateResourceMetadata;
186
+ /**
187
+ * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
188
+ * either inline content or a reference to a completed Upload; exactly one of the
189
+ * two must be set.
190
+ */
191
+ spec: MemoryEntryCreateSpec;
192
+ }
193
+ export interface EntryRetrieveParams {
194
+ memoryLayerId: string;
195
+ }
196
+ export interface EntryUpdateParams {
197
+ /**
198
+ * Path param
199
+ */
200
+ memoryLayerId: string;
201
+ /**
202
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
203
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
204
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
205
+ * server.
206
+ */
207
+ metadata?: Shared.UpdateResourceMetadata;
208
+ /**
209
+ * Body param: MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry.
210
+ * Fields present in the request's update_mask are applied; unset fields are left
211
+ * alone. The source oneof is optional for updates — omit it to leave the body
212
+ * untouched, or set exactly one branch to replace it.
213
+ */
214
+ spec?: MemoryEntryUpdateSpec;
215
+ /**
216
+ * Body param
217
+ */
218
+ updateMask?: string;
219
+ }
220
+ export interface EntryListParams extends CursorPaginationParams {
221
+ /**
222
+ * When set to true you may use more of your alloted API rate-limit
223
+ */
224
+ includeInfo?: boolean;
225
+ /**
226
+ * Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that
227
+ * hierarchy). Matches against the entry's key, not its name.
228
+ */
229
+ prefix?: string;
230
+ /**
231
+ * Sort order for results (asc or desc by creation time)
232
+ */
233
+ sortOrder?: string;
234
+ }
235
+ export interface EntryDeleteParams {
236
+ memoryLayerId: string;
237
+ }
238
+ export declare namespace Entries {
239
+ export { 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, };
240
+ }
241
+ //# sourceMappingURL=entries.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entries.d.mts","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":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AW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,sBAAsB,CAAC;IAEzC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;CACvB;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"}
@@ -0,0 +1,241 @@
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 { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
6
+ import { RequestOptions } from "../../internal/request-options.js";
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
18
+ */
19
+ export declare class Entries extends APIResource {
20
+ /**
21
+ * Creates a new entry in a memory layer. Returns the detail view, including the
22
+ * resolved content body.
23
+ */
24
+ create(memoryLayerID: string, body: EntryCreateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
25
+ /**
26
+ * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
27
+ * including the content body.
28
+ */
29
+ retrieve(id: string, params: EntryRetrieveParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
30
+ /**
31
+ * Updates a memory entry in a memory layer. Returns the detail view, including the
32
+ * resolved content body.
33
+ */
34
+ update(id: string, params: EntryUpdateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
35
+ /**
36
+ * Lists all entries in a memory layer
37
+ */
38
+ list(memoryLayerID: string, query?: EntryListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryEntriesCursorPagination, MemoryEntry>;
39
+ /**
40
+ * Deletes a memory entry from a memory layer
41
+ */
42
+ delete(id: string, params: EntryDeleteParams, options?: RequestOptions): APIPromise<void>;
43
+ }
44
+ export type MemoryEntriesCursorPagination = CursorPagination<MemoryEntry>;
45
+ /**
46
+ * MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
47
+ * by their key, which follows the S3 object key safe-character convention (see
48
+ * MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
49
+ * the same key may appear in multiple layers, in which case the LIFO stack-walk
50
+ * determines which one wins for a given objective.
51
+ *
52
+ * MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
53
+ * carry the entry body — callers that need the body must fetch the entry
54
+ * individually via GetMemoryEntry, which returns a MemoryEntryDetail.
55
+ */
56
+ export interface MemoryEntry {
57
+ /**
58
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
59
+ */
60
+ metadata: Shared.ResourceMetadata;
61
+ /**
62
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that identify
63
+ * and describe it, without the body. It appears on both the summary (MemoryEntry)
64
+ * and detail (MemoryEntryDetail) views.
65
+ */
66
+ spec: MemoryEntrySpec;
67
+ info?: MemoryEntryInfo;
68
+ }
69
+ /**
70
+ * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
71
+ * either inline content or a reference to a completed Upload; exactly one of the
72
+ * two must be set.
73
+ */
74
+ export interface MemoryEntryCreateSpec {
75
+ /**
76
+ * See MemoryEntrySpec.key for the full rule set. Same constraints apply here.
77
+ */
78
+ key: string;
79
+ /**
80
+ * Inline content, written directly into the entry.
81
+ */
82
+ content?: string;
83
+ description?: string;
84
+ title?: string;
85
+ /**
86
+ * ID of a COMPLETE Upload. The server reads the object from storage, copies its
87
+ * bytes into the entry, and marks the upload consumed.
88
+ */
89
+ uploadId?: string;
90
+ }
91
+ /**
92
+ * MemoryEntryDetail is the full representation of an entry, including the resolved
93
+ * content body. Returned by GetMemoryEntry, CreateMemoryEntry, and
94
+ * UpdateMemoryEntry.
95
+ */
96
+ export interface MemoryEntryDetail {
97
+ /**
98
+ * The resolved body of the entry. For entries created or updated via an upload_id,
99
+ * this is the ingested content, not the original upload handle. May be empty; an
100
+ * entry with only a key, title, and description is valid (e.g., a stub skill being
101
+ * drafted, or an entry where the frontmatter alone is the payload).
102
+ */
103
+ content: string;
104
+ /**
105
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
106
+ */
107
+ metadata: Shared.ResourceMetadata;
108
+ /**
109
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that identify
110
+ * and describe it, without the body. It appears on both the summary (MemoryEntry)
111
+ * and detail (MemoryEntryDetail) views.
112
+ */
113
+ spec: MemoryEntrySpec;
114
+ info?: MemoryEntryInfo;
115
+ }
116
+ export interface MemoryEntryInfo {
117
+ /**
118
+ * Profile represents a human user at the account level. Profiles are
119
+ * account-scoped resources that can be associated with multiple workspaces through
120
+ * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
121
+ */
122
+ createdBy?: AccountAPI.Profile;
123
+ /**
124
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
125
+ */
126
+ memoryLayer?: Shared.ResourceMetadata;
127
+ }
128
+ /**
129
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that identify
130
+ * and describe it, without the body. It appears on both the summary (MemoryEntry)
131
+ * and detail (MemoryEntryDetail) views.
132
+ */
133
+ export interface MemoryEntrySpec {
134
+ /**
135
+ * The lookup key for this entry within its layer. Must conform to the S3 object
136
+ * key safe-characters spec: ASCII alphanumerics and the special characters !, -,
137
+ * \_, ., \*, ', (, ), and /. Forward slashes may be used to suggest hierarchy
138
+ * (e.g., "skills/postmortem/write"), but lookups are flat — the key is a single
139
+ * opaque string, not a path.
140
+ *
141
+ * Additional rules enforced by the service:
142
+ *
143
+ * - May not begin or end with /
144
+ * - May not contain consecutive slashes (//)
145
+ * - May not begin with reserved prefixes (cadenya/, system/)
146
+ * - Case-sensitive
147
+ * - Unique within the parent layer
148
+ *
149
+ * For skills entries, this key is also the id the model passes to
150
+ * memory_load_skill when it decides to load the entry's content.
151
+ */
152
+ key: string;
153
+ /**
154
+ * One-line "when to use this" hint shown in the frontmatter manifest for skills
155
+ * entries. The model uses this to decide whether to load the body, so it should be
156
+ * written for the model as the audience. Ignored for layer types that do not
157
+ * advertise frontmatter.
158
+ */
159
+ description?: string;
160
+ /**
161
+ * Short human/LLM-readable title shown in the frontmatter manifest for skills
162
+ * entries. Ignored for layer types that do not advertise frontmatter.
163
+ */
164
+ title?: string;
165
+ }
166
+ /**
167
+ * MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry. Fields present
168
+ * in the request's update_mask are applied; unset fields are left alone. The
169
+ * source oneof is optional for updates — omit it to leave the body untouched, or
170
+ * set exactly one branch to replace it.
171
+ */
172
+ export interface MemoryEntryUpdateSpec {
173
+ content?: string;
174
+ description?: string;
175
+ key?: string;
176
+ title?: string;
177
+ uploadId?: string;
178
+ }
179
+ export interface EntryCreateParams {
180
+ /**
181
+ * CreateResourceMetadata contains the user-provided fields for creating a
182
+ * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
183
+ * profile_id, created_at) are excluded since they are set by the server.
184
+ */
185
+ metadata: Shared.CreateResourceMetadata;
186
+ /**
187
+ * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
188
+ * either inline content or a reference to a completed Upload; exactly one of the
189
+ * two must be set.
190
+ */
191
+ spec: MemoryEntryCreateSpec;
192
+ }
193
+ export interface EntryRetrieveParams {
194
+ memoryLayerId: string;
195
+ }
196
+ export interface EntryUpdateParams {
197
+ /**
198
+ * Path param
199
+ */
200
+ memoryLayerId: string;
201
+ /**
202
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
203
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
204
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
205
+ * server.
206
+ */
207
+ metadata?: Shared.UpdateResourceMetadata;
208
+ /**
209
+ * Body param: MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry.
210
+ * Fields present in the request's update_mask are applied; unset fields are left
211
+ * alone. The source oneof is optional for updates — omit it to leave the body
212
+ * untouched, or set exactly one branch to replace it.
213
+ */
214
+ spec?: MemoryEntryUpdateSpec;
215
+ /**
216
+ * Body param
217
+ */
218
+ updateMask?: string;
219
+ }
220
+ export interface EntryListParams extends CursorPaginationParams {
221
+ /**
222
+ * When set to true you may use more of your alloted API rate-limit
223
+ */
224
+ includeInfo?: boolean;
225
+ /**
226
+ * Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that
227
+ * hierarchy). Matches against the entry's key, not its name.
228
+ */
229
+ prefix?: string;
230
+ /**
231
+ * Sort order for results (asc or desc by creation time)
232
+ */
233
+ sortOrder?: string;
234
+ }
235
+ export interface EntryDeleteParams {
236
+ memoryLayerId: string;
237
+ }
238
+ export declare namespace Entries {
239
+ export { 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, };
240
+ }
241
+ //# sourceMappingURL=entries.d.ts.map
@@ -0,0 +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,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB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AAK,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"}
@@ -0,0 +1,63 @@
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.Entries = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const pagination_1 = require("../../core/pagination.js");
7
+ const headers_1 = require("../../internal/headers.js");
8
+ const path_1 = require("../../internal/utils/path.js");
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
20
+ */
21
+ class Entries extends resource_1.APIResource {
22
+ /**
23
+ * Creates a new entry in a memory layer. Returns the detail view, including the
24
+ * resolved content body.
25
+ */
26
+ create(memoryLayerID, body, options) {
27
+ return this._client.post((0, path_1.path) `/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
28
+ }
29
+ /**
30
+ * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
31
+ * including the content body.
32
+ */
33
+ retrieve(id, params, options) {
34
+ const { memoryLayerId } = params;
35
+ return this._client.get((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
36
+ }
37
+ /**
38
+ * Updates a memory entry in a memory layer. Returns the detail view, including the
39
+ * resolved content body.
40
+ */
41
+ 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 });
44
+ }
45
+ /**
46
+ * Lists all entries in a memory layer
47
+ */
48
+ list(memoryLayerID, query = {}, options) {
49
+ return this._client.getAPIList((0, path_1.path) `/v1/memory_layers/${memoryLayerID}/entries`, (pagination_1.CursorPagination), { query, ...options });
50
+ }
51
+ /**
52
+ * Deletes a memory entry from a memory layer
53
+ */
54
+ 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
+ });
60
+ }
61
+ }
62
+ exports.Entries = Entries;
63
+ //# sourceMappingURL=entries.js.map
@@ -0,0 +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,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,qBAAqB,aAAa,UAAU,EAChD,CAAA,6BAA6B,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,aAAa,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,aAAa,YAAY,EAAE,EAAE,EAAE;YACjF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAxDD,0BAwDC"}
@@ -0,0 +1,59 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { CursorPagination } from "../../core/pagination.mjs";
4
+ import { buildHeaders } from "../../internal/headers.mjs";
5
+ import { path } from "../../internal/utils/path.mjs";
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
17
+ */
18
+ export class Entries extends APIResource {
19
+ /**
20
+ * Creates a new entry in a memory layer. Returns the detail view, including the
21
+ * resolved content body.
22
+ */
23
+ create(memoryLayerID, body, options) {
24
+ return this._client.post(path `/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
25
+ }
26
+ /**
27
+ * Retrieves a memory entry by ID from a memory layer. Returns the detail view,
28
+ * including the content body.
29
+ */
30
+ retrieve(id, params, options) {
31
+ const { memoryLayerId } = params;
32
+ return this._client.get(path `/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
33
+ }
34
+ /**
35
+ * Updates a memory entry in a memory layer. Returns the detail view, including the
36
+ * resolved content body.
37
+ */
38
+ update(id, params, options) {
39
+ const { memoryLayerId, ...body } = params;
40
+ return this._client.patch(path `/v1/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
41
+ }
42
+ /**
43
+ * Lists all entries in a memory layer
44
+ */
45
+ list(memoryLayerID, query = {}, options) {
46
+ return this._client.getAPIList(path `/v1/memory_layers/${memoryLayerID}/entries`, (CursorPagination), { query, ...options });
47
+ }
48
+ /**
49
+ * Deletes a memory entry from a memory layer
50
+ */
51
+ 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
+ });
57
+ }
58
+ }
59
+ //# sourceMappingURL=entries.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entries.mjs","sourceRoot":"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,CAAC,EAAU,EAAE,MAAyB,EAAE,OAAwB;QACpE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,aAAa,YAAY,EAAE,EAAE,EAAE;YACjF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,3 @@
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";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +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"}
@@ -0,0 +1,3 @@
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";
3
+ //# sourceMappingURL=index.d.ts.map