Class: OllamaAgent::Runtime::ExecutionManifest

Inherits:
Object
  • Object
show all
Defined in:
lib/ollama_agent/runtime/execution_manifest.rb

Overview

Manifest record representing one execution attempt and lineage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent_manifest_id:, workspace_fingerprint:, created_at:, metadata: {}, id: SecureRandom.uuid) ⇒ ExecutionManifest

Returns a new instance of ExecutionManifest.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 12

def initialize(
  parent_manifest_id:,
  workspace_fingerprint:,
  created_at:,
  metadata: {},
  id: SecureRandom.uuid
)
  @id = id
  @parent_manifest_id = parent_manifest_id
  @workspace_fingerprint = workspace_fingerprint
  @created_at = created_at
  @metadata = .dup
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



10
11
12
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 10

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 10

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



10
11
12
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 10

def 
  @metadata
end

#parent_manifest_idObject (readonly)

Returns the value of attribute parent_manifest_id.



10
11
12
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 10

def parent_manifest_id
  @parent_manifest_id
end

#workspace_fingerprintObject (readonly)

Returns the value of attribute workspace_fingerprint.



10
11
12
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 10

def workspace_fingerprint
  @workspace_fingerprint
end

Instance Method Details

#to_hObject



26
27
28
29
30
31
32
33
34
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 26

def to_h
  {
    "id" => id,
    "parent_manifest_id" => parent_manifest_id,
    "workspace_fingerprint" => workspace_fingerprint,
    "created_at" => created_at,
    "metadata" => 
  }
end

#to_jsonObject



36
37
38
# File 'lib/ollama_agent/runtime/execution_manifest.rb', line 36

def to_json(*)
  JSON.generate(to_h, *)
end