samagotchi 0.149.0 → 0.151.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 +69 -1
- data/README.md +4 -2
- data/docs/architecture.md +4 -4
- data/docs/bundle-authoring.md +1 -1
- data/docs/cli.md +59 -24
- data/docs/configuration.md +6 -6
- data/docs/internals/background-tasks.md +1 -1
- data/docs/internals/block-renderers.md +96 -0
- data/docs/internals/bridge.md +53 -9
- data/docs/internals/bundles.md +43 -14
- data/docs/internals/objectives.md +7 -2
- data/docs/internals/web-frontend.md +2 -2
- data/docs/internals/web-push.md +2 -2
- data/docs/internals/working-set.md +5 -2
- data/docs/memory.md +48 -10
- data/docs/plugins.md +49 -3
- data/docs/sessions.md +5 -4
- data/docs/testing.md +5 -0
- data/lib/samagotchi/atomic_file.rb +3 -0
- data/lib/samagotchi/block_renderers.rb +115 -0
- data/lib/samagotchi/bootstrap_command.rb +5 -2
- data/lib/samagotchi/bridge/card_places.rb +93 -0
- data/lib/samagotchi/bridge/card_store.rb +224 -82
- data/lib/samagotchi/bridge.rb +12 -4
- data/lib/samagotchi/bundle_command/try/trace.rb +1 -1
- data/lib/samagotchi/bundle_command.rb +91 -68
- data/lib/samagotchi/bundler_env.rb +24 -0
- data/lib/samagotchi/bundles/dev/manifest.yml +2 -2
- data/lib/samagotchi/bundles/github-pr/manifest.yml +3 -3
- data/lib/samagotchi/bundles/github-pr/plugin.rb +2 -1
- data/lib/samagotchi/bundles/known-names/hooks/known_names.rb +3 -1
- data/lib/samagotchi/bundles/known-names/manifest.yml +3 -2
- data/lib/samagotchi/bundles/source-links/hooks/source_links.rb +2 -2
- data/lib/samagotchi/bundles/source-links/manifest.yml +3 -3
- data/lib/samagotchi/bundles/system/manifest.yml +3 -3
- data/lib/samagotchi/bundles/system/memory_guide.md +5 -5
- data/lib/samagotchi/bundles/system/self_map.md +1 -1
- data/lib/samagotchi/chi_home.rb +4 -2
- data/lib/samagotchi/chi_shim.rb +2 -1
- data/lib/samagotchi/child_env.rb +10 -3
- data/lib/samagotchi/engine.rb +19 -1
- data/lib/samagotchi/git_env.rb +43 -0
- data/lib/samagotchi/guardrails/context.rb +2 -0
- data/lib/samagotchi/guardrails/targets.rb +4 -1
- data/lib/samagotchi/memory_bundle/asset_installer.rb +23 -3
- data/lib/samagotchi/memory_bundle/builder.rb +5 -3
- data/lib/samagotchi/memory_bundle/file_standing.rb +167 -0
- data/lib/samagotchi/memory_bundle/installed_bundle.rb +70 -6
- data/lib/samagotchi/memory_bundle/installed_copy.rb +1 -0
- data/lib/samagotchi/memory_bundle/installer.rb +162 -52
- data/lib/samagotchi/memory_bundle/listing.rb +4 -3
- data/lib/samagotchi/memory_bundle/manifest.rb +23 -2
- data/lib/samagotchi/memory_bundle/merger.rb +209 -8
- data/lib/samagotchi/memory_bundle/placeholder.rb +2 -1
- data/lib/samagotchi/memory_bundle/profile.rb +7 -3
- data/lib/samagotchi/memory_bundle/provenance.rb +182 -22
- data/lib/samagotchi/memory_bundle/remerge.rb +167 -0
- data/lib/samagotchi/memory_bundle/shipped_history.rb +79 -0
- data/lib/samagotchi/memory_bundle/shipped_update.rb +89 -24
- data/lib/samagotchi/memory_bundle/source.rb +3 -3
- data/lib/samagotchi/memory_bundle/status.rb +21 -3
- data/lib/samagotchi/memory_bundle/system_bundle.rb +98 -33
- data/lib/samagotchi/memory_bundle/text_merge.rb +399 -0
- data/lib/samagotchi/memory_bundle/trash.rb +58 -2
- data/lib/samagotchi/memory_bundle/uninstaller.rb +26 -6
- data/lib/samagotchi/objectives_check.rb +37 -7
- data/lib/samagotchi/project_env.rb +3 -2
- data/lib/samagotchi/self_report.rb +2 -0
- data/lib/samagotchi/session_chain.rb +2 -7
- data/lib/samagotchi/session_commands.rb +15 -9
- data/lib/samagotchi/session_manager.rb +10 -7
- data/lib/samagotchi/steer.rb +17 -0
- data/lib/samagotchi/terminal_ui.rb +4 -4
- data/lib/samagotchi/testing/boundary.rb +1 -0
- data/lib/samagotchi/testing/minitest.rb +3 -0
- data/lib/samagotchi/testing/rspec.rb +3 -0
- data/lib/samagotchi/testing/sandbox.rb +3 -1
- data/lib/samagotchi/tools/delegate.rb +2 -1
- data/lib/samagotchi/tools/task_runtime.rb +13 -10
- data/lib/samagotchi/turn_checkpoint.rb +11 -5
- data/lib/samagotchi/turn_flow.rb +2 -1
- data/lib/samagotchi/update_command.rb +76 -28
- data/lib/samagotchi/update_hint.rb +4 -1
- data/lib/samagotchi/version.rb +1 -1
- data/lib/samagotchi/web/app.rb +22 -12
- data/lib/samagotchi/web/auto_update.rb +8 -8
- data/lib/samagotchi/web/auto_update_record.rb +6 -4
- data/lib/samagotchi/web/block_renderer_routes.rb +32 -0
- data/lib/samagotchi/web/markdown_renderer.rb +39 -6
- data/lib/samagotchi/web/message_display.rb +3 -3
- data/lib/samagotchi/web/public/app.js +7 -3
- data/lib/samagotchi/web/public/block_frame.js +202 -0
- data/lib/samagotchi/web/public/block_host.js +502 -0
- data/lib/samagotchi/web/public/block_open.js +13 -0
- data/lib/samagotchi/web/public/block_renderers.css +20 -0
- data/lib/samagotchi/web/public/block_source.js +37 -0
- data/lib/samagotchi/web/public/bubbles.js +11 -5
- data/lib/samagotchi/web/public/card.js +17 -10
- data/lib/samagotchi/web/public/cards_place.js +10 -5
- data/lib/samagotchi/web/public/claim_link.js +4 -2
- data/lib/samagotchi/web/public/details_motion.js +2 -1
- data/lib/samagotchi/web/public/history_reveal.js +4 -1
- data/lib/samagotchi/web/public/index.html +20 -14
- data/lib/samagotchi/web/public/markdown_place.js +2 -3
- data/lib/samagotchi/web/public/stage_model.js +5 -6
- data/lib/samagotchi/web/public/stage_view.js +8 -7
- data/lib/samagotchi/web/public/text_roots.js +6 -0
- data/lib/samagotchi/web/public/turn_block.js +34 -19
- data/lib/samagotchi/web/public/turn_html.js +4 -1
- data/lib/samagotchi/web/public/turn_model.js +1 -1
- data/lib/samagotchi/web/public/update_sheet.js +8 -3
- data/lib/samagotchi/web/public/working_set_view.js +10 -7
- data/lib/samagotchi/web/push/notifier.rb +7 -9
- data/lib/samagotchi/web/session_hub.rb +2 -1
- data/lib/samagotchi/web/session_show.rb +1 -1
- data/lib/samagotchi/web/update_ops.rb +2 -1
- data/lib/samagotchi/worker.rb +4 -2
- metadata +17 -1
data/lib/samagotchi/worker.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "fileutils"
|
|
4
|
+
require "securerandom"
|
|
4
5
|
|
|
5
6
|
require_relative "client_id"
|
|
6
7
|
require_relative "config"
|
|
@@ -1263,14 +1264,15 @@ module Samagotchi
|
|
|
1263
1264
|
# a fresh worker's first), so the list is this turn's from the start.
|
|
1264
1265
|
@merged_this_turn = []
|
|
1265
1266
|
origin = fresh_origin(turn_args[:origin])
|
|
1266
|
-
|
|
1267
|
+
# Settled here: the checkpoint's prompt carries it from the start.
|
|
1268
|
+
turn_args = turn_args.merge(origin: origin, id: turn_args[:id] || SecureRandom.uuid)
|
|
1267
1269
|
verdicts_before = @session.verdicts.size
|
|
1268
1270
|
@reporting_turn = reports_to_parent?(origin)
|
|
1269
1271
|
# A participant's review turn merges no input (#pending_input_drain).
|
|
1270
1272
|
@participant_turn = origin.participant?
|
|
1271
1273
|
restores = @turn_flow.restores
|
|
1272
1274
|
begin
|
|
1273
|
-
@checkpoint.begin_turn(prompt: prompt, enqueued_id: origin.enqueued_id, author: turn_author_fields(origin))
|
|
1275
|
+
@checkpoint.begin_turn(prompt: prompt, turn_id: turn_args[:id], enqueued_id: origin.enqueued_id, author: turn_author_fields(origin))
|
|
1274
1276
|
@session.status = Session::STATUS_RUNNING
|
|
1275
1277
|
# A continue that moved this session to the chain's new link wrote
|
|
1276
1278
|
# the new parent beside it (Session::PARENT_FILE): this turn's
|
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.151.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dmitry Dedov
|
|
@@ -155,6 +155,7 @@ files:
|
|
|
155
155
|
- docs/internals/anthropic.md
|
|
156
156
|
- docs/internals/attached-context.md
|
|
157
157
|
- docs/internals/background-tasks.md
|
|
158
|
+
- docs/internals/block-renderers.md
|
|
158
159
|
- docs/internals/bridge.md
|
|
159
160
|
- docs/internals/bundles.md
|
|
160
161
|
- docs/internals/context-telemetry.md
|
|
@@ -186,12 +187,14 @@ files:
|
|
|
186
187
|
- lib/samagotchi/answer_tail.rb
|
|
187
188
|
- lib/samagotchi/archive_store.rb
|
|
188
189
|
- lib/samagotchi/atomic_file.rb
|
|
190
|
+
- lib/samagotchi/block_renderers.rb
|
|
189
191
|
- lib/samagotchi/bootstrap/bundles.rb
|
|
190
192
|
- lib/samagotchi/bootstrap/config_writer.rb
|
|
191
193
|
- lib/samagotchi/bootstrap/probe.rb
|
|
192
194
|
- lib/samagotchi/bootstrap_command.rb
|
|
193
195
|
- lib/samagotchi/bridge.rb
|
|
194
196
|
- lib/samagotchi/bridge/bounded_queue.rb
|
|
197
|
+
- lib/samagotchi/bridge/card_places.rb
|
|
195
198
|
- lib/samagotchi/bridge/card_store.rb
|
|
196
199
|
- lib/samagotchi/bridge/client_event.rb
|
|
197
200
|
- lib/samagotchi/bridge/event_id.rb
|
|
@@ -226,6 +229,7 @@ files:
|
|
|
226
229
|
- lib/samagotchi/bundle_command/try/trace.rb
|
|
227
230
|
- lib/samagotchi/bundle_needs.rb
|
|
228
231
|
- lib/samagotchi/bundle_settings_check.rb
|
|
232
|
+
- lib/samagotchi/bundler_env.rb
|
|
229
233
|
- lib/samagotchi/bundles/agents-md/manifest.yml
|
|
230
234
|
- lib/samagotchi/bundles/agents-md/plugin.rb
|
|
231
235
|
- lib/samagotchi/bundles/btw/manifest.yml
|
|
@@ -359,6 +363,7 @@ files:
|
|
|
359
363
|
- lib/samagotchi/file_ref.rb
|
|
360
364
|
- lib/samagotchi/gem_update.rb
|
|
361
365
|
- lib/samagotchi/generation_phase.rb
|
|
366
|
+
- lib/samagotchi/git_env.rb
|
|
362
367
|
- lib/samagotchi/git_head.rb
|
|
363
368
|
- lib/samagotchi/guardrail_wiring.rb
|
|
364
369
|
- lib/samagotchi/guardrails.rb
|
|
@@ -467,6 +472,7 @@ files:
|
|
|
467
472
|
- lib/samagotchi/memory_bundle/builder.rb
|
|
468
473
|
- lib/samagotchi/memory_bundle/bundle_hook.rb
|
|
469
474
|
- lib/samagotchi/memory_bundle/entry_size.rb
|
|
475
|
+
- lib/samagotchi/memory_bundle/file_standing.rb
|
|
470
476
|
- lib/samagotchi/memory_bundle/index_size.rb
|
|
471
477
|
- lib/samagotchi/memory_bundle/index_sync.rb
|
|
472
478
|
- lib/samagotchi/memory_bundle/index_updater.rb
|
|
@@ -481,11 +487,14 @@ files:
|
|
|
481
487
|
- lib/samagotchi/memory_bundle/plugin_ref.rb
|
|
482
488
|
- lib/samagotchi/memory_bundle/profile.rb
|
|
483
489
|
- lib/samagotchi/memory_bundle/provenance.rb
|
|
490
|
+
- lib/samagotchi/memory_bundle/remerge.rb
|
|
484
491
|
- lib/samagotchi/memory_bundle/shas.rb
|
|
492
|
+
- lib/samagotchi/memory_bundle/shipped_history.rb
|
|
485
493
|
- lib/samagotchi/memory_bundle/shipped_update.rb
|
|
486
494
|
- lib/samagotchi/memory_bundle/source.rb
|
|
487
495
|
- lib/samagotchi/memory_bundle/status.rb
|
|
488
496
|
- lib/samagotchi/memory_bundle/system_bundle.rb
|
|
497
|
+
- lib/samagotchi/memory_bundle/text_merge.rb
|
|
489
498
|
- lib/samagotchi/memory_bundle/trash.rb
|
|
490
499
|
- lib/samagotchi/memory_bundle/uninstaller.rb
|
|
491
500
|
- lib/samagotchi/memory_command.rb
|
|
@@ -793,6 +802,7 @@ files:
|
|
|
793
802
|
- lib/samagotchi/web/app.rb
|
|
794
803
|
- lib/samagotchi/web/auto_update.rb
|
|
795
804
|
- lib/samagotchi/web/auto_update_record.rb
|
|
805
|
+
- lib/samagotchi/web/block_renderer_routes.rb
|
|
796
806
|
- lib/samagotchi/web/capabilities.rb
|
|
797
807
|
- lib/samagotchi/web/editor.rb
|
|
798
808
|
- lib/samagotchi/web/grants.rb
|
|
@@ -822,6 +832,11 @@ files:
|
|
|
822
832
|
- lib/samagotchi/web/public/app.js
|
|
823
833
|
- lib/samagotchi/web/public/apple-touch-icon.png
|
|
824
834
|
- lib/samagotchi/web/public/auth_lost.js
|
|
835
|
+
- lib/samagotchi/web/public/block_frame.js
|
|
836
|
+
- lib/samagotchi/web/public/block_host.js
|
|
837
|
+
- lib/samagotchi/web/public/block_open.js
|
|
838
|
+
- lib/samagotchi/web/public/block_renderers.css
|
|
839
|
+
- lib/samagotchi/web/public/block_source.js
|
|
825
840
|
- lib/samagotchi/web/public/bubbles.js
|
|
826
841
|
- lib/samagotchi/web/public/card.js
|
|
827
842
|
- lib/samagotchi/web/public/cards_place.js
|
|
@@ -946,6 +961,7 @@ files:
|
|
|
946
961
|
- lib/samagotchi/web/public/system_one_wrong.js
|
|
947
962
|
- lib/samagotchi/web/public/tally.js
|
|
948
963
|
- lib/samagotchi/web/public/task_stop.js
|
|
964
|
+
- lib/samagotchi/web/public/text_roots.js
|
|
949
965
|
- lib/samagotchi/web/public/thinking_chip.js
|
|
950
966
|
- lib/samagotchi/web/public/thinking_ticker.js
|
|
951
967
|
- lib/samagotchi/web/public/time_gaps.js
|