Class: Cadenya::Models::WidgetSessionSpec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::WidgetSessionSpec
- Defined in:
- lib/cadenya/models/widget_session_spec.rb,
sig/cadenya/models/widget_session_spec.rbs
Instance Attribute Summary collapse
-
#expires_at ⇒ Time?
Hard session expiry.
-
#pinned_parameters ⇒ Hash{Symbol=>String}?
Parameters forced onto tool calls made by this session's conversations.
-
#subject ⇒ Cadenya::Models::SubjectAssertion?
SubjectAssertion identifies a person within a tenant in the customer's own namespace — typically their user id.
-
#tenant ⇒ Cadenya::Models::TenantAssertion?
TenantAssertion identifies a tenant in the customer's own namespace — their org, company, or team identifier for an end user.
-
#token ⇒ String?
readonly
Returns the value of attribute token.
-
#token_expires_at ⇒ Time?
readonly
Returns the value of attribute token_expires_at.
-
#widget_id ⇒ String
Widget this session is minted against.
Instance Method Summary collapse
-
#initialize(widget_id:, token: nil, expires_at: nil, pinned_parameters: nil, subject: nil, tenant: nil, token_expires_at: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see WidgetSessionSpec for more details.
- #to_hash ⇒ {
- #token ⇒ String readonly
- #token_expires_at ⇒ Time readonly
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(widget_id:, token: nil, expires_at: nil, pinned_parameters: nil, subject: nil, tenant: nil, token_expires_at: nil) ⇒ Object
Some parameter documentations has been truncated, see Cadenya::Models::WidgetSessionSpec for more details.
WidgetSessionSpec is the configuration of a session, fixed at mint.
|
|
# File 'lib/cadenya/models/widget_session_spec.rb', line 68
|
Instance Attribute Details
#expires_at ⇒ Time?
Hard session expiry. Tokens never outlive it; after it passes the session transitions to STATE_EXPIRED. Defaults to a server-chosen horizon when unset.
18 |
# File 'lib/cadenya/models/widget_session_spec.rb', line 18 optional :expires_at, Time, api_name: :expiresAt |
#pinned_parameters ⇒ Hash{Symbol=>String}?
Parameters forced onto tool calls made by this session's conversations. A pinned parameter is an overlay on a tool's JSON schema: the parameter is removed from what the LLM sees, and its value is always overwritten server-side with the pinned value — so the model cannot be tricked into calling a tool with a different id than the one the session was minted for (e.g. pin "workspaceId" for an OpenAPI tool with a /workspaces/workspaceId path). Flows to every objective the session creates.
30 |
# File 'lib/cadenya/models/widget_session_spec.rb', line 30 optional :pinned_parameters, Cadenya::Internal::Type::HashOf[String], api_name: :pinnedParameters |
#subject ⇒ Cadenya::Models::SubjectAssertion?
SubjectAssertion identifies a person within a tenant in the customer's own namespace — typically their user id. Asserting a subject upserts the subject record under the asserted tenant and associates the created resource with it. A subject assertion is only valid alongside a tenant assertion: subject identifiers are scoped to their tenant.
40 |
# File 'lib/cadenya/models/widget_session_spec.rb', line 40 optional :subject, -> { Cadenya::SubjectAssertion } |
#tenant ⇒ Cadenya::Models::TenantAssertion?
TenantAssertion identifies a tenant in the customer's own namespace — their org,
company, or team identifier for an end user. Asserting a tenant upserts the
tenant record in the workspace (keyed on id as the tenant's external_id) and
associates the created resource with it.
49 |
# File 'lib/cadenya/models/widget_session_spec.rb', line 49 optional :tenant, -> { Cadenya::TenantAssertion } |
#token ⇒ String? (readonly)
Returns the value of attribute token.
33 34 35 |
# File 'sig/cadenya/models/widget_session_spec.rbs', line 33 def token @token end |
#token_expires_at ⇒ Time? (readonly)
Returns the value of attribute token_expires_at.
37 38 39 |
# File 'sig/cadenya/models/widget_session_spec.rbs', line 37 def token_expires_at @token_expires_at end |
#widget_id ⇒ String
Widget this session is minted against. Accepts the canonical wgt_… form or the
external_id:<value> form.
11 |
# File 'lib/cadenya/models/widget_session_spec.rb', line 11 required :widget_id, String, api_name: :widgetId |
Instance Method Details
#to_hash ⇒ {
51 |
# File 'sig/cadenya/models/widget_session_spec.rbs', line 51
def to_hash: -> {
|
#token= ⇒ String (readonly)
35 |
# File 'sig/cadenya/models/widget_session_spec.rbs', line 35
def token=: (String) -> String
|
#token_expires_at= ⇒ Time (readonly)
39 |
# File 'sig/cadenya/models/widget_session_spec.rbs', line 39
def token_expires_at=: (Time) -> Time
|