symphony-code 0.0.6__tar.gz → 0.0.7__tar.gz
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.
- {symphony_code-0.0.6 → symphony_code-0.0.7}/PKG-INFO +3 -3
- {symphony_code-0.0.6 → symphony_code-0.0.7}/pyproject.toml +3 -3
- {symphony_code-0.0.6 → symphony_code-0.0.7}/pyproject.toml.orig +3 -3
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/learning/addon.py +2 -2
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/learning/loop.py +10 -2
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/jsonl.py +44 -11
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/__init__.py +5 -1
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/resolve.py +11 -2
- symphony_code-0.0.7/src/coding_agent/addons/plugins/themes.py +143 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/agent.py +5 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/cli.py +5 -1
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/catalog.py +1 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/installed.py +3 -1
- symphony_code-0.0.7/src/coding_agent/commands/themes_cli.py +75 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/config/__init__.py +6 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/config/config.py +15 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/run/cli.py +6 -3
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/search.py +18 -5
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/EFFICIENCY_PLAN.md +3 -2
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/app.py +68 -8
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/chrome/topbar.py +4 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/commands/manager.py +3 -0
- symphony_code-0.0.7/src/coding_agent/tui/commands/theme.py +53 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/runtime/events.py +17 -8
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/runtime/turn.py +8 -1
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/diff.py +7 -7
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/history.py +47 -1
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/resume.py +8 -4
- symphony_code-0.0.7/src/coding_agent/tui/screens/theme_picker.py +103 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/theme/__init__.py +4 -2
- symphony_code-0.0.7/src/coding_agent/tui/theme/active.py +44 -0
- symphony_code-0.0.7/src/coding_agent/tui/theme/ansi_colors.py +63 -0
- symphony_code-0.0.7/src/coding_agent/tui/theme/base_palettes.py +104 -0
- symphony_code-0.0.7/src/coding_agent/tui/theme/claude_slots.py +67 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/theme/load.py +31 -13
- symphony_code-0.0.7/src/coding_agent/tui/theme/picker_css.py +35 -0
- symphony_code-0.0.7/src/coding_agent/tui/theme/plugin_palette.py +65 -0
- symphony_code-0.0.7/src/coding_agent/tui/theme/style.py +130 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/theme/theme.toml +3 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/calls.py +6 -3
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/messages.py +31 -9
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/surface.py +16 -1
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/updates.py +5 -3
- symphony_code-0.0.6/src/coding_agent/tui/theme/style.py +0 -95
- {symphony_code-0.0.6 → symphony_code-0.0.7}/LICENSE +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/README.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/_lazy.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/approvals.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/artifacts/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/artifacts/addon.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/artifacts/capture.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/artifacts/kinds.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/artifacts/noise.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/artifacts/store.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/compaction/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/compaction/addon.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/compaction/compactor.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/compaction/prompts.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/compaction/transcript.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/addon.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/evaluators.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/handlers.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/policy.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/protocol.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/evaluation/state.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/langfuse/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/langfuse/addon.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/langfuse/install.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/langfuse/serialize.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/learning/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/learning/prompts.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/learning/sanitize.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/learning/store.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/manager/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/manager/bridge.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/manager/discovery.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/manager/report.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/manager/runtime.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/manager/tool_changes.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/active.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/artifacts.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/collection.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/compatibility.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/images.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/persistence/presentation.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/install.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/manifest.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/marketplace.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/marketplaces.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/plugins/state.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/args.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/addon-authoring/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/context-budget/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/orient-first/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/security-boundary/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/skill-discipline/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/surgical-edit/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/systematic-debug/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/bundled_skills/verify-before-done/SKILL.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/catalog.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/discovery.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/frontmatter.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/install.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/models.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/skills/registry.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/addon.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/credentials.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/playback.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/speak.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/stream.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/addons/voice/summary.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/bench/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/bench/cli.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/bench/patch.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/cli_support.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/extension_slash.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/jev_argument.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/plugins_cli.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/commands/skills_cli.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/config/credentials.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/config/personalities.json +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/config/personalities.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/config/prompts.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/extensions/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/extensions/diagnostics.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/extensions/roots.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/extensions/source.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/acp/README.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/acp/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/acp/mapping.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/acp/server.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/acp/transport.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/README.md +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/catalog.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/commands.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/requests.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/server.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/protocols/stdio/transport.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/py.typed +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/resources/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/resources/usage.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/run/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/run/detach.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/run/interrupted.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/run/log_sink.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tls.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/ask_user.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/base.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/bash.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/bash_jobs.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/generate_image.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/memory.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/patch.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/read_file.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/save_artifact.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/summary.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/web_search.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tools/write_file.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/__main__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/chrome/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/chrome/footer.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/chrome/session.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/commands/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/commands/catalog.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/composer/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/composer/input.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/composer/slash_menu.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/composer/surface.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/composer/voice.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/composer/voice_mode.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/runtime/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/runtime/sink.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/runtime/state.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/runtime/subagent.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/artifacts.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/ask.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/context.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/cost.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/dashboard.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/extensions.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/file_selector.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/langfuse.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/learning.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/modal.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/onboard.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/update.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/screens/usage.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/terminal_title.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/activity.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/code_view.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/images.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/labels.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/modal.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/partial_args.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/tools/snapshots.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/artifact.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/decision.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/process.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/tui/transcript/thinking_markdown.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/web/__init__.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/web/bundle.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/web/server.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/web/sessions.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/web/worker.py +0 -0
- {symphony_code-0.0.6 → symphony_code-0.0.7}/src/coding_agent/widget_fields.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: symphony-code
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: Symphony coding agent: workspace tools, JSONL sessions, and a Textual TUI on top of symphony-harness (import as coding_agent; run as `symphony`)
|
|
5
5
|
Author: Sarthak Chauhan
|
|
6
6
|
Author-email: Sarthak Chauhan <sarthakchauhann@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: symphony-core>=0.0.
|
|
10
|
-
Requires-Dist: symphony-harness>=0.0.
|
|
9
|
+
Requires-Dist: symphony-core>=0.0.7
|
|
10
|
+
Requires-Dist: symphony-harness>=0.0.7
|
|
11
11
|
Requires-Dist: pillow>=12.3.0
|
|
12
12
|
Requires-Dist: pydantic>=2.0.0
|
|
13
13
|
Requires-Dist: certifi>=2024.2.2
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "symphony-code"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.7"
|
|
4
4
|
description = "Symphony coding agent: workspace tools, JSONL sessions, and a Textual TUI on top of symphony-harness (import as coding_agent; run as `symphony`)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
7
7
|
license-files = ["LICENSE"]
|
|
8
8
|
requires-python = ">=3.11"
|
|
9
9
|
dependencies = [
|
|
10
|
-
"symphony-core>=0.0.
|
|
11
|
-
"symphony-harness>=0.0.
|
|
10
|
+
"symphony-core>=0.0.7",
|
|
11
|
+
"symphony-harness>=0.0.7",
|
|
12
12
|
"pillow>=12.3.0",
|
|
13
13
|
"pydantic>=2.0.0",
|
|
14
14
|
"certifi>=2024.2.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "symphony-code"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.7"
|
|
4
4
|
description = "Symphony coding agent: workspace tools, JSONL sessions, and a Textual TUI on top of symphony-harness (import as coding_agent; run as `symphony`)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -10,8 +10,8 @@ authors = [
|
|
|
10
10
|
]
|
|
11
11
|
requires-python = ">=3.11"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"symphony-core>=0.0.
|
|
14
|
-
"symphony-harness>=0.0.
|
|
13
|
+
"symphony-core>=0.0.7",
|
|
14
|
+
"symphony-harness>=0.0.7",
|
|
15
15
|
"pillow>=12.3.0",
|
|
16
16
|
"pydantic>=2.0.0",
|
|
17
17
|
# coding_agent.tls: stdlib HTTPS on uv-managed Pythons without a CA store.
|
|
@@ -122,7 +122,7 @@ class LearningAddon(Addon):
|
|
|
122
122
|
async def before_run(self, **payload: Any) -> None:
|
|
123
123
|
self.task = next((text_from_content(m.content) for m in reversed(payload.get("messages") or [])
|
|
124
124
|
if isinstance(m, Message) and m.role == "user"), str(payload.get("task") or ""))
|
|
125
|
-
self.loop.
|
|
125
|
+
self.loop.begin_run()
|
|
126
126
|
|
|
127
127
|
async def after_turn(self, **payload: Any) -> None:
|
|
128
128
|
if self.should_review():
|
|
@@ -174,7 +174,7 @@ class SessionMemoryAddon(Addon):
|
|
|
174
174
|
self.task = next((text_from_content(m.content) for m in reversed(payload.get("messages") or [])
|
|
175
175
|
if isinstance(m, Message) and m.role == "user"), str(payload.get("task") or ""))
|
|
176
176
|
if self.should_inject:
|
|
177
|
-
self.loop.
|
|
177
|
+
self.loop.begin_run()
|
|
178
178
|
|
|
179
179
|
async def after_turn(self, **payload: Any) -> None:
|
|
180
180
|
if self.should_inject:
|
|
@@ -112,6 +112,7 @@ class LearningLoop:
|
|
|
112
112
|
self.context_limit = context_limit
|
|
113
113
|
self.context_max_chars = context_max_chars
|
|
114
114
|
self._worker: asyncio.Task[None] | None = None
|
|
115
|
+
self._last_capture_job: str | None = None
|
|
115
116
|
self._recaps: dict[str, Emit] = {}
|
|
116
117
|
# Control-plane emit for capture notices; bound by ``LearningAddon``.
|
|
117
118
|
self.emit: Emit | None = None
|
|
@@ -121,11 +122,18 @@ class LearningLoop:
|
|
|
121
122
|
job_id = self.store.enqueue_capture(
|
|
122
123
|
sanitize_task(task), _capture_messages(messages), self.store.session_id,
|
|
123
124
|
)
|
|
124
|
-
self.
|
|
125
|
+
if job_id != self._last_capture_job:
|
|
126
|
+
self._last_capture_job = job_id
|
|
127
|
+
self.resume()
|
|
125
128
|
return job_id
|
|
126
129
|
|
|
130
|
+
def begin_run(self) -> None:
|
|
131
|
+
"""Allow pending captures to retry on a subsequent run."""
|
|
132
|
+
self._last_capture_job = None
|
|
133
|
+
self.resume()
|
|
134
|
+
|
|
127
135
|
def resume(self) -> None:
|
|
128
|
-
"""Resume durable pending jobs
|
|
136
|
+
"""Resume durable pending jobs (also safe outside an event loop)."""
|
|
129
137
|
if self._worker is not None and not self._worker.done():
|
|
130
138
|
return
|
|
131
139
|
try:
|
|
@@ -8,6 +8,7 @@ reconstructed from those events; no separate context file is written.
|
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
11
|
+
import asyncio
|
|
11
12
|
import fcntl
|
|
12
13
|
import hashlib
|
|
13
14
|
import json
|
|
@@ -166,6 +167,7 @@ class _SessionIndex:
|
|
|
166
167
|
self.event_keys: set[tuple[str, int]] = set()
|
|
167
168
|
self.collected: set[tuple[str, int]] = set()
|
|
168
169
|
self.collectable: Dict[str, List[tuple[str, int]]] = {}
|
|
170
|
+
self.collectable_keys: set[tuple[str, int]] = set()
|
|
169
171
|
self.run_started: set[str] = set()
|
|
170
172
|
self.latest_terminal_run = ""
|
|
171
173
|
self.messages: List[Dict[str, Any]] = []
|
|
@@ -231,8 +233,9 @@ class _SessionIndex:
|
|
|
231
233
|
return
|
|
232
234
|
if run_id in self.run_started and event_type in COLLECTABLE_EVENT_TYPES:
|
|
233
235
|
bucket = self.collectable.setdefault(run_id, [])
|
|
234
|
-
if key not in self.collected and key not in
|
|
236
|
+
if key not in self.collected and key not in self.collectable_keys:
|
|
235
237
|
bucket.append(key)
|
|
238
|
+
self.collectable_keys.add(key)
|
|
236
239
|
|
|
237
240
|
def _note_message(self, entry: Dict[str, Any], seq: int) -> None:
|
|
238
241
|
payload = JsonlPersistence._message_payload_from_entry(entry)
|
|
@@ -891,8 +894,18 @@ class JsonlPersistence:
|
|
|
891
894
|
saved = self._read_listing(session_id, size)
|
|
892
895
|
if saved is not None:
|
|
893
896
|
return saved
|
|
894
|
-
|
|
895
|
-
|
|
897
|
+
# Older bundles may not have a listing yet. Building a display row
|
|
898
|
+
# must not hydrate every message/image or repair every artifact in the
|
|
899
|
+
# journal; those are only needed when this session is actually opened.
|
|
900
|
+
with self._session_lock(session_id):
|
|
901
|
+
self._sync_legacy(session_id)
|
|
902
|
+
self._require_version(session_id)
|
|
903
|
+
path = self._path(session_id)
|
|
904
|
+
size = self._mark(path)
|
|
905
|
+
listing = self._listing_from_entries(self._load_transcript(path))
|
|
906
|
+
listing["transcript_size"] = size
|
|
907
|
+
refresh_snapshot(self._listing_path(session_id), listing)
|
|
908
|
+
return listing
|
|
896
909
|
|
|
897
910
|
def _transcript_messages(self, entries: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
|
898
911
|
"""Return every persisted message, including messages before compaction."""
|
|
@@ -904,9 +917,22 @@ class JsonlPersistence:
|
|
|
904
917
|
return
|
|
905
918
|
fields = self.fields
|
|
906
919
|
for name, body in fields.apply(event_type, payload) if fields is not None else [(event_type, payload)]:
|
|
907
|
-
self.
|
|
908
|
-
|
|
909
|
-
|
|
920
|
+
await self._durable_thread(self._append_event_sync, name, body)
|
|
921
|
+
|
|
922
|
+
@staticmethod
|
|
923
|
+
async def _durable_thread(function: Callable[..., Any], *args: Any) -> Any:
|
|
924
|
+
write = asyncio.create_task(asyncio.to_thread(function, *args))
|
|
925
|
+
try:
|
|
926
|
+
return await asyncio.shield(write)
|
|
927
|
+
except asyncio.CancelledError:
|
|
928
|
+
# Do not leave a write running behind subsequent persistence operations.
|
|
929
|
+
await write
|
|
930
|
+
raise
|
|
931
|
+
|
|
932
|
+
def _append_event_sync(self, name: str, body: dict[str, Any]) -> None:
|
|
933
|
+
self._journal(name, body)
|
|
934
|
+
if name == "usage":
|
|
935
|
+
self._record_usage_cost(body)
|
|
910
936
|
|
|
911
937
|
def _record_usage_cost(self, payload: dict[str, Any]) -> None:
|
|
912
938
|
if payload.get("parent_id"):
|
|
@@ -1068,6 +1094,9 @@ class JsonlPersistence:
|
|
|
1068
1094
|
session_id: str,
|
|
1069
1095
|
messages: List[Message],
|
|
1070
1096
|
) -> None:
|
|
1097
|
+
await self._durable_thread(self._save_conversation, session_id, list(messages))
|
|
1098
|
+
|
|
1099
|
+
def _save_conversation(self, session_id: str, messages: List[Message]) -> None:
|
|
1071
1100
|
with self._lock, self._session_lock(session_id):
|
|
1072
1101
|
self._stamp_client(session_id)
|
|
1073
1102
|
entries = self._read_entries(session_id)
|
|
@@ -1212,16 +1241,20 @@ class JsonlPersistence:
|
|
|
1212
1241
|
]
|
|
1213
1242
|
|
|
1214
1243
|
async def save_checkpoint(self, *, checkpoint: Checkpoint) -> None:
|
|
1215
|
-
#
|
|
1244
|
+
# Capture live agent state on its owning event-loop thread.
|
|
1216
1245
|
payload = checkpoint.model_dump(exclude={"messages"})
|
|
1217
1246
|
payload["metadata"] = {**self.checkpoint_metadata(), **payload["metadata"]}
|
|
1218
|
-
|
|
1219
|
-
|
|
1247
|
+
await self._durable_thread(self._save_checkpoint, checkpoint.session_id, payload)
|
|
1248
|
+
|
|
1249
|
+
def _save_checkpoint(self, session_id: str, payload: dict[str, Any]) -> None:
|
|
1250
|
+
# The journal already holds the messages; do not dump them every turn.
|
|
1251
|
+
with self._lock, self._session_lock(session_id):
|
|
1252
|
+
entries = self._read_entries(session_id)
|
|
1220
1253
|
outgoing: List[Dict[str, Any]] = []
|
|
1221
1254
|
if not entries:
|
|
1222
|
-
outgoing.append(self._header(
|
|
1255
|
+
outgoing.append(self._header(session_id))
|
|
1223
1256
|
outgoing.append({"type": "checkpoint", "version": 1, **payload})
|
|
1224
|
-
self._append_entries(
|
|
1257
|
+
self._append_entries(session_id, outgoing)
|
|
1225
1258
|
|
|
1226
1259
|
def checkpoint_goal(self, session_id: str) -> str:
|
|
1227
1260
|
"""Return the latest saved goal without rebuilding the conversation."""
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""Plugins: find them, validate them, install them, decide whether their code may load.
|
|
2
2
|
|
|
3
3
|
This package executes nothing. It hands a plugin's skill directories to
|
|
4
|
-
``addons/skills
|
|
4
|
+
``addons/skills``, the addon directories of enabled plugins to the addon loader, and
|
|
5
|
+
the themes of enabled plugins to the TUI.
|
|
5
6
|
"""
|
|
6
7
|
|
|
7
8
|
from coding_agent.addons.plugins.install import (
|
|
@@ -19,14 +20,17 @@ from coding_agent.addons.plugins.marketplaces import (
|
|
|
19
20
|
update_marketplaces,
|
|
20
21
|
)
|
|
21
22
|
from coding_agent.addons.plugins.resolve import PluginSet, ResolvedPlugin, resolve_plugins
|
|
23
|
+
from coding_agent.addons.plugins.themes import PluginTheme, find_theme
|
|
22
24
|
|
|
23
25
|
__all__ = [
|
|
24
26
|
"LoadedManifest",
|
|
25
27
|
"PluginManifest",
|
|
26
28
|
"PluginSet",
|
|
29
|
+
"PluginTheme",
|
|
27
30
|
"ResolvedPlugin",
|
|
28
31
|
"UpdateResult",
|
|
29
32
|
"add_marketplace",
|
|
33
|
+
"find_theme",
|
|
30
34
|
"install_plugin",
|
|
31
35
|
"list_marketplaces",
|
|
32
36
|
"read_manifest",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This only reads: manifests, directories, the state file. No plugin code runs.
|
|
4
4
|
It answers two questions per plugin: is it enabled, and which skill directories
|
|
5
|
-
does it add. An enabled plugin's addon is loaded; disabling it is how you stop that.
|
|
5
|
+
and themes does it add. An enabled plugin's addon is loaded; disabling it is how you stop that.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
@@ -13,6 +13,7 @@ from typing import Iterable, Literal
|
|
|
13
13
|
|
|
14
14
|
from coding_agent.addons.plugins.manifest import LoadedManifest, read_manifest
|
|
15
15
|
from coding_agent.addons.plugins.state import PluginState, load_state, plugins_dir
|
|
16
|
+
from coding_agent.addons.plugins.themes import PluginTheme, discover_plugin_themes
|
|
16
17
|
from coding_agent.addons.skills.models import SkillSource
|
|
17
18
|
from coding_agent.addons.skills.registry import skill_directories
|
|
18
19
|
from coding_agent.extensions import Diagnostic, extension_roots
|
|
@@ -37,6 +38,7 @@ class ResolvedPlugin:
|
|
|
37
38
|
skill_count: int
|
|
38
39
|
addon_root: Path | None
|
|
39
40
|
skipped: tuple[tuple[str, str], ...]
|
|
41
|
+
themes: tuple[PluginTheme, ...] = ()
|
|
40
42
|
|
|
41
43
|
@property
|
|
42
44
|
def runs_addon(self) -> bool:
|
|
@@ -67,6 +69,11 @@ class PluginSet:
|
|
|
67
69
|
"""Skill directories of enabled plugins, handed to ``addons/skills``."""
|
|
68
70
|
return tuple(source for plugin in self.plugins if plugin.enabled for source in plugin.skill_sources)
|
|
69
71
|
|
|
72
|
+
@property
|
|
73
|
+
def themes(self) -> tuple[PluginTheme, ...]:
|
|
74
|
+
"""Themes of enabled plugins, offered by ``/theme`` and ``symphony themes``."""
|
|
75
|
+
return tuple(theme for plugin in self.plugins if plugin.enabled for theme in plugin.themes)
|
|
76
|
+
|
|
70
77
|
@property
|
|
71
78
|
def addon_roots(self) -> tuple[Path, ...]:
|
|
72
79
|
"""Addon directories of enabled plugins, handed to the addon loader."""
|
|
@@ -143,11 +150,13 @@ def resolve_plugins(workspace: str | Path, state: PluginState | None = None) ->
|
|
|
143
150
|
diagnostics.append(Diagnostic(str(root), "extensions.symphony.addons leaves the plugin"))
|
|
144
151
|
continue
|
|
145
152
|
skill_dirs = _skill_dirs(loaded, diagnostics)
|
|
153
|
+
themes, theme_diagnostics = discover_plugin_themes(name, root)
|
|
154
|
+
diagnostics.extend(theme_diagnostics)
|
|
146
155
|
plugins[name] = ResolvedPlugin(
|
|
147
156
|
key=key, name=name, version=loaded.manifest.version, description=loaded.manifest.description,
|
|
148
157
|
root=root, scope=scope, enabled=record.enabled if record else True,
|
|
149
158
|
skill_dirs=skill_dirs, skill_count=sum(len(skill_directories(path)) for path in skill_dirs), addon_root=addon_root,
|
|
150
|
-
skipped=loaded.skipped,
|
|
159
|
+
skipped=loaded.skipped, themes=themes,
|
|
151
160
|
)
|
|
152
161
|
return PluginSet(tuple(plugins.values()), tuple(diagnostics))
|
|
153
162
|
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"""Read the themes a plugin ships in its ``themes/`` directory. Discovery only.
|
|
2
|
+
|
|
3
|
+
Two file shapes are accepted, both parsed as data and never executed:
|
|
4
|
+
|
|
5
|
+
* ``*.json`` in the Claude theme format (``name``, ``base``, ``overrides``), as the
|
|
6
|
+
claude-themes marketplace publishes them.
|
|
7
|
+
* ``*.toml`` in Symphony's own ``theme.toml`` shape: a ``[colors]`` table, with an
|
|
8
|
+
optional top-level ``name`` and ``base``.
|
|
9
|
+
|
|
10
|
+
Turning these into TUI colors is the adapter's job (``coding_agent.tui.theme``);
|
|
11
|
+
this module only says which themes exist and what they contain.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import tomllib
|
|
18
|
+
from dataclasses import dataclass
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from typing import Any, Literal
|
|
21
|
+
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, ValidationError
|
|
23
|
+
|
|
24
|
+
from coding_agent.extensions import Diagnostic
|
|
25
|
+
|
|
26
|
+
THEMES_DIRECTORY = "themes"
|
|
27
|
+
MAX_THEME_BYTES = 256_000
|
|
28
|
+
Base = Literal["dark", "light", "dark-daltonized", "light-daltonized", "dark-ansi", "light-ansi"]
|
|
29
|
+
Format = Literal["claude", "symphony"]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ClaudeThemeFile(BaseModel):
|
|
33
|
+
"""The Claude theme schema. Unknown override slots are kept: the adapter ignores what it has no use for."""
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(extra="ignore", populate_by_name=True)
|
|
36
|
+
|
|
37
|
+
name: str = ""
|
|
38
|
+
base: Base = "dark"
|
|
39
|
+
overrides: dict[str, str] = Field(default_factory=dict)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class SymphonyThemeFile(BaseModel):
|
|
43
|
+
"""A ``theme.toml`` as a plugin ships it: just the palette. CSS stays Symphony's."""
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(extra="ignore")
|
|
46
|
+
|
|
47
|
+
name: str = ""
|
|
48
|
+
base: Base = "dark"
|
|
49
|
+
colors: dict[str, str]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@dataclass(frozen=True)
|
|
53
|
+
class PluginTheme:
|
|
54
|
+
"""One theme file of one plugin.
|
|
55
|
+
|
|
56
|
+
``colors`` is the file's own map: slot overrides for a Claude theme, the
|
|
57
|
+
``[colors]`` table for a Symphony one.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
plugin: str
|
|
61
|
+
name: str
|
|
62
|
+
path: Path
|
|
63
|
+
format: Format
|
|
64
|
+
base: Base
|
|
65
|
+
colors: dict[str, str]
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def qualified_name(self) -> str:
|
|
69
|
+
"""``<plugin>:<Theme Name>``, the name a user picks."""
|
|
70
|
+
return f"{self.plugin}:{self.name}"
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def discover_plugin_themes(plugin: str, root: Path) -> tuple[tuple[PluginTheme, ...], tuple[Diagnostic, ...]]:
|
|
74
|
+
"""Themes under ``<root>/themes/``, by name. A bad file is a diagnostic; the others still load."""
|
|
75
|
+
directory = root / THEMES_DIRECTORY
|
|
76
|
+
if not directory.is_dir() or directory.is_symlink():
|
|
77
|
+
return (), ()
|
|
78
|
+
found: dict[str, PluginTheme] = {}
|
|
79
|
+
diagnostics: list[Diagnostic] = []
|
|
80
|
+
for path in sorted(directory.iterdir()):
|
|
81
|
+
if path.suffix not in {".json", ".toml"} or not path.is_file() or path.is_symlink():
|
|
82
|
+
continue
|
|
83
|
+
try:
|
|
84
|
+
theme = _read_theme(plugin, path)
|
|
85
|
+
except (OSError, UnicodeError, ValueError, ValidationError) as exc:
|
|
86
|
+
diagnostics.append(Diagnostic(str(path), f"theme not loaded: {_reason(exc)}"))
|
|
87
|
+
continue
|
|
88
|
+
key = theme.name.casefold()
|
|
89
|
+
if key in found:
|
|
90
|
+
diagnostics.append(Diagnostic(str(path), f"theme {theme.qualified_name!r} is already defined by {found[key].path.name}"))
|
|
91
|
+
continue
|
|
92
|
+
found[key] = theme
|
|
93
|
+
return tuple(sorted(found.values(), key=lambda item: item.name.casefold())), tuple(diagnostics)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def find_theme(themes: tuple[PluginTheme, ...], query: str) -> PluginTheme:
|
|
97
|
+
"""Match ``plugin:Name`` or a bare ``Name`` (case-insensitive); an ambiguous bare name is an error."""
|
|
98
|
+
needle = query.strip().casefold()
|
|
99
|
+
exact = [item for item in themes if item.qualified_name.casefold() == needle]
|
|
100
|
+
matches = exact or [item for item in themes if item.name.casefold() == needle]
|
|
101
|
+
if not matches:
|
|
102
|
+
raise ValueError(f"no theme named {query!r}; see: symphony themes list")
|
|
103
|
+
if len(matches) > 1:
|
|
104
|
+
raise ValueError(f"{query!r} is ambiguous: use one of {', '.join(item.qualified_name for item in matches)}")
|
|
105
|
+
return matches[0]
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _read_theme(plugin: str, path: Path) -> PluginTheme:
|
|
109
|
+
if path.stat().st_size > MAX_THEME_BYTES:
|
|
110
|
+
raise ValueError("file is too large")
|
|
111
|
+
text = path.read_text(encoding="utf-8")
|
|
112
|
+
if path.suffix == ".json":
|
|
113
|
+
claude = ClaudeThemeFile.model_validate(_json_object(text))
|
|
114
|
+
return PluginTheme(plugin, claude.name or _title(path), path, "claude", claude.base, claude.overrides)
|
|
115
|
+
symphony = SymphonyThemeFile.model_validate(_toml_table(text))
|
|
116
|
+
return PluginTheme(plugin, symphony.name or _title(path), path, "symphony", symphony.base, symphony.colors)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def _json_object(text: str) -> dict[str, Any]:
|
|
120
|
+
raw = json.loads(text)
|
|
121
|
+
if not isinstance(raw, dict):
|
|
122
|
+
raise ValueError("theme must be a JSON object")
|
|
123
|
+
return raw
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _toml_table(text: str) -> dict[str, Any]:
|
|
127
|
+
try:
|
|
128
|
+
return tomllib.loads(text)
|
|
129
|
+
except tomllib.TOMLDecodeError as exc:
|
|
130
|
+
raise ValueError(f"invalid TOML: {exc}") from exc
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def _title(path: Path) -> str:
|
|
134
|
+
return path.stem.replace("-", " ").replace("_", " ").title()
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def _reason(exc: Exception) -> str:
|
|
138
|
+
if isinstance(exc, ValidationError):
|
|
139
|
+
return "; ".join(f"{'.'.join(str(part) for part in error['loc']) or 'theme'}: {error['msg']}" for error in exc.errors())
|
|
140
|
+
return str(exc)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
__all__ = ["PluginTheme", "discover_plugin_themes", "find_theme"]
|
|
@@ -529,6 +529,11 @@ class CodingAgent:
|
|
|
529
529
|
if self.learning_loop is not None:
|
|
530
530
|
await self.learning_loop.shutdown()
|
|
531
531
|
|
|
532
|
+
async def shutdown(self) -> None:
|
|
533
|
+
"""Stop learning capture, then close the providers' pooled connections."""
|
|
534
|
+
await self.shutdown_learning()
|
|
535
|
+
await self.registry.aclose()
|
|
536
|
+
|
|
532
537
|
async def compact_conversation(self) -> tuple[int, int]:
|
|
533
538
|
"""Compact the persisted conversation through the harness-mounted compactor.
|
|
534
539
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""The ``symphony`` command: route subcommands, else open the TUI.
|
|
2
2
|
|
|
3
3
|
Each subcommand is imported only when chosen, so ``web``, ``stdio``, ``acp``,
|
|
4
|
-
``bench``, ``run``, ``skills`` and ``
|
|
4
|
+
``bench``, ``run``, ``skills``, ``plugins`` and ``themes`` never load Textual or ``coding_agent.tui``.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
@@ -51,6 +51,10 @@ def main() -> None:
|
|
|
51
51
|
from coding_agent.commands.plugins_cli import main as plugins_main
|
|
52
52
|
|
|
53
53
|
raise SystemExit(plugins_main(sys.argv[2:]))
|
|
54
|
+
if command == "themes":
|
|
55
|
+
from coding_agent.commands.themes_cli import main as themes_main
|
|
56
|
+
|
|
57
|
+
raise SystemExit(themes_main(sys.argv[2:]))
|
|
54
58
|
from coding_agent.tui.__main__ import main as tui_main
|
|
55
59
|
|
|
56
60
|
tui_main()
|
|
@@ -95,6 +95,7 @@ EFFORTS = tuple(option.id for option in EFFORT_CATALOG)
|
|
|
95
95
|
SLASH_COMMANDS = (
|
|
96
96
|
SlashCommand("model", "View or switch the active model", "[model]"),
|
|
97
97
|
SlashCommand("personality", "View or switch the agent personality", "[id]"),
|
|
98
|
+
SlashCommand("theme", "Preview and switch the color theme", "[name]"),
|
|
98
99
|
SlashCommand("voice", "Talk until you say done or press Ctrl+A again", ""),
|
|
99
100
|
SlashCommand("effort", "Set model reasoning effort", "[level]"),
|
|
100
101
|
SlashCommand("login", "Sign in or add a model provider", "[name]"),
|
|
@@ -52,8 +52,10 @@ def plugin_state(plugin: ResolvedPlugin) -> str:
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
def plugin_details(plugin: ResolvedPlugin) -> list[str]:
|
|
55
|
-
"""Indented lines under a plugin row: whether its addon loads, and each skipped contribution."""
|
|
55
|
+
"""Indented lines under a plugin row: its themes, whether its addon loads, and each skipped contribution."""
|
|
56
56
|
lines = [f" {plugin.addon_note}"] if plugin.addon_note else []
|
|
57
|
+
if plugin.themes:
|
|
58
|
+
lines.append(" themes: " + ", ".join(theme.qualified_name for theme in plugin.themes))
|
|
57
59
|
lines += [f" skipped {label}: {reason}" for label, reason in plugin.skipped]
|
|
58
60
|
return lines
|
|
59
61
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""``symphony themes``: list the themes plugins provide and choose one.
|
|
2
|
+
|
|
3
|
+
Choosing saves ``theme`` in config.json; the TUI applies it the next time it starts,
|
|
4
|
+
or at once through ``/theme``. Nothing here loads the TUI or runs plugin code.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import Sequence
|
|
12
|
+
|
|
13
|
+
from coding_agent.addons.plugins import PluginTheme, find_theme, resolve_plugins
|
|
14
|
+
from coding_agent.commands.cli_support import Context, Outcome, Parser, main as run_main, run_command, table
|
|
15
|
+
from coding_agent.commands.installed import saved_config
|
|
16
|
+
from coding_agent.config import DEFAULT_THEME, CodingAgentConfig, ensure_spawn_settings, user_theme_path
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def build_parser(prog: str = "symphony themes") -> Parser:
|
|
20
|
+
parser = Parser(prog=prog, description="Themes from plugins (themes/ directories). Install some with: symphony plugins add <plugin>@<marketplace>")
|
|
21
|
+
commands = parser.add_subparsers(dest="command", metavar="COMMAND", required=True)
|
|
22
|
+
commands.add_parser("list", help="list the available themes and the one in use")
|
|
23
|
+
commands.add_parser("use", help="use a theme (plugin:Name, a bare Name, or 'default')").add_argument("name")
|
|
24
|
+
return parser
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def available_themes(workspace: Path, config: CodingAgentConfig) -> tuple[PluginTheme, ...]:
|
|
28
|
+
"""Themes of the enabled plugins this workspace sees; none when plugins are switched off."""
|
|
29
|
+
return resolve_plugins(workspace).themes if config.plugins.enabled else ()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def choose_theme(workspace: Path, query: str) -> CodingAgentConfig:
|
|
33
|
+
"""Save the theme ``query`` names as the user's choice. ``ValueError`` when no available theme matches."""
|
|
34
|
+
config = saved_config(workspace)
|
|
35
|
+
if query.strip().casefold() == DEFAULT_THEME:
|
|
36
|
+
name = DEFAULT_THEME
|
|
37
|
+
else:
|
|
38
|
+
name = find_theme(available_themes(workspace, config), query).qualified_name
|
|
39
|
+
return ensure_spawn_settings(workspace, overrides={"theme": name})
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _listing(workspace: Path) -> str:
|
|
43
|
+
config = saved_config(workspace)
|
|
44
|
+
rows = [(("*" if config.theme == DEFAULT_THEME else " "), DEFAULT_THEME, "dark", "symphony", "built in")]
|
|
45
|
+
rows += [
|
|
46
|
+
("*" if config.theme.casefold() == theme.qualified_name.casefold() else " ", theme.qualified_name, theme.base, theme.format, theme.path.name)
|
|
47
|
+
for theme in available_themes(workspace, config)
|
|
48
|
+
]
|
|
49
|
+
lines = [table(("", "THEME", "BASE", "FORMAT", "FILE"), rows)]
|
|
50
|
+
if user_theme_path().is_file():
|
|
51
|
+
lines.append(f"\n{user_theme_path()} overrides the chosen theme; remove it to use the theme above.")
|
|
52
|
+
if len(rows) == 1:
|
|
53
|
+
lines.append("\nNo plugin themes yet. Try: symphony plugins marketplace add matcra587/claude-themes && symphony plugins add dracula@claude-themes")
|
|
54
|
+
return "\n".join(lines)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def execute(arguments: argparse.Namespace, context: Context) -> Outcome:
|
|
58
|
+
match arguments.command:
|
|
59
|
+
case "list":
|
|
60
|
+
return Outcome(_listing(context.workspace))
|
|
61
|
+
case "use":
|
|
62
|
+
config = choose_theme(context.workspace, arguments.name)
|
|
63
|
+
return Outcome(f"Theme set to {config.theme}", changed=True)
|
|
64
|
+
raise ValueError(f"unknown command {arguments.command!r}")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def run(argv: Sequence[str], context: Context) -> Outcome:
|
|
68
|
+
return run_command(argv, context, build_parser, execute)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def main(argv: Sequence[str]) -> int:
|
|
72
|
+
return run_main(argv, build_parser, execute)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
__all__ = ["available_themes", "build_parser", "choose_theme", "execute", "main", "run"]
|
|
@@ -5,6 +5,7 @@ from coding_agent.config.config import (
|
|
|
5
5
|
BashConfig,
|
|
6
6
|
CodingAgentConfig,
|
|
7
7
|
CompactionConfig,
|
|
8
|
+
DEFAULT_THEME,
|
|
8
9
|
EvaluationConfig,
|
|
9
10
|
LEARNING_MIN_OUTPUT_TOKENS,
|
|
10
11
|
LangfuseConfig,
|
|
@@ -16,6 +17,7 @@ from coding_agent.config.config import (
|
|
|
16
17
|
SkillSetting,
|
|
17
18
|
SkillsConfig,
|
|
18
19
|
SettingsSource,
|
|
20
|
+
THEME_FILE,
|
|
19
21
|
ToolsConfig,
|
|
20
22
|
UpdatesConfig,
|
|
21
23
|
WebSearchConfig,
|
|
@@ -25,6 +27,7 @@ from coding_agent.config.config import (
|
|
|
25
27
|
resolve_coding_agent_config,
|
|
26
28
|
spawn_settings_path,
|
|
27
29
|
symphony_dir,
|
|
30
|
+
user_theme_path,
|
|
28
31
|
)
|
|
29
32
|
|
|
30
33
|
__all__ = [
|
|
@@ -32,6 +35,7 @@ __all__ = [
|
|
|
32
35
|
"BashConfig",
|
|
33
36
|
"CodingAgentConfig",
|
|
34
37
|
"CompactionConfig",
|
|
38
|
+
"DEFAULT_THEME",
|
|
35
39
|
"EvaluationConfig",
|
|
36
40
|
"LangfuseConfig",
|
|
37
41
|
"LEARNING_MIN_OUTPUT_TOKENS",
|
|
@@ -43,6 +47,7 @@ __all__ = [
|
|
|
43
47
|
"SkillSetting",
|
|
44
48
|
"SkillsConfig",
|
|
45
49
|
"SettingsSource",
|
|
50
|
+
"THEME_FILE",
|
|
46
51
|
"ToolsConfig",
|
|
47
52
|
"UpdatesConfig",
|
|
48
53
|
"WebSearchConfig",
|
|
@@ -52,4 +57,5 @@ __all__ = [
|
|
|
52
57
|
"resolve_coding_agent_config",
|
|
53
58
|
"spawn_settings_path",
|
|
54
59
|
"symphony_dir",
|
|
60
|
+
"user_theme_path",
|
|
55
61
|
]
|
|
@@ -216,6 +216,10 @@ class UpdatesConfig(BaseModel):
|
|
|
216
216
|
auto: bool = False
|
|
217
217
|
|
|
218
218
|
|
|
219
|
+
DEFAULT_THEME = "default"
|
|
220
|
+
THEME_FILE = "theme.toml"
|
|
221
|
+
|
|
222
|
+
|
|
219
223
|
class CodingAgentConfig(BaseModel):
|
|
220
224
|
model_config = ConfigDict(extra="forbid")
|
|
221
225
|
|
|
@@ -232,6 +236,9 @@ class CodingAgentConfig(BaseModel):
|
|
|
232
236
|
last_model: str | None = None
|
|
233
237
|
# Default "direct" inserts that catalog segment. null = stock prompt only.
|
|
234
238
|
personality: str | None = "direct"
|
|
239
|
+
# "default" is Symphony's own dark palette; otherwise "<plugin>:<Theme Name>"
|
|
240
|
+
# from an enabled plugin. A ~/.symphony/theme.toml still overrides it.
|
|
241
|
+
theme: str = DEFAULT_THEME
|
|
235
242
|
# Runtime-only (--unattended): never written back to config.json.
|
|
236
243
|
unattended: bool = Field(default=False, exclude=True)
|
|
237
244
|
|
|
@@ -312,6 +319,11 @@ def symphony_dir() -> Path:
|
|
|
312
319
|
return (Path.home() / ".symphony").expanduser().resolve()
|
|
313
320
|
|
|
314
321
|
|
|
322
|
+
def user_theme_path() -> Path:
|
|
323
|
+
"""The user's own ``theme.toml`` in the Symphony home. When it exists it overrides every other theme."""
|
|
324
|
+
return symphony_dir() / THEME_FILE
|
|
325
|
+
|
|
326
|
+
|
|
315
327
|
def spawn_settings_path(workspace: str | Path | None = None) -> Path:
|
|
316
328
|
"""Return the user-wide config file path.
|
|
317
329
|
|
|
@@ -388,6 +400,7 @@ def ensure_spawn_settings(
|
|
|
388
400
|
|
|
389
401
|
|
|
390
402
|
__all__ = [
|
|
403
|
+
"DEFAULT_THEME",
|
|
391
404
|
"ApprovalConfig",
|
|
392
405
|
"BashConfig",
|
|
393
406
|
"CodingAgentConfig",
|
|
@@ -399,6 +412,7 @@ __all__ = [
|
|
|
399
412
|
"PluginsConfig",
|
|
400
413
|
"ReadFileConfig",
|
|
401
414
|
"SPAWN_SETTINGS_NAME",
|
|
415
|
+
"THEME_FILE",
|
|
402
416
|
"SearchConfig",
|
|
403
417
|
"SettingsSource",
|
|
404
418
|
"SkillSetting",
|
|
@@ -410,4 +424,5 @@ __all__ = [
|
|
|
410
424
|
"load_coding_agent_config",
|
|
411
425
|
"resolve_coding_agent_config",
|
|
412
426
|
"spawn_settings_path",
|
|
427
|
+
"user_theme_path",
|
|
413
428
|
]
|