anima-core 1.2.0 → 1.4.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/.reek.yml +14 -8
- data/README.md +96 -23
- data/agents/codebase-analyzer.md +1 -1
- data/agents/codebase-pattern-finder.md +1 -1
- data/agents/documentation-researcher.md +1 -1
- data/agents/thoughts-analyzer.md +1 -1
- data/agents/web-search-researcher.md +2 -2
- data/app/channels/session_channel.rb +53 -35
- data/app/decorators/tool_call_decorator.rb +7 -7
- data/app/decorators/user_message_decorator.rb +3 -17
- data/app/jobs/agent_request_job.rb +15 -6
- data/app/jobs/passive_recall_job.rb +6 -11
- data/app/models/concerns/message/broadcasting.rb +1 -0
- data/app/models/goal.rb +14 -0
- data/app/models/message.rb +13 -31
- data/app/models/pending_message.rb +191 -0
- data/app/models/secret.rb +72 -0
- data/app/models/session.rb +480 -271
- data/bin/inspect-cassette +144 -0
- data/bin/release +212 -0
- data/bin/with-llms +20 -0
- data/config/database.yml +1 -0
- data/config/environments/test.rb +5 -0
- data/config/initializers/time_nanoseconds.rb +11 -0
- data/db/cable_structure.sql +9 -0
- data/db/migrate/20260328100000_create_secrets.rb +15 -0
- data/db/migrate/20260328152142_add_evicted_at_to_goals.rb +6 -0
- data/db/migrate/20260329120000_create_pending_messages.rb +11 -0
- data/db/migrate/20260330120000_add_source_to_pending_messages.rb +8 -0
- data/db/migrate/20260401180000_add_api_metrics_to_messages.rb +7 -0
- data/db/migrate/20260401210935_remove_recalled_message_ids_from_sessions.rb +5 -0
- data/db/migrate/20260403080031_add_initial_cwd_to_sessions.rb +5 -0
- data/db/queue_structure.sql +61 -0
- data/db/structure.sql +120 -0
- data/lib/agent_loop.rb +53 -51
- data/lib/agents/definition.rb +1 -1
- data/lib/analytical_brain/runner.rb +19 -6
- data/lib/analytical_brain/tools/activate_skill.rb +2 -2
- data/lib/analytical_brain/tools/assign_nickname.rb +1 -1
- data/lib/analytical_brain/tools/deactivate_skill.rb +2 -1
- data/lib/analytical_brain/tools/deactivate_workflow.rb +2 -1
- data/lib/analytical_brain/tools/finish_goal.rb +3 -0
- data/lib/analytical_brain/tools/goal_messaging.rb +28 -0
- data/lib/analytical_brain/tools/read_workflow.rb +2 -2
- data/lib/analytical_brain/tools/set_goal.rb +5 -1
- data/lib/analytical_brain/tools/update_goal.rb +5 -1
- data/lib/anima/cli/mcp/secrets.rb +4 -4
- data/lib/anima/cli/mcp.rb +4 -4
- data/lib/anima/cli.rb +41 -13
- data/lib/anima/installer.rb +20 -1
- data/lib/anima/settings.rb +37 -2
- data/lib/anima/version.rb +1 -1
- data/lib/anima.rb +1 -1
- data/lib/credential_store.rb +17 -66
- data/lib/events/agent_message.rb +14 -0
- data/lib/events/base.rb +1 -1
- data/lib/events/subscribers/persister.rb +12 -18
- data/lib/events/subscribers/subagent_message_router.rb +18 -9
- data/lib/events/user_message.rb +2 -13
- data/lib/llm/client.rb +91 -50
- data/lib/mcp/config.rb +2 -2
- data/lib/mcp/secrets.rb +7 -8
- data/lib/mneme/compressed_viewport.rb +9 -5
- data/lib/mneme/passive_recall.rb +85 -16
- data/lib/mneme/runner.rb +15 -4
- data/lib/providers/anthropic.rb +112 -7
- data/lib/shell_session.rb +239 -18
- data/lib/tools/base.rb +22 -0
- data/lib/tools/bash.rb +61 -7
- data/lib/tools/edit.rb +2 -2
- data/lib/tools/mark_goal_completed.rb +85 -0
- data/lib/tools/read.rb +2 -1
- data/lib/tools/recall.rb +98 -0
- data/lib/tools/registry.rb +41 -7
- data/lib/tools/remember.rb +1 -1
- data/lib/tools/response_truncator.rb +70 -0
- data/lib/tools/spawn_specialist.rb +11 -8
- data/lib/tools/spawn_subagent.rb +19 -13
- data/lib/tools/subagent_prompts.rb +41 -5
- data/lib/tools/think.rb +23 -0
- data/lib/tools/write.rb +1 -1
- data/lib/tui/app.rb +545 -137
- data/lib/tui/braille_spinner.rb +152 -0
- data/lib/tui/cable_client.rb +13 -20
- data/lib/tui/decorators/base_decorator.rb +40 -11
- data/lib/tui/decorators/bash_decorator.rb +3 -3
- data/lib/tui/decorators/edit_decorator.rb +7 -4
- data/lib/tui/decorators/read_decorator.rb +6 -8
- data/lib/tui/decorators/think_decorator.rb +4 -6
- data/lib/tui/decorators/web_get_decorator.rb +4 -3
- data/lib/tui/decorators/write_decorator.rb +7 -4
- data/lib/tui/flash.rb +19 -14
- data/lib/tui/formatting.rb +33 -0
- data/lib/tui/input_buffer.rb +6 -6
- data/lib/tui/message_store.rb +159 -27
- data/lib/tui/performance_logger.rb +2 -3
- data/lib/tui/screens/chat.rb +302 -103
- data/lib/tui/settings.rb +86 -0
- data/skills/activerecord/SKILL.md +1 -1
- data/skills/dragonruby/SKILL.md +1 -1
- data/skills/draper-decorators/SKILL.md +1 -1
- data/skills/gh-issue.md +1 -1
- data/skills/mcp-server/SKILL.md +1 -1
- data/skills/ratatui-ruby/SKILL.md +1 -1
- data/skills/rspec/SKILL.md +1 -1
- data/templates/config.toml +30 -1
- data/templates/tui.toml +209 -0
- metadata +24 -3
- data/config/initializers/fts5_schema_dump.rb +0 -21
- data/lib/environment_probe.rb +0 -232
data/lib/tui/settings.rb
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "toml-rb"
|
|
4
|
+
|
|
5
|
+
module TUI
|
|
6
|
+
# TUI-specific configuration backed by +~/.anima/tui.toml+.
|
|
7
|
+
#
|
|
8
|
+
# Zero Rails dependency — the TUI is a standalone client process.
|
|
9
|
+
#
|
|
10
|
+
# Accessors are generated automatically from the template TOML file.
|
|
11
|
+
# Convention: method name = +section_key+ (e.g. +[hud] min_width+ →
|
|
12
|
+
# +hud_min_width+). To add a setting, add the key to +tui.toml+ — the
|
|
13
|
+
# accessor appears automatically.
|
|
14
|
+
#
|
|
15
|
+
# Settings are loaded once at startup. Restart the TUI to pick up
|
|
16
|
+
# changes — it's a thin client, the brain won't notice.
|
|
17
|
+
#
|
|
18
|
+
# @example Reading a setting
|
|
19
|
+
# TUI::Settings.connection_default_host #=> "localhost:42134"
|
|
20
|
+
# TUI::Settings.hud_min_width #=> 24
|
|
21
|
+
#
|
|
22
|
+
# @see Anima::Installer#create_tui_config creates the config file
|
|
23
|
+
module Settings
|
|
24
|
+
DEFAULT_PATH = File.expand_path("~/.anima/tui.toml")
|
|
25
|
+
TEMPLATE_PATH = File.expand_path("../../../templates/tui.toml", __FILE__)
|
|
26
|
+
TEMPLATE = TomlRB.load_file(TEMPLATE_PATH)
|
|
27
|
+
|
|
28
|
+
class MissingConfigError < StandardError; end
|
|
29
|
+
class MissingSettingError < StandardError; end
|
|
30
|
+
|
|
31
|
+
@config_path = nil
|
|
32
|
+
|
|
33
|
+
class << self
|
|
34
|
+
TEMPLATE.each do |section, keys|
|
|
35
|
+
keys.each_key { |key| attr_reader :"#{section}_#{key}" }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Override config file path (for testing).
|
|
39
|
+
# Triggers a load so the new config takes effect immediately.
|
|
40
|
+
#
|
|
41
|
+
# @param path [String, nil] custom path, or +nil+ to restore default
|
|
42
|
+
def config_path=(path)
|
|
43
|
+
@config_path = path
|
|
44
|
+
load! if path
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @return [String] active config file path
|
|
48
|
+
def config_path
|
|
49
|
+
@config_path || DEFAULT_PATH
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Clears all loaded settings and resets to default path.
|
|
53
|
+
# Useful in test teardown.
|
|
54
|
+
def reset!
|
|
55
|
+
@config_path = nil
|
|
56
|
+
TEMPLATE.each do |section, keys|
|
|
57
|
+
keys.each_key { |key| instance_variable_set(:"@#{section}_#{key}", nil) }
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Parses the config file and populates all setting ivars.
|
|
62
|
+
#
|
|
63
|
+
# @raise [MissingConfigError] when tui.toml does not exist
|
|
64
|
+
# @raise [MissingSettingError] when a template key is missing from config
|
|
65
|
+
def load!
|
|
66
|
+
path = config_path
|
|
67
|
+
unless File.exist?(path)
|
|
68
|
+
raise MissingConfigError,
|
|
69
|
+
"TUI config file not found: #{path}. Run `anima install` to create it."
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
parsed = TomlRB.load_file(path)
|
|
73
|
+
TEMPLATE.each do |section, keys|
|
|
74
|
+
keys.each_key do |key|
|
|
75
|
+
value = parsed.dig(section, key)
|
|
76
|
+
if value.nil?
|
|
77
|
+
raise MissingSettingError,
|
|
78
|
+
"[#{section}] #{key} is not set in #{path}. Run `anima update` to add missing settings."
|
|
79
|
+
end
|
|
80
|
+
instance_variable_set(:"@#{section}_#{key}", value)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: activerecord
|
|
3
|
-
description: "Associations, validations, queries, migrations, eager loading
|
|
3
|
+
description: "Associations, validations, queries, migrations, eager loading, N+1 queries, scopes, callbacks, app/models/, db/migrate/."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ActiveRecord
|
data/skills/dragonruby/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dragonruby
|
|
3
|
-
description: "2D game development — game loops, sprites, input, collisions, scenes
|
|
3
|
+
description: "2D game development — game loops, sprites, input, collisions, scenes, DRGTK, args.outputs/state/inputs."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# DragonRuby Game Toolkit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draper-decorators
|
|
3
|
-
description: "Decorator patterns for Rails views — presentation logic separated from models
|
|
3
|
+
description: "Decorator patterns for Rails views — presentation logic separated from models, *_decorator.rb, app/decorators/."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Draper Decorators for Rails
|
data/skills/gh-issue.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gh-issue
|
|
3
|
-
description: "Issue writing with WHAT/WHY/HOW framework
|
|
3
|
+
description: "Issue writing with WHAT/WHY/HOW framework — tickets, bug reports, feature requests, issue descriptions, unclear rationale in existing issues."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GitHub Issue Writing
|
data/skills/mcp-server/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mcp-server
|
|
3
|
-
description: "Ruby server development — tools, prompts, resources, transport
|
|
3
|
+
description: "Ruby MCP server development — tools, prompts, resources, transport, the mcp gem, LLM tool integrations."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# MCP Ruby SDK - Server Development Guide
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ratatui-ruby
|
|
3
|
-
description: "Terminal UI development — widgets, layouts, events, Tea MVU
|
|
3
|
+
description: "Terminal UI development — widgets, layouts, events, Tea MVU, terminal rendering."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# RatatuiRuby
|
data/skills/rspec/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rspec
|
|
3
|
-
description: "Testing with FactoryBot — matchers, test doubles, shared examples
|
|
3
|
+
description: "Testing with FactoryBot — matchers, test doubles, shared examples, describe/it/expect blocks, *_spec.rb files, test strategy."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# RSpec Testing
|
data/templates/config.toml
CHANGED
|
@@ -29,7 +29,18 @@ max_tool_rounds = 500
|
|
|
29
29
|
|
|
30
30
|
# Context window budget — tokens reserved for conversation history.
|
|
31
31
|
# Set this based on your model's context window minus system prompt.
|
|
32
|
-
token_budget =
|
|
32
|
+
token_budget = 120_000
|
|
33
|
+
|
|
34
|
+
# Maximum character length for the Think tool's thoughts parameter.
|
|
35
|
+
# Sub-agents receive half this budget (their tasks are less complex).
|
|
36
|
+
thinking_budget = 10_000
|
|
37
|
+
|
|
38
|
+
# Model for sub-agent sessions. Sonnet is cost-effective for focused tasks.
|
|
39
|
+
subagent_model = "claude-sonnet-4-6"
|
|
40
|
+
|
|
41
|
+
# Context window budget for sub-agent sessions.
|
|
42
|
+
# Smaller than main to stay out of the "dumb zone" (~last 10% of context).
|
|
43
|
+
subagent_token_budget = 90_000
|
|
33
44
|
|
|
34
45
|
# ─── Timeouts (seconds) ─────────────────────────────────────────
|
|
35
46
|
|
|
@@ -51,6 +62,10 @@ web_request = 10
|
|
|
51
62
|
# Also used as the default deadline for orphan detection in heal_orphaned_tool_calls!.
|
|
52
63
|
tool = 180
|
|
53
64
|
|
|
65
|
+
# How often (seconds) to poll for user interrupt during long-running commands.
|
|
66
|
+
# Lower = faster Escape response, higher = less DB overhead.
|
|
67
|
+
interrupt_check = 2
|
|
68
|
+
|
|
54
69
|
# ─── Shell ──────────────────────────────────────────────────────
|
|
55
70
|
|
|
56
71
|
[shell]
|
|
@@ -77,6 +92,16 @@ max_web_response_bytes = 100_000
|
|
|
77
92
|
# Minimum characters of extracted content before flagging as possibly incomplete.
|
|
78
93
|
min_web_content_chars = 100
|
|
79
94
|
|
|
95
|
+
# Maximum characters of tool output before truncation (head + tail + temp file).
|
|
96
|
+
# ~6000 chars ≈ ~2000 tokens. Most useful info fits in 10+10 lines; agent can
|
|
97
|
+
# read the saved temp file for more.
|
|
98
|
+
max_tool_response_chars = 6_000
|
|
99
|
+
|
|
100
|
+
# Maximum characters of sub-agent result before truncation.
|
|
101
|
+
# Sub-agent output is already curated — needs a generous but bounded limit.
|
|
102
|
+
# ~24000 chars ≈ ~8000 tokens.
|
|
103
|
+
max_subagent_response_chars = 24_000
|
|
104
|
+
|
|
80
105
|
# ─── Environment ──────────────────────────────────────────────
|
|
81
106
|
|
|
82
107
|
[environment]
|
|
@@ -155,6 +180,10 @@ l2_budget_fraction = 0.05
|
|
|
155
180
|
# Number of uncovered Level 1 snapshots that triggers Level 2 compression.
|
|
156
181
|
l2_snapshot_threshold = 5
|
|
157
182
|
|
|
183
|
+
# Fraction of the viewport to evict in batch when Mneme runs.
|
|
184
|
+
# Matches the viewport_fraction (Mneme's zone = eviction zone).
|
|
185
|
+
eviction_fraction = 0.33
|
|
186
|
+
|
|
158
187
|
# Fraction of the main viewport token budget reserved for pinned messages.
|
|
159
188
|
# Pinned messages appear between snapshots and the sliding window in the Goals section.
|
|
160
189
|
pinned_budget_fraction = 0.05
|
data/templates/tui.toml
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# TUI Configuration
|
|
2
|
+
#
|
|
3
|
+
# Presentation settings for the Anima terminal interface.
|
|
4
|
+
# Changes take effect immediately — no restart needed.
|
|
5
|
+
#
|
|
6
|
+
# These settings only affect the TUI client, not the brain server.
|
|
7
|
+
# Brain settings live in config.toml.
|
|
8
|
+
|
|
9
|
+
# ─── Connection ──────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
[connection]
|
|
12
|
+
|
|
13
|
+
# Brain server address (host:port). Override per-launch with --host flag.
|
|
14
|
+
default_host = "localhost:42134"
|
|
15
|
+
|
|
16
|
+
# Seconds to wait for WebSocket thread cleanup on disconnect.
|
|
17
|
+
disconnect_timeout = 2
|
|
18
|
+
|
|
19
|
+
# Seconds between connection status checks during connect/reconnect.
|
|
20
|
+
poll_interval = 0.1
|
|
21
|
+
|
|
22
|
+
# Seconds before a connection attempt is considered timed out.
|
|
23
|
+
timeout = 10
|
|
24
|
+
|
|
25
|
+
# Maximum reconnection attempts before giving up.
|
|
26
|
+
max_reconnect_attempts = 10
|
|
27
|
+
|
|
28
|
+
# Initial delay before first reconnection attempt (seconds).
|
|
29
|
+
# Doubles with each subsequent attempt up to backoff_cap.
|
|
30
|
+
backoff_base = 1.0
|
|
31
|
+
|
|
32
|
+
# Maximum delay between reconnection attempts (seconds).
|
|
33
|
+
backoff_cap = 30.0
|
|
34
|
+
|
|
35
|
+
# Seconds without an Action Cable ping before the connection is stale.
|
|
36
|
+
ping_stale_threshold = 6.0
|
|
37
|
+
|
|
38
|
+
# ─── HUD ─────────────────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
[hud]
|
|
41
|
+
|
|
42
|
+
# Minimum width (columns) for the info panel.
|
|
43
|
+
# The HUD occupies 1/3 of screen width, clamped to this minimum.
|
|
44
|
+
min_width = 24
|
|
45
|
+
|
|
46
|
+
# Lines scrolled per keyboard arrow event.
|
|
47
|
+
scroll_step = 1
|
|
48
|
+
|
|
49
|
+
# Lines scrolled per mouse wheel event.
|
|
50
|
+
mouse_scroll_step = 2
|
|
51
|
+
|
|
52
|
+
# ─── Chat ────────────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
[chat]
|
|
55
|
+
|
|
56
|
+
# Minimum height (rows) for the text input area.
|
|
57
|
+
min_input_height = 3
|
|
58
|
+
|
|
59
|
+
# Lines scrolled per keyboard arrow event.
|
|
60
|
+
scroll_step = 1
|
|
61
|
+
|
|
62
|
+
# Lines scrolled per mouse wheel event.
|
|
63
|
+
mouse_scroll_step = 2
|
|
64
|
+
|
|
65
|
+
# Entries rendered before scroll target for upward scroll margin.
|
|
66
|
+
viewport_back_buffer = 3
|
|
67
|
+
|
|
68
|
+
# Viewports worth of lines to pre-build for smooth scrolling.
|
|
69
|
+
viewport_overflow_multiplier = 2
|
|
70
|
+
|
|
71
|
+
# Entries from the end before including all trailing entries.
|
|
72
|
+
viewport_bottom_threshold = 10
|
|
73
|
+
|
|
74
|
+
# ─── Terminal ────────────────────────────────────────────────────
|
|
75
|
+
|
|
76
|
+
[terminal]
|
|
77
|
+
|
|
78
|
+
# How often the watchdog checks if the controlling terminal is alive (seconds).
|
|
79
|
+
check_interval = 0.5
|
|
80
|
+
|
|
81
|
+
# Grace period for watchdog thread to exit before force-killing it (seconds).
|
|
82
|
+
shutdown_timeout = 1
|
|
83
|
+
|
|
84
|
+
# ─── Token Dialog ────────────────────────────────────────────────
|
|
85
|
+
|
|
86
|
+
[token_dialog]
|
|
87
|
+
|
|
88
|
+
# Leading characters shown unmasked in the token input.
|
|
89
|
+
# Default 14 matches the "sk-ant-oat01-" prefix plus one secret character.
|
|
90
|
+
mask_visible = 14
|
|
91
|
+
|
|
92
|
+
# Maximum stars shown in the masked portion.
|
|
93
|
+
mask_stars = 4
|
|
94
|
+
|
|
95
|
+
# Height (rows) of the token setup popup.
|
|
96
|
+
popup_height = 14
|
|
97
|
+
|
|
98
|
+
# Minimum width (columns) of the token setup popup.
|
|
99
|
+
popup_min_width = 44
|
|
100
|
+
|
|
101
|
+
# ─── Session Picker ──────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
[session_picker]
|
|
104
|
+
|
|
105
|
+
# Sessions displayed per page.
|
|
106
|
+
page_size = 9
|
|
107
|
+
|
|
108
|
+
# Maximum sessions fetched from the brain for client-side pagination.
|
|
109
|
+
fetch_limit = 50
|
|
110
|
+
|
|
111
|
+
# ─── Flash ───────────────────────────────────────────────────────
|
|
112
|
+
|
|
113
|
+
[flash]
|
|
114
|
+
|
|
115
|
+
# Seconds before flash notifications auto-dismiss.
|
|
116
|
+
auto_dismiss_seconds = 20.0
|
|
117
|
+
|
|
118
|
+
# Flash area occupies at most 1/N of the chat pane height.
|
|
119
|
+
max_height_fraction = 3
|
|
120
|
+
|
|
121
|
+
# ─── Input ───────────────────────────────────────────────────────
|
|
122
|
+
|
|
123
|
+
[input]
|
|
124
|
+
|
|
125
|
+
# Maximum character length for the text input buffer.
|
|
126
|
+
max_length = 10_000
|
|
127
|
+
|
|
128
|
+
# ─── Message Store ───────────────────────────────────────────────
|
|
129
|
+
|
|
130
|
+
[message_store]
|
|
131
|
+
|
|
132
|
+
# Maximum cache history entries for sparkline rendering.
|
|
133
|
+
# Each braille character encodes 2 data points, so 200 entries
|
|
134
|
+
# render as ~100 characters.
|
|
135
|
+
max_cache_history = 200
|
|
136
|
+
|
|
137
|
+
# ─── Theme ────────────────────────────────────────────────────────
|
|
138
|
+
|
|
139
|
+
[theme]
|
|
140
|
+
|
|
141
|
+
# Progress bar width in characters.
|
|
142
|
+
progress_bar_width = 8
|
|
143
|
+
|
|
144
|
+
# Rate limit color thresholds (percentage).
|
|
145
|
+
# Below warning = green, between warning and critical = yellow, above critical = red.
|
|
146
|
+
rate_limit_warning = 70
|
|
147
|
+
rate_limit_critical = 90
|
|
148
|
+
|
|
149
|
+
# Cache hit color thresholds (percentage).
|
|
150
|
+
# Above good = green, between low and good = yellow, below low = red.
|
|
151
|
+
cache_hit_good = 70
|
|
152
|
+
cache_hit_low = 30
|
|
153
|
+
|
|
154
|
+
# Chat message background colors (256-color palette codes).
|
|
155
|
+
# 22 = dark green (#005f00), 17 = dark navy (#00005f).
|
|
156
|
+
# Full palette: https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
|
|
157
|
+
user_message_bg = 22
|
|
158
|
+
assistant_message_bg = 17
|
|
159
|
+
|
|
160
|
+
# Scrollbar colors.
|
|
161
|
+
scrollbar_thumb = "cyan"
|
|
162
|
+
scrollbar_track = "dark_gray"
|
|
163
|
+
|
|
164
|
+
# Semantic colors — consistent visual language across the TUI.
|
|
165
|
+
# Success (connected, completed, saved), error (disconnected, failed),
|
|
166
|
+
# warning (connecting, loading, in-progress), info (labels, highlights),
|
|
167
|
+
# muted (de-emphasized, idle, hints), accent (tool calls, special actions).
|
|
168
|
+
color_success = "green"
|
|
169
|
+
color_error = "red"
|
|
170
|
+
color_warning = "yellow"
|
|
171
|
+
color_info = "cyan"
|
|
172
|
+
color_muted = "dark_gray"
|
|
173
|
+
color_accent = "magenta"
|
|
174
|
+
color_text = "white"
|
|
175
|
+
|
|
176
|
+
# Selection highlight (session picker, menus).
|
|
177
|
+
highlight_fg = "black"
|
|
178
|
+
highlight_bg = "cyan"
|
|
179
|
+
|
|
180
|
+
# Flash notification colors.
|
|
181
|
+
flash_error_fg = "white"
|
|
182
|
+
flash_error_bg = "red"
|
|
183
|
+
flash_warning_fg = "black"
|
|
184
|
+
flash_warning_bg = "yellow"
|
|
185
|
+
flash_info_fg = "white"
|
|
186
|
+
flash_info_bg = "blue"
|
|
187
|
+
|
|
188
|
+
# Token count color for expensive responses (10k-20k tokens).
|
|
189
|
+
# 208 = orange in 256-color palette.
|
|
190
|
+
color_expensive = 208
|
|
191
|
+
|
|
192
|
+
# Tool response CRUD colors — distinguish read/create/update at a glance.
|
|
193
|
+
tool_read_color = "light_blue"
|
|
194
|
+
tool_create_color = "light_green"
|
|
195
|
+
tool_update_color = "light_yellow"
|
|
196
|
+
|
|
197
|
+
# Border colors.
|
|
198
|
+
border_focused = "yellow"
|
|
199
|
+
border_normal = "white"
|
|
200
|
+
border_input_connected = "green"
|
|
201
|
+
border_input_connecting = "yellow"
|
|
202
|
+
border_input_disconnected = "dark_gray"
|
|
203
|
+
|
|
204
|
+
# ─── Performance ─────────────────────────────────────────────────
|
|
205
|
+
|
|
206
|
+
[performance]
|
|
207
|
+
|
|
208
|
+
# File path for TUI performance debug logs (relative to working directory).
|
|
209
|
+
log_path = "log/tui_performance.log"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anima-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yevhenii Hurin
|
|
@@ -277,12 +277,17 @@ files:
|
|
|
277
277
|
- app/models/goal.rb
|
|
278
278
|
- app/models/goal_pinned_message.rb
|
|
279
279
|
- app/models/message.rb
|
|
280
|
+
- app/models/pending_message.rb
|
|
280
281
|
- app/models/pinned_message.rb
|
|
282
|
+
- app/models/secret.rb
|
|
281
283
|
- app/models/session.rb
|
|
282
284
|
- app/models/snapshot.rb
|
|
285
|
+
- bin/inspect-cassette
|
|
283
286
|
- bin/jobs
|
|
284
287
|
- bin/rails
|
|
285
288
|
- bin/rake
|
|
289
|
+
- bin/release
|
|
290
|
+
- bin/with-llms
|
|
286
291
|
- config.ru
|
|
287
292
|
- config/application.rb
|
|
288
293
|
- config/boot.rb
|
|
@@ -293,13 +298,14 @@ files:
|
|
|
293
298
|
- config/environments/production.rb
|
|
294
299
|
- config/environments/test.rb
|
|
295
300
|
- config/initializers/event_subscribers.rb
|
|
296
|
-
- config/initializers/fts5_schema_dump.rb
|
|
297
301
|
- config/initializers/inflections.rb
|
|
302
|
+
- config/initializers/time_nanoseconds.rb
|
|
298
303
|
- config/puma.rb
|
|
299
304
|
- config/queue.yml
|
|
300
305
|
- config/recurring.yml
|
|
301
306
|
- config/routes.rb
|
|
302
307
|
- db/cable_schema.rb
|
|
308
|
+
- db/cable_structure.sql
|
|
303
309
|
- db/migrate/.keep
|
|
304
310
|
- db/migrate/20260308124202_create_sessions.rb
|
|
305
311
|
- db/migrate/20260308124203_create_events.rb
|
|
@@ -324,8 +330,17 @@ files:
|
|
|
324
330
|
- db/migrate/20260321140000_create_events_fts_index.rb
|
|
325
331
|
- db/migrate/20260321140100_add_recalled_event_ids_to_sessions.rb
|
|
326
332
|
- db/migrate/20260326180000_rename_event_to_message.rb
|
|
333
|
+
- db/migrate/20260328100000_create_secrets.rb
|
|
334
|
+
- db/migrate/20260328152142_add_evicted_at_to_goals.rb
|
|
335
|
+
- db/migrate/20260329120000_create_pending_messages.rb
|
|
336
|
+
- db/migrate/20260330120000_add_source_to_pending_messages.rb
|
|
337
|
+
- db/migrate/20260401180000_add_api_metrics_to_messages.rb
|
|
338
|
+
- db/migrate/20260401210935_remove_recalled_message_ids_from_sessions.rb
|
|
339
|
+
- db/migrate/20260403080031_add_initial_cwd_to_sessions.rb
|
|
327
340
|
- db/queue_schema.rb
|
|
341
|
+
- db/queue_structure.sql
|
|
328
342
|
- db/seeds.rb
|
|
343
|
+
- db/structure.sql
|
|
329
344
|
- exe/anima
|
|
330
345
|
- lib/agent_loop.rb
|
|
331
346
|
- lib/agents/definition.rb
|
|
@@ -338,6 +353,7 @@ files:
|
|
|
338
353
|
- lib/analytical_brain/tools/deactivate_workflow.rb
|
|
339
354
|
- lib/analytical_brain/tools/everything_is_ready.rb
|
|
340
355
|
- lib/analytical_brain/tools/finish_goal.rb
|
|
356
|
+
- lib/analytical_brain/tools/goal_messaging.rb
|
|
341
357
|
- lib/analytical_brain/tools/read_workflow.rb
|
|
342
358
|
- lib/analytical_brain/tools/rename_session.rb
|
|
343
359
|
- lib/analytical_brain/tools/set_goal.rb
|
|
@@ -352,7 +368,6 @@ files:
|
|
|
352
368
|
- lib/anima/spinner.rb
|
|
353
369
|
- lib/anima/version.rb
|
|
354
370
|
- lib/credential_store.rb
|
|
355
|
-
- lib/environment_probe.rb
|
|
356
371
|
- lib/events/agent_message.rb
|
|
357
372
|
- lib/events/base.rb
|
|
358
373
|
- lib/events/bounce_back.rb
|
|
@@ -389,11 +404,14 @@ files:
|
|
|
389
404
|
- lib/tools/base.rb
|
|
390
405
|
- lib/tools/bash.rb
|
|
391
406
|
- lib/tools/edit.rb
|
|
407
|
+
- lib/tools/mark_goal_completed.rb
|
|
392
408
|
- lib/tools/mcp_tool.rb
|
|
393
409
|
- lib/tools/open_issue.rb
|
|
394
410
|
- lib/tools/read.rb
|
|
411
|
+
- lib/tools/recall.rb
|
|
395
412
|
- lib/tools/registry.rb
|
|
396
413
|
- lib/tools/remember.rb
|
|
414
|
+
- lib/tools/response_truncator.rb
|
|
397
415
|
- lib/tools/spawn_specialist.rb
|
|
398
416
|
- lib/tools/spawn_subagent.rb
|
|
399
417
|
- lib/tools/subagent_prompts.rb
|
|
@@ -401,6 +419,7 @@ files:
|
|
|
401
419
|
- lib/tools/web_get.rb
|
|
402
420
|
- lib/tools/write.rb
|
|
403
421
|
- lib/tui/app.rb
|
|
422
|
+
- lib/tui/braille_spinner.rb
|
|
404
423
|
- lib/tui/cable_client.rb
|
|
405
424
|
- lib/tui/decorators/base_decorator.rb
|
|
406
425
|
- lib/tui/decorators/bash_decorator.rb
|
|
@@ -416,6 +435,7 @@ files:
|
|
|
416
435
|
- lib/tui/message_store.rb
|
|
417
436
|
- lib/tui/performance_logger.rb
|
|
418
437
|
- lib/tui/screens/chat.rb
|
|
438
|
+
- lib/tui/settings.rb
|
|
419
439
|
- lib/workflows/definition.rb
|
|
420
440
|
- lib/workflows/registry.rb
|
|
421
441
|
- skills/activerecord/SKILL.md
|
|
@@ -599,6 +619,7 @@ files:
|
|
|
599
619
|
- skills/rspec/references/rails.md
|
|
600
620
|
- templates/config.toml
|
|
601
621
|
- templates/soul.md
|
|
622
|
+
- templates/tui.toml
|
|
602
623
|
- workflows/commit.md
|
|
603
624
|
- workflows/create_handoff.md
|
|
604
625
|
- workflows/create_note.md
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Skip FTS5 virtual tables during Ruby schema dump.
|
|
4
|
-
# Rails' schema dumper can't express contentless FTS5 tables — the
|
|
5
|
-
# migration handles creation. The schema.rb omits the virtual table,
|
|
6
|
-
# and db:prepare runs pending migrations to recreate it.
|
|
7
|
-
ActiveSupport.on_load(:active_record) do
|
|
8
|
-
require "active_record/connection_adapters/sqlite3/schema_dumper"
|
|
9
|
-
|
|
10
|
-
ActiveRecord::ConnectionAdapters::SQLite3::SchemaDumper.prepend(Module.new do
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def virtual_tables(stream)
|
|
14
|
-
# Intentionally empty — FTS5 tables are managed by migrations.
|
|
15
|
-
# The default implementation crashes on contentless FTS5 arguments.
|
|
16
|
-
end
|
|
17
|
-
end)
|
|
18
|
-
rescue LoadError
|
|
19
|
-
# Not using SQLite3 adapter — nothing to patch.
|
|
20
|
-
nil
|
|
21
|
-
end
|