Class: Cadenya::Models::Agents::VariationMemoryLayerAssignment

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/agents/variation_memory_layer_assignment.rb,
sig/cadenya/models/agents/variation_memory_layer_assignment.rbs

Overview

See Also:

  • Cadenya::Resources::Agents::Variations#add_memory_layer

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: nil, memory_layer: nil, position: nil) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::Agents::VariationMemoryLayerAssignment for more details.

VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a given position in the variation's baseline memory cascade. A variation has at most one assignment per memory_layer_id.

Variations only support whole-layer attachments — entry pinning is an objective-level capability.

Parameters:

  • id (String) (defaults to: nil)

    Assignment row id — handle for removing the assignment. Distinct

  • memory_layer (Cadenya::Models::BareMetadata) (defaults to: nil)

    BareMetadata contains the minimal metadata for a resource: the ID and an

  • position (Integer) (defaults to: nil)

    Position in the variation's baseline cascade. Position is



# File 'lib/cadenya/models/agents/variation_memory_layer_assignment.rb', line 39

Instance Attribute Details

#idString? (readonly)

Returns the value of attribute id.

Returns:

  • (String, nil)


16
17
18
# File 'sig/cadenya/models/agents/variation_memory_layer_assignment.rbs', line 16

def id
  @id
end

#memory_layerCadenya::Models::BareMetadata?

BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.



17
# File 'lib/cadenya/models/agents/variation_memory_layer_assignment.rb', line 17

optional :memory_layer, -> { Cadenya::BareMetadata }, api_name: :memoryLayer

#positionInteger?

Position in the variation's baseline cascade. Position is specificity, CSS-style: a LOWER position is more specific and is consulted first; the highest-position assignment is the most general fallback. Gaps are fine — only relative position matters. Positions must be unique within a variation; a request that would collide with an existing assignment's position is rejected with InvalidArgument.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


28
# File 'lib/cadenya/models/agents/variation_memory_layer_assignment.rb', line 28

optional :position, Integer

Instance Method Details

#id=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


18
# File 'sig/cadenya/models/agents/variation_memory_layer_assignment.rbs', line 18

def id=: (String) -> String

#to_hash{

Returns:

  • ({)


26
# File 'sig/cadenya/models/agents/variation_memory_layer_assignment.rbs', line 26

def to_hash: -> {