samagotchi 0.141.0 → 0.142.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 +46 -1
- data/README.md +1 -1
- data/bin/chi +2 -0
- data/docs/architecture.md +12 -283
- data/docs/bundle-authoring.md +1 -0
- data/docs/cli.md +15 -7
- data/docs/configuration.md +57 -18
- data/docs/context.md +2 -2
- data/docs/guardrails.md +20 -11
- data/docs/hooks.md +9 -7
- data/docs/internals/attached-context.md +226 -0
- data/docs/internals/background-tasks.md +1 -1
- data/docs/internals/bridge.md +380 -0
- data/docs/internals/bundles.md +1 -0
- data/docs/internals/context-telemetry.md +1 -1
- data/docs/internals/engine.md +24 -18
- data/docs/internals/participants.md +13 -12
- data/docs/internals/remote-sessions.md +1 -1
- data/docs/internals/{tool-guardrails.md → tool-output-limits.md} +21 -2
- data/docs/memory.md +31 -1
- data/docs/plugins.md +122 -1
- data/docs/sessions.md +50 -26
- data/docs/system-one.md +122 -0
- data/docs/testing.md +3 -1
- data/lib/samagotchi/bridge.rb +2 -0
- data/lib/samagotchi/bundles/check-in/manifest.yml +6 -3
- data/lib/samagotchi/bundles/check-in/plugin.rb +101 -4
- data/lib/samagotchi/bundles/core/manifest.yml +2 -2
- data/lib/samagotchi/bundles/system/config_modification_protocol.md +2 -2
- data/lib/samagotchi/bundles/system/manifest.yml +4 -4
- data/lib/samagotchi/bundles/system/memory_guide.md +1 -1
- data/lib/samagotchi/bundles/system/self_map.md +1 -1
- data/lib/samagotchi/config.rb +74 -14
- data/lib/samagotchi/context_candidate_choice.rb +8 -0
- data/lib/samagotchi/context_candidates_log.rb +25 -1
- data/lib/samagotchi/context_judge.rb +6 -2
- data/lib/samagotchi/engine.rb +68 -7
- data/lib/samagotchi/extension_load.rb +3 -2
- data/lib/samagotchi/guardrail_wiring.rb +36 -31
- data/lib/samagotchi/guardrails/chi_dirs.rb +7 -4
- data/lib/samagotchi/guardrails/path_resolve.rb +1 -1
- data/lib/samagotchi/guardrails/protected_paths.rb +7 -4
- data/lib/samagotchi/guardrails_command.rb +3 -3
- data/lib/samagotchi/judgments_command.rb +155 -0
- data/lib/samagotchi/kernel_loop.rb +13 -1
- data/lib/samagotchi/llm/chat_loop.rb +74 -10
- data/lib/samagotchi/llm/errors.rb +7 -5
- data/lib/samagotchi/llm/stray_tool_call.rb +61 -0
- data/lib/samagotchi/log_line.rb +1 -1
- data/lib/samagotchi/memory_bundle/entry_size.rb +100 -0
- data/lib/samagotchi/plugin/api.rb +33 -2
- data/lib/samagotchi/plugin/context.rb +49 -1
- data/lib/samagotchi/plugin/judgments.rb +72 -0
- data/lib/samagotchi/plugin/loader.rb +3 -2
- data/lib/samagotchi/run_options.rb +1 -0
- data/lib/samagotchi/self_report.rb +36 -0
- data/lib/samagotchi/session_access/contract.rb +1 -1
- data/lib/samagotchi/session_commands.rb +3 -0
- data/lib/samagotchi/session_manager.rb +13 -2
- data/lib/samagotchi/session_retention.rb +10 -0
- data/lib/samagotchi/side_judgments.rb +12 -1
- data/lib/samagotchi/system_one/answer.rb +63 -11
- data/lib/samagotchi/system_one/approval_label.rb +56 -0
- data/lib/samagotchi/system_one/approval_question.rb +2 -0
- data/lib/samagotchi/system_one/client.rb +43 -17
- data/lib/samagotchi/system_one/fake_backend.rb +1 -1
- data/lib/samagotchi/system_one/http_backend.rb +12 -4
- data/lib/samagotchi/system_one/judgment_settings.rb +61 -0
- data/lib/samagotchi/system_one/judgments.rb +260 -0
- data/lib/samagotchi/system_one/log.rb +4 -2
- data/lib/samagotchi/system_one/recording.rb +117 -0
- data/lib/samagotchi/system_one/runs.rb +179 -0
- data/lib/samagotchi/system_one/runs_store.rb +230 -0
- data/lib/samagotchi/system_one.rb +9 -0
- data/lib/samagotchi/testing/bundle.rb +9 -2
- data/lib/samagotchi/testing/host.rb +2 -1
- data/lib/samagotchi/testing/judgments.rb +185 -0
- data/lib/samagotchi/testing/recorder.rb +5 -0
- data/lib/samagotchi/testing/recording_api.rb +1 -1
- data/lib/samagotchi/tool_output_cut.rb +26 -6
- data/lib/samagotchi/tool_response.rb +1 -1
- data/lib/samagotchi/tool_runner.rb +63 -4
- data/lib/samagotchi/toolkit_suggest.rb +11 -2
- data/lib/samagotchi/tools/memory.rb +28 -0
- data/lib/samagotchi/turn_note.rb +9 -0
- data/lib/samagotchi/version.rb +1 -1
- metadata +16 -2
|
@@ -12,8 +12,11 @@ require_relative "tool_output_cut"
|
|
|
12
12
|
require_relative "tool_output_files"
|
|
13
13
|
require_relative "tools/output_guardrails"
|
|
14
14
|
require_relative "tools/tool_path"
|
|
15
|
+
require_relative "tools/memory"
|
|
16
|
+
require_relative "config"
|
|
15
17
|
require_relative "memory_bundle/index_sync"
|
|
16
18
|
require_relative "memory_bundle/index_size"
|
|
19
|
+
require_relative "memory_bundle/entry_size"
|
|
17
20
|
require_relative "participant_mode"
|
|
18
21
|
|
|
19
22
|
module Samagotchi
|
|
@@ -37,7 +40,8 @@ module Samagotchi
|
|
|
37
40
|
# and their veto), dispatch through KernelLoop, the after_tool_call hook
|
|
38
41
|
# and the output cap. Both loops feed the model `capped_output:` (cut to
|
|
39
42
|
# the cap by the tool's ToolOutputCut policy, with a "[cut: …]" line),
|
|
40
|
-
# the text the event and the hook get too.
|
|
43
|
+
# the text the event and the hook get too. memory_read has its own cap,
|
|
44
|
+
# memory.read_max_chars (0: none), not max_tool_output_chars.
|
|
41
45
|
class ToolRunner
|
|
42
46
|
# More images in one result are left out, each with a line (a tool
|
|
43
47
|
# that returns many screenshots can't flood the context).
|
|
@@ -51,9 +55,14 @@ module Samagotchi
|
|
|
51
55
|
# the kernel is built.
|
|
52
56
|
# @param clock [#call] monotonic seconds, for the approval wait and the
|
|
53
57
|
# dispatch time (after_tool_call's elapsed_ms)
|
|
54
|
-
|
|
58
|
+
# @param window [#call, nil] → ContextWindow::Resolved or nil: the
|
|
59
|
+
# model's window, for memory_read's overflow guard. nil: the kernel's
|
|
60
|
+
# own reader (KernelLoop#tool_output_window); a loop whose window comes
|
|
61
|
+
# from more than the kernel's client (LLM::ChatLoop's adapter) passes it.
|
|
62
|
+
def initialize(kernel, clock: -> { Process.clock_gettime(Process::CLOCK_MONOTONIC) }, window: nil)
|
|
55
63
|
@kernel = kernel
|
|
56
64
|
@clock = clock
|
|
65
|
+
@window = window
|
|
57
66
|
end
|
|
58
67
|
|
|
59
68
|
# @param call_index [Integer] 1-based position of the call in its batch
|
|
@@ -115,6 +124,7 @@ module Samagotchi
|
|
|
115
124
|
end
|
|
116
125
|
before = verdict.deny? ? NOT_AN_EDIT : file_before(call)
|
|
117
126
|
index_before = before.equal?(NOT_AN_EDIT) ? nil : memory_index_size(call)
|
|
127
|
+
entry_before = before.equal?(NOT_AN_EDIT) ? nil : MemoryBundle::EntrySize.measure_file(Tools::ToolPath.normalize(call[:path]))
|
|
118
128
|
elapsed_ms = nil
|
|
119
129
|
if verdict.deny?
|
|
120
130
|
result = denied(call, verdict)
|
|
@@ -126,6 +136,7 @@ module Samagotchi
|
|
|
126
136
|
diff = file_change(call, before)
|
|
127
137
|
if diff && refresh_memory_index(call)
|
|
128
138
|
result = with_index_note(result, index_before, call)
|
|
139
|
+
result = with_entry_note(result, entry_before, call)
|
|
129
140
|
end
|
|
130
141
|
result = approved(result, verdict) if verdict.allow? && verdict.decided_by
|
|
131
142
|
result, images = attach_images(call, result) if result[:images]
|
|
@@ -139,8 +150,9 @@ module Samagotchi
|
|
|
139
150
|
if (changed = changed_call_line(original, call))
|
|
140
151
|
output = "#{changed}\n#{output}"
|
|
141
152
|
end
|
|
142
|
-
|
|
143
|
-
|
|
153
|
+
cap = output_cap(call, max_tool_output_chars)
|
|
154
|
+
truncated = !cap.nil? && output.length > cap
|
|
155
|
+
capped, saved = truncated ? cut(call, output, cap, result) : output
|
|
144
156
|
output_file = saved.path if saved.is_a?(ToolOutputFiles::Saved)
|
|
145
157
|
|
|
146
158
|
# The call's outcome as its activity line has it (worked out from the
|
|
@@ -197,11 +209,48 @@ module Samagotchi
|
|
|
197
209
|
# there is none) when it was cut that way
|
|
198
210
|
def cut(call, output, cap, result)
|
|
199
211
|
ToolOutputCut.apply(output, cap: cap, tool: call[:name], save: ->(text, dry: false) { save_output(call, text, dry: dry) },
|
|
212
|
+
line: (memory_cut_line(call) if call[:name] == MEMORY_READ),
|
|
200
213
|
ref: result[:ref_path], ref_stderr: result[:ref_stderr_path],
|
|
201
214
|
head_chars: Tools::OutputGuardrails.config_positive_int("execute.cut_head_chars",
|
|
202
215
|
ToolOutputCut::HEAD_CHARS))
|
|
203
216
|
end
|
|
204
217
|
|
|
218
|
+
MEMORY_READ = Tools::MemoryRead::NAME
|
|
219
|
+
|
|
220
|
+
# The most chars +call+'s result may hold: +cap+ (max_tool_output_chars)
|
|
221
|
+
# for every tool but memory_read, which memory.read_max_chars caps (0:
|
|
222
|
+
# no fixed cap) and, with none set, a known window's half (#window_guard).
|
|
223
|
+
# A nil +cap+ stays nil.
|
|
224
|
+
def output_cap(call, cap)
|
|
225
|
+
return cap unless cap && call[:name] == MEMORY_READ
|
|
226
|
+
|
|
227
|
+
fixed = Config.get("memory.read_max_chars").to_i
|
|
228
|
+
fixed.positive? ? fixed : window_guard
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Half the model's context window in characters, the most one memory_read
|
|
232
|
+
# result may take: a context overflow fails the turn (its work rolls back
|
|
233
|
+
# and a retry repeats the read). nil when the window isn't known (the
|
|
234
|
+
# default isn't a window) or can't be read. It checks this result, not the
|
|
235
|
+
# context already used.
|
|
236
|
+
def window_guard
|
|
237
|
+
window = @window ? @window.call : (@kernel.tool_output_window if @kernel.respond_to?(:tool_output_window))
|
|
238
|
+
return nil unless window&.tokens&.positive? && window.source != :default
|
|
239
|
+
|
|
240
|
+
(window.tokens * MemoryBundle::IndexSize.chars_per_token / 2).floor
|
|
241
|
+
rescue StandardError
|
|
242
|
+
nil
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# memory_read's cut line: the rest is in the memory's file, in the dir(s)
|
|
246
|
+
# the call searched (a scope, else project then system).
|
|
247
|
+
def memory_cut_line(call)
|
|
248
|
+
scope = call[:scope].to_s.strip
|
|
249
|
+
scopes = Tools::VALID_SCOPES.include?(scope) ? [scope] : Tools::VALID_SCOPES
|
|
250
|
+
names = Tools::MemoryRead.parse_names(call[:content].to_s)
|
|
251
|
+
ToolOutputCut.memory_line(scopes.map { |s| Tools::MemoryRead.memories_dir(s) }, single: names.size == 1)
|
|
252
|
+
end
|
|
253
|
+
|
|
205
254
|
# The whole output in the session's tool_output folder
|
|
206
255
|
# (ToolOutputFiles), or why it isn't saved: no session (a bare kernel)
|
|
207
256
|
# or the error's class. Never fails the call. +dry+: where it would go,
|
|
@@ -275,6 +324,16 @@ module Samagotchi
|
|
|
275
324
|
note ? result.merge(output: "#{result[:output]}\n\n#{note}") : result
|
|
276
325
|
end
|
|
277
326
|
|
|
327
|
+
# +result+ with the note a write/edit gets when it took the memory over
|
|
328
|
+
# memory.entry_warn_tokens (MemoryBundle::EntrySize). It is apart from
|
|
329
|
+
# the index's: that one is off with index_warn_tokens at 0, this one isn't.
|
|
330
|
+
def with_entry_note(result, before, call)
|
|
331
|
+
return result unless before
|
|
332
|
+
|
|
333
|
+
note = MemoryBundle::EntrySize.crossing_note(before, MemoryBundle::EntrySize.measure_file(Tools::ToolPath.normalize(call[:path])))
|
|
334
|
+
note ? result.merge(output: "#{result[:output]}\n\n#{note}") : result
|
|
335
|
+
end
|
|
336
|
+
|
|
278
337
|
# A tool's output can hold bytes that aren't UTF-8 (`printf '\xff'`, a
|
|
279
338
|
# binary file). They become "?" here, before the output reaches the
|
|
280
339
|
# conversation, the events and the saved session: JSON.generate raises
|
|
@@ -6,6 +6,7 @@ require_relative "cancellation_controller"
|
|
|
6
6
|
require_relative "log"
|
|
7
7
|
require_relative "owner_prompt"
|
|
8
8
|
require_relative "system_one/question"
|
|
9
|
+
require_relative "system_one/runs"
|
|
9
10
|
require_relative "toolkit"
|
|
10
11
|
|
|
11
12
|
module Samagotchi
|
|
@@ -17,6 +18,8 @@ module Samagotchi
|
|
|
17
18
|
class ToolkitSuggest
|
|
18
19
|
FILE = "toolkit_suggestions.jsonl"
|
|
19
20
|
QUESTION_ID = "toolkit"
|
|
21
|
+
# Its saved asks' name (SystemOne::Runs).
|
|
22
|
+
JUDGMENT = "toolkit.suggest"
|
|
20
23
|
PROMPT_MAX = 1500
|
|
21
24
|
CHARS_PER_TOKEN = 4.0
|
|
22
25
|
INSTRUCTIONS = "A user is starting a session of a coding agent with the prompt in the state. " \
|
|
@@ -121,8 +124,9 @@ module Samagotchi
|
|
|
121
124
|
question, = question(default: Toolkit.new(name: snapshot.default.name),
|
|
122
125
|
kits: snapshot.candidates.to_h { |candidate| [candidate.name, kit_for(candidate)] },
|
|
123
126
|
project: snapshot.state.fetch(:project), prompt: snapshot.state.fetch(:prompt))
|
|
127
|
+
run_id = SystemOne::Runs.new_id(JUDGMENT)
|
|
124
128
|
answer = client.ask(state: snapshot.state, questions: { QUESTION_ID => question },
|
|
125
|
-
cancel_controller: cancel_controller)&.fetch(QUESTION_ID, nil)
|
|
129
|
+
cancel_controller: cancel_controller, run_id: run_id)&.fetch(QUESTION_ID, nil)
|
|
126
130
|
raw = answer&.choice
|
|
127
131
|
candidate_name = raw.to_s.delete_prefix("kit:")
|
|
128
132
|
candidate = snapshot.candidates.find { |item| item.name == candidate_name } if raw.to_s.start_with?("kit:")
|
|
@@ -148,6 +152,7 @@ module Samagotchi
|
|
|
148
152
|
end
|
|
149
153
|
fields = {
|
|
150
154
|
session_id: snapshot.session_id,
|
|
155
|
+
run_id: run_id,
|
|
151
156
|
turn_number: snapshot.turn_number,
|
|
152
157
|
default_kit: snapshot.default.name,
|
|
153
158
|
raw: raw,
|
|
@@ -194,8 +199,11 @@ module Samagotchi
|
|
|
194
199
|
# @return [CancellationController] what the ask's request watches
|
|
195
200
|
attr_reader :cancel_controller
|
|
196
201
|
|
|
197
|
-
|
|
202
|
+
# @param acted [#call, nil] (judged, did), once, as its line is written
|
|
203
|
+
# with what the turn did: the saved run's acted line
|
|
204
|
+
def initialize(log:, timeout_seconds:, joined:, acted: nil, clock: -> { Process.clock_gettime(Process::CLOCK_MONOTONIC) })
|
|
198
205
|
@log = log
|
|
206
|
+
@acted = acted
|
|
199
207
|
@clock = clock
|
|
200
208
|
@deadline = clock.call + timeout_seconds.to_f
|
|
201
209
|
@joined = joined
|
|
@@ -284,6 +292,7 @@ module Samagotchi
|
|
|
284
292
|
|
|
285
293
|
@recorded = true
|
|
286
294
|
ToolkitSuggest.record(@log, @judged, did: did)
|
|
295
|
+
@acted&.call(@judged, did) unless did.nil?
|
|
287
296
|
end
|
|
288
297
|
end
|
|
289
298
|
|
|
@@ -234,6 +234,8 @@ module Samagotchi
|
|
|
234
234
|
# The index's size before the write, for the note on crossing
|
|
235
235
|
# memory.index_warn_tokens (not for the verbatim index write).
|
|
236
236
|
before = index_size(resolved_scope) unless entry_name == MEMORY_INDEX
|
|
237
|
+
# And the memory's own size, for memory.entry_warn_tokens.
|
|
238
|
+
entry_before = entry_size(resolved_scope, entry_name, file_path) unless entry_name == MEMORY_INDEX
|
|
237
239
|
if entry_name == MEMORY_INDEX
|
|
238
240
|
Samagotchi::MemoryBundle::IndexUpdater.locked_write(dir) { body }
|
|
239
241
|
else
|
|
@@ -248,6 +250,7 @@ module Samagotchi
|
|
|
248
250
|
message += " Index line refreshed automatically."
|
|
249
251
|
message += index_crossing_note(before, resolved_scope)
|
|
250
252
|
end
|
|
253
|
+
message += entry_crossing_note(entry_before, resolved_scope, entry_name, body) if entry_before
|
|
251
254
|
|
|
252
255
|
message
|
|
253
256
|
rescue StandardError => e
|
|
@@ -319,6 +322,31 @@ module Samagotchi
|
|
|
319
322
|
size.measure(scope) if size.warn_limit.positive?
|
|
320
323
|
end
|
|
321
324
|
|
|
325
|
+
# The memory +name+ as its file is now (0 tokens when it isn't there), nil
|
|
326
|
+
# when memory.entry_warn_tokens is off, for a model note (its own
|
|
327
|
+
# warning) or when it can't be measured.
|
|
328
|
+
def self.entry_size(scope, name, file_path)
|
|
329
|
+
require_relative "../memory_bundle/entry_size"
|
|
330
|
+
size = Samagotchi::MemoryBundle::EntrySize
|
|
331
|
+
return nil unless size.warn_limit.positive? && size.counted?(name)
|
|
332
|
+
|
|
333
|
+
size.of_text(name, scope, File.file?(file_path) ? File.read(file_path, encoding: "UTF-8") : "")
|
|
334
|
+
rescue StandardError
|
|
335
|
+
nil
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# "\n\nNote: memory '<name>' is now ~N tokens …" when the write took
|
|
339
|
+
# the memory from at or under memory.entry_warn_tokens to over it
|
|
340
|
+
# (+before+: its size before the write), else "". +body+ is what was
|
|
341
|
+
# written.
|
|
342
|
+
def self.entry_crossing_note(before, scope, name, body)
|
|
343
|
+
size = Samagotchi::MemoryBundle::EntrySize
|
|
344
|
+
note = size.crossing_note(before, size.of_text(name, scope, body))
|
|
345
|
+
note ? "\n\n#{note}" : ""
|
|
346
|
+
rescue StandardError
|
|
347
|
+
""
|
|
348
|
+
end
|
|
349
|
+
|
|
322
350
|
# "\n\nNote: the <scope> memory index is now ~N tokens …" when the
|
|
323
351
|
# write took +scope+'s index from at or under memory.index_warn_tokens
|
|
324
352
|
# to over it (+before+: its size before the write), else "".
|
data/lib/samagotchi/turn_note.rb
CHANGED
|
@@ -205,6 +205,15 @@ module Samagotchi
|
|
|
205
205
|
"or answer if it is done."))
|
|
206
206
|
end
|
|
207
207
|
|
|
208
|
+
# The hidden nudge before a retry of a reply that came back as a tool call
|
|
209
|
+
# written as text, which the host could not read (ChatLoop's
|
|
210
|
+
# LLM::StrayToolCall): nothing ran, and the text is not in the history, so
|
|
211
|
+
# the model is told what it is being asked for again.
|
|
212
|
+
def malformed_retry
|
|
213
|
+
retry_nudge(message("your last reply was a tool call written as plain text, and the host could not read it, " \
|
|
214
|
+
"so nothing ran. Call the tool again as a real tool call, or answer in plain text."))
|
|
215
|
+
end
|
|
216
|
+
|
|
208
217
|
# The hidden nudge before a retry of a generation a plugin cut
|
|
209
218
|
# (stop_generation): +by+ is the bundle, +reason+ what it said.
|
|
210
219
|
def cut_retry(by, reason)
|
data/lib/samagotchi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: samagotchi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.142.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dmitry Dedov
|
|
@@ -152,7 +152,9 @@ files:
|
|
|
152
152
|
- docs/guardrails.md
|
|
153
153
|
- docs/hooks.md
|
|
154
154
|
- docs/internals/anthropic.md
|
|
155
|
+
- docs/internals/attached-context.md
|
|
155
156
|
- docs/internals/background-tasks.md
|
|
157
|
+
- docs/internals/bridge.md
|
|
156
158
|
- docs/internals/bundles.md
|
|
157
159
|
- docs/internals/context-telemetry.md
|
|
158
160
|
- docs/internals/engine.md
|
|
@@ -163,7 +165,7 @@ files:
|
|
|
163
165
|
- docs/internals/participants.md
|
|
164
166
|
- docs/internals/prompt-caching.md
|
|
165
167
|
- docs/internals/remote-sessions.md
|
|
166
|
-
- docs/internals/tool-
|
|
168
|
+
- docs/internals/tool-output-limits.md
|
|
167
169
|
- docs/internals/web-frontend.md
|
|
168
170
|
- docs/internals/web-push.md
|
|
169
171
|
- docs/internals/working-set.md
|
|
@@ -172,6 +174,7 @@ files:
|
|
|
172
174
|
- docs/releasing.md
|
|
173
175
|
- docs/sessions.md
|
|
174
176
|
- docs/sub-agent.md
|
|
177
|
+
- docs/system-one.md
|
|
175
178
|
- docs/testing.md
|
|
176
179
|
- lib/samagotchi.rb
|
|
177
180
|
- lib/samagotchi/analytics_file.rb
|
|
@@ -408,6 +411,7 @@ files:
|
|
|
408
411
|
- lib/samagotchi/installed_versions.rb
|
|
409
412
|
- lib/samagotchi/interrupted_turn.rb
|
|
410
413
|
- lib/samagotchi/iteration_limit.rb
|
|
414
|
+
- lib/samagotchi/judgments_command.rb
|
|
411
415
|
- lib/samagotchi/kernel_loop.rb
|
|
412
416
|
- lib/samagotchi/last_turn.rb
|
|
413
417
|
- lib/samagotchi/launch_mode.rb
|
|
@@ -432,6 +436,7 @@ files:
|
|
|
432
436
|
- lib/samagotchi/llm/openai_chat.rb
|
|
433
437
|
- lib/samagotchi/llm/prompt_cache.rb
|
|
434
438
|
- lib/samagotchi/llm/refusal_memo.rb
|
|
439
|
+
- lib/samagotchi/llm/stray_tool_call.rb
|
|
435
440
|
- lib/samagotchi/llm/stream_drops.rb
|
|
436
441
|
- lib/samagotchi/llm/turn_settings.rb
|
|
437
442
|
- lib/samagotchi/llm/usage.rb
|
|
@@ -453,6 +458,7 @@ files:
|
|
|
453
458
|
- lib/samagotchi/memory_bundle/asset_installer.rb
|
|
454
459
|
- lib/samagotchi/memory_bundle/builder.rb
|
|
455
460
|
- lib/samagotchi/memory_bundle/bundle_hook.rb
|
|
461
|
+
- lib/samagotchi/memory_bundle/entry_size.rb
|
|
456
462
|
- lib/samagotchi/memory_bundle/index_size.rb
|
|
457
463
|
- lib/samagotchi/memory_bundle/index_sync.rb
|
|
458
464
|
- lib/samagotchi/memory_bundle/index_updater.rb
|
|
@@ -512,6 +518,7 @@ files:
|
|
|
512
518
|
- lib/samagotchi/plugin/context.rb
|
|
513
519
|
- lib/samagotchi/plugin/http.rb
|
|
514
520
|
- lib/samagotchi/plugin/http_transport.rb
|
|
521
|
+
- lib/samagotchi/plugin/judgments.rb
|
|
515
522
|
- lib/samagotchi/plugin/loader.rb
|
|
516
523
|
- lib/samagotchi/plugin/peer.rb
|
|
517
524
|
- lib/samagotchi/plugin/prompt_sections.rb
|
|
@@ -610,14 +617,20 @@ files:
|
|
|
610
617
|
- lib/samagotchi/steer_cut_after.rb
|
|
611
618
|
- lib/samagotchi/system_one.rb
|
|
612
619
|
- lib/samagotchi/system_one/answer.rb
|
|
620
|
+
- lib/samagotchi/system_one/approval_label.rb
|
|
613
621
|
- lib/samagotchi/system_one/approval_question.rb
|
|
614
622
|
- lib/samagotchi/system_one/client.rb
|
|
615
623
|
- lib/samagotchi/system_one/errors.rb
|
|
616
624
|
- lib/samagotchi/system_one/fake_backend.rb
|
|
617
625
|
- lib/samagotchi/system_one/http_backend.rb
|
|
626
|
+
- lib/samagotchi/system_one/judgment_settings.rb
|
|
627
|
+
- lib/samagotchi/system_one/judgments.rb
|
|
618
628
|
- lib/samagotchi/system_one/log.rb
|
|
619
629
|
- lib/samagotchi/system_one/question.rb
|
|
620
630
|
- lib/samagotchi/system_one/record.rb
|
|
631
|
+
- lib/samagotchi/system_one/recording.rb
|
|
632
|
+
- lib/samagotchi/system_one/runs.rb
|
|
633
|
+
- lib/samagotchi/system_one/runs_store.rb
|
|
621
634
|
- lib/samagotchi/system_one/self_protect.rb
|
|
622
635
|
- lib/samagotchi/system_one/similar.rb
|
|
623
636
|
- lib/samagotchi/system_prompt.rb
|
|
@@ -670,6 +683,7 @@ files:
|
|
|
670
683
|
- lib/samagotchi/testing/helpers.rb
|
|
671
684
|
- lib/samagotchi/testing/host.rb
|
|
672
685
|
- lib/samagotchi/testing/install.rb
|
|
686
|
+
- lib/samagotchi/testing/judgments.rb
|
|
673
687
|
- lib/samagotchi/testing/minitest.rb
|
|
674
688
|
- lib/samagotchi/testing/recorder.rb
|
|
675
689
|
- lib/samagotchi/testing/recording_api.rb
|