phil-agent 0.1.0__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.
- phil_agent-0.1.0/.gitignore +27 -0
- phil_agent-0.1.0/CHANGELOG.md +57 -0
- phil_agent-0.1.0/LICENSE +201 -0
- phil_agent-0.1.0/PKG-INFO +129 -0
- phil_agent-0.1.0/README.md +84 -0
- phil_agent-0.1.0/pyproject.toml +91 -0
- phil_agent-0.1.0/src/phil/__init__.py +16 -0
- phil_agent-0.1.0/src/phil/__main__.py +4 -0
- phil_agent-0.1.0/src/phil/agents/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/agents/activity.py +185 -0
- phil_agent-0.1.0/src/phil/agents/check.py +217 -0
- phil_agent-0.1.0/src/phil/agents/collector.py +167 -0
- phil_agent-0.1.0/src/phil/agents/evidence.py +69 -0
- phil_agent-0.1.0/src/phil/agents/factory.py +351 -0
- phil_agent-0.1.0/src/phil/agents/failures.py +204 -0
- phil_agent-0.1.0/src/phil/agents/fake.py +134 -0
- phil_agent-0.1.0/src/phil/agents/invoke.py +721 -0
- phil_agent-0.1.0/src/phil/agents/model_retry.py +123 -0
- phil_agent-0.1.0/src/phil/agents/openrouter_model.py +32 -0
- phil_agent-0.1.0/src/phil/agents/pricing.py +353 -0
- phil_agent-0.1.0/src/phil/agents/providers.py +207 -0
- phil_agent-0.1.0/src/phil/agents/registry.py +108 -0
- phil_agent-0.1.0/src/phil/agents/reminder.py +102 -0
- phil_agent-0.1.0/src/phil/agents/retry.py +260 -0
- phil_agent-0.1.0/src/phil/agents/salvage.py +211 -0
- phil_agent-0.1.0/src/phil/agents/spec.py +55 -0
- phil_agent-0.1.0/src/phil/agents/tool_args.py +171 -0
- phil_agent-0.1.0/src/phil/agents/tool_choice.py +36 -0
- phil_agent-0.1.0/src/phil/agents/tools.py +96 -0
- phil_agent-0.1.0/src/phil/agents/unpriced.py +128 -0
- phil_agent-0.1.0/src/phil/agents/usage.py +21 -0
- phil_agent-0.1.0/src/phil/agents/vision.py +233 -0
- phil_agent-0.1.0/src/phil/chat/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/chat/answer.py +46 -0
- phil_agent-0.1.0/src/phil/chat/approval.py +187 -0
- phil_agent-0.1.0/src/phil/chat/attachments.py +232 -0
- phil_agent-0.1.0/src/phil/chat/btw.py +30 -0
- phil_agent-0.1.0/src/phil/chat/controller.py +3838 -0
- phil_agent-0.1.0/src/phil/chat/decision.py +283 -0
- phil_agent-0.1.0/src/phil/chat/design.py +33 -0
- phil_agent-0.1.0/src/phil/chat/events.py +12 -0
- phil_agent-0.1.0/src/phil/chat/mockup.py +64 -0
- phil_agent-0.1.0/src/phil/chat/mockup_page.py +302 -0
- phil_agent-0.1.0/src/phil/chat/overview.py +18 -0
- phil_agent-0.1.0/src/phil/chat/planning.py +298 -0
- phil_agent-0.1.0/src/phil/chat/session.py +188 -0
- phil_agent-0.1.0/src/phil/chat/snapshot.py +101 -0
- phil_agent-0.1.0/src/phil/chat/state.py +147 -0
- phil_agent-0.1.0/src/phil/chat/terminal.py +338 -0
- phil_agent-0.1.0/src/phil/chat/watcher.py +330 -0
- phil_agent-0.1.0/src/phil/cli/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/cli/attach.py +189 -0
- phil_agent-0.1.0/src/phil/cli/entry.py +80 -0
- phil_agent-0.1.0/src/phil/cli/main.py +1416 -0
- phil_agent-0.1.0/src/phil/cli/memory.py +209 -0
- phil_agent-0.1.0/src/phil/cli/parked.py +72 -0
- phil_agent-0.1.0/src/phil/cli/permissions.py +268 -0
- phil_agent-0.1.0/src/phil/cli/skills.py +209 -0
- phil_agent-0.1.0/src/phil/config.py +539 -0
- phil_agent-0.1.0/src/phil/contracts/__init__.py +106 -0
- phil_agent-0.1.0/src/phil/contracts/base.py +13 -0
- phil_agent-0.1.0/src/phil/contracts/common.py +44 -0
- phil_agent-0.1.0/src/phil/contracts/converse.py +76 -0
- phil_agent-0.1.0/src/phil/contracts/design.py +97 -0
- phil_agent-0.1.0/src/phil/contracts/inputs.py +88 -0
- phil_agent-0.1.0/src/phil/contracts/interface.py +110 -0
- phil_agent-0.1.0/src/phil/contracts/memory.py +43 -0
- phil_agent-0.1.0/src/phil/contracts/planning.py +86 -0
- phil_agent-0.1.0/src/phil/contracts/results.py +112 -0
- phil_agent-0.1.0/src/phil/contracts/routing.py +39 -0
- phil_agent-0.1.0/src/phil/contracts/schema.py +14 -0
- phil_agent-0.1.0/src/phil/contracts/skills.py +31 -0
- phil_agent-0.1.0/src/phil/diagnostics.py +228 -0
- phil_agent-0.1.0/src/phil/git.py +70 -0
- phil_agent-0.1.0/src/phil/key_store.py +150 -0
- phil_agent-0.1.0/src/phil/memory/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/memory/agents_md.py +173 -0
- phil_agent-0.1.0/src/phil/memory/apply.py +132 -0
- phil_agent-0.1.0/src/phil/memory/commands.py +93 -0
- phil_agent-0.1.0/src/phil/memory/context.py +182 -0
- phil_agent-0.1.0/src/phil/memory/doc.py +169 -0
- phil_agent-0.1.0/src/phil/memory/editor.py +95 -0
- phil_agent-0.1.0/src/phil/memory/learn.py +110 -0
- phil_agent-0.1.0/src/phil/memory/listing.py +36 -0
- phil_agent-0.1.0/src/phil/memory/store.py +117 -0
- phil_agent-0.1.0/src/phil/packets/__init__.py +3 -0
- phil_agent-0.1.0/src/phil/packets/packet.py +209 -0
- phil_agent-0.1.0/src/phil/parking.py +33 -0
- phil_agent-0.1.0/src/phil/permissions/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/permissions/catalog.py +179 -0
- phil_agent-0.1.0/src/phil/permissions/listing.py +131 -0
- phil_agent-0.1.0/src/phil/permissions/load.py +231 -0
- phil_agent-0.1.0/src/phil/permissions/rules.py +303 -0
- phil_agent-0.1.0/src/phil/permissions/store.py +362 -0
- phil_agent-0.1.0/src/phil/platform.py +290 -0
- phil_agent-0.1.0/src/phil/prompts/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/prompts/_shared.md +23 -0
- phil_agent-0.1.0/src/phil/prompts/answer.md +15 -0
- phil_agent-0.1.0/src/phil/prompts/architect.md +47 -0
- phil_agent-0.1.0/src/phil/prompts/btw.md +13 -0
- phil_agent-0.1.0/src/phil/prompts/converse.md +30 -0
- phil_agent-0.1.0/src/phil/prompts/critic.md +17 -0
- phil_agent-0.1.0/src/phil/prompts/design.md +21 -0
- phil_agent-0.1.0/src/phil/prompts/implementer.md +26 -0
- phil_agent-0.1.0/src/phil/prompts/intake.md +34 -0
- phil_agent-0.1.0/src/phil/prompts/memory.md +21 -0
- phil_agent-0.1.0/src/phil/prompts/mockup.md +31 -0
- phil_agent-0.1.0/src/phil/prompts/model_check.md +7 -0
- phil_agent-0.1.0/src/phil/prompts/reviewer.md +15 -0
- phil_agent-0.1.0/src/phil/prompts/route.md +9 -0
- phil_agent-0.1.0/src/phil/prompts/skill_labels.md +10 -0
- phil_agent-0.1.0/src/phil/prompts/tester.md +13 -0
- phil_agent-0.1.0/src/phil/publish/__init__.py +16 -0
- phil_agent-0.1.0/src/phil/publish/learnings.py +80 -0
- phil_agent-0.1.0/src/phil/publish/pr_body.py +179 -0
- phil_agent-0.1.0/src/phil/publish/publisher.py +249 -0
- phil_agent-0.1.0/src/phil/publish/service.py +235 -0
- phil_agent-0.1.0/src/phil/repo.py +54 -0
- phil_agent-0.1.0/src/phil/repo_detect.py +73 -0
- phil_agent-0.1.0/src/phil/routing/__init__.py +24 -0
- phil_agent-0.1.0/src/phil/routing/classes.py +83 -0
- phil_agent-0.1.0/src/phil/routing/classify.py +54 -0
- phil_agent-0.1.0/src/phil/routing/jev.py +156 -0
- phil_agent-0.1.0/src/phil/routing/llm.py +24 -0
- phil_agent-0.1.0/src/phil/routing/policy.py +52 -0
- phil_agent-0.1.0/src/phil/routing/types.py +52 -0
- phil_agent-0.1.0/src/phil/run/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/run/checkpoint.py +14 -0
- phil_agent-0.1.0/src/phil/run/cleanup.py +134 -0
- phil_agent-0.1.0/src/phil/run/engine.py +1395 -0
- phil_agent-0.1.0/src/phil/run/gates.py +216 -0
- phil_agent-0.1.0/src/phil/run/launch.py +135 -0
- phil_agent-0.1.0/src/phil/run/naming.py +49 -0
- phil_agent-0.1.0/src/phil/run/runner.py +66 -0
- phil_agent-0.1.0/src/phil/run/state.py +297 -0
- phil_agent-0.1.0/src/phil/run/worker.py +338 -0
- phil_agent-0.1.0/src/phil/setup/__init__.py +4 -0
- phil_agent-0.1.0/src/phil/setup/catalog.py +64 -0
- phil_agent-0.1.0/src/phil/setup/flow.py +660 -0
- phil_agent-0.1.0/src/phil/setup/guard.py +38 -0
- phil_agent-0.1.0/src/phil/setup/io.py +129 -0
- phil_agent-0.1.0/src/phil/setup/skill_labels.py +60 -0
- phil_agent-0.1.0/src/phil/setup/suggestions.py +31 -0
- phil_agent-0.1.0/src/phil/setup/write.py +86 -0
- phil_agent-0.1.0/src/phil/skills/__init__.py +1 -0
- phil_agent-0.1.0/src/phil/skills/discover.py +132 -0
- phil_agent-0.1.0/src/phil/skills/labels.py +137 -0
- phil_agent-0.1.0/src/phil/skills/listing.py +106 -0
- phil_agent-0.1.0/src/phil/skills/runtime.py +55 -0
- phil_agent-0.1.0/src/phil/skills/select.py +155 -0
- phil_agent-0.1.0/src/phil/skills/sources.py +264 -0
- phil_agent-0.1.0/src/phil/skills/tool.py +159 -0
- phil_agent-0.1.0/src/phil/store/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/store/activity.py +193 -0
- phil_agent-0.1.0/src/phil/store/artifacts.py +88 -0
- phil_agent-0.1.0/src/phil/store/db.py +139 -0
- phil_agent-0.1.0/src/phil/store/events.py +89 -0
- phil_agent-0.1.0/src/phil/store/parked.py +102 -0
- phil_agent-0.1.0/src/phil/store/paths.py +64 -0
- phil_agent-0.1.0/src/phil/store/runs.py +179 -0
- phil_agent-0.1.0/src/phil/store/telemetry.py +259 -0
- phil_agent-0.1.0/src/phil/text.py +16 -0
- phil_agent-0.1.0/src/phil/tomlw.py +59 -0
- phil_agent-0.1.0/src/phil/ui/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/ui/answer_view.py +10 -0
- phil_agent-0.1.0/src/phil/ui/banner.py +191 -0
- phil_agent-0.1.0/src/phil/ui/blocks.py +122 -0
- phil_agent-0.1.0/src/phil/ui/brief_view.py +19 -0
- phil_agent-0.1.0/src/phil/ui/bursts.py +167 -0
- phil_agent-0.1.0/src/phil/ui/callout.py +281 -0
- phil_agent-0.1.0/src/phil/ui/chats_view.py +44 -0
- phil_agent-0.1.0/src/phil/ui/diff_view.py +94 -0
- phil_agent-0.1.0/src/phil/ui/feed_view.py +196 -0
- phil_agent-0.1.0/src/phil/ui/fragments.py +16 -0
- phil_agent-0.1.0/src/phil/ui/links.py +16 -0
- phil_agent-0.1.0/src/phil/ui/mascot.py +12 -0
- phil_agent-0.1.0/src/phil/ui/plan_view.py +97 -0
- phil_agent-0.1.0/src/phil/ui/runs.py +20 -0
- phil_agent-0.1.0/src/phil/ui/runs_view.py +43 -0
- phil_agent-0.1.0/src/phil/ui/screen/__init__.py +1 -0
- phil_agent-0.1.0/src/phil/ui/screen/app.py +355 -0
- phil_agent-0.1.0/src/phil/ui/screen/clipboard.py +91 -0
- phil_agent-0.1.0/src/phil/ui/screen/console.py +44 -0
- phil_agent-0.1.0/src/phil/ui/screen/io.py +312 -0
- phil_agent-0.1.0/src/phil/ui/screen/mode.py +30 -0
- phil_agent-0.1.0/src/phil/ui/screen/themed.py +24 -0
- phil_agent-0.1.0/src/phil/ui/screen/widgets.py +487 -0
- phil_agent-0.1.0/src/phil/ui/show_view.py +204 -0
- phil_agent-0.1.0/src/phil/ui/theme.py +76 -0
- phil_agent-0.1.0/src/phil/ui/toolbar.py +353 -0
- phil_agent-0.1.0/src/phil/ui/when.py +28 -0
- phil_agent-0.1.0/src/phil/workspace/__init__.py +0 -0
- phil_agent-0.1.0/src/phil/workspace/shell.py +795 -0
- phil_agent-0.1.0/src/phil/workspace/worktree.py +104 -0
- phil_agent-0.1.0/tests/__init__.py +0 -0
- phil_agent-0.1.0/tests/agents/__init__.py +0 -0
- phil_agent-0.1.0/tests/agents/conftest.py +41 -0
- phil_agent-0.1.0/tests/agents/fixtures/openrouter-models.json +25 -0
- phil_agent-0.1.0/tests/agents/test_activity_callback.py +212 -0
- phil_agent-0.1.0/tests/agents/test_approvals.py +67 -0
- phil_agent-0.1.0/tests/agents/test_architect_cap.py +105 -0
- phil_agent-0.1.0/tests/agents/test_check.py +283 -0
- phil_agent-0.1.0/tests/agents/test_collector.py +160 -0
- phil_agent-0.1.0/tests/agents/test_evidence.py +186 -0
- phil_agent-0.1.0/tests/agents/test_factory.py +327 -0
- phil_agent-0.1.0/tests/agents/test_failures.py +351 -0
- phil_agent-0.1.0/tests/agents/test_fake_usage.py +51 -0
- phil_agent-0.1.0/tests/agents/test_invoke.py +976 -0
- phil_agent-0.1.0/tests/agents/test_invoke_skills.py +301 -0
- phil_agent-0.1.0/tests/agents/test_light_harness.py +321 -0
- phil_agent-0.1.0/tests/agents/test_model_retry.py +286 -0
- phil_agent-0.1.0/tests/agents/test_pricing.py +363 -0
- phil_agent-0.1.0/tests/agents/test_prompt_cache.py +128 -0
- phil_agent-0.1.0/tests/agents/test_prose_answers.py +89 -0
- phil_agent-0.1.0/tests/agents/test_provider_detail.py +60 -0
- phil_agent-0.1.0/tests/agents/test_providers.py +364 -0
- phil_agent-0.1.0/tests/agents/test_registry.py +121 -0
- phil_agent-0.1.0/tests/agents/test_reminder.py +153 -0
- phil_agent-0.1.0/tests/agents/test_repo_context.py +51 -0
- phil_agent-0.1.0/tests/agents/test_retry.py +322 -0
- phil_agent-0.1.0/tests/agents/test_salvage.py +193 -0
- phil_agent-0.1.0/tests/agents/test_scripted.py +41 -0
- phil_agent-0.1.0/tests/agents/test_tool_args.py +145 -0
- phil_agent-0.1.0/tests/agents/test_tool_choice.py +64 -0
- phil_agent-0.1.0/tests/agents/test_tools.py +158 -0
- phil_agent-0.1.0/tests/agents/test_unpriced.py +169 -0
- phil_agent-0.1.0/tests/agents/test_vision.py +477 -0
- phil_agent-0.1.0/tests/chat/__init__.py +0 -0
- phil_agent-0.1.0/tests/chat/chat_scenarios.py +11 -0
- phil_agent-0.1.0/tests/chat/conftest.py +104 -0
- phil_agent-0.1.0/tests/chat/test_answer.py +129 -0
- phil_agent-0.1.0/tests/chat/test_approval.py +300 -0
- phil_agent-0.1.0/tests/chat/test_attachments.py +273 -0
- phil_agent-0.1.0/tests/chat/test_btw.py +28 -0
- phil_agent-0.1.0/tests/chat/test_chat_picker.py +232 -0
- phil_agent-0.1.0/tests/chat/test_controller.py +929 -0
- phil_agent-0.1.0/tests/chat/test_controller_agents.py +134 -0
- phil_agent-0.1.0/tests/chat/test_controller_callouts.py +698 -0
- phil_agent-0.1.0/tests/chat/test_controller_feed.py +664 -0
- phil_agent-0.1.0/tests/chat/test_controller_images.py +270 -0
- phil_agent-0.1.0/tests/chat/test_controller_mockups.py +618 -0
- phil_agent-0.1.0/tests/chat/test_controller_pr.py +359 -0
- phil_agent-0.1.0/tests/chat/test_controller_repo_rules.py +173 -0
- phil_agent-0.1.0/tests/chat/test_controller_run.py +935 -0
- phil_agent-0.1.0/tests/chat/test_controller_skills.py +29 -0
- phil_agent-0.1.0/tests/chat/test_controller_status.py +313 -0
- phil_agent-0.1.0/tests/chat/test_conversation_flow.py +177 -0
- phil_agent-0.1.0/tests/chat/test_conversation_limits.py +211 -0
- phil_agent-0.1.0/tests/chat/test_conversation_reopen.py +80 -0
- phil_agent-0.1.0/tests/chat/test_converse_spec.py +31 -0
- phil_agent-0.1.0/tests/chat/test_decision.py +266 -0
- phil_agent-0.1.0/tests/chat/test_design.py +80 -0
- phil_agent-0.1.0/tests/chat/test_design_flow.py +218 -0
- phil_agent-0.1.0/tests/chat/test_intake_spec.py +115 -0
- phil_agent-0.1.0/tests/chat/test_memory_commands.py +253 -0
- phil_agent-0.1.0/tests/chat/test_mockup.py +80 -0
- phil_agent-0.1.0/tests/chat/test_mockup_page.py +266 -0
- phil_agent-0.1.0/tests/chat/test_overview_session.py +192 -0
- phil_agent-0.1.0/tests/chat/test_planning.py +288 -0
- phil_agent-0.1.0/tests/chat/test_planning_budget.py +139 -0
- phil_agent-0.1.0/tests/chat/test_questions_flow.py +134 -0
- phil_agent-0.1.0/tests/chat/test_quick_flow.py +587 -0
- phil_agent-0.1.0/tests/chat/test_reopen_state.py +193 -0
- phil_agent-0.1.0/tests/chat/test_revision_budget.py +48 -0
- phil_agent-0.1.0/tests/chat/test_routing_flow.py +458 -0
- phil_agent-0.1.0/tests/chat/test_skills_command.py +123 -0
- phil_agent-0.1.0/tests/chat/test_skills_labelling.py +135 -0
- phil_agent-0.1.0/tests/chat/test_snapshot.py +126 -0
- phil_agent-0.1.0/tests/chat/test_state.py +42 -0
- phil_agent-0.1.0/tests/chat/test_terminal.py +766 -0
- phil_agent-0.1.0/tests/chat/test_threads.py +63 -0
- phil_agent-0.1.0/tests/chat/test_watcher.py +827 -0
- phil_agent-0.1.0/tests/cli/__init__.py +0 -0
- phil_agent-0.1.0/tests/cli/conftest.py +1 -0
- phil_agent-0.1.0/tests/cli/test_attach.py +498 -0
- phil_agent-0.1.0/tests/cli/test_banner_startup.py +280 -0
- phil_agent-0.1.0/tests/cli/test_chat_command.py +721 -0
- phil_agent-0.1.0/tests/cli/test_config_command.py +65 -0
- phil_agent-0.1.0/tests/cli/test_diff_clean.py +181 -0
- phil_agent-0.1.0/tests/cli/test_entry.py +154 -0
- phil_agent-0.1.0/tests/cli/test_full_screen_chat.py +165 -0
- phil_agent-0.1.0/tests/cli/test_keys_command.py +218 -0
- phil_agent-0.1.0/tests/cli/test_memory_cli.py +249 -0
- phil_agent-0.1.0/tests/cli/test_missing_bash.py +42 -0
- phil_agent-0.1.0/tests/cli/test_models_command.py +123 -0
- phil_agent-0.1.0/tests/cli/test_permissions_cli.py +466 -0
- phil_agent-0.1.0/tests/cli/test_pr_command.py +235 -0
- phil_agent-0.1.0/tests/cli/test_resume_command.py +207 -0
- phil_agent-0.1.0/tests/cli/test_run_command.py +260 -0
- phil_agent-0.1.0/tests/cli/test_setup_autostart.py +63 -0
- phil_agent-0.1.0/tests/cli/test_setup_command.py +108 -0
- phil_agent-0.1.0/tests/cli/test_show_command.py +106 -0
- phil_agent-0.1.0/tests/cli/test_skills_command.py +232 -0
- phil_agent-0.1.0/tests/cli/test_stop_command.py +225 -0
- phil_agent-0.1.0/tests/cli/test_worker_diagnostics.py +28 -0
- phil_agent-0.1.0/tests/conftest.py +228 -0
- phil_agent-0.1.0/tests/helpers.py +68 -0
- phil_agent-0.1.0/tests/live/__init__.py +0 -0
- phil_agent-0.1.0/tests/live/bench/__init__.py +0 -0
- phil_agent-0.1.0/tests/live/bench/cases.py +97 -0
- phil_agent-0.1.0/tests/live/bench/classify/__init__.py +0 -0
- phil_agent-0.1.0/tests/live/bench/classify/cases.jsonl +50 -0
- phil_agent-0.1.0/tests/live/bench/classify/metrics.py +192 -0
- phil_agent-0.1.0/tests/live/bench/classify/run.py +359 -0
- phil_agent-0.1.0/tests/live/bench/classify/test_classify_bench.py +62 -0
- phil_agent-0.1.0/tests/live/bench/classify/test_metrics_offline.py +207 -0
- phil_agent-0.1.0/tests/live/bench/classify/test_run_offline.py +287 -0
- phil_agent-0.1.0/tests/live/bench/conftest.py +3 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/py-calc/.gitignore +2 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/py-calc/calc/__init__.py +12 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/py-calc/pyproject.toml +8 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/py-calc/tests/test_calc.py +9 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/static-site/.gitignore +2 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/static-site/build.mjs +7 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/static-site/package.json +1 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/static-site/src/index.html +1 -0
- phil_agent-0.1.0/tests/live/bench/fixtures/static-site/src/layout.html +1 -0
- phil_agent-0.1.0/tests/live/bench/harness.py +351 -0
- phil_agent-0.1.0/tests/live/bench/report.py +175 -0
- phil_agent-0.1.0/tests/live/bench/test_bench.py +57 -0
- phil_agent-0.1.0/tests/live/bench/test_harness_offline.py +574 -0
- phil_agent-0.1.0/tests/live/test_invoke_live.py +80 -0
- phil_agent-0.1.0/tests/memory/__init__.py +0 -0
- phil_agent-0.1.0/tests/memory/test_agents_md.py +250 -0
- phil_agent-0.1.0/tests/memory/test_apply.py +100 -0
- phil_agent-0.1.0/tests/memory/test_context.py +317 -0
- phil_agent-0.1.0/tests/memory/test_doc.py +98 -0
- phil_agent-0.1.0/tests/memory/test_editor.py +262 -0
- phil_agent-0.1.0/tests/memory/test_learn.py +142 -0
- phil_agent-0.1.0/tests/memory/test_store.py +72 -0
- phil_agent-0.1.0/tests/packets/__init__.py +0 -0
- phil_agent-0.1.0/tests/packets/test_packet.py +154 -0
- phil_agent-0.1.0/tests/permissions/__init__.py +0 -0
- phil_agent-0.1.0/tests/permissions/test_call_sites.py +77 -0
- phil_agent-0.1.0/tests/permissions/test_catalog.py +118 -0
- phil_agent-0.1.0/tests/permissions/test_decide.py +501 -0
- phil_agent-0.1.0/tests/permissions/test_rules.py +580 -0
- phil_agent-0.1.0/tests/permissions/test_store.py +223 -0
- phil_agent-0.1.0/tests/publish/__init__.py +0 -0
- phil_agent-0.1.0/tests/publish/conftest.py +1 -0
- phil_agent-0.1.0/tests/publish/test_learnings.py +216 -0
- phil_agent-0.1.0/tests/publish/test_pr_body.py +200 -0
- phil_agent-0.1.0/tests/publish/test_publisher.py +329 -0
- phil_agent-0.1.0/tests/publish/test_service_publish.py +229 -0
- phil_agent-0.1.0/tests/publish/test_service_sweep.py +339 -0
- phil_agent-0.1.0/tests/release/__init__.py +12 -0
- phil_agent-0.1.0/tests/release/test_changelog.py +10 -0
- phil_agent-0.1.0/tests/release/test_contributing.py +11 -0
- phil_agent-0.1.0/tests/release/test_dist.py +64 -0
- phil_agent-0.1.0/tests/release/test_readme.py +20 -0
- phil_agent-0.1.0/tests/release/test_release_check.py +188 -0
- phil_agent-0.1.0/tests/release/test_workflows.py +47 -0
- phil_agent-0.1.0/tests/routing/__init__.py +0 -0
- phil_agent-0.1.0/tests/routing/fixtures/jev_ok.json +15 -0
- phil_agent-0.1.0/tests/routing/fixtures/jev_openrouter_ok.json +17 -0
- phil_agent-0.1.0/tests/routing/test_classify.py +85 -0
- phil_agent-0.1.0/tests/routing/test_jev.py +181 -0
- phil_agent-0.1.0/tests/routing/test_policy.py +67 -0
- phil_agent-0.1.0/tests/routing/test_types.py +23 -0
- phil_agent-0.1.0/tests/run/__init__.py +0 -0
- phil_agent-0.1.0/tests/run/conftest.py +143 -0
- phil_agent-0.1.0/tests/run/test_checkpoint.py +46 -0
- phil_agent-0.1.0/tests/run/test_cleanup.py +153 -0
- phil_agent-0.1.0/tests/run/test_engine_activity.py +151 -0
- phil_agent-0.1.0/tests/run/test_engine_approval.py +494 -0
- phil_agent-0.1.0/tests/run/test_engine_check.py +159 -0
- phil_agent-0.1.0/tests/run/test_engine_commit_policy.py +72 -0
- phil_agent-0.1.0/tests/run/test_engine_deny.py +76 -0
- phil_agent-0.1.0/tests/run/test_engine_escalation.py +100 -0
- phil_agent-0.1.0/tests/run/test_engine_gates_integrity.py +50 -0
- phil_agent-0.1.0/tests/run/test_engine_happy.py +106 -0
- phil_agent-0.1.0/tests/run/test_engine_images.py +77 -0
- phil_agent-0.1.0/tests/run/test_engine_memory.py +75 -0
- phil_agent-0.1.0/tests/run/test_engine_mockup.py +69 -0
- phil_agent-0.1.0/tests/run/test_engine_quick.py +276 -0
- phil_agent-0.1.0/tests/run/test_engine_review.py +116 -0
- phil_agent-0.1.0/tests/run/test_engine_setup.py +303 -0
- phil_agent-0.1.0/tests/run/test_engine_skills.py +30 -0
- phil_agent-0.1.0/tests/run/test_engine_test_cmd.py +216 -0
- phil_agent-0.1.0/tests/run/test_engine_tester.py +195 -0
- phil_agent-0.1.0/tests/run/test_engine_worklog.py +180 -0
- phil_agent-0.1.0/tests/run/test_gates_tests.py +164 -0
- phil_agent-0.1.0/tests/run/test_gates_verify.py +189 -0
- phil_agent-0.1.0/tests/run/test_launch.py +287 -0
- phil_agent-0.1.0/tests/run/test_naming.py +62 -0
- phil_agent-0.1.0/tests/run/test_runner.py +153 -0
- phil_agent-0.1.0/tests/run/test_state.py +221 -0
- phil_agent-0.1.0/tests/run/test_worker.py +848 -0
- phil_agent-0.1.0/tests/run/worker_scenarios.py +53 -0
- phil_agent-0.1.0/tests/setup/__init__.py +0 -0
- phil_agent-0.1.0/tests/setup/test_catalog.py +129 -0
- phil_agent-0.1.0/tests/setup/test_flow.py +1175 -0
- phil_agent-0.1.0/tests/setup/test_guard.py +55 -0
- phil_agent-0.1.0/tests/setup/test_io.py +82 -0
- phil_agent-0.1.0/tests/setup/test_skill_labels.py +48 -0
- phil_agent-0.1.0/tests/setup/test_write.py +208 -0
- phil_agent-0.1.0/tests/skills/__init__.py +0 -0
- phil_agent-0.1.0/tests/skills/test_discover.py +251 -0
- phil_agent-0.1.0/tests/skills/test_labels.py +165 -0
- phil_agent-0.1.0/tests/skills/test_listing.py +150 -0
- phil_agent-0.1.0/tests/skills/test_runtime.py +94 -0
- phil_agent-0.1.0/tests/skills/test_select.py +240 -0
- phil_agent-0.1.0/tests/skills/test_sources.py +295 -0
- phil_agent-0.1.0/tests/skills/test_tool.py +273 -0
- phil_agent-0.1.0/tests/store/__init__.py +0 -0
- phil_agent-0.1.0/tests/store/test_activity.py +126 -0
- phil_agent-0.1.0/tests/store/test_artifacts.py +147 -0
- phil_agent-0.1.0/tests/store/test_db.py +154 -0
- phil_agent-0.1.0/tests/store/test_events.py +74 -0
- phil_agent-0.1.0/tests/store/test_goal_cost.py +23 -0
- phil_agent-0.1.0/tests/store/test_runs.py +217 -0
- phil_agent-0.1.0/tests/store/test_runs_pr_fields.py +30 -0
- phil_agent-0.1.0/tests/store/test_telemetry.py +118 -0
- phil_agent-0.1.0/tests/store/test_telemetry_parked.py +123 -0
- phil_agent-0.1.0/tests/support/locktrace.py +125 -0
- phil_agent-0.1.0/tests/support/minitest.py +65 -0
- phil_agent-0.1.0/tests/test_ask_contracts.py +88 -0
- phil_agent-0.1.0/tests/test_cli.py +207 -0
- phil_agent-0.1.0/tests/test_config.py +559 -0
- phil_agent-0.1.0/tests/test_conftest_keyring.py +74 -0
- phil_agent-0.1.0/tests/test_contract_descriptions.py +73 -0
- phil_agent-0.1.0/tests/test_contracts.py +235 -0
- phil_agent-0.1.0/tests/test_converse_contracts.py +74 -0
- phil_agent-0.1.0/tests/test_diagnostics.py +241 -0
- phil_agent-0.1.0/tests/test_encoding.py +193 -0
- phil_agent-0.1.0/tests/test_git.py +81 -0
- phil_agent-0.1.0/tests/test_key_store.py +195 -0
- phil_agent-0.1.0/tests/test_locktrace.py +42 -0
- phil_agent-0.1.0/tests/test_network_guard.py +23 -0
- phil_agent-0.1.0/tests/test_platform.py +421 -0
- phil_agent-0.1.0/tests/test_repo.py +47 -0
- phil_agent-0.1.0/tests/test_repo_detect.py +129 -0
- phil_agent-0.1.0/tests/test_tomlw.py +22 -0
- phil_agent-0.1.0/tests/test_ui.py +13 -0
- phil_agent-0.1.0/tests/test_version.py +24 -0
- phil_agent-0.1.0/tests/ui/__init__.py +0 -0
- phil_agent-0.1.0/tests/ui/conftest.py +1 -0
- phil_agent-0.1.0/tests/ui/screen/__init__.py +0 -0
- phil_agent-0.1.0/tests/ui/screen/pilot.py +46 -0
- phil_agent-0.1.0/tests/ui/screen/test_choose.py +443 -0
- phil_agent-0.1.0/tests/ui/screen/test_clipboard.py +139 -0
- phil_agent-0.1.0/tests/ui/screen/test_frame.py +467 -0
- phil_agent-0.1.0/tests/ui/screen/test_io.py +758 -0
- phil_agent-0.1.0/tests/ui/screen/test_live.py +234 -0
- phil_agent-0.1.0/tests/ui/screen/test_mode.py +26 -0
- phil_agent-0.1.0/tests/ui/screen/test_paste.py +169 -0
- phil_agent-0.1.0/tests/ui/screen/test_tasks.py +292 -0
- phil_agent-0.1.0/tests/ui/test_banner.py +196 -0
- phil_agent-0.1.0/tests/ui/test_blocks.py +128 -0
- phil_agent-0.1.0/tests/ui/test_brief_view.py +14 -0
- phil_agent-0.1.0/tests/ui/test_bursts.py +79 -0
- phil_agent-0.1.0/tests/ui/test_callout.py +232 -0
- phil_agent-0.1.0/tests/ui/test_chats_view.py +17 -0
- phil_agent-0.1.0/tests/ui/test_diff_view.py +74 -0
- phil_agent-0.1.0/tests/ui/test_feed_view.py +345 -0
- phil_agent-0.1.0/tests/ui/test_fragments.py +11 -0
- phil_agent-0.1.0/tests/ui/test_links.py +38 -0
- phil_agent-0.1.0/tests/ui/test_plan_view.py +137 -0
- phil_agent-0.1.0/tests/ui/test_runs_label.py +18 -0
- phil_agent-0.1.0/tests/ui/test_runs_view.py +19 -0
- phil_agent-0.1.0/tests/ui/test_show_view.py +297 -0
- phil_agent-0.1.0/tests/ui/test_toolbar.py +386 -0
- phil_agent-0.1.0/tests/ui/test_when.py +31 -0
- phil_agent-0.1.0/tests/workspace/__init__.py +0 -0
- phil_agent-0.1.0/tests/workspace/test_shell.py +948 -0
- phil_agent-0.1.0/tests/workspace/test_worktree.py +172 -0
- phil_agent-0.1.0/uv.lock +1774 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Secrets and local clutter
|
|
13
|
+
.env
|
|
14
|
+
.DS_Store
|
|
15
|
+
.ipynb_checkpoints/
|
|
16
|
+
|
|
17
|
+
# Superpowers working files (brainstorm mockups, SDD ledgers and briefs)
|
|
18
|
+
.superpowers/
|
|
19
|
+
|
|
20
|
+
# Node / Astro website build artifacts
|
|
21
|
+
site/node_modules/
|
|
22
|
+
site/dist/
|
|
23
|
+
site/.astro/
|
|
24
|
+
site/.wrangler/
|
|
25
|
+
node_modules/
|
|
26
|
+
.astro/
|
|
27
|
+
.wrangler/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Phil are recorded here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-11-22
|
|
8
|
+
|
|
9
|
+
The first public release, published to PyPI as `phil-agent`.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `phil`, a chat in the terminal that plans a goal with you, then runs it in its own git worktree
|
|
14
|
+
and leaves a tested, reviewed branch.
|
|
15
|
+
- A welcome card with Phil's φ mascot (for *philia*), with a line under it instead of a box.
|
|
16
|
+
- Two model tiers, `high` and `low`. Providers: OpenRouter, OpenAI, Anthropic, Google, Ollama and
|
|
17
|
+
any OpenAI-compatible endpoint.
|
|
18
|
+
- `phil setup` for choosing a provider, storing its key in the OS key store and checking each model.
|
|
19
|
+
- Request routing with the Jev classifier.
|
|
20
|
+
- A run budget that stops a run before it spends more than you allowed.
|
|
21
|
+
- `phil pr` to push a finished run and open its pull request, and `phil clean` to remove it.
|
|
22
|
+
- `phil show`, `phil diff` and `phil runs` for following and inspecting runs.
|
|
23
|
+
- Rules for the shell commands agents may run (`phil permissions`).
|
|
24
|
+
- Repo memory that Phil keeps between runs (`phil memory`).
|
|
25
|
+
- Native Windows support through Git Bash.
|
|
26
|
+
- A full-screen chat: `phil` opens a header, a scrolling conversation, a live line (agent, step,
|
|
27
|
+
tasks, run time and cost, one line per sub-agent) and a boxed input. New commands `/chat`,
|
|
28
|
+
`/status` and `/copy`; `phil chat` and `phil --continue` reopen chats; `[chat] screen = "inline"`
|
|
29
|
+
keeps the previous chat, and small terminals, some Windows consoles and piped output fall back
|
|
30
|
+
to it automatically.
|
|
31
|
+
- A calmer activity feed: a blank line before each block, design options that wrap instead of
|
|
32
|
+
being cut off, picked answers and answers to Phil's clarifying questions kept as
|
|
33
|
+
`? question answer`, and a burst that edited files
|
|
34
|
+
shows each file's changed lines (`+`/`−`, up to 8 lines and 3 files, `/more #n` for the rest).
|
|
35
|
+
- Images: drag an image (up to 5 MB, 5 per message) onto the chat input and the intake
|
|
36
|
+
conversation, answerer, designer, architect, critic and implementer see it (the tester and
|
|
37
|
+
reviewer are told its path). An optional
|
|
38
|
+
`[models] vision` model, offered by `phil setup` and checked by `phil models check`, reads
|
|
39
|
+
images when an agent's own model can't.
|
|
40
|
+
- Skills: Phil's agents can use the `SKILL.md` skills you have installed for other coding tools
|
|
41
|
+
(`~/.agents/skills`, Claude Code and its plugins, Codex, Cursor, Gemini). `phil setup` asks which
|
|
42
|
+
folders to use, Phil labels each skill with the stages it helps, and `phil skills` lists them,
|
|
43
|
+
turns one on or off, sets its stages (`phil skills stages <name> design,testing`) and approves a
|
|
44
|
+
repo's own skills (`phil skills repo on`, void if those skills change). `/skills` shows the
|
|
45
|
+
list in the chat, and `phil permissions` lists the skill folders agents can read. Scripts in a
|
|
46
|
+
skill never run.
|
|
47
|
+
- Mockups at the approach stage: `show` draws every design approach, `show N` one and
|
|
48
|
+
`show N <note>` redraws it, or pick "Show as mockups" in the menu. The first one opens in the
|
|
49
|
+
browser, later ones rewrite the same page (reload the tab), and with no browser (SSH, or Linux
|
|
50
|
+
with no display) Phil prints a terminal sketch. Pages sit in the project's folder under
|
|
51
|
+
`~/.phil`, run no script and load nothing from the network. The picked mockup goes to the
|
|
52
|
+
planner and the coding agents as a reference. Nothing is drawn unless you ask.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- A model's malformed tool-call arguments are repaired before Phil resends the history, so
|
|
57
|
+
provider errors like `function.arguments must be valid JSON` no longer stop a run.
|
phil_agent-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: phil-agent
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A terminal coding agent that plans with you, works in its own git worktree, and stops at the budget you set
|
|
5
|
+
Project-URL: Homepage, https://github.com/ahochoy/phil
|
|
6
|
+
Project-URL: Documentation, https://github.com/ahochoy/phil/blob/main/docs/guide.md
|
|
7
|
+
Project-URL: Repository, https://github.com/ahochoy/phil
|
|
8
|
+
Project-URL: Issues, https://github.com/ahochoy/phil/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/ahochoy/phil/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Andrew HoChoy
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: ai agent,cli,coding agent,langgraph,llm
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: MacOS
|
|
18
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Software Development
|
|
24
|
+
Requires-Python: >=3.14
|
|
25
|
+
Requires-Dist: deepagents>=0.7.19
|
|
26
|
+
Requires-Dist: httpx>=0.28.1
|
|
27
|
+
Requires-Dist: keyring>=25.7.0
|
|
28
|
+
Requires-Dist: langchain-anthropic>=1.7.5
|
|
29
|
+
Requires-Dist: langchain-google-genai>=4.4.0
|
|
30
|
+
Requires-Dist: langchain-openai>=1.6.7
|
|
31
|
+
Requires-Dist: langchain-openrouter>=0.2.9
|
|
32
|
+
Requires-Dist: langchain>=1.4.3
|
|
33
|
+
Requires-Dist: langgraph-checkpoint-sqlite>=3.1.1
|
|
34
|
+
Requires-Dist: langgraph-checkpoint>=4.2.0
|
|
35
|
+
Requires-Dist: langgraph>=1.2.12
|
|
36
|
+
Requires-Dist: prompt-toolkit>=3.0.53
|
|
37
|
+
Requires-Dist: psutil>=7.2.2
|
|
38
|
+
Requires-Dist: pydantic>=2.13
|
|
39
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
40
|
+
Requires-Dist: rich>=15.0.0
|
|
41
|
+
Requires-Dist: textual<8.3,>=8.2.8
|
|
42
|
+
Requires-Dist: tomlkit>=0.15.1
|
|
43
|
+
Requires-Dist: typer>=0.27.2
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="https://raw.githubusercontent.com/ahochoy/phil/main/assets/banner.jpg" alt="Phil — The Friendly, Token-Efficient Development Agent" width="100%" />
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
# Phil
|
|
51
|
+
|
|
52
|
+
Named after *philia* (ancient Greek for friendship and mutual goodwill), Phil is a friendly
|
|
53
|
+
terminal coding agent built to be a token-efficient teammate. Run it inside a git repository:
|
|
54
|
+
it plans a goal with you, implements it in its own git worktree, and leaves a tested, reviewed
|
|
55
|
+
branch. It stops before it spends more than the budget you set.
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
Phil needs Python 3.14. [uv](https://docs.astral.sh/uv/) installs it for you if it's missing:
|
|
60
|
+
|
|
61
|
+
uv tool install phil-agent
|
|
62
|
+
|
|
63
|
+
Or with [pipx](https://pipx.pypa.io/):
|
|
64
|
+
|
|
65
|
+
pipx install phil-agent
|
|
66
|
+
|
|
67
|
+
Either way you get the `phil` command. To upgrade later, run `uv tool upgrade phil-agent` (or
|
|
68
|
+
`pipx upgrade phil-agent`).
|
|
69
|
+
|
|
70
|
+
**Windows:** Phil runs natively and needs [Git for Windows](https://git-scm.com/download/win),
|
|
71
|
+
which includes Git Bash. See the guide's
|
|
72
|
+
[Windows section](https://github.com/ahochoy/phil/blob/main/docs/guide.md#windows).
|
|
73
|
+
|
|
74
|
+
## Set up
|
|
75
|
+
|
|
76
|
+
cd your-repo
|
|
77
|
+
phil
|
|
78
|
+
|
|
79
|
+
The first time, setup starts automatically. It asks for a provider (OpenRouter, OpenAI,
|
|
80
|
+
Anthropic, Google, Ollama or any OpenAI-compatible endpoint), stores its API key in your OS key
|
|
81
|
+
store, picks a `high` and a `low` model and checks that each one answers. Run `phil setup` any
|
|
82
|
+
time to change them.
|
|
83
|
+
|
|
84
|
+
## Your first goal
|
|
85
|
+
|
|
86
|
+
In the chat, describe what you want:
|
|
87
|
+
|
|
88
|
+
you › add a --verbose flag to the CLI that prints each step
|
|
89
|
+
|
|
90
|
+
Phil asks what it needs to know, shows you the plan, and runs it when you agree. When the run
|
|
91
|
+
finishes, look at the branch it left and open a pull request:
|
|
92
|
+
|
|
93
|
+
phil diff <run-id>
|
|
94
|
+
phil pr <run-id>
|
|
95
|
+
|
|
96
|
+
## Commands
|
|
97
|
+
|
|
98
|
+
| Command | What it does |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `phil` | Open the chat in the current repository |
|
|
101
|
+
| `phil setup` | Choose a provider, store its key and pick your models |
|
|
102
|
+
| `phil runs` | List this repository's runs |
|
|
103
|
+
| `phil show <run>` | A run's tasks, usage and open issues |
|
|
104
|
+
| `phil attach <run>` | Follow a run and answer it when it pauses |
|
|
105
|
+
| `phil resume <run>` | Answer a paused run, or continue a stopped one |
|
|
106
|
+
| `phil stop <run>` | Stop a running run |
|
|
107
|
+
| `phil diff <run>` | The changes a run made |
|
|
108
|
+
| `phil pr <run>` | Push a finished run's branch and open its pull request |
|
|
109
|
+
| `phil clean <run>` | Remove a finished run's worktree and branch |
|
|
110
|
+
| `phil keys list` | Where each provider's key comes from |
|
|
111
|
+
| `phil models check` | Check the configured models |
|
|
112
|
+
| `phil config` | The effective settings, and where each came from |
|
|
113
|
+
| `phil permissions` | The rules for agents' shell commands |
|
|
114
|
+
| `phil memory` | What Phil remembers about this repository |
|
|
115
|
+
|
|
116
|
+
`phil --help` and `phil <command> --help` list every option.
|
|
117
|
+
|
|
118
|
+
## Learn more
|
|
119
|
+
|
|
120
|
+
- [User guide](https://github.com/ahochoy/phil/blob/main/docs/guide.md): configuration, routing,
|
|
121
|
+
budgets, permissions, memory and every command in detail.
|
|
122
|
+
- [Changelog](https://github.com/ahochoy/phil/blob/main/CHANGELOG.md)
|
|
123
|
+
- [Contributing](https://github.com/ahochoy/phil/blob/main/CONTRIBUTING.md): development, tests
|
|
124
|
+
and releases.
|
|
125
|
+
- [Issues](https://github.com/ahochoy/phil/issues)
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
Apache-2.0. See [LICENSE](https://github.com/ahochoy/phil/blob/main/LICENSE).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/ahochoy/phil/main/assets/banner.jpg" alt="Phil — The Friendly, Token-Efficient Development Agent" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Phil
|
|
6
|
+
|
|
7
|
+
Named after *philia* (ancient Greek for friendship and mutual goodwill), Phil is a friendly
|
|
8
|
+
terminal coding agent built to be a token-efficient teammate. Run it inside a git repository:
|
|
9
|
+
it plans a goal with you, implements it in its own git worktree, and leaves a tested, reviewed
|
|
10
|
+
branch. It stops before it spends more than the budget you set.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
Phil needs Python 3.14. [uv](https://docs.astral.sh/uv/) installs it for you if it's missing:
|
|
15
|
+
|
|
16
|
+
uv tool install phil-agent
|
|
17
|
+
|
|
18
|
+
Or with [pipx](https://pipx.pypa.io/):
|
|
19
|
+
|
|
20
|
+
pipx install phil-agent
|
|
21
|
+
|
|
22
|
+
Either way you get the `phil` command. To upgrade later, run `uv tool upgrade phil-agent` (or
|
|
23
|
+
`pipx upgrade phil-agent`).
|
|
24
|
+
|
|
25
|
+
**Windows:** Phil runs natively and needs [Git for Windows](https://git-scm.com/download/win),
|
|
26
|
+
which includes Git Bash. See the guide's
|
|
27
|
+
[Windows section](https://github.com/ahochoy/phil/blob/main/docs/guide.md#windows).
|
|
28
|
+
|
|
29
|
+
## Set up
|
|
30
|
+
|
|
31
|
+
cd your-repo
|
|
32
|
+
phil
|
|
33
|
+
|
|
34
|
+
The first time, setup starts automatically. It asks for a provider (OpenRouter, OpenAI,
|
|
35
|
+
Anthropic, Google, Ollama or any OpenAI-compatible endpoint), stores its API key in your OS key
|
|
36
|
+
store, picks a `high` and a `low` model and checks that each one answers. Run `phil setup` any
|
|
37
|
+
time to change them.
|
|
38
|
+
|
|
39
|
+
## Your first goal
|
|
40
|
+
|
|
41
|
+
In the chat, describe what you want:
|
|
42
|
+
|
|
43
|
+
you › add a --verbose flag to the CLI that prints each step
|
|
44
|
+
|
|
45
|
+
Phil asks what it needs to know, shows you the plan, and runs it when you agree. When the run
|
|
46
|
+
finishes, look at the branch it left and open a pull request:
|
|
47
|
+
|
|
48
|
+
phil diff <run-id>
|
|
49
|
+
phil pr <run-id>
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
| Command | What it does |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `phil` | Open the chat in the current repository |
|
|
56
|
+
| `phil setup` | Choose a provider, store its key and pick your models |
|
|
57
|
+
| `phil runs` | List this repository's runs |
|
|
58
|
+
| `phil show <run>` | A run's tasks, usage and open issues |
|
|
59
|
+
| `phil attach <run>` | Follow a run and answer it when it pauses |
|
|
60
|
+
| `phil resume <run>` | Answer a paused run, or continue a stopped one |
|
|
61
|
+
| `phil stop <run>` | Stop a running run |
|
|
62
|
+
| `phil diff <run>` | The changes a run made |
|
|
63
|
+
| `phil pr <run>` | Push a finished run's branch and open its pull request |
|
|
64
|
+
| `phil clean <run>` | Remove a finished run's worktree and branch |
|
|
65
|
+
| `phil keys list` | Where each provider's key comes from |
|
|
66
|
+
| `phil models check` | Check the configured models |
|
|
67
|
+
| `phil config` | The effective settings, and where each came from |
|
|
68
|
+
| `phil permissions` | The rules for agents' shell commands |
|
|
69
|
+
| `phil memory` | What Phil remembers about this repository |
|
|
70
|
+
|
|
71
|
+
`phil --help` and `phil <command> --help` list every option.
|
|
72
|
+
|
|
73
|
+
## Learn more
|
|
74
|
+
|
|
75
|
+
- [User guide](https://github.com/ahochoy/phil/blob/main/docs/guide.md): configuration, routing,
|
|
76
|
+
budgets, permissions, memory and every command in detail.
|
|
77
|
+
- [Changelog](https://github.com/ahochoy/phil/blob/main/CHANGELOG.md)
|
|
78
|
+
- [Contributing](https://github.com/ahochoy/phil/blob/main/CONTRIBUTING.md): development, tests
|
|
79
|
+
and releases.
|
|
80
|
+
- [Issues](https://github.com/ahochoy/phil/issues)
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
Apache-2.0. See [LICENSE](https://github.com/ahochoy/phil/blob/main/LICENSE).
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "phil-agent"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A terminal coding agent that plans with you, works in its own git worktree, and stops at the budget you set"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [{ name = "Andrew HoChoy" }]
|
|
9
|
+
keywords = ["coding agent", "llm", "cli", "langgraph", "ai agent"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 3 - Alpha",
|
|
12
|
+
"Environment :: Console",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"Operating System :: MacOS",
|
|
15
|
+
"Operating System :: Microsoft :: Windows",
|
|
16
|
+
"Operating System :: POSIX :: Linux",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
+
"Programming Language :: Python :: 3.14",
|
|
20
|
+
"Topic :: Software Development",
|
|
21
|
+
]
|
|
22
|
+
requires-python = ">=3.14"
|
|
23
|
+
dependencies = [
|
|
24
|
+
"deepagents>=0.7.19",
|
|
25
|
+
"langchain>=1.4.3",
|
|
26
|
+
"langchain-openrouter>=0.2.9",
|
|
27
|
+
"langgraph>=1.2.12",
|
|
28
|
+
"langgraph-checkpoint>=4.2.0",
|
|
29
|
+
"rich>=15.0.0",
|
|
30
|
+
"typer>=0.27.2",
|
|
31
|
+
# 2.13+ is Python 3.14-clean (2.12 warns on import); the newest openrouter SDK still caps
|
|
32
|
+
# pydantic <2.13, so this holds openrouter at 0.10.x until it lifts the cap.
|
|
33
|
+
"pydantic>=2.13",
|
|
34
|
+
"langgraph-checkpoint-sqlite>=3.1.1",
|
|
35
|
+
"prompt-toolkit>=3.0.53",
|
|
36
|
+
# Held to 8.2: phil.ui.screen uses App._context and App._exception (private); re-check both before raising it.
|
|
37
|
+
"textual>=8.2.8,<8.3",
|
|
38
|
+
"langchain-openai>=1.6.7",
|
|
39
|
+
"langchain-anthropic>=1.7.5",
|
|
40
|
+
"langchain-google-genai>=4.4.0",
|
|
41
|
+
"keyring>=25.7.0",
|
|
42
|
+
"tomlkit>=0.15.1",
|
|
43
|
+
"httpx>=0.28.1",
|
|
44
|
+
"psutil>=7.2.2",
|
|
45
|
+
"pyyaml>=6.0.3",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.scripts]
|
|
49
|
+
phil = "phil.cli.entry:main"
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://github.com/ahochoy/phil"
|
|
53
|
+
Documentation = "https://github.com/ahochoy/phil/blob/main/docs/guide.md"
|
|
54
|
+
Repository = "https://github.com/ahochoy/phil"
|
|
55
|
+
Issues = "https://github.com/ahochoy/phil/issues"
|
|
56
|
+
Changelog = "https://github.com/ahochoy/phil/blob/main/CHANGELOG.md"
|
|
57
|
+
|
|
58
|
+
[build-system]
|
|
59
|
+
requires = ["hatchling>=1.27"]
|
|
60
|
+
build-backend = "hatchling.build"
|
|
61
|
+
|
|
62
|
+
[tool.hatch.build.targets.wheel]
|
|
63
|
+
packages = ["src/phil"]
|
|
64
|
+
|
|
65
|
+
# Only what rebuilds and tests the package: the site, docs, prototype and assets stay out.
|
|
66
|
+
[tool.hatch.build.targets.sdist]
|
|
67
|
+
include = [
|
|
68
|
+
"/src",
|
|
69
|
+
"/tests",
|
|
70
|
+
"/README.md",
|
|
71
|
+
"/LICENSE",
|
|
72
|
+
"/CHANGELOG.md",
|
|
73
|
+
"/pyproject.toml",
|
|
74
|
+
"/uv.lock",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[tool.pytest.ini_options]
|
|
78
|
+
testpaths = ["tests"]
|
|
79
|
+
markers = [
|
|
80
|
+
"live: calls real LLM APIs (opt-in with -m live)",
|
|
81
|
+
"bench: runs the live benchmark (opt-in with -m bench)",
|
|
82
|
+
]
|
|
83
|
+
addopts = "-m 'not live and not bench' -n auto"
|
|
84
|
+
# A warning raised from Phil's own code fails the test; library warnings stay in the summary.
|
|
85
|
+
filterwarnings = ["error:::phil"]
|
|
86
|
+
|
|
87
|
+
[dependency-groups]
|
|
88
|
+
dev = [
|
|
89
|
+
"pytest>=9.1.1",
|
|
90
|
+
"pytest-xdist>=3.8.0",
|
|
91
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from importlib.metadata import PackageNotFoundError
|
|
2
|
+
from importlib.metadata import version as _dist_version
|
|
3
|
+
|
|
4
|
+
DIST_NAME = "phil-agent"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _installed_version() -> str:
|
|
8
|
+
"""The installed distribution's version, which comes from pyproject.toml. "0+unknown" when
|
|
9
|
+
Phil runs from a source tree that was never installed."""
|
|
10
|
+
try:
|
|
11
|
+
return _dist_version(DIST_NAME)
|
|
12
|
+
except PackageNotFoundError:
|
|
13
|
+
return "0+unknown"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
__version__ = _installed_version()
|
|
File without changes
|