getapo 0.3.4__tar.gz → 0.3.5__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.
- {getapo-0.3.4 → getapo-0.3.5}/PKG-INFO +1 -1
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/__init__.py +1 -1
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/db.py +5 -3
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/app.py +8 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/app.css +1 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/decision.html +5 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/PKG-INFO +1 -1
- {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/SOURCES.txt +1 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_entry_points.py +1 -1
- getapo-0.3.5/tests/test_filed_byline.py +77 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_folder_identity.py +33 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_session_states.py +1 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_sessions.py +5 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_wheel.py +1 -1
- {getapo-0.3.4 → getapo-0.3.5}/LICENSE +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/README.md +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/THIRD_PARTY_NOTICES.md +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/pyproject.toml +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/setup.cfg +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/__main__.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/changelog.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/claude_runtime.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/cli.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/config.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/credentials.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/installer.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/__init__.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/linear_client.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/linear_goals.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/sources.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/mcp_server.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/repo_writer.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/resources/guide.md +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/resources/hooks/session-decisions-nudge.sh +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/resources/skills/decisions/SKILL.md +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/transcripts.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/verify.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/__init__.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/app.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/fleet.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/live.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/notify.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/now.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/palette.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/round.js +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_agents_board.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_attachment_composer.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_bulk.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_decision_log.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_icons.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_macros.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_merge_result.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_new_work.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_now_item.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_project_macros.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_prompt_form.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_reply_form.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_resume_actions.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_session_card.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_week_overview.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_work_location.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_work_main.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_work_status.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/accept.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_activity.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_agents.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_overview.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_work.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/base.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/guide.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/now.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/outcome.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_activity.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_agents.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_overview.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_settings.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_work.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/projects_shell.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/report.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/round.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/search.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/session.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/settings.html +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/dependency_links.txt +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/entry_points.txt +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/requires.txt +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/top_level.txt +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_action_spec_render.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_actions.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_agents_hub.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_answering.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_app.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_assets.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_autonomy_rules.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_background.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_browser.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_bugs.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_bulk_and_keys.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_bulk_and_views.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_cancel_button.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_changelog.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_checklist_back.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_claude_profiles.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_claude_runtime.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_cli.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_cli_hooks.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_close_rows.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_config.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_consolidation.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_continue.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_court.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_credentials.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_cross_site.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_dashboard_cli.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_db.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_decisions_skill.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_delivery.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_digest.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_due_stuck.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_edit_undo.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_events.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_goal_page.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_guide.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_installer.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_item_folder.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_item_page.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_landing.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_layout_fixes.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_linear_client.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_linear_goals.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_links.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_live_stream.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_mcp_instructions.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_mcp_server.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_merge_branches.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_names.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_navigation.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_new_work.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_next_item.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_notes_labels.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_notify.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_now.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_now_leads.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_now_scan.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_outcome_pages.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_outcomes.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_overview_order.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_palette_js.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_poll_loop.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_preview_paths.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_priority_due.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_home.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_identity.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_overview.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_scope.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_settings.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_projects.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_prompt_answers.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_quiet_pages.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_rank_and_deps.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_reply_where_you_are.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_repo_writer.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_resume_folder.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_round.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_scheduled_resume.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_schema.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_schema_upgrade.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_search.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_session_page.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_session_verdict.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_small_fixes.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_snooze.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_sources.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_start_and_follow_up.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_station_read_api.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_status_export.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_sync_errors.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_task_attempts.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_task_effort.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_task_page.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_transcripts.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_ui_review.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_usage_limit.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_verify.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_week_and_trend.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_weekly_report.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_items.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_location.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_order.py +0 -0
- {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_tab.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: getapo
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: apo (AI Project Orchestration): a local dashboard and MCP server for Claude Code. Agents ask instead of stopping; you answer every project's questions from one queue.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://getapo.pages.dev/
|
|
@@ -5117,9 +5117,11 @@ def _auto_register_repository_for_cwd(
|
|
|
5117
5117
|
forever just because nothing's filed a decision from that project yet. The folder
|
|
5118
5118
|
is the git repository root when there is one (a session started in src/api is the
|
|
5119
5119
|
repo's, and a worktree is its main repo's). Attaches to an existing same-name
|
|
5120
|
-
project instead of making a duplicate. None for the home directory or above,
|
|
5121
|
-
for a folder
|
|
5122
|
-
|
|
5120
|
+
project instead of making a duplicate. None for the home directory or above, for a
|
|
5121
|
+
folder of projects, and for a folder that isn't on disk: `claude agents` keeps
|
|
5122
|
+
listing a background job from before its folder was moved, and registering that
|
|
5123
|
+
cwd brought a relocated folder back as "Not found on disk"."""
|
|
5124
|
+
if _is_home_or_above(cwd) or not os.path.isdir(cwd):
|
|
5123
5125
|
return None
|
|
5124
5126
|
folder = git_root(cwd) or cwd.rstrip("/")
|
|
5125
5127
|
repository = find_repository_by_path(conn, folder)
|
|
@@ -526,6 +526,14 @@ def _when(iso_ts: str) -> str:
|
|
|
526
526
|
templates.env.filters["when"] = _when
|
|
527
527
|
|
|
528
528
|
|
|
529
|
+
def _stamp(iso_ts: str) -> str:
|
|
530
|
+
at = datetime.fromisoformat(iso_ts).astimezone()
|
|
531
|
+
return f"{at:%a %b} {at.day}, {at.year} at {at:%H:%M}"
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
templates.env.filters["stamp"] = _stamp
|
|
535
|
+
|
|
536
|
+
|
|
529
537
|
def _due(due_on: str | None, today: date | None = None) -> dict | None:
|
|
530
538
|
"""How a due date reads, and how loud: overdue is danger, the next two days a warning."""
|
|
531
539
|
if not due_on:
|
|
@@ -712,6 +712,7 @@ form.add-item .btn { --btn-h: 32px; }
|
|
|
712
712
|
.detail-title { font-size: var(--fs-2xl); letter-spacing: -.025em; line-height: 1.2; text-wrap: balance; }
|
|
713
713
|
.detail-title-row { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-5); }
|
|
714
714
|
.detail-title-row .badges { display: flex; gap: var(--s-2); flex-wrap: wrap; }
|
|
715
|
+
.detail-byline { font-size: var(--fs-sm); }
|
|
715
716
|
.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--text); text-wrap: pretty; }
|
|
716
717
|
.question-block { margin-top: var(--s-5); padding-left: var(--s-4); border-left: 2px solid var(--border-strong); }
|
|
717
718
|
.question-block .eyebrow { margin-bottom: 2px; }
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
{{ linear_badge(decision) }}
|
|
38
38
|
</div>
|
|
39
39
|
<h1 class="detail-title">{{ decision.title }}</h1>
|
|
40
|
+
{% set filer = connections.filed_by %}
|
|
41
|
+
<p class="detail-byline muted">
|
|
42
|
+
{%- if decision.requested_by == "human" %}Added by you
|
|
43
|
+
{%- elif filer %}Filed by the session <a href="/sessions/{{ filer.id }}">{{ filer.title or filer.claude_session_id[:8] }}</a>
|
|
44
|
+
{%- else %}Filed by an agent{% endif %} on <time datetime="{{ decision.created_at }}" title="{{ decision.created_at | ago }}">{{ decision.created_at | stamp }}</time></p>
|
|
40
45
|
</header>
|
|
41
46
|
|
|
42
47
|
{% set has_question_block = decision.summary and decision.summary != decision.question %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: getapo
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: apo (AI Project Orchestration): a local dashboard and MCP server for Claude Code. Agents ask instead of stopping; you answer every project's questions from one queue.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://getapo.pages.dev/
|
|
@@ -27,7 +27,7 @@ def test_version(db_path):
|
|
|
27
27
|
result = _run(["-m", "apo", "--version"], _env(db_path))
|
|
28
28
|
|
|
29
29
|
assert result.stdout.strip() == f"apo {apo.__version__}"
|
|
30
|
-
assert apo.__version__ == "0.3.
|
|
30
|
+
assert apo.__version__ == "0.3.5"
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def test_there_is_no_ado_command_any_more():
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""An item's page says, right under its title, who filed it and exactly when — a date
|
|
2
|
+
and a clock time, not only "2h ago" further down."""
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from fastapi.testclient import TestClient
|
|
7
|
+
|
|
8
|
+
from apo import db
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@pytest.fixture
|
|
12
|
+
def client(db_path):
|
|
13
|
+
from apo.web import app
|
|
14
|
+
|
|
15
|
+
return TestClient(app.app)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@pytest.fixture
|
|
19
|
+
def acme(db_path, tmp_path):
|
|
20
|
+
conn = db.get_connection()
|
|
21
|
+
project = db.get_or_create_project(conn, "acme")
|
|
22
|
+
db.ensure_repository_for_project(conn, project["id"], str(tmp_path))
|
|
23
|
+
return project
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _filed_at(item_id, iso_ts):
|
|
27
|
+
conn = db.get_connection()
|
|
28
|
+
conn.execute("UPDATE decision_requests SET created_at = ? WHERE id = ?", (iso_ts, item_id))
|
|
29
|
+
conn.commit()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _byline(html):
|
|
33
|
+
found = re.search(r'<p class="detail-byline[^"]*">(.*?)</p>', html, re.S)
|
|
34
|
+
assert found, "no byline under the title"
|
|
35
|
+
return found.group(1)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def test_a_task_you_added_says_so_with_its_date_and_time(client, acme, local_zone):
|
|
39
|
+
local_zone("Asia/Jerusalem")
|
|
40
|
+
task = db.create_task(db.get_connection(), project_id=acme["id"], title="Add dates to tasks")
|
|
41
|
+
_filed_at(task, "2026-03-05T09:07:00+00:00")
|
|
42
|
+
|
|
43
|
+
byline = _byline(client.get(f"/decisions/{task}").text)
|
|
44
|
+
|
|
45
|
+
assert "Added by you" in byline
|
|
46
|
+
assert re.search(r'<time datetime="2026-03-05T09:07:00\+00:00"[^>]*>Thu Mar 5, 2026 at 11:07</time>', byline)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_an_item_a_session_filed_names_that_session(client, acme, tmp_path):
|
|
50
|
+
conn = db.get_connection()
|
|
51
|
+
db.register_session(conn, "asker-0002-bbbb", str(tmp_path))
|
|
52
|
+
session = conn.execute("SELECT id FROM sessions WHERE claude_session_id = 'asker-0002-bbbb'").fetchone()["id"]
|
|
53
|
+
item = db.create_decision_request(conn, project_id=acme["id"], title="Which payment provider?",
|
|
54
|
+
question="Stripe or Paddle?", origin_session_id="asker-0002-bbbb")
|
|
55
|
+
|
|
56
|
+
byline = _byline(client.get(f"/decisions/{item}").text)
|
|
57
|
+
|
|
58
|
+
assert "Filed by" in byline and f'href="/sessions/{session}"' in byline
|
|
59
|
+
assert "<time" in byline
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def test_an_agent_item_with_no_known_session_still_says_who_and_when(client, acme):
|
|
63
|
+
item = db.create_decision_request(db.get_connection(), project_id=acme["id"], title="Pick a queue",
|
|
64
|
+
question="SQS or Redis?")
|
|
65
|
+
|
|
66
|
+
byline = _byline(client.get(f"/decisions/{item}").text)
|
|
67
|
+
|
|
68
|
+
assert "Filed by an agent" in byline and "<time" in byline
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def test_the_byline_sits_between_the_title_and_the_summary(client, acme):
|
|
72
|
+
item = db.create_decision_request(db.get_connection(), project_id=acme["id"], title="Pick a queue",
|
|
73
|
+
question="SQS or Redis?", summary="Exports need a queue.")
|
|
74
|
+
|
|
75
|
+
html = client.get(f"/decisions/{item}").text
|
|
76
|
+
|
|
77
|
+
assert html.index('class="detail-title"') < html.index('class="detail-byline') < html.index("Exports need a queue.")
|
|
@@ -377,6 +377,39 @@ def test_the_renamed_folder_repro_writes_nothing_into_the_old_path(db_path, tmp_
|
|
|
377
377
|
assert db.recent_sync_errors(conn, unresolved_only=True) == []
|
|
378
378
|
|
|
379
379
|
|
|
380
|
+
def test_a_relocated_folder_does_not_come_back_when_a_stale_session_in_it_is_seen_again(db_path, tmp_path):
|
|
381
|
+
"""Live incident (#471): the old dev folder was relocated, then reappeared as
|
|
382
|
+
"Not found on disk". A background job left from before the move is still listed by
|
|
383
|
+
`claude agents` with the old folder as its cwd; each time its session row was
|
|
384
|
+
re-registered, that cwd auto-registered the folder that no longer exists."""
|
|
385
|
+
conn, project, repo, decision_id, old, new = _renamed(tmp_path)
|
|
386
|
+
db.register_session(conn, "stale-job", str(old))
|
|
387
|
+
db.relocate_repository(conn, repo["id"], str(new))
|
|
388
|
+
db.session_end(conn, "stale-job", "process_gone")
|
|
389
|
+
|
|
390
|
+
db.reconcile_live_sessions(conn, [
|
|
391
|
+
{"id": "stalejob", "kind": "background", "sessionId": "stale-job", "cwd": str(old), "state": "blocked"},
|
|
392
|
+
])
|
|
393
|
+
|
|
394
|
+
rows = conn.execute("SELECT id, local_path FROM repositories").fetchall()
|
|
395
|
+
assert [(r["id"], r["local_path"]) for r in rows] == [(repo["id"], str(new))]
|
|
396
|
+
assert db.missing_folders(conn) == []
|
|
397
|
+
session = conn.execute("SELECT project_id, repository_id FROM sessions "
|
|
398
|
+
"WHERE claude_session_id = 'stale-job'").fetchone()
|
|
399
|
+
assert (session["project_id"], session["repository_id"]) == (project["id"], repo["id"])
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
def test_a_session_seen_in_a_folder_that_is_not_on_disk_registers_nothing(db_path, tmp_path):
|
|
403
|
+
conn = db.get_connection()
|
|
404
|
+
gone = tmp_path / "x" / "gone"
|
|
405
|
+
|
|
406
|
+
db.register_session(conn, "nowhere", str(gone))
|
|
407
|
+
db.reconcile_live_sessions(conn, [{"sessionId": "moved-off", "cwd": str(gone), "status": "idle"}])
|
|
408
|
+
|
|
409
|
+
assert conn.execute("SELECT COUNT(*) FROM repositories").fetchone()[0] == 0
|
|
410
|
+
assert conn.execute("SELECT COUNT(*) FROM projects").fetchone()[0] == 0
|
|
411
|
+
|
|
412
|
+
|
|
380
413
|
def test_relocating_refuses_an_unknown_folder_a_missing_path_and_another_projects_folder(db_path, tmp_path):
|
|
381
414
|
conn, project, repo, decision_id, old, new = _renamed(tmp_path)
|
|
382
415
|
other = db.get_or_create_project(conn, "globex")
|
|
@@ -262,6 +262,7 @@ def test_reconcile_settles_a_session_whose_stop_hook_was_missed(db_path, tmp_pat
|
|
|
262
262
|
|
|
263
263
|
def test_reconcile_registers_a_live_session_it_never_saw(db_path, tmp_path):
|
|
264
264
|
conn = db.get_connection()
|
|
265
|
+
(tmp_path / "proj").mkdir()
|
|
265
266
|
db.reconcile_live_sessions(conn, [
|
|
266
267
|
{"pid": 7, "sessionId": "never-seen", "cwd": str(tmp_path / "proj"), "status": "waiting",
|
|
267
268
|
"waitingFor": "permission prompt"},
|
|
@@ -6,6 +6,8 @@ its hook wrapper needs: never raise on a missing/unknown session, since the hook
|
|
|
6
6
|
scripts calling these are wrapped in a fail-open contract (see tests/test_cli.py) and
|
|
7
7
|
these are the layer underneath that contract.
|
|
8
8
|
"""
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
9
11
|
from apo import db
|
|
10
12
|
|
|
11
13
|
|
|
@@ -31,6 +33,7 @@ def test_register_session_auto_registers_a_repo_when_none_matches(db_path, tmp_p
|
|
|
31
33
|
nothing's filed a decision from that project yet."""
|
|
32
34
|
conn = db.get_connection()
|
|
33
35
|
cwd = str(tmp_path / "my-cool-project")
|
|
36
|
+
Path(cwd).mkdir()
|
|
34
37
|
|
|
35
38
|
db.register_session(conn, "sess-1", cwd)
|
|
36
39
|
|
|
@@ -44,6 +47,7 @@ def test_register_session_auto_registers_a_repo_when_none_matches(db_path, tmp_p
|
|
|
44
47
|
def test_register_session_auto_register_is_idempotent_across_resumes(db_path, tmp_path):
|
|
45
48
|
conn = db.get_connection()
|
|
46
49
|
cwd = str(tmp_path / "my-cool-project")
|
|
50
|
+
Path(cwd).mkdir()
|
|
47
51
|
|
|
48
52
|
db.register_session(conn, "sess-1", cwd)
|
|
49
53
|
db.register_session(conn, "sess-2", cwd)
|
|
@@ -59,6 +63,7 @@ def test_register_session_attaches_to_an_existing_same_name_project(db_path, tmp
|
|
|
59
63
|
repo attaches to that project instead of creating a duplicate."""
|
|
60
64
|
conn = db.get_connection()
|
|
61
65
|
cwd = str(tmp_path / "acme")
|
|
66
|
+
Path(cwd).mkdir()
|
|
62
67
|
existing_project = db.get_or_create_project(conn, "acme")
|
|
63
68
|
|
|
64
69
|
db.register_session(conn, "sess-1", cwd)
|
|
@@ -68,7 +68,7 @@ def test_the_wheel_carries_the_package_data(wheel):
|
|
|
68
68
|
assert path in names, path
|
|
69
69
|
assert not any(n.startswith(("tests/", "docs/", "scripts/", "site/")) for n in names)
|
|
70
70
|
metadata = zipfile.ZipFile(wheel).read(next(n for n in names if n.endswith("METADATA"))).decode()
|
|
71
|
-
assert "Name: getapo" in metadata and "Version: 0.3.
|
|
71
|
+
assert "Name: getapo" in metadata and "Version: 0.3.5" in metadata
|
|
72
72
|
assert "License-Expression: MIT" in metadata
|
|
73
73
|
assert {n.rsplit("/", 1)[-1] for n in names if "/licenses/" in n} == {"LICENSE", "THIRD_PARTY_NOTICES.md"}
|
|
74
74
|
entry_points = zipfile.ZipFile(wheel).read(next(n for n in names if n.endswith("entry_points.txt"))).decode()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|