Class: Agent::SessionContext::Snapshot

Inherits:
Data
  • Object
show all
Defined in:
lib/agent/session_context/snapshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session_uid:, agent:, project_path:, captured_at:, message_count:, prompts: [], injected_context: [], files: [], documents: [], tool_activity: [], goals: [], decisions: [], terms: [], constraints: [], open_questions: [], next_actions: [], warnings: [], summary_metadata: {}) ⇒ Snapshot

Returns a new instance of Snapshot.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/agent/session_context/snapshot.rb', line 25

def initialize(
  session_uid:,
  agent:,
  project_path:,
  captured_at:,
  message_count:,
  prompts: [],
  injected_context: [],
  files: [],
  documents: [],
  tool_activity: [],
  goals: [],
  decisions: [],
  terms: [],
  constraints: [],
  open_questions: [],
  next_actions: [],
  warnings: [],
  summary_metadata: {}
)
  super(
    session_uid: normalize_string(session_uid, :session_uid),
    agent: normalize_agent(agent),
    project_path: normalize_optional_string(project_path, :project_path),
    captured_at: captured_at,
    message_count: normalize_message_count(message_count),
    prompts: duplicate_collection(prompts),
    injected_context: duplicate_collection(injected_context),
    files: duplicate_collection(files),
    documents: duplicate_collection(documents),
    tool_activity: duplicate_collection(tool_activity),
    goals: duplicate_collection(goals),
    decisions: duplicate_collection(decisions),
    terms: duplicate_collection(terms),
    constraints: duplicate_collection(constraints),
    open_questions: duplicate_collection(open_questions),
    next_actions: duplicate_collection(next_actions),
    warnings: normalize_warnings(warnings),
    summary_metadata: ()
  )
end

Instance Attribute Details

#agent ⇒ Object (readonly)

Returns the value of attribute agent

Returns:

  • (Object) —

    the current value of agent



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def agent
  @agent
end

#captured_at ⇒ Object (readonly)

Returns the value of attribute captured_at

Returns:

  • (Object) —

    the current value of captured_at



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def captured_at
  @captured_at
end

#constraints ⇒ Object (readonly)

Returns the value of attribute constraints

Returns:

  • (Object) —

    the current value of constraints



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def constraints
  @constraints
end

#decisions ⇒ Object (readonly)

Returns the value of attribute decisions

Returns:

  • (Object) —

    the current value of decisions



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def decisions
  @decisions
end

#documents ⇒ Object (readonly)

Returns the value of attribute documents

Returns:

  • (Object) —

    the current value of documents



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def documents
  @documents
end

#files ⇒ Object (readonly)

Returns the value of attribute files

Returns:

  • (Object) —

    the current value of files



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def files
  @files
end

#goals ⇒ Object (readonly)

Returns the value of attribute goals

Returns:

  • (Object) —

    the current value of goals



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def goals
  @goals
end

#injected_context ⇒ Object (readonly)

Returns the value of attribute injected_context

Returns:

  • (Object) —

    the current value of injected_context



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def injected_context
  @injected_context
end

#message_count ⇒ Object (readonly)

Returns the value of attribute message_count

Returns:

  • (Object) —

    the current value of message_count



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def message_count
  @message_count
end

#next_actions ⇒ Object (readonly)

Returns the value of attribute next_actions

Returns:

  • (Object) —

    the current value of next_actions



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def next_actions
  @next_actions
end

#open_questions ⇒ Object (readonly)

Returns the value of attribute open_questions

Returns:

  • (Object) —

    the current value of open_questions



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def open_questions
  @open_questions
end

#project_path ⇒ Object (readonly)

Returns the value of attribute project_path

Returns:

  • (Object) —

    the current value of project_path



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def project_path
  @project_path
end

#prompts ⇒ Object (readonly)

Returns the value of attribute prompts

Returns:

  • (Object) —

    the current value of prompts



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def prompts
  @prompts
end

#session_uid ⇒ Object (readonly)

Returns the value of attribute session_uid

Returns:

  • (Object) —

    the current value of session_uid



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def session_uid
  @session_uid
end

#summary_metadata ⇒ Object (readonly)

Returns the value of attribute summary_metadata

Returns:

  • (Object) —

    the current value of summary_metadata



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def 
  @summary_metadata
end

#terms ⇒ Object (readonly)

Returns the value of attribute terms

Returns:

  • (Object) —

    the current value of terms



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def terms
  @terms
end

#tool_activity ⇒ Object (readonly)

Returns the value of attribute tool_activity

Returns:

  • (Object) —

    the current value of tool_activity



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def tool_activity
  @tool_activity
end

#warnings ⇒ Object (readonly)

Returns the value of attribute warnings

Returns:

  • (Object) —

    the current value of warnings



5
6
7
# File 'lib/agent/session_context/snapshot.rb', line 5

def warnings
  @warnings
end