@cadenya/cadenya 0.87.0 → 0.89.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 (50) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.ts +1 -1
  4. package/client.js +1 -1
  5. package/client.mjs +1 -1
  6. package/package.json +1 -1
  7. package/resources/agents/agents.d.mts +14 -0
  8. package/resources/agents/agents.d.mts.map +1 -1
  9. package/resources/agents/agents.d.ts +14 -0
  10. package/resources/agents/agents.d.ts.map +1 -1
  11. package/resources/agents/agents.js.map +1 -1
  12. package/resources/agents/agents.mjs.map +1 -1
  13. package/resources/agents/variations.d.mts +11 -22
  14. package/resources/agents/variations.d.mts.map +1 -1
  15. package/resources/agents/variations.d.ts +11 -22
  16. package/resources/agents/variations.d.ts.map +1 -1
  17. package/resources/agents/variations.js +1 -1
  18. package/resources/agents/variations.mjs +1 -1
  19. package/resources/bulk-workspace-resources/results.d.mts +8 -8
  20. package/resources/bulk-workspace-resources/results.d.ts +8 -8
  21. package/resources/memory-layers/entries.d.mts +3 -3
  22. package/resources/memory-layers/entries.d.ts +3 -3
  23. package/resources/memory-layers/entries.js +1 -1
  24. package/resources/memory-layers/entries.mjs +1 -1
  25. package/resources/memory-layers/memory-layers.d.mts +26 -6
  26. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  27. package/resources/memory-layers/memory-layers.d.ts +26 -6
  28. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  29. package/resources/memory-layers/memory-layers.js +1 -1
  30. package/resources/memory-layers/memory-layers.js.map +1 -1
  31. package/resources/memory-layers/memory-layers.mjs +1 -1
  32. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  33. package/resources/objectives/objectives.d.mts +71 -37
  34. package/resources/objectives/objectives.d.mts.map +1 -1
  35. package/resources/objectives/objectives.d.ts +71 -37
  36. package/resources/objectives/objectives.d.ts.map +1 -1
  37. package/resources/objectives/objectives.js.map +1 -1
  38. package/resources/objectives/objectives.mjs.map +1 -1
  39. package/src/client.ts +1 -1
  40. package/src/resources/agents/agents.ts +16 -0
  41. package/src/resources/agents/variations.ts +11 -24
  42. package/src/resources/bulk-workspace-resources/results.ts +8 -8
  43. package/src/resources/memory-layers/entries.ts +3 -3
  44. package/src/resources/memory-layers/memory-layers.ts +30 -6
  45. package/src/resources/objectives/objectives.ts +76 -37
  46. package/src/version.ts +1 -1
  47. package/version.d.mts +1 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
  50. package/version.mjs +1 -1
