recala-cli 0.6.8__tar.gz → 0.6.9__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.
- {recala_cli-0.6.8 → recala_cli-0.6.9}/CHANGELOG.md +5 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/PKG-INFO +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/pyproject.toml +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/__init__.py +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/auth.py +6 -6
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/onboard.py +2 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/shell.py +7 -8
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/status.py +9 -3
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/topics.py +22 -8
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/display.py +7 -0
- recala_cli-0.6.9/src/recala_cli/stages.py +53 -0
- recala_cli-0.6.9/tests/fixtures/run_states_from_the_api.json +228 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_connect_and_status.py +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_core_release.py +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_core_root.py +0 -7
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_dogfood_fixes.py +4 -11
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_empty_scan_next.py +3 -3
- recala_cli-0.6.9/tests/test_first_run_findings.py +123 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_onboard_free_plan.py +3 -3
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_org_readable.py +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_review_round3.py +1 -1
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_stages.py +39 -33
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_topics_one_call.py +1 -1
- recala_cli-0.6.9/uv.lock +172 -0
- recala_cli-0.6.8/src/recala_cli/stages.py +0 -73
- {recala_cli-0.6.8 → recala_cli-0.6.9}/.gitignore +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/README.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/scripts/check-dogfood.sh +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/scripts/publish_pypi.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/scripts/release.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/__main__.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/analytics.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/article_runs.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/auth.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/client.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/__init__.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/article.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/billing.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/bing.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/cadence.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/connect.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/credits.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/export.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/faithful_translations.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/gsc.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/index.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/keys.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/knowledge.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/languages.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/monthly_report.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/notifications.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/org.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/profile.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/questions.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/reads.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/refresh.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/refusals.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/schema.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/skills.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/commands/slot_topic.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/config.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/confirm.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/endpoints.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/errors.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/human.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/ids.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/labels.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/main.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/onboarding.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/organizations.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/output.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/parallel.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/polling.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/prompts.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/runtime.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/search_numbers.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/SKILL.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/apply-revision-notes.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/article-signoff.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/connect-search-console.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/first-hand-evidence.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/onboard.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/plan-month.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/recala-cli-contract.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/schedule-approved.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/skills/recala/references/weekly-authority-report.md +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/stop_next_steps.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/ui.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/updates.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/src/recala_cli/views.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/conftest.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/distribution/test_public_install.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/fixtures/hold_text_json.json +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/fixtures/human_output_pass1_json.json +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/fixtures/machine_contract_main.json +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_agent_error_next_steps.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_agent_onboarding.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_analytics.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_analytics_security.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_approve_read_receipt.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_approve_reconfirm.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_article_cover.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_article_export.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_article_id_output.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_article_portal_link.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_billing_invoices.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_billing_link.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_billing_top_up.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_bing.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_blank_author.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_c2_onboarding.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_cadence.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_calendar_matches_plan.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_calendar_slots.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_cms_skip.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_company_name_in_prompts.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_confirm.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_content_commands.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_core_errors.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_core_short_ids.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_core_speed.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_core_status_speed.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_credits.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_declined_setup_is_not_an_error.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_dogfood_status.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_edit_link_warnings.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_empty_scan_replay.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_errors.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_failed_scan_ends_softly.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_faithful_translation_settings.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_free_article_tries.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_free_company_topics_step.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_free_plan_wording.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_free_scout_refusal.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_free_topics.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_gsc.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_help_listing.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_hold_finding_sentences.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_hold_text.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_human_output_pass1.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_human_readable.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_index.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_keys.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_knowledge_admit.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_knowledge_show_ideas.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_languages.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_login.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_login_json_org.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_machine_contract.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_monthly_report.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_no_endings_say_what_is_true.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_notifications.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_onboard_defaults.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_onboarding_channel.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_onboarding_commands.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_org.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_org_describe.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_poll_pacing.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_profile.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_publish_commands.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_publish_pypi.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_questions.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_questions_in_words.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_recheck_findings.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_refresh.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_rerun_refusal.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_review_hardening.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_run_progress.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_scan_reports_what_was_found.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_scene.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_scout_count.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_search_numbers.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_second_company_and_refused_details.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_short_id_selectors.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_signed_in_writes.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_skills.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_slot_topic.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_stop_next_steps.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_submit_review_state.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_times_in_company_zone.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_topics.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_topics_add.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_ui.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_view_surface.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_whoami.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_will_retry.py +0 -0
- {recala_cli-0.6.8 → recala_cli-0.6.9}/tests/test_write_flags.py +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# CLI changes
|
|
2
2
|
|
|
3
|
+
## 0.6.9
|
|
4
|
+
|
|
5
|
+
- `recala update` now upgrades a plain pip install with the same Python. Topics are listed once while an article is written, and `status` says which. The signed-in address is masked or left out of plain output. An empty topic list points to `recala topics scout`.
|
|
6
|
+
- The writing stages now come from the server's `stage` field, so a run started from the terminal moves from Researching to Drafting, Checking and Saving as it really does. An older server that sends no stage keeps the stage already shown.
|
|
7
|
+
|
|
3
8
|
## 0.6.8
|
|
4
9
|
|
|
5
10
|
- `recala article create` names four stages while it writes (Researching, Drafting, Checking, Saving), says once that a good article takes about 10 minutes, and ends with "The light found you." A raw server step name is no longer shown. `--json` output and exit codes are unchanged.
|
|
@@ -13,7 +13,7 @@ from recala_cli.auth import credential_kind
|
|
|
13
13
|
from recala_cli.client import RecalaClient
|
|
14
14
|
from recala_cli.confirm import signin_status
|
|
15
15
|
from recala_cli.endpoints import ME, SIGN_OUT
|
|
16
|
-
from recala_cli.display import display_name
|
|
16
|
+
from recala_cli.display import display_name, masked_email
|
|
17
17
|
from recala_cli.errors import CliError
|
|
18
18
|
from recala_cli.output import notify
|
|
19
19
|
from recala_cli.organizations import (
|
|
@@ -29,7 +29,7 @@ from recala_cli.runtime import command_runner, common_options, interactive_human
|
|
|
29
29
|
def _describe_sign_in(result: dict[str, Any]) -> str:
|
|
30
30
|
if not result.get("signed_in"):
|
|
31
31
|
return "Signed out."
|
|
32
|
-
who = result.get("email") or result.get("kind", "token")
|
|
32
|
+
who = masked_email(result.get("email")) or result.get("kind", "token")
|
|
33
33
|
return f"Signed in ({who})."
|
|
34
34
|
|
|
35
35
|
|
|
@@ -58,11 +58,11 @@ class SignInScreen:
|
|
|
58
58
|
return nullcontext()
|
|
59
59
|
return ui.Spinner("Waiting for you to approve the code in your browser", style=self.style)
|
|
60
60
|
|
|
61
|
-
def signed_in(self
|
|
61
|
+
def signed_in(self) -> None:
|
|
62
62
|
if self.as_json:
|
|
63
63
|
return
|
|
64
64
|
if self.within_onboarding:
|
|
65
|
-
notify(f"\n {self.style.accent('*')} {self.style.bold('Signed in')}
|
|
65
|
+
notify(f"\n {self.style.accent('*')} {self.style.bold('Signed in')}\n") # the address stays out of onboarding transcripts
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
def _describe_login(ctx: click.Context, result: dict[str, Any]) -> str:
|
|
@@ -70,7 +70,7 @@ def _describe_login(ctx: click.Context, result: dict[str, Any]) -> str:
|
|
|
70
70
|
return _describe_sign_in(result)
|
|
71
71
|
me = ctx.meta.get("login_identity") or {}
|
|
72
72
|
user = me.get("user") if isinstance(me.get("user"), dict) else {}
|
|
73
|
-
name = display_name(user.get("name") or user.get("display_name") or user.get("email") or result.get("email"))
|
|
73
|
+
name = display_name(user.get("name") or user.get("display_name")) or masked_email(user.get("email") or result.get("email"))
|
|
74
74
|
lines = [f"Signed in as {name or result.get('kind') or 'you'}."]
|
|
75
75
|
if "login_identity" not in ctx.meta:
|
|
76
76
|
return "\n".join([*lines, ORGANIZATION_LOOKUP_FAILED])
|
|
@@ -135,7 +135,7 @@ def sign_in(ctx: click.Context, *, no_browser: bool = False, within_onboarding:
|
|
|
135
135
|
present_code=screen.present_code,
|
|
136
136
|
waiting=screen.waiting,
|
|
137
137
|
)
|
|
138
|
-
screen.signed_in(
|
|
138
|
+
screen.signed_in()
|
|
139
139
|
return result
|
|
140
140
|
|
|
141
141
|
|
|
@@ -278,8 +278,9 @@ def _complete_setup(ctx: click.Context, client: RecalaClient, facts: Facts, *, r
|
|
|
278
278
|
|
|
279
279
|
def describe_onboarding(report: dict[str, Any]) -> str:
|
|
280
280
|
report = human_data(report)
|
|
281
|
+
steps = [{**row, "detail": ""} if row["key"] == "login" else row for row in report["steps"]] # no address in transcripts
|
|
281
282
|
lines = ["", *credit_lines(report.get("plan") or {}, None, None), "",
|
|
282
|
-
ui.checklist(checklist_rows(
|
|
283
|
+
ui.checklist(checklist_rows(steps), style=ui.Style.for_stream(sys.stdout)), ""]
|
|
283
284
|
upcoming = report.get("next")
|
|
284
285
|
if upcoming:
|
|
285
286
|
lines.append(f" Next: {upcoming['title']} -> {upcoming['command']}")
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import shlex
|
|
5
6
|
import subprocess
|
|
6
7
|
import sys
|
|
7
8
|
from collections.abc import Callable
|
|
@@ -15,6 +16,7 @@ from recala_cli.runtime import command_runner, json_option
|
|
|
15
16
|
SHELLS = ("bash", "zsh", "fish")
|
|
16
17
|
UV_UPGRADE = ["uv", "tool", "install", "--force", "recala-cli"]
|
|
17
18
|
PIPX_UPGRADE = ["pipx", "install", "--force", "recala-cli"]
|
|
19
|
+
PIP_UPGRADE_ARGS = ["-m", "pip", "install", "--upgrade", "recala-cli"]
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
@click.command()
|
|
@@ -61,17 +63,14 @@ def _run_command(command: list[str]) -> int:
|
|
|
61
63
|
@click.option("--dry-run", is_flag=True, help="Only print the command that would run.")
|
|
62
64
|
@command_runner(human=lambda result: result["message"])
|
|
63
65
|
def update(ctx: click.Context, dry_run: bool) -> dict[str, object]:
|
|
64
|
-
"""Install the newest CLI with uv or
|
|
66
|
+
"""Install the newest CLI with uv, pipx or pip.
|
|
65
67
|
|
|
66
|
-
Uses the tool that installed Recala
|
|
68
|
+
Uses the tool that installed Recala; any other install (plain pip) is upgraded with pip, using the Python that runs this program.
|
|
69
|
+
A failed upgrade exits with an error and prints the exact command to run yourself."""
|
|
67
70
|
seams = ctx.find_root().obj
|
|
68
71
|
manager = installed_by(seams.get("install_prefix") or sys.prefix)
|
|
69
|
-
command = {"uv": UV_UPGRADE, "pipx": PIPX_UPGRADE}.get(manager or "")
|
|
70
|
-
|
|
71
|
-
return {"updated": False, "command": None, "message":
|
|
72
|
-
f"Recala was not installed with uv or pipx, so it will not guess. Run one of:\n"
|
|
73
|
-
f" {' '.join(UV_UPGRADE)}\n {' '.join(PIPX_UPGRADE)}"}
|
|
74
|
-
text = " ".join(command)
|
|
72
|
+
command = {"uv": UV_UPGRADE, "pipx": PIPX_UPGRADE}.get(manager or "") or [sys.executable, *PIP_UPGRADE_ARGS]
|
|
73
|
+
text = shlex.join(command)
|
|
75
74
|
if dry_run:
|
|
76
75
|
return {"updated": False, "command": text, "message": f"Would run: {text}"}
|
|
77
76
|
run: Callable[[list[str]], int] = seams.get("run_command") or _run_command
|
|
@@ -17,6 +17,7 @@ from recala_cli import ui
|
|
|
17
17
|
from recala_cli.endpoints import BILLING_MANAGED_USAGE, ENTITLEMENTS, CADENCE_SHOW, PUBLICATION_PLAN, AUTOAPPROVE_SHOW
|
|
18
18
|
from recala_cli.onboarding import Facts, evaluate, free_articles_left, gather, next_step, with_plan_optional
|
|
19
19
|
from recala_cli.commands.index import is_indexed, read_indexing
|
|
20
|
+
from recala_cli.display import display_name
|
|
20
21
|
from recala_cli.errors import CliError
|
|
21
22
|
from recala_cli.parallel import run_parallel
|
|
22
23
|
from recala_cli.human import publish_state_words
|
|
@@ -49,7 +50,8 @@ def dashboard(facts: Facts, *, entitlements: dict[str, Any] | None, managed: dic
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
|
|
52
|
-
def describe_dashboard(board: dict[str, Any], *, cadence: dict[str, Any] | None = None
|
|
53
|
+
def describe_dashboard(board: dict[str, Any], *, cadence: dict[str, Any] | None = None,
|
|
54
|
+
being_written: tuple[str, ...] = ()) -> str:
|
|
53
55
|
style = ui.Style.for_stream(sys.stdout) # the dashboard is printed on stdout
|
|
54
56
|
org = board.get("org") or {}
|
|
55
57
|
calendar = board.get("calendar") or {}
|
|
@@ -73,8 +75,10 @@ def describe_dashboard(board: dict[str, Any], *, cadence: dict[str, Any] | None
|
|
|
73
75
|
in_words[publish_state_words(state)] += count
|
|
74
76
|
counts = ", ".join(f"{n} {state}" for state, n in sorted(in_words.items()))
|
|
75
77
|
total = articles.get("total", 0)
|
|
78
|
+
waiting = max(0, articles.get("topics_waiting", 0) - len(being_written)) # a topic being written is not waiting
|
|
76
79
|
lines.append(f" {total} article{'' if total == 1 else 's'}" + (f" ({counts})" if counts else "")
|
|
77
|
-
+ f"; {
|
|
80
|
+
+ f"; {waiting} topics waiting -> recala topics list")
|
|
81
|
+
lines.extend(f' Being written now: "{display_name(topic)}"' for topic in being_written)
|
|
78
82
|
lines.append(" " + indexing_line(board.get("indexing")))
|
|
79
83
|
if calendar:
|
|
80
84
|
calendar = {**calendar, "timezone": zone}
|
|
@@ -114,7 +118,8 @@ def autopilot_blockers(facts):
|
|
|
114
118
|
|
|
115
119
|
@click.command()
|
|
116
120
|
@common_options
|
|
117
|
-
@command_runner(contextual_human=lambda ctx, board: describe_dashboard(
|
|
121
|
+
@command_runner(contextual_human=lambda ctx, board: describe_dashboard(
|
|
122
|
+
board, cadence=ctx.meta.get("status_cadence"), being_written=ctx.meta.get("status_being_written", ())))
|
|
118
123
|
def status(ctx: click.Context, org_flag: str | None) -> dict[str, Any]:
|
|
119
124
|
"""The active company at a glance.
|
|
120
125
|
|
|
@@ -132,6 +137,7 @@ def status(ctx: click.Context, org_flag: str | None) -> dict[str, Any]:
|
|
|
132
137
|
facts = answers["facts"]
|
|
133
138
|
facts.cadence, facts.approval, facts.publication_plan = answers["cadence"], answers["approval"], answers["plan"]
|
|
134
139
|
ctx.meta["status_cadence"] = (facts.publication_plan.get("cadence") or facts.cadence.get("cadence") or {})
|
|
140
|
+
ctx.meta["status_being_written"] = tuple(str(row.get("topic")) for row in facts.topics.get("processing") or [])
|
|
135
141
|
entitlements = answers["entitlements"]
|
|
136
142
|
return dashboard(facts, entitlements=entitlements if (entitlements or {}).get("enabled") else None,
|
|
137
143
|
managed=answers["managed"], indexing=indexing_of_listed(client, facts.articles))
|
|
@@ -54,10 +54,22 @@ def read_queue(client, *, limit: int | None = None, offset: int = 0) -> dict[str
|
|
|
54
54
|
return queue
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
#:
|
|
58
|
-
#:
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
#: Live check 24 Nov 2026: no topic arrived 5.5 minutes after a scan, and `recala topics scout` found one in 22 seconds.
|
|
58
|
+
#: The scan route starts no topic search (apps/api/src/routers/onboarding.py: its only background task is competitor intel).
|
|
59
|
+
NO_TOPICS_YET = ("No topics yet. Ask Recala to look for some now: recala topics scout. "
|
|
60
|
+
"Or write your own: recala topics add \"<a question your buyers ask>\"")
|
|
61
|
+
|
|
62
|
+
#: A topic that is being written is also in Up next and Other in the API's answer; it is shown where it is true for it.
|
|
63
|
+
_MOST_TRUE_FIRST = ("processing", "queued", "up_next", "backlog", "other")
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _each_topic_once(result: dict[str, Any]) -> dict[str, list[dict[str, Any]]]:
|
|
67
|
+
shown: set[Any] = set()
|
|
68
|
+
sections: dict[str, list[dict[str, Any]]] = {}
|
|
69
|
+
for section in _MOST_TRUE_FIRST:
|
|
70
|
+
sections[section] = [row for row in result.get(section) or [] if row.get("id") not in shown]
|
|
71
|
+
shown.update(row.get("id") for row in sections[section])
|
|
72
|
+
return sections
|
|
61
73
|
|
|
62
74
|
|
|
63
75
|
def _no_topic_can_come(client: RecalaClient) -> bool:
|
|
@@ -75,20 +87,22 @@ def _no_topic_can_come(client: RecalaClient) -> bool:
|
|
|
75
87
|
def _describe_topics(ctx: click.Context, result: dict[str, Any]) -> str:
|
|
76
88
|
show_all = ctx.meta.get("topics_show_all", False)
|
|
77
89
|
lines = []
|
|
90
|
+
sections = _each_topic_once(result)
|
|
78
91
|
for section in SECTIONS:
|
|
79
|
-
rows =
|
|
92
|
+
rows = sections[section]
|
|
80
93
|
if rows:
|
|
81
94
|
shown = rows if show_all else rows[:PEOPLE_SECTION_ROWS]
|
|
82
95
|
lines.append(f"{section.replace('_', ' ').capitalize()} ({len(rows)})")
|
|
83
96
|
lines.extend(f" {row['topic']} [{str(row['id'])[:8]}]" for row in shown)
|
|
84
97
|
if len(shown) < len(rows):
|
|
85
98
|
lines.append(f" {len(rows) - len(shown)} more: recala topics list --limit 0")
|
|
86
|
-
|
|
87
|
-
if
|
|
99
|
+
total = result.get("total", 0)
|
|
100
|
+
lines.append(f"{total} topic{'' if total == 1 else 's'} in total")
|
|
101
|
+
if not any(sections.values()):
|
|
88
102
|
client = ctx.meta.get("org_client")
|
|
89
103
|
none_are_coming = client is not None and _no_topic_can_come(client)
|
|
90
104
|
lines.append(f"Your site's scan gave nothing to prepare topics from, so none are coming. "
|
|
91
|
-
f"Add the first one yourself: {ADD_FIRST_TOPIC_COMMAND}" if none_are_coming else
|
|
105
|
+
f"Add the first one yourself: {ADD_FIRST_TOPIC_COMMAND}" if none_are_coming else NO_TOPICS_YET)
|
|
92
106
|
return "\n".join(lines)
|
|
93
107
|
|
|
94
108
|
|
|
@@ -27,6 +27,13 @@ def display_name(value: Any) -> str:
|
|
|
27
27
|
return " ".join(terminal_text(value).split()) if isinstance(value, str) else ""
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
def masked_email(value: Any) -> str:
|
|
31
|
+
""""you@company.example" as "y…@company.example": enough to recognise the account, not to copy it into a log."""
|
|
32
|
+
text = display_name(value)
|
|
33
|
+
local, at, domain = text.partition("@")
|
|
34
|
+
return f"{local[:1]}…@{domain}" if at and local else text
|
|
35
|
+
|
|
36
|
+
|
|
30
37
|
def human_data(value: Any, *, field: str = "") -> Any:
|
|
31
38
|
"""A sanitized presentation copy; the API data still goes unchanged to JSON."""
|
|
32
39
|
if isinstance(value, str):
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""The four stages of writing an article, as the terminal says them: the same four the web wizard shows.
|
|
2
|
+
|
|
3
|
+
The server says which stage a run has reached (apps/api GET /api/v1/runs/{id}, field ``stage``, computed in
|
|
4
|
+
apps/api/src/authority/run_stage.py); this module only turns it into Researching, Drafting, Checking and Saving.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from recala_cli import ui
|
|
12
|
+
|
|
13
|
+
STAGES = ("Researching", "Drafting", "Checking", "Saving")
|
|
14
|
+
|
|
15
|
+
#: One true sentence per stage, short enough that "Stage: sentence" fits a 40-column window.
|
|
16
|
+
_SENTENCES = {
|
|
17
|
+
"Researching": "Reading about your field.",
|
|
18
|
+
"Drafting": "Writing it in your voice.",
|
|
19
|
+
"Checking": "Matching facts to sources.",
|
|
20
|
+
"Saving": "Adding a cover and saving.",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#: Measured on five live first-article runs (23 Nov 2026): 7 to 14 minutes. Said once, when the wait starts.
|
|
24
|
+
WAITING_LINE = "A good article takes about 10 minutes."
|
|
25
|
+
|
|
26
|
+
#: The server's stage names, as the terminal says them.
|
|
27
|
+
_LABEL_OF_STAGE = {"researching": "Researching", "writing": "Drafting", "checking": "Checking", "saving": "Saving"}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def stage_line(label: str) -> str | None:
|
|
31
|
+
""""Drafting: Writing it in your voice." for a stage name; None for any other label."""
|
|
32
|
+
return f"{label}: {_SENTENCES[label]}" if label in _SENTENCES else None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class StageTracker:
|
|
36
|
+
"""Reads run states in order and answers with the stage reached: never raw, never earlier than one already shown.
|
|
37
|
+
|
|
38
|
+
A state with no stage the terminal knows (an older server, a run not started yet) keeps the stage last shown.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self) -> None:
|
|
42
|
+
self._reached = 0
|
|
43
|
+
|
|
44
|
+
def observe(self, run: dict[str, Any]) -> str:
|
|
45
|
+
label = _LABEL_OF_STAGE.get(str(run.get("stage") or ""))
|
|
46
|
+
if label:
|
|
47
|
+
self._reached = max(self._reached, STAGES.index(label))
|
|
48
|
+
return STAGES[self._reached]
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def finish_headline(style: ui.Style) -> str:
|
|
52
|
+
"""The line that marks the end of a wait that ended with an article; stdout then says which."""
|
|
53
|
+
return style.bold(style.accent("The light found you."))
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"queue_id": "queue-w53",
|
|
4
|
+
"topic": "Why maritime companies switch to dedicated crew-payroll SaaS",
|
|
5
|
+
"failure_code": null,
|
|
6
|
+
"failure_reason": null,
|
|
7
|
+
"status": "processing",
|
|
8
|
+
"will_retry": false,
|
|
9
|
+
"current_node": "search",
|
|
10
|
+
"stage": "researching",
|
|
11
|
+
"timeline": [
|
|
12
|
+
{
|
|
13
|
+
"node_name": "search",
|
|
14
|
+
"started_at": "<time>",
|
|
15
|
+
"completed_at": null,
|
|
16
|
+
"duration_ms": null,
|
|
17
|
+
"status": "running",
|
|
18
|
+
"error_message": null
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"article_id": null,
|
|
22
|
+
"error_message": null,
|
|
23
|
+
"events": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"queue_id": "queue-w53",
|
|
27
|
+
"topic": "Why maritime companies switch to dedicated crew-payroll SaaS",
|
|
28
|
+
"failure_code": null,
|
|
29
|
+
"failure_reason": null,
|
|
30
|
+
"status": "processing",
|
|
31
|
+
"will_retry": false,
|
|
32
|
+
"current_node": "generate",
|
|
33
|
+
"stage": "writing",
|
|
34
|
+
"timeline": [
|
|
35
|
+
{
|
|
36
|
+
"node_name": "search",
|
|
37
|
+
"started_at": "<time>",
|
|
38
|
+
"completed_at": "<time>",
|
|
39
|
+
"duration_ms": null,
|
|
40
|
+
"status": "completed",
|
|
41
|
+
"error_message": null
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"node_name": "generate",
|
|
45
|
+
"started_at": "<time>",
|
|
46
|
+
"completed_at": null,
|
|
47
|
+
"duration_ms": null,
|
|
48
|
+
"status": "running",
|
|
49
|
+
"error_message": null
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"article_id": null,
|
|
53
|
+
"error_message": null,
|
|
54
|
+
"events": []
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"queue_id": "queue-w53",
|
|
58
|
+
"topic": "Why maritime companies switch to dedicated crew-payroll SaaS",
|
|
59
|
+
"failure_code": null,
|
|
60
|
+
"failure_reason": null,
|
|
61
|
+
"status": "processing",
|
|
62
|
+
"will_retry": false,
|
|
63
|
+
"current_node": "fact_check",
|
|
64
|
+
"stage": "checking",
|
|
65
|
+
"timeline": [
|
|
66
|
+
{
|
|
67
|
+
"node_name": "search",
|
|
68
|
+
"started_at": "<time>",
|
|
69
|
+
"completed_at": "<time>",
|
|
70
|
+
"duration_ms": null,
|
|
71
|
+
"status": "completed",
|
|
72
|
+
"error_message": null
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"node_name": "generate",
|
|
76
|
+
"started_at": "<time>",
|
|
77
|
+
"completed_at": "<time>",
|
|
78
|
+
"duration_ms": null,
|
|
79
|
+
"status": "completed",
|
|
80
|
+
"error_message": null
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"node_name": "fact_check",
|
|
84
|
+
"started_at": "<time>",
|
|
85
|
+
"completed_at": null,
|
|
86
|
+
"duration_ms": null,
|
|
87
|
+
"status": "running",
|
|
88
|
+
"error_message": null
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"article_id": null,
|
|
92
|
+
"error_message": null,
|
|
93
|
+
"events": []
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"queue_id": "queue-w53",
|
|
97
|
+
"topic": "Why maritime companies switch to dedicated crew-payroll SaaS",
|
|
98
|
+
"failure_code": null,
|
|
99
|
+
"failure_reason": null,
|
|
100
|
+
"status": "processing",
|
|
101
|
+
"will_retry": false,
|
|
102
|
+
"current_node": "fact_check",
|
|
103
|
+
"stage": "checking",
|
|
104
|
+
"timeline": [
|
|
105
|
+
{
|
|
106
|
+
"node_name": "search",
|
|
107
|
+
"started_at": "<time>",
|
|
108
|
+
"completed_at": "<time>",
|
|
109
|
+
"duration_ms": null,
|
|
110
|
+
"status": "completed",
|
|
111
|
+
"error_message": null
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"node_name": "generate",
|
|
115
|
+
"started_at": "<time>",
|
|
116
|
+
"completed_at": "<time>",
|
|
117
|
+
"duration_ms": null,
|
|
118
|
+
"status": "completed",
|
|
119
|
+
"error_message": null
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"node_name": "fact_check",
|
|
123
|
+
"started_at": "<time>",
|
|
124
|
+
"completed_at": null,
|
|
125
|
+
"duration_ms": null,
|
|
126
|
+
"status": "running",
|
|
127
|
+
"error_message": null
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"article_id": null,
|
|
131
|
+
"error_message": null,
|
|
132
|
+
"events": []
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"queue_id": "queue-w53",
|
|
136
|
+
"topic": "Why maritime companies switch to dedicated crew-payroll SaaS",
|
|
137
|
+
"failure_code": null,
|
|
138
|
+
"failure_reason": null,
|
|
139
|
+
"status": "processing",
|
|
140
|
+
"will_retry": false,
|
|
141
|
+
"current_node": "publish_cms",
|
|
142
|
+
"stage": "saving",
|
|
143
|
+
"timeline": [
|
|
144
|
+
{
|
|
145
|
+
"node_name": "search",
|
|
146
|
+
"started_at": "<time>",
|
|
147
|
+
"completed_at": "<time>",
|
|
148
|
+
"duration_ms": null,
|
|
149
|
+
"status": "completed",
|
|
150
|
+
"error_message": null
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"node_name": "generate",
|
|
154
|
+
"started_at": "<time>",
|
|
155
|
+
"completed_at": "<time>",
|
|
156
|
+
"duration_ms": null,
|
|
157
|
+
"status": "completed",
|
|
158
|
+
"error_message": null
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"node_name": "fact_check",
|
|
162
|
+
"started_at": "<time>",
|
|
163
|
+
"completed_at": "<time>",
|
|
164
|
+
"duration_ms": null,
|
|
165
|
+
"status": "completed",
|
|
166
|
+
"error_message": null
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"node_name": "publish_cms",
|
|
170
|
+
"started_at": "<time>",
|
|
171
|
+
"completed_at": null,
|
|
172
|
+
"duration_ms": null,
|
|
173
|
+
"status": "running",
|
|
174
|
+
"error_message": null
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"article_id": null,
|
|
178
|
+
"error_message": null,
|
|
179
|
+
"events": []
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"queue_id": "queue-w53",
|
|
183
|
+
"topic": "Why maritime companies switch to dedicated crew-payroll SaaS",
|
|
184
|
+
"failure_code": null,
|
|
185
|
+
"failure_reason": null,
|
|
186
|
+
"status": "completed",
|
|
187
|
+
"will_retry": false,
|
|
188
|
+
"current_node": null,
|
|
189
|
+
"stage": null,
|
|
190
|
+
"timeline": [
|
|
191
|
+
{
|
|
192
|
+
"node_name": "search",
|
|
193
|
+
"started_at": "<time>",
|
|
194
|
+
"completed_at": "<time>",
|
|
195
|
+
"duration_ms": null,
|
|
196
|
+
"status": "completed",
|
|
197
|
+
"error_message": null
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"node_name": "generate",
|
|
201
|
+
"started_at": "<time>",
|
|
202
|
+
"completed_at": "<time>",
|
|
203
|
+
"duration_ms": null,
|
|
204
|
+
"status": "completed",
|
|
205
|
+
"error_message": null
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"node_name": "fact_check",
|
|
209
|
+
"started_at": "<time>",
|
|
210
|
+
"completed_at": "<time>",
|
|
211
|
+
"duration_ms": null,
|
|
212
|
+
"status": "completed",
|
|
213
|
+
"error_message": null
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"node_name": "publish_cms",
|
|
217
|
+
"started_at": "<time>",
|
|
218
|
+
"completed_at": "<time>",
|
|
219
|
+
"duration_ms": null,
|
|
220
|
+
"status": "completed",
|
|
221
|
+
"error_message": null
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"article_id": "11111111-2222-4333-8444-555555555555",
|
|
225
|
+
"error_message": null,
|
|
226
|
+
"events": []
|
|
227
|
+
}
|
|
228
|
+
]
|
|
@@ -352,7 +352,7 @@ def test_login_for_a_person_shows_the_wordmark_the_code_and_who_signed_in(api, r
|
|
|
352
352
|
assert result.exit_code == 0, result.stderr
|
|
353
353
|
assert "|_| \\___|\\__|\\__,_||_|\\__,_|" in result.stderr # the wordmark's last line
|
|
354
354
|
assert "W D J B - M J H T" in result.stderr
|
|
355
|
-
assert "Signed in as a
|
|
355
|
+
assert "Signed in as a…@example.test." in result.stdout
|
|
356
356
|
assert json.loads((isolated_config / "config.json").read_text())["web_url"] == "http://127.0.0.1:4361"
|
|
357
357
|
assert ACCESS_TOKEN not in result.stderr + result.stdout
|
|
358
358
|
|
|
@@ -12,7 +12,7 @@ PROJECT = tomllib.loads((CLI / "pyproject.toml").read_text())["project"]
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def test_the_version_is_065_in_the_package_and_in_pyproject():
|
|
15
|
-
assert __version__ == PROJECT["version"] == "0.6.
|
|
15
|
+
assert __version__ == PROJECT["version"] == "0.6.9"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def test_pypi_metadata_is_complete():
|
|
@@ -127,13 +127,6 @@ def test_update_dry_run_only_prints_the_command(run):
|
|
|
127
127
|
assert ran == [] and "uv tool install --force recala-cli" in result.stdout
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
def test_update_from_an_install_it_cannot_recognise_prints_the_command_to_run(run):
|
|
131
|
-
ran = []
|
|
132
|
-
result = run("update", install_prefix=sys.prefix, run_command=ran.append)
|
|
133
|
-
assert ran == [] and result.exit_code == 0
|
|
134
|
-
assert "uv tool install --force recala-cli" in result.stdout and "pipx install --force recala-cli" in result.stdout
|
|
135
|
-
|
|
136
|
-
|
|
137
130
|
def test_the_installers_own_output_goes_to_stderr_so_json_stays_clean(capfd):
|
|
138
131
|
from recala_cli.commands.shell import _run_command
|
|
139
132
|
assert _run_command([sys.executable, "-c", "print('installed package recala-cli 0.6.0')"]) == 0
|
|
@@ -858,17 +858,10 @@ def test_create_shows_server_progress_steps(api, run, granted):
|
|
|
858
858
|
{"run_id": TOPIC_ID, "state": "processing"},
|
|
859
859
|
202,
|
|
860
860
|
)
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
{
|
|
866
|
-
"queue_id": TOPIC_ID,
|
|
867
|
-
"status": "processing",
|
|
868
|
-
"topic": "Evidence",
|
|
869
|
-
"current_node": node,
|
|
870
|
-
},
|
|
871
|
-
)
|
|
861
|
+
from test_stages import IN_PROGRESS # the real route's run states (one shared fixture)
|
|
862
|
+
|
|
863
|
+
for state in IN_PROGRESS[:2]: # researching, then writing
|
|
864
|
+
api.json("GET", f"/api/v1/runs/{TOPIC_ID}", {**state, "queue_id": TOPIC_ID, "topic": "Evidence"})
|
|
872
865
|
api.json(
|
|
873
866
|
"GET",
|
|
874
867
|
f"/api/v1/runs/{TOPIC_ID}",
|
|
@@ -62,15 +62,15 @@ def test_topics_list_after_an_empty_scan_never_says_none_are_coming_when_a_topic
|
|
|
62
62
|
|
|
63
63
|
result = run("topics", "list", "--org", ORG_ID)
|
|
64
64
|
|
|
65
|
-
assert "none are coming" not in result.stdout and "
|
|
65
|
+
assert "none are coming" not in result.stdout and "recala topics scout" in result.stdout, result.stdout
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
def
|
|
68
|
+
def test_topics_list_with_no_empty_scan_names_the_scout_command(api, run, signed_in):
|
|
69
69
|
api.json("GET", "/api/v1/content-queue", {"total": 0})
|
|
70
70
|
|
|
71
71
|
result = run("topics", "list", "--org", ORG_ID)
|
|
72
72
|
|
|
73
|
-
assert "
|
|
73
|
+
assert "recala topics scout" in result.stdout, result.stdout
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
READ_ANOTHER = "To read another address: recala company scan --website"
|