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.
Files changed (190) hide show
  1. {getapo-0.3.4 → getapo-0.3.5}/PKG-INFO +1 -1
  2. {getapo-0.3.4 → getapo-0.3.5}/src/apo/__init__.py +1 -1
  3. {getapo-0.3.4 → getapo-0.3.5}/src/apo/db.py +5 -3
  4. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/app.py +8 -0
  5. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/app.css +1 -0
  6. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/decision.html +5 -0
  7. {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/PKG-INFO +1 -1
  8. {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/SOURCES.txt +1 -0
  9. {getapo-0.3.4 → getapo-0.3.5}/tests/test_entry_points.py +1 -1
  10. getapo-0.3.5/tests/test_filed_byline.py +77 -0
  11. {getapo-0.3.4 → getapo-0.3.5}/tests/test_folder_identity.py +33 -0
  12. {getapo-0.3.4 → getapo-0.3.5}/tests/test_session_states.py +1 -0
  13. {getapo-0.3.4 → getapo-0.3.5}/tests/test_sessions.py +5 -0
  14. {getapo-0.3.4 → getapo-0.3.5}/tests/test_wheel.py +1 -1
  15. {getapo-0.3.4 → getapo-0.3.5}/LICENSE +0 -0
  16. {getapo-0.3.4 → getapo-0.3.5}/README.md +0 -0
  17. {getapo-0.3.4 → getapo-0.3.5}/THIRD_PARTY_NOTICES.md +0 -0
  18. {getapo-0.3.4 → getapo-0.3.5}/pyproject.toml +0 -0
  19. {getapo-0.3.4 → getapo-0.3.5}/setup.cfg +0 -0
  20. {getapo-0.3.4 → getapo-0.3.5}/src/apo/__main__.py +0 -0
  21. {getapo-0.3.4 → getapo-0.3.5}/src/apo/changelog.py +0 -0
  22. {getapo-0.3.4 → getapo-0.3.5}/src/apo/claude_runtime.py +0 -0
  23. {getapo-0.3.4 → getapo-0.3.5}/src/apo/cli.py +0 -0
  24. {getapo-0.3.4 → getapo-0.3.5}/src/apo/config.py +0 -0
  25. {getapo-0.3.4 → getapo-0.3.5}/src/apo/credentials.py +0 -0
  26. {getapo-0.3.4 → getapo-0.3.5}/src/apo/installer.py +0 -0
  27. {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/__init__.py +0 -0
  28. {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/linear_client.py +0 -0
  29. {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/linear_goals.py +0 -0
  30. {getapo-0.3.4 → getapo-0.3.5}/src/apo/integrations/sources.py +0 -0
  31. {getapo-0.3.4 → getapo-0.3.5}/src/apo/mcp_server.py +0 -0
  32. {getapo-0.3.4 → getapo-0.3.5}/src/apo/repo_writer.py +0 -0
  33. {getapo-0.3.4 → getapo-0.3.5}/src/apo/resources/guide.md +0 -0
  34. {getapo-0.3.4 → getapo-0.3.5}/src/apo/resources/hooks/session-decisions-nudge.sh +0 -0
  35. {getapo-0.3.4 → getapo-0.3.5}/src/apo/resources/skills/decisions/SKILL.md +0 -0
  36. {getapo-0.3.4 → getapo-0.3.5}/src/apo/transcripts.py +0 -0
  37. {getapo-0.3.4 → getapo-0.3.5}/src/apo/verify.py +0 -0
  38. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/__init__.py +0 -0
  39. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/app.js +0 -0
  40. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/fleet.js +0 -0
  41. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/live.js +0 -0
  42. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/notify.js +0 -0
  43. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/now.js +0 -0
  44. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/palette.js +0 -0
  45. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/static/round.js +0 -0
  46. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_agents_board.html +0 -0
  47. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_attachment_composer.html +0 -0
  48. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_bulk.html +0 -0
  49. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_decision_log.html +0 -0
  50. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_icons.html +0 -0
  51. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_macros.html +0 -0
  52. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_merge_result.html +0 -0
  53. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_new_work.html +0 -0
  54. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_now_item.html +0 -0
  55. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_project_macros.html +0 -0
  56. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_prompt_form.html +0 -0
  57. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_reply_form.html +0 -0
  58. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_resume_actions.html +0 -0
  59. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_session_card.html +0 -0
  60. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_week_overview.html +0 -0
  61. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_work_location.html +0 -0
  62. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_work_main.html +0 -0
  63. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/_work_status.html +0 -0
  64. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/accept.html +0 -0
  65. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_activity.html +0 -0
  66. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_agents.html +0 -0
  67. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_overview.html +0 -0
  68. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/all_work.html +0 -0
  69. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/base.html +0 -0
  70. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/guide.html +0 -0
  71. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/now.html +0 -0
  72. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/outcome.html +0 -0
  73. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_activity.html +0 -0
  74. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_agents.html +0 -0
  75. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_overview.html +0 -0
  76. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_settings.html +0 -0
  77. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/project_work.html +0 -0
  78. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/projects_shell.html +0 -0
  79. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/report.html +0 -0
  80. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/round.html +0 -0
  81. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/search.html +0 -0
  82. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/session.html +0 -0
  83. {getapo-0.3.4 → getapo-0.3.5}/src/apo/web/templates/settings.html +0 -0
  84. {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/dependency_links.txt +0 -0
  85. {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/entry_points.txt +0 -0
  86. {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/requires.txt +0 -0
  87. {getapo-0.3.4 → getapo-0.3.5}/src/getapo.egg-info/top_level.txt +0 -0
  88. {getapo-0.3.4 → getapo-0.3.5}/tests/test_action_spec_render.py +0 -0
  89. {getapo-0.3.4 → getapo-0.3.5}/tests/test_actions.py +0 -0
  90. {getapo-0.3.4 → getapo-0.3.5}/tests/test_agents_hub.py +0 -0
  91. {getapo-0.3.4 → getapo-0.3.5}/tests/test_answering.py +0 -0
  92. {getapo-0.3.4 → getapo-0.3.5}/tests/test_app.py +0 -0
  93. {getapo-0.3.4 → getapo-0.3.5}/tests/test_assets.py +0 -0
  94. {getapo-0.3.4 → getapo-0.3.5}/tests/test_autonomy_rules.py +0 -0
  95. {getapo-0.3.4 → getapo-0.3.5}/tests/test_background.py +0 -0
  96. {getapo-0.3.4 → getapo-0.3.5}/tests/test_browser.py +0 -0
  97. {getapo-0.3.4 → getapo-0.3.5}/tests/test_bugs.py +0 -0
  98. {getapo-0.3.4 → getapo-0.3.5}/tests/test_bulk_and_keys.py +0 -0
  99. {getapo-0.3.4 → getapo-0.3.5}/tests/test_bulk_and_views.py +0 -0
  100. {getapo-0.3.4 → getapo-0.3.5}/tests/test_cancel_button.py +0 -0
  101. {getapo-0.3.4 → getapo-0.3.5}/tests/test_changelog.py +0 -0
  102. {getapo-0.3.4 → getapo-0.3.5}/tests/test_checklist_back.py +0 -0
  103. {getapo-0.3.4 → getapo-0.3.5}/tests/test_claude_profiles.py +0 -0
  104. {getapo-0.3.4 → getapo-0.3.5}/tests/test_claude_runtime.py +0 -0
  105. {getapo-0.3.4 → getapo-0.3.5}/tests/test_cli.py +0 -0
  106. {getapo-0.3.4 → getapo-0.3.5}/tests/test_cli_hooks.py +0 -0
  107. {getapo-0.3.4 → getapo-0.3.5}/tests/test_close_rows.py +0 -0
  108. {getapo-0.3.4 → getapo-0.3.5}/tests/test_config.py +0 -0
  109. {getapo-0.3.4 → getapo-0.3.5}/tests/test_consolidation.py +0 -0
  110. {getapo-0.3.4 → getapo-0.3.5}/tests/test_continue.py +0 -0
  111. {getapo-0.3.4 → getapo-0.3.5}/tests/test_court.py +0 -0
  112. {getapo-0.3.4 → getapo-0.3.5}/tests/test_credentials.py +0 -0
  113. {getapo-0.3.4 → getapo-0.3.5}/tests/test_cross_site.py +0 -0
  114. {getapo-0.3.4 → getapo-0.3.5}/tests/test_dashboard_cli.py +0 -0
  115. {getapo-0.3.4 → getapo-0.3.5}/tests/test_db.py +0 -0
  116. {getapo-0.3.4 → getapo-0.3.5}/tests/test_decisions_skill.py +0 -0
  117. {getapo-0.3.4 → getapo-0.3.5}/tests/test_delivery.py +0 -0
  118. {getapo-0.3.4 → getapo-0.3.5}/tests/test_digest.py +0 -0
  119. {getapo-0.3.4 → getapo-0.3.5}/tests/test_due_stuck.py +0 -0
  120. {getapo-0.3.4 → getapo-0.3.5}/tests/test_edit_undo.py +0 -0
  121. {getapo-0.3.4 → getapo-0.3.5}/tests/test_events.py +0 -0
  122. {getapo-0.3.4 → getapo-0.3.5}/tests/test_goal_page.py +0 -0
  123. {getapo-0.3.4 → getapo-0.3.5}/tests/test_guide.py +0 -0
  124. {getapo-0.3.4 → getapo-0.3.5}/tests/test_installer.py +0 -0
  125. {getapo-0.3.4 → getapo-0.3.5}/tests/test_item_folder.py +0 -0
  126. {getapo-0.3.4 → getapo-0.3.5}/tests/test_item_page.py +0 -0
  127. {getapo-0.3.4 → getapo-0.3.5}/tests/test_landing.py +0 -0
  128. {getapo-0.3.4 → getapo-0.3.5}/tests/test_layout_fixes.py +0 -0
  129. {getapo-0.3.4 → getapo-0.3.5}/tests/test_linear_client.py +0 -0
  130. {getapo-0.3.4 → getapo-0.3.5}/tests/test_linear_goals.py +0 -0
  131. {getapo-0.3.4 → getapo-0.3.5}/tests/test_links.py +0 -0
  132. {getapo-0.3.4 → getapo-0.3.5}/tests/test_live_stream.py +0 -0
  133. {getapo-0.3.4 → getapo-0.3.5}/tests/test_mcp_instructions.py +0 -0
  134. {getapo-0.3.4 → getapo-0.3.5}/tests/test_mcp_server.py +0 -0
  135. {getapo-0.3.4 → getapo-0.3.5}/tests/test_merge_branches.py +0 -0
  136. {getapo-0.3.4 → getapo-0.3.5}/tests/test_names.py +0 -0
  137. {getapo-0.3.4 → getapo-0.3.5}/tests/test_navigation.py +0 -0
  138. {getapo-0.3.4 → getapo-0.3.5}/tests/test_new_work.py +0 -0
  139. {getapo-0.3.4 → getapo-0.3.5}/tests/test_next_item.py +0 -0
  140. {getapo-0.3.4 → getapo-0.3.5}/tests/test_notes_labels.py +0 -0
  141. {getapo-0.3.4 → getapo-0.3.5}/tests/test_notify.py +0 -0
  142. {getapo-0.3.4 → getapo-0.3.5}/tests/test_now.py +0 -0
  143. {getapo-0.3.4 → getapo-0.3.5}/tests/test_now_leads.py +0 -0
  144. {getapo-0.3.4 → getapo-0.3.5}/tests/test_now_scan.py +0 -0
  145. {getapo-0.3.4 → getapo-0.3.5}/tests/test_outcome_pages.py +0 -0
  146. {getapo-0.3.4 → getapo-0.3.5}/tests/test_outcomes.py +0 -0
  147. {getapo-0.3.4 → getapo-0.3.5}/tests/test_overview_order.py +0 -0
  148. {getapo-0.3.4 → getapo-0.3.5}/tests/test_palette_js.py +0 -0
  149. {getapo-0.3.4 → getapo-0.3.5}/tests/test_poll_loop.py +0 -0
  150. {getapo-0.3.4 → getapo-0.3.5}/tests/test_preview_paths.py +0 -0
  151. {getapo-0.3.4 → getapo-0.3.5}/tests/test_priority_due.py +0 -0
  152. {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_home.py +0 -0
  153. {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_identity.py +0 -0
  154. {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_overview.py +0 -0
  155. {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_scope.py +0 -0
  156. {getapo-0.3.4 → getapo-0.3.5}/tests/test_project_settings.py +0 -0
  157. {getapo-0.3.4 → getapo-0.3.5}/tests/test_projects.py +0 -0
  158. {getapo-0.3.4 → getapo-0.3.5}/tests/test_prompt_answers.py +0 -0
  159. {getapo-0.3.4 → getapo-0.3.5}/tests/test_quiet_pages.py +0 -0
  160. {getapo-0.3.4 → getapo-0.3.5}/tests/test_rank_and_deps.py +0 -0
  161. {getapo-0.3.4 → getapo-0.3.5}/tests/test_reply_where_you_are.py +0 -0
  162. {getapo-0.3.4 → getapo-0.3.5}/tests/test_repo_writer.py +0 -0
  163. {getapo-0.3.4 → getapo-0.3.5}/tests/test_resume_folder.py +0 -0
  164. {getapo-0.3.4 → getapo-0.3.5}/tests/test_round.py +0 -0
  165. {getapo-0.3.4 → getapo-0.3.5}/tests/test_scheduled_resume.py +0 -0
  166. {getapo-0.3.4 → getapo-0.3.5}/tests/test_schema.py +0 -0
  167. {getapo-0.3.4 → getapo-0.3.5}/tests/test_schema_upgrade.py +0 -0
  168. {getapo-0.3.4 → getapo-0.3.5}/tests/test_search.py +0 -0
  169. {getapo-0.3.4 → getapo-0.3.5}/tests/test_session_page.py +0 -0
  170. {getapo-0.3.4 → getapo-0.3.5}/tests/test_session_verdict.py +0 -0
  171. {getapo-0.3.4 → getapo-0.3.5}/tests/test_small_fixes.py +0 -0
  172. {getapo-0.3.4 → getapo-0.3.5}/tests/test_snooze.py +0 -0
  173. {getapo-0.3.4 → getapo-0.3.5}/tests/test_sources.py +0 -0
  174. {getapo-0.3.4 → getapo-0.3.5}/tests/test_start_and_follow_up.py +0 -0
  175. {getapo-0.3.4 → getapo-0.3.5}/tests/test_station_read_api.py +0 -0
  176. {getapo-0.3.4 → getapo-0.3.5}/tests/test_status_export.py +0 -0
  177. {getapo-0.3.4 → getapo-0.3.5}/tests/test_sync_errors.py +0 -0
  178. {getapo-0.3.4 → getapo-0.3.5}/tests/test_task_attempts.py +0 -0
  179. {getapo-0.3.4 → getapo-0.3.5}/tests/test_task_effort.py +0 -0
  180. {getapo-0.3.4 → getapo-0.3.5}/tests/test_task_page.py +0 -0
  181. {getapo-0.3.4 → getapo-0.3.5}/tests/test_transcripts.py +0 -0
  182. {getapo-0.3.4 → getapo-0.3.5}/tests/test_ui_review.py +0 -0
  183. {getapo-0.3.4 → getapo-0.3.5}/tests/test_usage_limit.py +0 -0
  184. {getapo-0.3.4 → getapo-0.3.5}/tests/test_verify.py +0 -0
  185. {getapo-0.3.4 → getapo-0.3.5}/tests/test_week_and_trend.py +0 -0
  186. {getapo-0.3.4 → getapo-0.3.5}/tests/test_weekly_report.py +0 -0
  187. {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_items.py +0 -0
  188. {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_location.py +0 -0
  189. {getapo-0.3.4 → getapo-0.3.5}/tests/test_work_order.py +0 -0
  190. {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.4
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/
@@ -1,3 +1,3 @@
1
1
  """apo (AI Project Orchestration): a local dashboard and MCP server for Claude Code."""
2
2
 
3
- __version__ = "0.3.4"
3
+ __version__ = "0.3.5"
@@ -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, and
5121
- for a folder of projects."""
5122
- if _is_home_or_above(cwd):
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.4
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/
@@ -112,6 +112,7 @@ tests/test_due_stuck.py
112
112
  tests/test_edit_undo.py
113
113
  tests/test_entry_points.py
114
114
  tests/test_events.py
115
+ tests/test_filed_byline.py
115
116
  tests/test_folder_identity.py
116
117
  tests/test_goal_page.py
117
118
  tests/test_guide.py
@@ -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.4"
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.4" in metadata
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