cadenya 0.13.0 → 0.14.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/cadenya/client.rb +2 -2
- data/lib/cadenya/models/agents/agent_variation_info.rb +2 -1
- data/lib/cadenya/models/agents/variation_add_memory_layer_params.rb +3 -2
- data/lib/cadenya/models/agents/variation_memory_layer_assignment.rb +7 -6
- data/lib/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_entry_outcome.rb +2 -2
- data/lib/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_layer_outcome.rb +4 -4
- data/lib/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_variation_memory_layer_outcome.rb +2 -2
- data/lib/cadenya/models/memory_layer.rb +4 -4
- data/lib/cadenya/models/memory_layer_spec.rb +1 -1
- data/lib/cadenya/models/memory_layers/memory_entry.rb +2 -2
- data/lib/cadenya/models/memory_read.rb +2 -2
- data/lib/cadenya/models/memory_reference.rb +6 -5
- data/lib/cadenya/models/objective.rb +14 -16
- data/lib/cadenya/models/objective_create_params.rb +14 -16
- data/lib/cadenya/models/objective_event_data.rb +2 -2
- data/lib/cadenya/models/objective_info.rb +11 -9
- data/lib/cadenya/resources/agents/variations.rb +2 -2
- data/lib/cadenya/resources/memory_layers/entries.rb +2 -2
- data/lib/cadenya/resources/memory_layers.rb +4 -4
- data/lib/cadenya/resources/objectives.rb +2 -2
- data/lib/cadenya/version.rb +1 -1
- data/rbi/cadenya/client.rbi +2 -2
- data/rbi/cadenya/models/agents/agent_variation_info.rbi +4 -2
- data/rbi/cadenya/models/agents/variation_add_memory_layer_params.rbi +4 -2
- data/rbi/cadenya/models/agents/variation_memory_layer_assignment.rbi +10 -8
- data/rbi/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_entry_outcome.rbi +4 -4
- data/rbi/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_memory_layer_outcome.rbi +8 -8
- data/rbi/cadenya/models/bulk_workspace_resources/bulk_workspace_apply_result_data_variation_memory_layer_outcome.rbi +4 -4
- data/rbi/cadenya/models/memory_layer.rbi +4 -4
- data/rbi/cadenya/models/memory_layer_spec.rbi +2 -2
- data/rbi/cadenya/models/memory_layers/memory_entry.rbi +2 -2
- data/rbi/cadenya/models/memory_read.rbi +2 -2
- data/rbi/cadenya/models/memory_reference.rbi +9 -7
- data/rbi/cadenya/models/objective.rbi +24 -28
- data/rbi/cadenya/models/objective_create_params.rbi +24 -28
- data/rbi/cadenya/models/objective_event_data.rbi +4 -4
- data/rbi/cadenya/models/objective_info.rbi +16 -12
- data/rbi/cadenya/resources/agents/variations.rbi +3 -3
- data/rbi/cadenya/resources/memory_layers/entries.rbi +2 -2
- data/rbi/cadenya/resources/memory_layers.rbi +4 -4
- data/rbi/cadenya/resources/objectives.rbi +11 -13
- data/sig/cadenya/models/objective.rbs +5 -5
- data/sig/cadenya/models/objective_create_params.rbs +5 -5
- data/sig/cadenya/models/objective_info.rbs +4 -4
- data/sig/cadenya/resources/objectives.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12a4c26346682e6c70e9ce503df02f091ce2073e37f522e372106696b66f8437
|
|
4
|
+
data.tar.gz: e799c37f8c84900db9cdf5d4cfc0bacd2b623c7d8ff0407b12d2d89b2bfc88ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be228543f1c57ae71379a60d35bc0ceae0aa24498041a3ffc69b14f6b55b6a5c34f4e232e453933c148149ce46a0d49cca232683f8218b0e1ec22eeed8591b07
|
|
7
|
+
data.tar.gz: 9d93340c52c5d99382179ed1b51804720fe7464c7b55ac7c604a868ddbe52103718bdaab4f1632ea73c201b8324aef318a3673caa3e7481d2dbc766d7fcd05f9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.0 (2026-06-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/cadenya/cadenya-ruby/compare/v0.13.0...v0.14.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([4b8c8d2](https://github.com/cadenya/cadenya-ruby/commit/4b8c8d26a3e7e55103f11eeeae4f32f7893288ce))
|
|
10
|
+
|
|
3
11
|
## 0.13.0 (2026-06-11)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.12.0...v0.13.0](https://github.com/cadenya/cadenya-ruby/compare/v0.12.0...v0.13.0)
|
data/README.md
CHANGED
data/lib/cadenya/client.rb
CHANGED
|
@@ -37,8 +37,8 @@ module Cadenya
|
|
|
37
37
|
attr_reader :objectives
|
|
38
38
|
|
|
39
39
|
# Manage memory layers and their entries. Layers are named containers that can be
|
|
40
|
-
# composed into an objective's memory
|
|
41
|
-
# layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
40
|
+
# composed into an objective's memory cascade; entries are the keyed values within
|
|
41
|
+
# a layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
42
42
|
# cannot be mutated through this API.
|
|
43
43
|
# @return [Cadenya::Resources::MemoryLayers]
|
|
44
44
|
attr_reader :memory_layers
|
|
@@ -36,7 +36,8 @@ module Cadenya
|
|
|
36
36
|
|
|
37
37
|
# @!attribute memory_layer_assignments
|
|
38
38
|
# Read-only list of memory layer assignments for this variation, returned in
|
|
39
|
-
# ascending `position` (
|
|
39
|
+
# ascending `position` (most specific first — resolution order). Capped at 10
|
|
40
|
+
# entries.
|
|
40
41
|
#
|
|
41
42
|
# @return [Array<Cadenya::Models::Agents::VariationMemoryLayerAssignment>, nil]
|
|
42
43
|
optional :memory_layer_assignments,
|
|
@@ -31,7 +31,8 @@ module Cadenya
|
|
|
31
31
|
optional :memory_layer_id, String, api_name: :memoryLayerId
|
|
32
32
|
|
|
33
33
|
# @!attribute position
|
|
34
|
-
# Position in the
|
|
34
|
+
# Position in the baseline cascade (lower = more specific). If omitted, the server
|
|
35
|
+
# appends at the most general end (max existing position + 1).
|
|
35
36
|
#
|
|
36
37
|
# @return [Integer, nil]
|
|
37
38
|
optional :position, Integer
|
|
@@ -48,7 +49,7 @@ module Cadenya
|
|
|
48
49
|
#
|
|
49
50
|
# @param memory_layer_id [String] Layer to attach. Accepts the canonical `memlyr_…` form or the `external_id:<valu
|
|
50
51
|
#
|
|
51
|
-
# @param position [Integer] Position in the
|
|
52
|
+
# @param position [Integer] Position in the baseline cascade (lower = more specific). If
|
|
52
53
|
#
|
|
53
54
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
54
55
|
end
|
|
@@ -17,9 +17,10 @@ module Cadenya
|
|
|
17
17
|
optional :memory_layer, -> { Cadenya::BareMetadata }, api_name: :memoryLayer
|
|
18
18
|
|
|
19
19
|
# @!attribute position
|
|
20
|
-
# Position in the variation's baseline
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# Position in the variation's baseline cascade. Position is specificity,
|
|
21
|
+
# CSS-style: a LOWER position is more specific and is consulted first; the
|
|
22
|
+
# highest-position assignment is the most general fallback. Gaps are fine — only
|
|
23
|
+
# relative position matters. Positions must be unique within a variation; a
|
|
23
24
|
# request that would collide with an existing assignment's position is rejected
|
|
24
25
|
# with InvalidArgument.
|
|
25
26
|
#
|
|
@@ -40,8 +41,8 @@ module Cadenya
|
|
|
40
41
|
# {Cadenya::Models::Agents::VariationMemoryLayerAssignment} for more details.
|
|
41
42
|
#
|
|
42
43
|
# VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a
|
|
43
|
-
# given position in the variation's baseline memory
|
|
44
|
-
# one assignment per memory_layer_id.
|
|
44
|
+
# given position in the variation's baseline memory cascade. A variation has at
|
|
45
|
+
# most one assignment per memory_layer_id.
|
|
45
46
|
#
|
|
46
47
|
# Variations only support whole-layer attachments — entry pinning is an
|
|
47
48
|
# objective-level capability.
|
|
@@ -50,7 +51,7 @@ module Cadenya
|
|
|
50
51
|
#
|
|
51
52
|
# @param memory_layer [Cadenya::Models::BareMetadata] BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
52
53
|
#
|
|
53
|
-
# @param position [Integer] Position in the variation's baseline
|
|
54
|
+
# @param position [Integer] Position in the variation's baseline cascade. Position is
|
|
54
55
|
end
|
|
55
56
|
end
|
|
56
57
|
end
|
|
@@ -31,8 +31,8 @@ module Cadenya
|
|
|
31
31
|
# MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
32
32
|
# by their key, which follows the S3 object key safe-character convention (see
|
|
33
33
|
# MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
34
|
-
# the same key may appear in multiple layers, in which case the
|
|
35
|
-
# determines which one wins for a given objective.
|
|
34
|
+
# the same key may appear in multiple layers, in which case the cascade walk
|
|
35
|
+
# determines which one wins for a given objective (most specific layer first).
|
|
36
36
|
#
|
|
37
37
|
# MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
38
38
|
# carry the entry body — callers that need the body must fetch the entry
|
|
@@ -29,11 +29,11 @@ module Cadenya
|
|
|
29
29
|
|
|
30
30
|
# @!attribute resource
|
|
31
31
|
# MemoryLayer is a named container of memory entries that can be composed into an
|
|
32
|
-
# objective's memory
|
|
33
|
-
# controls how its entries participate in the agent loop — see
|
|
34
|
-
# details.
|
|
32
|
+
# objective's memory cascade. Layers are workspace-scoped resources. The layer
|
|
33
|
+
# type controls how its entries participate in the agent loop — see
|
|
34
|
+
# MemoryLayerType for details.
|
|
35
35
|
#
|
|
36
|
-
# See "Memory
|
|
36
|
+
# See "Memory cascade composition" above for how layers compose at lookup time.
|
|
37
37
|
#
|
|
38
38
|
# @return [Cadenya::Models::MemoryLayer, nil]
|
|
39
39
|
optional :resource, -> { Cadenya::MemoryLayer }
|
|
@@ -24,8 +24,8 @@ module Cadenya
|
|
|
24
24
|
|
|
25
25
|
# @!attribute resource
|
|
26
26
|
# VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a
|
|
27
|
-
# given position in the variation's baseline memory
|
|
28
|
-
# one assignment per memory_layer_id.
|
|
27
|
+
# given position in the variation's baseline memory cascade. A variation has at
|
|
28
|
+
# most one assignment per memory_layer_id.
|
|
29
29
|
#
|
|
30
30
|
# Variations only support whole-layer attachments — entry pinning is an
|
|
31
31
|
# objective-level capability.
|
|
@@ -25,11 +25,11 @@ module Cadenya
|
|
|
25
25
|
# {Cadenya::Models::MemoryLayer} for more details.
|
|
26
26
|
#
|
|
27
27
|
# MemoryLayer is a named container of memory entries that can be composed into an
|
|
28
|
-
# objective's memory
|
|
29
|
-
# controls how its entries participate in the agent loop — see
|
|
30
|
-
# details.
|
|
28
|
+
# objective's memory cascade. Layers are workspace-scoped resources. The layer
|
|
29
|
+
# type controls how its entries participate in the agent loop — see
|
|
30
|
+
# MemoryLayerType for details.
|
|
31
31
|
#
|
|
32
|
-
# See "Memory
|
|
32
|
+
# See "Memory cascade composition" above for how layers compose at lookup time.
|
|
33
33
|
#
|
|
34
34
|
# @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
35
35
|
#
|
|
@@ -40,7 +40,7 @@ module Cadenya
|
|
|
40
40
|
# @!attribute system_managed
|
|
41
41
|
# Server-set. True for layers managed by the system (e.g., episodic layers created
|
|
42
42
|
# automatically when an objective uses an episodic_key). System-managed layers
|
|
43
|
-
# cannot be assigned to objective
|
|
43
|
+
# cannot be assigned to objective cascades via the API and cannot be mutated by
|
|
44
44
|
# clients — their lifecycle is controlled entirely by the runtime.
|
|
45
45
|
#
|
|
46
46
|
# @return [Boolean, nil]
|
|
@@ -31,8 +31,8 @@ module Cadenya
|
|
|
31
31
|
# MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
32
32
|
# by their key, which follows the S3 object key safe-character convention (see
|
|
33
33
|
# MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
34
|
-
# the same key may appear in multiple layers, in which case the
|
|
35
|
-
# determines which one wins for a given objective.
|
|
34
|
+
# the same key may appear in multiple layers, in which case the cascade walk
|
|
35
|
+
# determines which one wins for a given objective (most specific layer first).
|
|
36
36
|
#
|
|
37
37
|
# MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
38
38
|
# carry the entry body — callers that need the body must fetch the entry
|
|
@@ -30,8 +30,8 @@ module Cadenya
|
|
|
30
30
|
# {Cadenya::Models::MemoryRead} for more details.
|
|
31
31
|
#
|
|
32
32
|
# MemoryRead is emitted each time the agent resolves a key against the memory
|
|
33
|
-
#
|
|
34
|
-
# emit this event.
|
|
33
|
+
# cascade and loads an entry. Lookups that miss (key not found in any layer) do
|
|
34
|
+
# not emit this event.
|
|
35
35
|
#
|
|
36
36
|
# @param memory_entry_id [String] The specific entry that was read.
|
|
37
37
|
#
|
|
@@ -4,9 +4,10 @@ module Cadenya
|
|
|
4
4
|
module Models
|
|
5
5
|
class MemoryReference < Cadenya::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute memory_entry_id
|
|
7
|
-
# When set,
|
|
8
|
-
# as a single-entry layer (only this key resolves at this position). The
|
|
9
|
-
# must belong to memory_layer_id; mismatches are rejected with
|
|
7
|
+
# When set, inserts only this entry from memory_layer_id into the cascade —
|
|
8
|
+
# behaves as a single-entry layer (only this key resolves at this position). The
|
|
9
|
+
# entry must belong to memory_layer_id; mismatches are rejected with
|
|
10
|
+
# InvalidArgument.
|
|
10
11
|
#
|
|
11
12
|
# @return [String, nil]
|
|
12
13
|
optional :memory_entry_id, String, api_name: :memoryEntryId
|
|
@@ -21,13 +22,13 @@ module Cadenya
|
|
|
21
22
|
# {Cadenya::Models::MemoryReference} for more details.
|
|
22
23
|
#
|
|
23
24
|
# MemoryReference identifies a memory layer or a specific entry within one, for
|
|
24
|
-
# composition into a memory
|
|
25
|
+
# composition into a memory cascade. Used on objectives (where entry pinning is
|
|
25
26
|
# permitted).
|
|
26
27
|
#
|
|
27
28
|
# memory*layer_id accepts both the canonical form (memlyr*…) and the external-id
|
|
28
29
|
# form (external_id:my-custom-id). The same applies to memory_entry_id when set.
|
|
29
30
|
#
|
|
30
|
-
# @param memory_entry_id [String] When set,
|
|
31
|
+
# @param memory_entry_id [String] When set, inserts only this entry from memory_layer_id into the cascade —
|
|
31
32
|
#
|
|
32
33
|
# @param memory_layer_id [String]
|
|
33
34
|
end
|
|
@@ -24,27 +24,25 @@ module Cadenya
|
|
|
24
24
|
# @return [Cadenya::Models::Objective::EpisodicMemory, nil]
|
|
25
25
|
optional :episodic_memory, -> { Cadenya::Objective::EpisodicMemory }, api_name: :episodicMemory
|
|
26
26
|
|
|
27
|
-
# @!attribute
|
|
28
|
-
# Memory layers/entries
|
|
29
|
-
#
|
|
27
|
+
# @!attribute memory_cascade
|
|
28
|
+
# Memory layers/entries layered over the baseline cascade inherited from the
|
|
29
|
+
# selected variation — element-level rules over inherited styles, in CSS terms.
|
|
30
30
|
#
|
|
31
|
-
# Array order is
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# position.
|
|
31
|
+
# Array order is resolution order: EARLIER elements are more specific and are
|
|
32
|
+
# consulted first. Entries pinned via memory_entry_id behave as single-entry
|
|
33
|
+
# layers at their position.
|
|
35
34
|
#
|
|
36
35
|
# System-managed layers (e.g., episodic) cannot be referenced here; they attach
|
|
37
|
-
# themselves automatically based on
|
|
36
|
+
# themselves automatically based on the episodic key.
|
|
38
37
|
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
# effective stack larger than 10 is rejected with InvalidArgument.
|
|
38
|
+
# Size cap: the TOTAL effective cascade (this field + the variation's memory layer
|
|
39
|
+
# assignments) must not exceed 10 entries. A request that would produce a larger
|
|
40
|
+
# cascade is rejected with InvalidArgument.
|
|
43
41
|
#
|
|
44
42
|
# @return [Array<Cadenya::Models::MemoryReference>, nil]
|
|
45
|
-
optional :
|
|
43
|
+
optional :memory_cascade,
|
|
46
44
|
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
|
|
47
|
-
api_name: :
|
|
45
|
+
api_name: :memoryCascade
|
|
48
46
|
|
|
49
47
|
# @!attribute secrets
|
|
50
48
|
# Secrets that can be used in the headers for tool calls using the secret
|
|
@@ -116,7 +114,7 @@ module Cadenya
|
|
|
116
114
|
api_name: :userData
|
|
117
115
|
end
|
|
118
116
|
|
|
119
|
-
# @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, episodic_memory: nil, info: nil,
|
|
117
|
+
# @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, episodic_memory: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, user_data: nil)
|
|
120
118
|
# Some parameter documentations has been truncated, see
|
|
121
119
|
# {Cadenya::Models::Objective} for more details.
|
|
122
120
|
#
|
|
@@ -140,7 +138,7 @@ module Cadenya
|
|
|
140
138
|
#
|
|
141
139
|
# @param info [Cadenya::Models::ObjectiveInfo] ObjectiveInfo provides read-only aggregated statistics about an objective's exec
|
|
142
140
|
#
|
|
143
|
-
# @param
|
|
141
|
+
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
144
142
|
#
|
|
145
143
|
# @param output [Hash{Symbol=>Object}] The output of the objective, populated when the objective completes. Will match
|
|
146
144
|
#
|
|
@@ -42,27 +42,25 @@ module Cadenya
|
|
|
42
42
|
# @return [String, nil]
|
|
43
43
|
optional :initial_message, String, api_name: :initialMessage
|
|
44
44
|
|
|
45
|
-
# @!attribute
|
|
46
|
-
# Memory layers/entries
|
|
47
|
-
#
|
|
45
|
+
# @!attribute memory_cascade
|
|
46
|
+
# Memory layers/entries layered over the baseline cascade inherited from the
|
|
47
|
+
# selected variation — element-level rules over inherited styles, in CSS terms.
|
|
48
48
|
#
|
|
49
|
-
# Array order is
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
# position.
|
|
49
|
+
# Array order is resolution order: EARLIER elements are more specific and are
|
|
50
|
+
# consulted first. Entries pinned via memory_entry_id behave as single-entry
|
|
51
|
+
# layers at their position.
|
|
53
52
|
#
|
|
54
53
|
# System-managed layers (e.g., episodic) cannot be referenced here; they attach
|
|
55
|
-
# themselves automatically based on
|
|
54
|
+
# themselves automatically based on the episodic key.
|
|
56
55
|
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
# effective stack larger than 10 is rejected with InvalidArgument.
|
|
56
|
+
# Size cap: the TOTAL effective cascade (this field + the variation's memory layer
|
|
57
|
+
# assignments) must not exceed 10 entries. A request that would produce a larger
|
|
58
|
+
# cascade is rejected with InvalidArgument.
|
|
61
59
|
#
|
|
62
60
|
# @return [Array<Cadenya::Models::MemoryReference>, nil]
|
|
63
|
-
optional :
|
|
61
|
+
optional :memory_cascade,
|
|
64
62
|
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
|
|
65
|
-
api_name: :
|
|
63
|
+
api_name: :memoryCascade
|
|
66
64
|
|
|
67
65
|
# @!attribute metadata
|
|
68
66
|
# CreateOperationMetadata contains the user-provided fields for creating an
|
|
@@ -96,7 +94,7 @@ module Cadenya
|
|
|
96
94
|
# @return [String, nil]
|
|
97
95
|
optional :variation_id, String, api_name: :variationId
|
|
98
96
|
|
|
99
|
-
# @!method initialize(workspace_id:, agent_id:, data:, episodic_memory: nil, initial_message: nil,
|
|
97
|
+
# @!method initialize(workspace_id:, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_cascade: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
|
|
100
98
|
# Some parameter documentations has been truncated, see
|
|
101
99
|
# {Cadenya::Models::ObjectiveCreateParams} for more details.
|
|
102
100
|
#
|
|
@@ -110,7 +108,7 @@ module Cadenya
|
|
|
110
108
|
#
|
|
111
109
|
# @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
|
|
112
110
|
#
|
|
113
|
-
# @param
|
|
111
|
+
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
114
112
|
#
|
|
115
113
|
# @param metadata [Cadenya::Models::CreateOperationMetadata] CreateOperationMetadata contains the user-provided fields for creating
|
|
116
114
|
#
|
|
@@ -38,8 +38,8 @@ module Cadenya
|
|
|
38
38
|
|
|
39
39
|
# @!attribute memory_read
|
|
40
40
|
# MemoryRead is emitted each time the agent resolves a key against the memory
|
|
41
|
-
#
|
|
42
|
-
# emit this event.
|
|
41
|
+
# cascade and loads an entry. Lookups that miss (key not found in any layer) do
|
|
42
|
+
# not emit this event.
|
|
43
43
|
#
|
|
44
44
|
# @return [Cadenya::Models::MemoryRead, nil]
|
|
45
45
|
optional :memory_read, -> { Cadenya::MemoryRead }, api_name: :memoryRead
|
|
@@ -31,16 +31,18 @@ module Cadenya
|
|
|
31
31
|
# @return [String]
|
|
32
32
|
required :current_context_window_id, String, api_name: :currentContextWindowId
|
|
33
33
|
|
|
34
|
-
# @!attribute
|
|
35
|
-
# The effective memory
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
34
|
+
# @!attribute effective_memory_cascade
|
|
35
|
+
# The effective memory cascade at objective creation time: the episodic layer
|
|
36
|
+
# (when present), then Objective.memory_cascade, then the variation's baseline
|
|
37
|
+
# layers by ascending position. Order is resolution order — index 0 is the most
|
|
38
|
+
# specific and is consulted first; the first layer containing a key wins. Returned
|
|
39
|
+
# on reads so clients can see exactly what the objective resolves against without
|
|
40
|
+
# re-joining variation state.
|
|
39
41
|
#
|
|
40
42
|
# @return [Array<Cadenya::Models::MemoryReference>]
|
|
41
|
-
required :
|
|
43
|
+
required :effective_memory_cascade,
|
|
42
44
|
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
|
|
43
|
-
api_name: :
|
|
45
|
+
api_name: :effectiveMemoryCascade
|
|
44
46
|
|
|
45
47
|
# @!attribute total_context_windows
|
|
46
48
|
# Total number of context windows that this objective has generated
|
|
@@ -80,7 +82,7 @@ module Cadenya
|
|
|
80
82
|
required :total_tool_calls, Integer, api_name: :totalToolCalls
|
|
81
83
|
end
|
|
82
84
|
|
|
83
|
-
# @!method initialize(agent:, agent_variation:, created_by:, current_context_window_id:,
|
|
85
|
+
# @!method initialize(agent:, agent_variation:, created_by:, current_context_window_id:, effective_memory_cascade:, total_context_windows:, total_events:, total_input_tokens:, total_iterations:, total_output_tokens:, total_tool_calls:)
|
|
84
86
|
# Some parameter documentations has been truncated, see
|
|
85
87
|
# {Cadenya::Models::ObjectiveInfo} for more details.
|
|
86
88
|
#
|
|
@@ -95,7 +97,7 @@ module Cadenya
|
|
|
95
97
|
#
|
|
96
98
|
# @param current_context_window_id [String] ID of the objective's current (most recent) context window. Hydrated on
|
|
97
99
|
#
|
|
98
|
-
# @param
|
|
100
|
+
# @param effective_memory_cascade [Array<Cadenya::Models::MemoryReference>] The effective memory cascade at objective creation time: the
|
|
99
101
|
#
|
|
100
102
|
# @param total_context_windows [Integer] Total number of context windows that this objective has generated
|
|
101
103
|
#
|
|
@@ -256,7 +256,7 @@ module Cadenya
|
|
|
256
256
|
# {Cadenya::Models::Agents::VariationAddMemoryLayerParams} for more details.
|
|
257
257
|
#
|
|
258
258
|
# Attaches a memory layer to a variation at a given position in the variation's
|
|
259
|
-
# baseline memory
|
|
259
|
+
# baseline memory cascade.
|
|
260
260
|
#
|
|
261
261
|
# @overload add_memory_layer(variation_id, workspace_id:, agent_id:, memory_layer_id: nil, position: nil, request_options: {})
|
|
262
262
|
#
|
|
@@ -268,7 +268,7 @@ module Cadenya
|
|
|
268
268
|
#
|
|
269
269
|
# @param memory_layer_id [String] Body param: Layer to attach. Accepts the canonical `memlyr_…` form or the `exter
|
|
270
270
|
#
|
|
271
|
-
# @param position [Integer] Body param: Position in the
|
|
271
|
+
# @param position [Integer] Body param: Position in the baseline cascade (lower = more specific). If
|
|
272
272
|
#
|
|
273
273
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
274
274
|
#
|
|
@@ -4,8 +4,8 @@ module Cadenya
|
|
|
4
4
|
module Resources
|
|
5
5
|
class MemoryLayers
|
|
6
6
|
# Manage memory layers and their entries. Layers are named containers that can be
|
|
7
|
-
# composed into an objective's memory
|
|
8
|
-
# layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
7
|
+
# composed into an objective's memory cascade; entries are the keyed values within
|
|
8
|
+
# a layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
9
9
|
# cannot be mutated through this API.
|
|
10
10
|
class Entries
|
|
11
11
|
# Some parameter documentations has been truncated, see
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
module Cadenya
|
|
4
4
|
module Resources
|
|
5
5
|
# Manage memory layers and their entries. Layers are named containers that can be
|
|
6
|
-
# composed into an objective's memory
|
|
7
|
-
# layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
6
|
+
# composed into an objective's memory cascade; entries are the keyed values within
|
|
7
|
+
# a layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
8
8
|
# cannot be mutated through this API.
|
|
9
9
|
class MemoryLayers
|
|
10
10
|
# Manage memory layers and their entries. Layers are named containers that can be
|
|
11
|
-
# composed into an objective's memory
|
|
12
|
-
# layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
11
|
+
# composed into an objective's memory cascade; entries are the keyed values within
|
|
12
|
+
# a layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
13
13
|
# cannot be mutated through this API.
|
|
14
14
|
# @return [Cadenya::Resources::MemoryLayers::Entries]
|
|
15
15
|
attr_reader :entries
|
|
@@ -20,7 +20,7 @@ module Cadenya
|
|
|
20
20
|
#
|
|
21
21
|
# Creates a new objective in the workspace
|
|
22
22
|
#
|
|
23
|
-
# @overload create(workspace_id, agent_id:, data:, episodic_memory: nil, initial_message: nil,
|
|
23
|
+
# @overload create(workspace_id, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_cascade: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
|
|
24
24
|
#
|
|
25
25
|
# @param workspace_id [String]
|
|
26
26
|
#
|
|
@@ -32,7 +32,7 @@ module Cadenya
|
|
|
32
32
|
#
|
|
33
33
|
# @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
|
|
34
34
|
#
|
|
35
|
-
# @param
|
|
35
|
+
# @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
|
|
36
36
|
#
|
|
37
37
|
# @param metadata [Cadenya::Models::CreateOperationMetadata] CreateOperationMetadata contains the user-provided fields for creating
|
|
38
38
|
#
|
data/lib/cadenya/version.rb
CHANGED
data/rbi/cadenya/client.rbi
CHANGED
|
@@ -32,8 +32,8 @@ module Cadenya
|
|
|
32
32
|
attr_reader :objectives
|
|
33
33
|
|
|
34
34
|
# Manage memory layers and their entries. Layers are named containers that can be
|
|
35
|
-
# composed into an objective's memory
|
|
36
|
-
# layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
35
|
+
# composed into an objective's memory cascade; entries are the keyed values within
|
|
36
|
+
# a layer. System-managed layers (e.g., episodic layers created by the runtime)
|
|
37
37
|
# cannot be mutated through this API.
|
|
38
38
|
sig { returns(Cadenya::Resources::MemoryLayers) }
|
|
39
39
|
attr_reader :memory_layers
|
|
@@ -54,7 +54,8 @@ module Cadenya
|
|
|
54
54
|
attr_writer :assignments
|
|
55
55
|
|
|
56
56
|
# Read-only list of memory layer assignments for this variation, returned in
|
|
57
|
-
# ascending `position` (
|
|
57
|
+
# ascending `position` (most specific first — resolution order). Capped at 10
|
|
58
|
+
# entries.
|
|
58
59
|
sig do
|
|
59
60
|
returns(
|
|
60
61
|
T.nilable(T::Array[Cadenya::Agents::VariationMemoryLayerAssignment])
|
|
@@ -133,7 +134,8 @@ module Cadenya
|
|
|
133
134
|
# Total number of objective feedbacks received for this variation
|
|
134
135
|
feedback_count: nil,
|
|
135
136
|
# Read-only list of memory layer assignments for this variation, returned in
|
|
136
|
-
# ascending `position` (
|
|
137
|
+
# ascending `position` (most specific first — resolution order). Capped at 10
|
|
138
|
+
# entries.
|
|
137
139
|
memory_layer_assignments: nil,
|
|
138
140
|
# Count of memory layer assignments.
|
|
139
141
|
memory_layer_count: nil,
|
|
@@ -32,7 +32,8 @@ module Cadenya
|
|
|
32
32
|
sig { params(memory_layer_id: String).void }
|
|
33
33
|
attr_writer :memory_layer_id
|
|
34
34
|
|
|
35
|
-
# Position in the
|
|
35
|
+
# Position in the baseline cascade (lower = more specific). If omitted, the server
|
|
36
|
+
# appends at the most general end (max existing position + 1).
|
|
36
37
|
sig { returns(T.nilable(Integer)) }
|
|
37
38
|
attr_reader :position
|
|
38
39
|
|
|
@@ -56,7 +57,8 @@ module Cadenya
|
|
|
56
57
|
# Layer to attach. Accepts the canonical `memlyr_…` form or the
|
|
57
58
|
# `external_id:<value>` form.
|
|
58
59
|
memory_layer_id: nil,
|
|
59
|
-
# Position in the
|
|
60
|
+
# Position in the baseline cascade (lower = more specific). If omitted, the server
|
|
61
|
+
# appends at the most general end (max existing position + 1).
|
|
60
62
|
position: nil,
|
|
61
63
|
request_options: {}
|
|
62
64
|
)
|
|
@@ -24,9 +24,10 @@ module Cadenya
|
|
|
24
24
|
sig { params(memory_layer: Cadenya::BareMetadata::OrHash).void }
|
|
25
25
|
attr_writer :memory_layer
|
|
26
26
|
|
|
27
|
-
# Position in the variation's baseline
|
|
28
|
-
#
|
|
29
|
-
#
|
|
27
|
+
# Position in the variation's baseline cascade. Position is specificity,
|
|
28
|
+
# CSS-style: a LOWER position is more specific and is consulted first; the
|
|
29
|
+
# highest-position assignment is the most general fallback. Gaps are fine — only
|
|
30
|
+
# relative position matters. Positions must be unique within a variation; a
|
|
30
31
|
# request that would collide with an existing assignment's position is rejected
|
|
31
32
|
# with InvalidArgument.
|
|
32
33
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -44,8 +45,8 @@ module Cadenya
|
|
|
44
45
|
attr_writer :id
|
|
45
46
|
|
|
46
47
|
# VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a
|
|
47
|
-
# given position in the variation's baseline memory
|
|
48
|
-
# one assignment per memory_layer_id.
|
|
48
|
+
# given position in the variation's baseline memory cascade. A variation has at
|
|
49
|
+
# most one assignment per memory_layer_id.
|
|
49
50
|
#
|
|
50
51
|
# Variations only support whole-layer attachments — entry pinning is an
|
|
51
52
|
# objective-level capability.
|
|
@@ -67,9 +68,10 @@ module Cadenya
|
|
|
67
68
|
# to an objective. Both fields are server-populated; clients provide IDs through
|
|
68
69
|
# sibling fields rather than by constructing a BareMetadata themselves.
|
|
69
70
|
memory_layer: nil,
|
|
70
|
-
# Position in the variation's baseline
|
|
71
|
-
#
|
|
72
|
-
#
|
|
71
|
+
# Position in the variation's baseline cascade. Position is specificity,
|
|
72
|
+
# CSS-style: a LOWER position is more specific and is consulted first; the
|
|
73
|
+
# highest-position assignment is the most general fallback. Gaps are fine — only
|
|
74
|
+
# relative position matters. Positions must be unique within a variation; a
|
|
73
75
|
# request that would collide with an existing assignment's position is rejected
|
|
74
76
|
# with InvalidArgument.
|
|
75
77
|
position: nil
|
|
@@ -61,8 +61,8 @@ module Cadenya
|
|
|
61
61
|
# MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
62
62
|
# by their key, which follows the S3 object key safe-character convention (see
|
|
63
63
|
# MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
64
|
-
# the same key may appear in multiple layers, in which case the
|
|
65
|
-
# determines which one wins for a given objective.
|
|
64
|
+
# the same key may appear in multiple layers, in which case the cascade walk
|
|
65
|
+
# determines which one wins for a given objective (most specific layer first).
|
|
66
66
|
#
|
|
67
67
|
# MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
68
68
|
# carry the entry body — callers that need the body must fetch the entry
|
|
@@ -98,8 +98,8 @@ module Cadenya
|
|
|
98
98
|
# MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
99
99
|
# by their key, which follows the S3 object key safe-character convention (see
|
|
100
100
|
# MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
101
|
-
# the same key may appear in multiple layers, in which case the
|
|
102
|
-
# determines which one wins for a given objective.
|
|
101
|
+
# the same key may appear in multiple layers, in which case the cascade walk
|
|
102
|
+
# determines which one wins for a given objective (most specific layer first).
|
|
103
103
|
#
|
|
104
104
|
# MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
105
105
|
# carry the entry body — callers that need the body must fetch the entry
|