@@ -241,8 +241,8 @@ export interface ContextWindowCompacted {
241
241
 
242
242
  /**
243
243
  * MemoryRead is emitted each time the agent resolves a key against the memory
244
- * stack and loads an entry. Lookups that miss (key not found in any layer) do not
245
- * emit this event.
244
+ * cascade and loads an entry. Lookups that miss (key not found in any layer) do
245
+ * not emit this event.
246
246
  */
247
247
  export interface MemoryRead {
248
248
  /**
@@ -267,7 +267,7 @@ export interface MemoryRead {
267
267
 
268
268
  /**
269
269
  * MemoryReference identifies a memory layer or a specific entry within one, for
270
- * composition into a memory stack. Used on objectives (where entry pinning is
270
+ * composition into a memory cascade. Used on objectives (where entry pinning is
271
271
  * permitted).
272
272
  *
273
273
  * memory*layer_id accepts both the canonical form (memlyr*…) and the external-id
@@ -275,9 +275,10 @@ export interface MemoryRead {
275
275
  */
276
276
  export interface MemoryReference {
277
277
  /**
278
- * When set, pushes only this entry from memory_layer_id onto the stack behaves
279
- * as a single-entry layer (only this key resolves at this position). The entry
280
- * must belong to memory_layer_id; mismatches are rejected with InvalidArgument.
278
+ * When set, inserts only this entry from memory_layer_id into the cascade
279
+ * behaves as a single-entry layer (only this key resolves at this position). The
280
+ * entry must belong to memory_layer_id; mismatches are rejected with
281
+ * InvalidArgument.
281
282
  */
282
283
  memoryEntryId?: string;
283
284
 
@@ -330,6 +331,11 @@ export interface Objective {
330
331
  */
331
332
  data?: { [key: string]: unknown };
332
333
 
334
+ /**
335
+ * Episodic is used to configure the episodic memory for the objective
336
+ */
337
+ episodicMemory?: Objective.EpisodicMemory;
338
+
333
339
  /**
334
340
  * ObjectiveInfo provides read-only aggregated statistics about an objective's
335
341
  * execution
@@ -337,23 +343,21 @@ export interface Objective {
337
343
  info?: ObjectiveInfo;
338
344
 
339
345
  /**
340
- * Memory layers/entries to push onto this objective's memory stack on top of the
341
- * baseline stack inherited from the selected variation.
346
+ * Memory layers/entries layered over the baseline cascade inherited from the
347
+ * selected variation — element-level rules over inherited styles, in CSS terms.
342
348
  *
343
- * Array order is push order: the first element sits lower in the objective's
344
- * contribution to the stack; the LAST element ends up on top of the effective
345
- * stack. Entries pinned via memory_entry_id behave as single-entry layers at their
346
- * position.
349
+ * Array order is resolution order: EARLIER elements are more specific and are
350
+ * consulted first. Entries pinned via memory_entry_id behave as single-entry
351
+ * layers at their position.
347
352
  *
348
353
  * System-managed layers (e.g., episodic) cannot be referenced here; they attach
349
- * themselves automatically based on episodic_key.
354
+ * themselves automatically based on the episodic key.
350
355
  *
351
- * Stack size cap: the TOTAL effective stack (variation's memory layers
352
- *
353
- * - this field) must not exceed 10 entries. A request that would produce an
354
- * effective stack larger than 10 is rejected with InvalidArgument.
356
+ * Size cap: the TOTAL effective cascade (this field + the variation's memory layer
357
+ * assignments) must not exceed 10 entries. A request that would produce a larger
358
+ * cascade is rejected with InvalidArgument.
355
359
  */
356
- memoryStack?: Array<MemoryReference>;
360
+ memoryCascade?: Array<MemoryReference>;
357
361
 
358
362
  /**
359
363
  * The output of the objective, populated when the objective completes. Will match
@@ -385,6 +389,25 @@ export interface Objective {
385
389
  userData?: { [key: string]: unknown };
386
390
  }
387
391
 
392
+ export namespace Objective {
393
+ /**
394
+ * Episodic is used to configure the episodic memory for the objective
395
+ */
396
+ export interface EpisodicMemory {
397
+ /**
398
+ * The caller-supplied episodic key. Objectives created with the same key (for the
399
+ * same agent) share one episodic memory layer.
400
+ */
401
+ key?: string;
402
+
403
+ /**
404
+ * The episodic memory layer resolved (created or reused) for this objective's key.
405
+ * Populated by the system at objective creation.
406
+ */
407
+ memoryLayerId?: string;
408
+ }
409
+ }
410
+
388
411
  /**
389
412
  * ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation,
390
413
  * and (when applicable) schedule that an objective was started with.
@@ -502,8 +525,8 @@ export interface ObjectiveEventData {
502
525
 
503
526
  /**
504
527
  * MemoryRead is emitted each time the agent resolves a key against the memory
505
- * stack and loads an entry. Lookups that miss (key not found in any layer) do not
506
- * emit this event.
528
+ * cascade and loads an entry. Lookups that miss (key not found in any layer) do
529
+ * not emit this event.
507
530
  */
508
531
  memoryRead?: MemoryRead;
509
532
 
@@ -664,12 +687,14 @@ export interface ObjectiveInfo {
664
687
  currentContextWindowId: string;
665
688
 
666
689
  /**
667
- * The effective memory stack at objective creation time, flattened from the
668
- * variation's baseline plus Objective.memory_stack. Order is push order (last =
669
- * top). Returned on reads so clients can see exactly what stack the objective is
670
- * using without having to re-join variation state.
690
+ * The effective memory cascade at objective creation time: the episodic layer
691
+ * (when present), then Objective.memory_cascade, then the variation's baseline
692
+ * layers by ascending position. Order is resolution order index 0 is the most
693
+ * specific and is consulted first; the first layer containing a key wins. Returned
694
+ * on reads so clients can see exactly what the objective resolves against without
695
+ * re-joining variation state.
671
696
  */
672
- effectiveMemoryStack: Array<MemoryReference>;
697
+ effectiveMemoryCascade: Array<MemoryReference>;
673
698
 
674
699
  /**
675
700
  * Total number of context windows that this objective has generated
@@ -862,6 +887,11 @@ export interface ObjectiveCreateParams {
862
887
  */
863
888
  data: { [key: string]: unknown };
864
889
 
890
+ /**
891
+ * Episodic is used to configure the episodic memory for the objective
892
+ */
893
+ episodicMemory?: ObjectiveCreateParams.EpisodicMemory;
894
+
865
895
  /**
866
896
  * Optional override for the initial message sent to the agent. This becomes the
867
897
  * first user message in the LLM chat history. When not set, the selected
@@ -872,23 +902,21 @@ export interface ObjectiveCreateParams {
872
902
  initialMessage?: string;
873
903
 
874
904
  /**
875
- * Memory layers/entries to push onto this objective's memory stack on top of the
876
- * baseline stack inherited from the selected variation.
905
+ * Memory layers/entries layered over the baseline cascade inherited from the
906
+ * selected variation — element-level rules over inherited styles, in CSS terms.
877
907
  *
878
- * Array order is push order: the first element sits lower in the objective's
879
- * contribution to the stack; the LAST element ends up on top of the effective
880
- * stack. Entries pinned via memory_entry_id behave as single-entry layers at their
881
- * position.
908
+ * Array order is resolution order: EARLIER elements are more specific and are
909
+ * consulted first. Entries pinned via memory_entry_id behave as single-entry
910
+ * layers at their position.
882
911
  *
883
912
  * System-managed layers (e.g., episodic) cannot be referenced here; they attach
884
- * themselves automatically based on episodic_key.
885
- *
886
- * Stack size cap: the TOTAL effective stack (variation's memory layers
913
+ * themselves automatically based on the episodic key.
887
914
  *
888
- * - this field) must not exceed 10 entries. A request that would produce an
889
- * effective stack larger than 10 is rejected with InvalidArgument.
915
+ * Size cap: the TOTAL effective cascade (this field + the variation's memory layer
916
+ * assignments) must not exceed 10 entries. A request that would produce a larger
917
+ * cascade is rejected with InvalidArgument.
890
918
  */
891
- memoryStack?: Array<MemoryReference>;
919
+ memoryCascade?: Array<MemoryReference>;
892
920
 
893
921
  /**
894
922
  * CreateOperationMetadata contains the user-provided fields for creating an
@@ -918,6 +946,17 @@ export interface ObjectiveCreateParams {
918
946
  }
919
947
 
920
948
  export namespace ObjectiveCreateParams {
949
+ /**
950
+ * Episodic is used to configure the episodic memory for the objective
951
+ */
952
+ export interface EpisodicMemory {
953
+ /**
954
+ * The caller-supplied episodic key. Objectives created with the same key (for the
955
+ * same agent) share one episodic memory layer.
956
+ */
957
+ key?: string;
958
+ }
959
+
921
960
  export interface Secret {
922
961
  name?: string;
923
962
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.87.0'; // x-release-please-version
1
+ export const VERSION = '0.89.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.87.0";
1
+ export declare const VERSION = "0.89.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.87.0";
1
+ export declare const VERSION = "0.89.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.87.0'; // x-release-please-version
4
+ exports.VERSION = '0.89.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.87.0'; // x-release-please-version
1
+ export const VERSION = '0.89.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map