mostlyright-data 0.31.39__tar.gz → 0.31.41__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 (133) hide show
  1. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/PKG-INFO +1 -1
  2. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/SKILL.md +4 -2
  3. mostlyright_data-0.31.41/skills/mr-data-build/agents/openai.yaml +4 -0
  4. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +8 -4
  5. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +5 -1
  6. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/commands.md +2 -2
  7. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/preparing-table-search.md +23 -59
  8. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/user-communication-contract.md +2 -2
  9. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_public.py +79 -19
  10. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_search.py +11 -4
  11. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/vocabulary.py +2 -2
  12. mostlyright_data-0.31.39/skills/mr-data-build/agents/openai.yaml +0 -4
  13. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/.gitignore +0 -0
  14. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/README.md +0 -0
  15. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/pyproject.toml +0 -0
  16. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/scripts/hatch_build.py +0 -0
  17. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
  18. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
  19. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +0 -0
  20. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +0 -0
  21. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
  22. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
  23. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
  24. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/agent-protocol.md +0 -0
  25. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
  26. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
  27. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/boundaries.md +0 -0
  28. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
  29. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/enriching-with-small-models.md +0 -0
  30. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/live-run.md +0 -0
  31. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/making-a-table-incremental.md +0 -0
  32. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/narrating-the-run.md +0 -0
  33. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
  34. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/one-install.md +0 -0
  35. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/patterns.md +0 -0
  36. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/predicting-with-tabular-models.md +0 -0
  37. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/prediction-labels.md +0 -0
  38. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/promote.md +0 -0
  39. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/readers.md +0 -0
  40. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/receipts.md +0 -0
  41. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/recipe-test.md +0 -0
  42. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
  43. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
  44. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/reference-pages.md +0 -0
  45. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/required-protocol.md +0 -0
  46. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/satellite-signals.md +0 -0
  47. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/source-credentials.md +0 -0
  48. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/sources.md +0 -0
  49. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
  50. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/transforms.md +0 -0
  51. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
  52. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
  53. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/__init__.py +0 -0
  54. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/agent_protocol.py +0 -0
  55. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/canonical.py +0 -0
  56. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/key_seam.py +0 -0
  57. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/page_coverage.py +0 -0
  58. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
  59. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/session_probes.py +0 -0
  60. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/skill_assets.py +0 -0
  61. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/table_manifest.py +0 -0
  62. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/__init__.py +0 -0
  63. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/activity.py +0 -0
  64. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/backoff.py +0 -0
  65. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/categories.py +0 -0
  66. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
  67. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/dataset_layout.py +0 -0
  68. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/delivery.py +0 -0
  69. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/description_shape.py +0 -0
  70. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/download.py +0 -0
  71. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/enrichment.py +0 -0
  72. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/fast_features.py +0 -0
  73. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/matching_benchmark.py +0 -0
  74. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/probe.py +0 -0
  75. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/progress_rate.py +0 -0
  76. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
  77. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/recipe.py +0 -0
  78. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
  79. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/recipe_explain.py +0 -0
  80. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/recipe_forecast.py +0 -0
  81. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/recipe_lint.py +0 -0
  82. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/recipe_test.py +0 -0
  83. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/refresh_rehearsal.py +0 -0
  84. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/release_check.py +0 -0
  85. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/research.py +0 -0
  86. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/router.py +0 -0
  87. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/run_diagnose.py +0 -0
  88. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/run_prefix.py +0 -0
  89. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/runs.py +0 -0
  90. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/session.py +0 -0
  91. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/stream.py +0 -0
  92. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
  93. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/studio_capabilities.py +0 -0
  94. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/support.py +0 -0
  95. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/table_search_contract.json +0 -0
  96. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/table_view.py +0 -0
  97. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/transport.py +0 -0
  98. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
  99. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4.py +0 -0
  100. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
  101. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
  102. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
  103. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
  104. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
  105. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_datasets.py +0 -0
  106. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
  107. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_matching.py +0 -0
  108. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
  109. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_public_pull.py +0 -0
  110. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
  111. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
  112. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_runs.py +0 -0
  113. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_search_contract.py +0 -0
  114. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
  115. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_stream.py +0 -0
  116. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/thin/v4_tables.py +0 -0
  117. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/__init__.py +0 -0
  118. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/attendance.py +0 -0
  119. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/clarification.py +0 -0
  120. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
  121. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
  122. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
  123. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
  124. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
  125. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
  126. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
  127. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
  128. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/credentials.py +0 -0
  129. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/login.py +0 -0
  130. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
  131. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
  132. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/remediation.py +0 -0
  133. {mostlyright_data-0.31.39 → mostlyright_data-0.31.41}/src/mostlyright/data_harness/ux/render.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mostlyright-data
3
- Version: 0.31.39
3
+ Version: 0.31.41
4
4
  Summary: Mostly Right hosted CLI for reviewed datasets
5
5
  Project-URL: Homepage, https://mostlyright.md/
6
6
  Project-URL: Documentation, https://mostlyright.md/docs/guides/cli/
@@ -119,8 +119,10 @@ step 6. The stage 3 reference holds its rule. Gate 4 is step 6.
119
119
  host's visible browser if available. A missing handoff does not undo creation: do not create a
120
120
  duplicate dataset.
121
121
  3. Settle purpose, row grain, tables, coverage, required sources and update cadence before
122
- dependent work. In an attended build, ask unresolved material questions in one concise message
123
- with recommended choices; recording an assumption is not asking the user. Default to one joined,
122
+ dependent work. In an attended build, use the host’s question form for unresolved material choices, including source
123
+ tradeoffs discovered later. In Mostly Right web chat call the offered `ask_user` tool. Put
124
+ questions, options and recommendations in the form once. Use a concise chat message only
125
+ on hosts without a question form; recording an assumption is not asking the user. Default to one joined,
124
126
  ML-ready table at the agreed grain unless the user requests otherwise. Define membership and
125
127
  relationship evidence for the intended use; resolve consequential proxies (for example,
126
128
  institution location versus a person’s origin) rather than silently treating them as equivalent.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Mostly Right Data Build"
3
+ short_description: "Build and verify reviewed datasets"
4
+ default_prompt: "Use $mr-data-build to autonomously deliver the requested dataset outcome before inspecting CLI help, documentation, schemas, fixtures, examples, prior runs, or installed package details whenever the request uses, tests, demonstrates, or debugs mr-data. If the host requires a skill-use disclosure, send only one outcome-specific sentence naming $mr-data-build before the first tool call; otherwise start silently. Never narrate preparation, skill loading, CLI discovery, authentication, document or contract lookup, example searches, package versions, command batches, or acquisition-document authoring. Never narrate skill instructions, commands, receipts, events, protocols, status codes, service behavior, or notebook mechanics. Open the request's canonical Dataset page first and put its stable address into your FIRST chat message as a link, saying once that it is open; never print or send the single-use handoff address, and where the host has no in-app browser the link is the whole of it. Then use the host’s question form for the brief and subsequent material choices (ask_user in Mostly Right web chat), with one recommended answer per question; use prose only on hosts without a question form -- and record each as a pending clarification on the dataset; default to one joined ML-ready table unless the user requests otherwise. Ask whether updates are needed, how often, and whether the cadence should be fixed or adaptive. Honor existing answers and explicit delegation within their scope; a request to build alone does not settle ongoing refresh decisions. Keep routine work and unchanged polling silent, but send one concise chat update for every newly observed hosted-run transition: accepted or queued, released after confirmation, started, failed with its supported cause, retried or replaced with both old and new run IDs, completed, and verified with elapsed time or throughput when benchmarking was requested. Include the current run ID in each lifecycle update so attempts cannot be confused. The Dataset page and app activity pill supplement these messages and never replace them. Fetch the published reference at https://mostlyright.md/docs/ for the recipe field, connector, Reader, transform, check, unit, command flag, error code, ceiling or worked example in front of you before drafting it; it is the contract, it wins over any memory of an older version, and fetching it is preparation you never narrate."
@@ -1,8 +1,12 @@
1
1
  ### 2. Brief — two to four questions, each with a recommended answer
2
2
 
3
- **One message, before any source lookup, asking what would make the first dataset wrong if you
4
- guessed it.** Not a form and not the whole list below: two to four questions, each with a short
5
- bold label, each with the answer you would pick and one clause saying why. A question with no
3
+ **Before source lookup, ask what would make the first dataset wrong if you guessed it.** Use
4
+ the host’s question form. In Mostly Right web chat, call `ask_user` once with the unresolved
5
+ questions (up to four), two to four distinct options per question and one recommended option
6
+ each. Put the tradeoffs in the option descriptions. If field validation fails, correct the
7
+ fields and retry. The card itself asks the questions. Only hosts without a question form
8
+ use a concise text brief with the same choices and recommendations. If more decisions remain, ask the four that most affect the dataset, including unresolved update behavior.
9
+ Ask remaining material choices in the next form before dependent work. A question with no
6
10
  recommendation makes the user do the work; a recommendation with no question decides for them.
7
11
 
8
12
  Resolve the following before dependent work; combine related questions and omit decisions the
@@ -47,7 +51,7 @@ fields. Do not infer a person’s origin from their name or silently replace it
47
51
  country. If the intended population cannot be evidenced, explain the gap and resolve the scope.
48
52
 
49
53
  **Every question is a pending `clarification` block on the dataset and the same words in chat.**
50
- The block carries `question` and no `answer`, so the page shows it open; the chat asks it in the
54
+ The block carries `question` and no `answer`, so the page shows it open; the form (or text-only chat) asks it in the
51
55
  same words, so the two readers see one question rather than two. The answer REVISES that cell —
52
56
  `--revise CELL_ID`, the same blocks with `answer` and `answered_at` — so the page shows it settled
53
57
  rather than a second cell nothing ties to the first.
@@ -17,7 +17,11 @@ settled. Post the same content in chat as one short message, with a compact reca
17
17
  shape, row grain, sources, coverage and the material limitations.
18
18
 
19
19
  **It ends with one question: build it?** The last question of the plan and the only one this stage
20
- asks. If existing authorization or a stage-2 delegation covers this exact build, do not ask
20
+ asks. When the person still needs to decide, keep the proposal visible and use the host’s
21
+ question form. In Mostly Right web chat call `ask_user` with options to build as proposed
22
+ or change the plan. Use prose only on hosts without a question form. “Build as proposed” accepts the plan. If they choose to change it, revise
23
+ the proposal before acting. The normal approval policy still applies to each subsequent tool action.
24
+ If existing authorization or a stage-2 delegation covers this exact build, do not ask
21
25
  again: say what is about to be built and build it. A narrower delegation does not settle this
22
26
  decision.
23
27
 
@@ -19,7 +19,7 @@ run in full.
19
19
  | `mr-data source` | `source inspect` takes a bounded look at one source, and it is the v4 path where `probe` is not. [Stage 3](3-probe-read-a-source-before-committing-to-it.md) says when to use it. It starts one of three ways, and each prints the `session_id`, `probe_id` and `source_id`, plus the `dataset_id` and `question_id` when it has them. For a new public HTTPS CSV that needs no key, give `--dataset-id`, `--question`, `--source-name`, `--source-url`, `--claimed-basis` and `--claim-evidence-digest`: it prepares the source and opens a session. For a source already prepared, give `--dataset-id`, `--question-id` and `--source-id`, which opens a session. In a session you already hold, give `--session-id` with `--source-id`. `--context-source-id` adds a source to a session it opens. `--session-id` with `--probe-id` reads the answer back; `--probe-id` alone is refused. A look is bounded to 65,536 bytes, 1,000 rows and 300 seconds. A larger file can fail `BYTE_LIMIT` after a wait, so read it by a bounded run of a scratch table. `queued` and `truncated` are not complete answers, and `capability_unavailable` means this deployment cannot inspect, so read the source by a bounded run of a scratch table instead, as [the probe rule](3-probe-read-a-source-before-committing-to-it.md#the-probe-rule-test-on-a-scratch-table-never-on-the-real-table) says. What it finds is exploratory evidence, not a run and not a receipt. |
20
20
  | `mr-data reader` | `reader normalize --family-id ID --family-version VERSION --options-file FILE [--workspace-id ID]` asks the server's Reader service to apply one certified family's own defaults and option rules to a JSON object of options, at most 64 KiB, and prints the normalized `decode_options`, `decode_options_json` and `options_digest`. The second is the text a recipe carries as `reader.decode_options`, and the third is the `options_digest` a Generic API's `generic_api.response.reader` states for exactly those options. A connector pin takes no `reader.options_digest` parameter ([Readers](readers.md)). It changes nothing, and this client does not validate or invent a family's options: the server decides. Run it for every Reader pin before you register, so a wrong option is refused here and not inside a run. |
21
21
  | `mr-data catalog` | `catalog search "QUESTION"` asks the sealed public-source catalogue which of its entries might answer a question and ranks them best first. Every ranked entry comes back with the disposition its own facts earned — `admitted`, `human_escalation_required` or `refused` — because an entry the catalogue could not vouch for is still a finding. `--format csv` states the one data format the question requires — one token per question, never repeated — and it is not a filter: an entry that does not declare that format still comes back ranked, with disposition `refused` and `filters_match` false, so nothing is held back; `--limit N` ranks at most N, up to 25. It fetches nothing and registers nothing. The catalogue holds one provider (Data.gov) and only part of it, so it is never exhaustive and an empty answer is not evidence that no such source exists. When the answer is `catalog_unavailable`, this deployment has no catalogue to search: record the lane and carry on. |
22
- | `mr-data public` | Read Mostly Right's public dataset catalogue. `public search "QUERY"` ranks published datasets (`--topic`, `--limit` and `--cursor` narrow and page it), `show SLUG` reads one overview, `tables SLUG` lists its table identifiers, `schema TABLE_ID` reads one table's schema, `sample TABLE_ID` prints its published preview rows, `lookup "QUERY"` is the connector search shape and `fetch SLUG` returns the dataset's Markdown document. Those seven need no login. `query TABLE_ID`, with `--body` or `--body-file`, and `download-url TABLE_ID` do need `mr-data login`: they ask Cloud, with the device key, to run one query over a public table and to say how it can be downloaded. Preview rows are not a query, and those commands pass no table bytes. `pull SLUG` writes the dataset into `DIR/SLUG/` (`--dir`, default `./datasets`; `--table TABLE_ID` repeats to pick tables): `README.md`, `dataset.json`, and per table `schema.json` and `sample.json`, all read-only. Only with `--data` does it add each table's `data.parquet`, and only where the publisher enabled download and an `mr_use_` key is in the `MOSTLYRIGHT_USE_KEY` environment variable; never pass the key as an argument. `--data` connects the dataset to the key's workspace and counts each download against its allowance, so leave it off unless the bytes are needed. A rerun asks Cloud whether a file it already verified is still current and keeps it when Cloud says so, and a failed table is recorded in `dataset.json` without stopping the others. |
22
+ | `mr-data public` | Read Mostly Right's public dataset catalogue. `public search "QUERY"` ranks published datasets (`--topic`, `--limit` and `--cursor` narrow and page it), `show SLUG` reads one overview, `tables SLUG` lists its table identifiers, `schema TABLE_ID` reads one table's schema, `sample TABLE_ID` prints its published preview rows, `lookup "QUERY"` is the connector search shape and `fetch SLUG` returns the dataset's Markdown document. Those seven need no login. A `query` body with `search.engine=resident` uses MCP and the workspace of `MOSTLYRIGHT_USE_KEY`. For ordinary query bodies, `query TABLE_ID`, with `--body` or `--body-file`, and `download-url TABLE_ID` do need `mr-data login`: they ask Cloud, with the device key, to run one query over a public table and to say how it can be downloaded. Preview rows are not a query, and those commands pass no table bytes. `pull SLUG` writes the dataset into `DIR/SLUG/` (`--dir`, default `./datasets`; `--table TABLE_ID` repeats to pick tables): `README.md`, `dataset.json`, and per table `schema.json` and `sample.json`, all read-only. Only with `--data` does it add each table's `data.parquet`, and only where the publisher enabled download and an `mr_use_` key is in the `MOSTLYRIGHT_USE_KEY` environment variable; never pass the key as an argument. `--data` connects the dataset to the key's workspace and counts each download against its allowance, so leave it off unless the bytes are needed. A rerun asks Cloud whether a file it already verified is still current and keeps it when Cloud says so, and a failed table is recorded in `dataset.json` without stopping the others. |
23
23
  | `mr-data connected` | `connected list` shows the public datasets connected to this workspace and `connected add SLUG` connects one by its slug. It needs `mr-data login`: both ask Cloud, with the device key, over the routes MCP's `list_connected_datasets` and `connect_dataset` use. |
24
24
  | `mr-data ask` | `ask "QUESTION" [--run RUN_ID ...] [--failure-code CODE]` asks the Mostly Right support agent one question and waits for the answer; `--no-wait` prints the question id at once and `ask status QUESTION_ID` reads it later. It needs `mr-data login` and a workspace the agent is switched on for: while it is off the answer is `THIN_CLOUD_SUPPORT_AGENT_DISABLED`, which is final. The agent may file a problem for the Mostly Right team and prints its reference (`SR-N`). |
25
25
  | `mr-data dataset` | Bring the dataset page into existence before there is anything on it, then fill it in while somebody watches. `dataset create --name TEXT` mints it and prints the `dataset_id`, unless the user's own request already has an empty dataset open, in which case it answers `open_request_reused` with that `dataset_id` and mints nothing (`--separate` mints a new one for a different dataset); `dataset show ID` reads it back; `dataset check ID` lists every delivery step the whole dataset still owes (cover, description shape, topics (never a licence), a real table that is unbuilt, queued, building, held or live on a build cut short, search and a saved view on the main table (the layout's `search_table_id` and `default_table_id` when it names them), cadence, failing refreshes, every `scratch_` table still listed), exits 2 and ends `Delivery open: N items.` while any is open, and exits 0 with `Delivery complete.` when none is (with `--json`, `status` is `dataset_delivery_open` or `dataset_delivery_complete`); `dataset set ID --name TEXT --topics "a,b,c" --license ID --description-file F` writes the title, the descriptive tags, the SPDX licence and the description under the version it was read at, retrying once if somebody else wrote first, and an empty `--topics` or `--license` takes that value off the page; send `--name` and `--topics` whenever you send `--description-file`, because a description sent on its own can make the server write a new title and new tags, and read `changed` and `written_by_studio` on the receipt for every field the write moved; a saved write whose public sync fails exits 2 and reports `public_projection_synced: false` — use `dataset sync ID` to retry that sync without writing the dataset again; `dataset note ID --heading H --blocks-file B` writes one cell of the decision record that OUTLIVES every run, and `--list` reads it back; `dataset watch ID` follows the page's own event stream; `dataset activity ID --phase P --message TEXT` says what is happening right now, silently, and is never a chat message and never a cell; `dataset publish ID [--mode public|link|private]` says who can read the dataset — `public` lists it in the public directory and serves it at an address anybody can read, `link` serves it at an unlisted address, `private` takes it back to the workspace — and `dataset publish ID --show` reads that back without changing it; `dataset layout ID` reads the dataset's layout from Cloud: its sections, `default_table_id` (the table the Data tab opens on), `search_table_id` (the table the dataset's search runs on), the main-table choice and the dataset's tables; `dataset layout ID --set LAYOUT.json` saves `{"version": 1, "default_table_id", "search_table_id", "sections": [{"id", "title", "collapsed", "tables": [{"table_id", "title", "description"}]}]}`, `--dry-run` has Cloud check it and save nothing, replacing a saved layout needs its revision as `--expected-revision`, and a first layout takes `--expected-main-table TABLE_ID|none`, the main-table choice the read printed; a stale one is refused `THIN_DATASET_LAYOUT_LAYOUT_CHANGED`, and it uses the device key; `dataset archive ID --confirm-name TITLE` retires the page and frees its title, deleting nothing. |
@@ -30,7 +30,7 @@ run in full.
30
30
  | `mr-data runs` | Report this workspace's own runs: identifier, mode, state and creation time, plus the failure triple of any that failed and whether that failure was the execution room's. `--dataset DATASET_ID` narrows it to one dataset's runs, so "what have I run for this dataset?" is one scoped read, and a value that is not an identifier is refused `THIN_ARGUMENT_INVALID`. `--status` and `--mode` narrow it too and are refused `THIN_ARGUMENT_INVALID` for a word outside the seven states or the six modes; the three combine. The server narrows before it cuts a page, so a filtered page holds the newest runs that match however many runs the workspace has. `--limit` says how many, and pages are followed to reach it; a listing that does not end says how many were read and suggests a smaller `--limit` or a narrower filter. The answer prints `next_cursor`, and `--cursor` continues from it. |
31
31
  | `mr-data watch` | Stream one run's live progress under the durable event type of each stage, resuming across stream cuts. Exits non-zero when the run failed. `mr-data watch RUN_ID RUN_ID ...` follows up to 16 runs at once, prints one line as each ends, and returns once all have finished with one receipt per run (`failed_run_ids`, `refused_run_ids`); it exits 2 when any run failed and 1 when a run could not be watched. `--from-seq` and `--last-event-id` resume one run only. A full run that succeeds carries the same `delivery` block as `mr-data status`, and the multi-run receipt merges every run's steps. |
32
32
  | `mr-data query` | Run one bounded read-only SQL statement over a finished run's own table and print the rows. Name the table `run_table` in the SQL, whatever the recipe called it. Bounded on rows, on answer bytes and on time, and refused by name when a bound is crossed. When no worker can answer, the refusal names `mr-data download RUN_ID` as `fallback_command`, which brings the table here to read locally. The question is asked through Mostly Right Cloud; while its usage paywall is on and the workspace is unsubscribed, each answered query counts toward the person's monthly allowance, and a spent allowance refuses `THIN_USAGE_LIMIT`. A refusal after the question was queued names its `query_id`; running the same command again reads that query back. |
33
- | `mr-data search` | `search VERB` prepares and tests versioned search for a new table through the server; no model or index runs on this computer. The verbs are `inspect`, `sample`, `values`, `propose`, `configure`, `validate`, `add-cases`, `explain`, `preview`, `evaluate`, `estimate`, `build`, `status`, `activate`, `cancel`, `rollback`, `locate`, `try` and `query`. `inspect`, `propose` and `validate` also take `--recipe FILE` before registration. `validate --spec` checks a spec and its evaluation cases against the pinned contract without sending anything. A top-level spec member the pinned contract does not name is a warning, and `validate` (with a table or `--recipe`) and `configure` still send the spec to the server. `locate` resolves evaluation-case rows to locators, `try` runs one query against the live search, and `query` searches a table through Cloud's search route as its page does. `try` and `query` keep every member of the answer they do not name (on a collapsed page `matched_via`, `group_size` and `collapsed_by`), and `--group row\|collapse` asks for one row per match or one result per value of the spec's `collapse` column. `--group` and grouped results need a server that serves contract 4.61.0 and takes `group`; an older one answers 400 `invalid_request` to `--group`, so run without it there. A build returns promptly with job coordinates, and an operation the server does not serve answers a typed capability error. [Prepare search](preparing-table-search.md) says how it fits a build. |
33
+ | `mr-data search` | `search VERB` prepares and tests versioned search for a new table through the server; no model or index runs on this computer. The verbs are `inspect`, `sample`, `values`, `propose`, `configure`, `validate`, `add-cases`, `explain`, `preview`, `evaluate`, `estimate`, `build`, `status`, `activate`, `cancel`, `rollback`, `locate`, `try` and `query`. `inspect`, `propose` and `validate` also take `--recipe FILE` before registration. `validate --spec` checks a spec and its evaluation cases against the pinned contract without sending anything. A top-level spec member the pinned contract does not name is a warning, and `validate` (with a table or `--recipe`) and `configure` still send the spec to the server. `locate` resolves evaluation-case rows to locators, `try` runs one query against the live search, and `query` searches a table using MCP search_table as dataset chat does. `try` and `query` keep every member of the answer they do not name (on a collapsed page `matched_via`, `group_size` and `collapsed_by`), and `--group row\|collapse` asks for one row per match or one result per value of the spec's `collapse` column. `--group` and grouped results need a server that serves contract 4.61.0 and takes `group`; an older one answers 400 `invalid_request` to `--group`, so run without it there. A build returns promptly with job coordinates, and an operation the server does not serve answers a typed capability error. [Prepare search](preparing-table-search.md) says how it fits a build. |
34
34
  | `mr-data peek` | Print the columns, their logical types and the first rows of one run's table. The type comes off the run's own column profile where the preview carries none, so `type` is null only for a run that sealed no profile. |
35
35
  | `mr-data receipt` | Print what one run recorded about how it was built: every source it fetched and what those bytes hashed to, the coverage it delivered, and the members of its raw snapshot. |
36
36
  | `mr-data checks` | Report how each check the recipe declared came out — the name, whether it passed, what it found. Exits non-zero when one did not pass. |
@@ -6,7 +6,7 @@ example `mr-data search validate --help`.
6
6
 
7
7
  The steps below build search at the level of a dedicated search site: typo-tolerant titles,
8
8
  person and brand lookups, category words that become filters, sort words that become sorts,
9
- meaning-based retrieval over descriptions, and a planner that turns a sentence into a plan.
9
+ meaning-based retrieval over descriptions, and explicit plans supplied by the querying agent.
10
10
 
11
11
  ## The verbs
12
12
 
@@ -25,7 +25,7 @@ meaning-based retrieval over descriptions, and a planner that turns a sentence i
25
25
  | `search build` | Queues a search build for a sealed version, or for one revision with `--revision`. |
26
26
  | `search status` | Reports package readiness, job progress and the failure reason. |
27
27
  | `search try` | Runs one query against the table's live search and prints rows, plan and timings. |
28
- | `search query` | Searches a public table through Cloud's search route, as its page and MCP do. |
28
+ | `search query` | Searches a public table through the same MCP tool as dataset chat. |
29
29
  | `search activate` | Switches the version's live search to a built generation. |
30
30
  | `search rollback` | Switches back to an earlier generation. |
31
31
  | `search explain` | Shows how the server parses one query into filters and sorts. |
@@ -71,7 +71,7 @@ NOTE.md`; that note closes the search item in `mr-data dataset check`.
71
71
  When the brief does not mention search, search is optional only while the capability is missing.
72
72
  Then omit `table.search`, keep the drafted intent beside the recipe, and record the limit in the
73
73
  dataset's Sources and decisions note. Never put that limit in the description, title or topics.
74
- When the user explicitly requires semantic retrieval or the planner, do not register a recipe
74
+ When the user explicitly requires semantic retrieval, do not register a recipe
75
75
  without it. Report the limit and wait.
76
76
 
77
77
  ## 2. Choose keyword and semantic columns
@@ -90,7 +90,7 @@ A table with no useful prose keeps `semantic_columns` empty. A semantic-only tab
90
90
 
91
91
  ## 3. Fill the field roles
92
92
 
93
- `field_roles` tells search what each column means. The ranking and the planner use it.
93
+ `field_roles` tells search what each column means. The index uses these roles for ranking.
94
94
 
95
95
  | Role | Column type | Use |
96
96
  |---|---|---|
@@ -150,10 +150,7 @@ column description.
150
150
 
151
151
  ## 6. Write the vocabulary column by column
152
152
 
153
- An alias maps a phrase to an exact filter, and a sort alias maps a phrase to a sort. Once
154
- the live page's search applies the aliases, it merges them with the planner's plan. Until
155
- then aliases are honoured only by `search explain`, and only while the
156
- planner is unavailable for that table. The live page applies none. List every
153
+ An alias maps a phrase to an exact filter, and a sort alias maps a phrase to a sort. List every
157
154
  declared column before you write the spec. Then generate its phrases from its type:
158
155
 
159
156
  | Column | Phrases | Spec entry |
@@ -194,7 +191,7 @@ When the brief names the metric that makes a row popular, point "best", "top" an
194
191
  at that column.
195
192
 
196
193
  A sort alias binds its phrase to one column for every query that holds it, and it wins over the
197
- column names, the descriptions and the planner. Never bind a word that two columns could own,
194
+ column names and their descriptions. Never bind a word that two columns could own,
198
195
  such as "growth", "change" or "best", unless the brief names the metric. "Highest growth"
199
196
  pointed at a revenue column turns "highest growth last 30 days" into a revenue sort.
200
197
 
@@ -224,7 +221,7 @@ base that makes the rate meaningful, in `order_floors` (contract 4.54.0, up to 3
224
221
  - Floors are declared on a search revision with `mr-data search configure --spec`, not in the
225
222
  recipe's `table.search`, which refuses the member. A revision configured from the recipe's own
226
223
  spec carries none, and a new version of a private table keeps them only when you configure the
227
- revision again. A plan made without the planner, such as a keystroke search, applies no floor.
224
+ revision again. Include the floor explicitly when submitting an agent-generated plan.
228
225
  - A server older than contract 4.54.0 refuses the member as unknown. Configure without it there.
229
226
  - When a plan orders by `column`, in either direction, the server adds `base_column >= min` as a
230
227
  filter. The reader sees it in the search summary and can remove it. A query that already filters
@@ -234,47 +231,19 @@ base that makes the rate meaningful, in `order_floors` (contract 4.54.0, up to 3
234
231
  wrong ranking.
235
232
  - Choose `min` from the built table with `mr-data query`: the smallest base at which the rate stops
236
233
  being dominated by placeholders. State the floor at the start of the base column's
237
- description, since the planner reads only the first 160 characters of a description.
234
+ description so the querying agent can find it.
238
235
 
239
236
  A recipe's spec takes 128 filter aliases and 64 sort aliases, and a search revision 512 and 256.
240
237
  `search validate` refuses more.
241
238
  Rank the phrases and keep the top of the list. Put first the words that name the kind of row, the
242
239
  facets users type most, the popularity sorts and the product's own vocabulary. A phrase you leave
243
- out maps to nothing. The planner may still recover it from the column names and values, and
244
- nothing guarantees that.
245
-
246
- ## 8. Turn the planner on
247
-
248
- The planner turns a sentence into filters, sorts and preferences. Turn it on for every table with
249
- search with `"enabled": true`. A query whose every word an alias resolved skips it. Queries with
250
- negation or "or" stay unresolved rather than becoming a guessed filter.
251
-
252
- The planner model sees the query text, the column names and their descriptions, value
253
- dictionaries of at most 16 columns of at most 256 short values each, the aliases and the field
254
- roles. It never sees rows.
255
-
256
- `external_context_allowed` is the owner's consent to send that context to the planner model:
257
-
258
- - A public table whose sources are all public gets the planner on its live page whatever the flag
259
- says. Set the flag to `true` on it, so `search explain` and `capabilities.planner` match the page.
260
- - A private or link-shared table gets the planner only when the recipe sets the flag to `true`.
261
- That is a deliberate yes from the user or the workspace policy. Data-read permission is not that
262
- consent. Without that yes, keep the flag `false`.
263
- - Until the server supports it, the flag changes only `search explain` and the
264
- `capabilities.planner` readout. The live page plans a public table with public sources and no
265
- other table.
266
-
267
- `search inspect`, `search status` and `search explain` say why the planner is unavailable in
268
- `planner_detail.reason`. `external_context_not_allowed` means the recipe withholds consent.
269
- `private_source` means a source is not public.
270
-
271
- Write each column description as if the planner reads it, because it does, and the page shows it
272
- to the reader beside results ordered by that column. Say what the column holds, the period it
273
- covers ("trailing twelve months", "latest fiscal year against the year before", "over the last
274
- five fiscal years"), its unit, and the words people use for it, abbreviations included
275
- ("compound annual growth rate, CAGR"). The planner picks the column a query asks about, named
276
- bare ("revenue") or in a question ("what is the P/E ratio?"), from these descriptions. It reads
277
- the first 160 characters of each, so lead with what the column measures and its period.
240
+ out maps to nothing. Agents can inspect column names and values when composing explicit filters.
241
+
242
+ ## 8. Describe columns for the querying agent
243
+
244
+ The webagent or external MCP client chooses the filters, order and retrieval mode. Give each
245
+ column a clear description, including its unit, time window and what a typical value means.
246
+ Leave the legacy planner flags disabled. Keyword and semantic indexes remain available.
278
247
 
279
248
  ### Name and describe columns for search
280
249
 
@@ -282,7 +251,7 @@ Search reads a numeric comparison ("growth over 50") and a superlative ("highest
282
251
  onto the one column whose words the phrase holds. It splits a column's name on underscores. A
283
252
  word of the name scores 3, the same word less a plural ending scores 2, and a description word
284
253
  that no other column's description holds scores 1. Every word of the phrase must belong to the
285
- column. The highest total wins. A tie names no column, and the planner model decides.
254
+ column. The highest total wins. A tie leaves the column unspecified.
286
255
 
287
256
  - Put the words people type in the name: the subject, the measure and the window. Name a price
288
257
  column `price_change_30d_pct` and a revenue column `revenue_growth_ttm_pct`, not
@@ -308,7 +277,7 @@ A full spec looks like this:
308
277
  "semantic_columns": ["title", "overview"],
309
278
  "aliases": [{"phrase": "horror", "column": "genres", "operator": "contains", "value": "Horror"}],
310
279
  "sort_aliases": [{"phrase": "most popular", "column": "popularity", "direction": "desc"}],
311
- "planner": {"enabled": true, "external_context_allowed": true},
280
+ "planner": {"enabled": false, "external_context_allowed": false},
312
281
  "field_roles": {"title": "title", "person": "people_text", "date": "release_date",
313
282
  "popularity": "popularity", "rating": "vote_average", "identifier": "id",
314
283
  "description": "overview", "category": "genres", "image": "poster_url",
@@ -386,10 +355,8 @@ the dashboard's explain, or through `search explain`:
386
355
  mr-data search explain TABLE_ID --version VERSION_ID --query "stocks under 10" --json
387
356
  ```
388
357
 
389
- Read `planner_used`, `filters` and `order_by`. A query that asks for a filter or a sort and plans
390
- text only is a gap in the spec. Add the alias or sharpen the column description, then check again.
391
- `planner_used: false` on a settled query is a fault to report, unless aliases resolved every word
392
- or `planner_detail.reason` says the planner is withheld.
358
+ Read `filters` and `order_by` to check the deterministic interpretation. To test an
359
+ agent-selected plan, pass it explicitly and inspect the returned rows.
393
360
 
394
361
  Run real queries against the live search once `package_state` is `ready`:
395
362
 
@@ -569,11 +536,9 @@ Add `"engine": "resident"` and `"settled": true` to `search` to use the live pac
569
536
  does. Public query prints Cloud stage durations under `result.timings`, the HTTP status and the
570
537
  request ID. Keep a refusal's `detail` with its request ID.
571
538
 
572
- ## 15. Search a table the way its page does
539
+ ## 15. Query an indexed table
573
540
 
574
- A public table with a ready search package answers through Cloud's search route. The dataset
575
- page, the Public API's `POST /api/v2/public/tables/{id}/search`, MCP `search_table` and this verb
576
- all reach the same search service with the same plans. There is no scan fallback.
541
+ Dataset chat and this command call the same MCP tool, `search_table`. Public tables allow anonymous reads. Set `MOSTLYRIGHT_USE_KEY` for your workspace's allowance and its private tables. With semantic columns, `--mode meaning` retrieves descriptions by embedding similarity.
577
542
 
578
543
  ```sh
579
544
  mr-data search query PUBLIC_TABLE_ID --query "incepton" --json
@@ -582,8 +547,7 @@ mr-data search query PUBLIC_TABLE_ID --query "dune" --count --json
582
547
  mr-data search query PUBLIC_TABLE_ID --query "dune" --plan plan.json --cursor NEXT_CURSOR --json
583
548
  ```
584
549
 
585
- A query is settled by default, so the planner runs. `--unsettled` answers as the search box does
586
- while someone types, without the planner. `--page-size` is 1 to 100 (default 20). `--count` asks
550
+ The calling agent supplies filters and ordering in an explicit plan. `--page-size` is 1 to 100 (default 20). `--count` asks
587
551
  for the number of matching rows. To read the next page, save the answer's `plan` to a file and
588
552
  pass it with `--plan` beside `--cursor NEXT_CURSOR`; a cursor continues one plan.
589
553
 
@@ -689,7 +653,7 @@ example. Run the bounded test of Gate 3 on a scratch table and read the passages
689
653
  "semantic_columns": ["passage_text"],
690
654
  "aliases": [{"phrase": "analyst questions", "column": "section", "operator": "eq", "value": "qa"}],
691
655
  "sort_aliases": [{"phrase": "latest", "column": "call_date", "direction": "desc"}],
692
- "planner": {"enabled": true, "external_context_allowed": false},
656
+ "planner": {"enabled": false, "external_context_allowed": false},
693
657
  "field_roles": {"identifier": "passage_id", "title": "company", "person": "speaker",
694
658
  "date": "call_date", "description": "passage_text"},
695
659
  "display_columns": ["passage_id", "call_id", "company", "ticker", "call_date",
@@ -14,8 +14,8 @@ outcome-oriented sentence about the dataset stage or an observed result, inventi
14
14
  | When | What it carries |
15
15
  | --- | --- |
16
16
  | Stage 1 | The dataset page's stable address, as a link, and one clause saying it is open. |
17
- | Stage 2 | Two to four brief questions, each with a recommended answer. |
18
- | Stage 4 | Sources chosen and refused, the shape that will be built, and `Build it?`. |
17
+ | Stage 2 | The host’s question form (ask_user in Mostly Right web chat) carries the brief and recommendations. Its card is the chat message. Use prose only on hosts without a question form. |
18
+ | Stage 4 | Sources chosen and refused, the shape that will be built, and a question form when the person still needs to decide whether to build it. |
19
19
  | Stage 6 | A preview that stopped short: which source, which row, what a full build would cover. |
20
20
  | Stage 9 | The build: rows, sources, coverage, checks, the link, and the refresh cadence. |
21
21
  | Run lifecycle | A newly observed accepted or queued run, release after confirmation, start, failure, retry or replacement, completion, or verification. Name the run ID and the outcome; include the supported failure cause, the old and new IDs for a retry or replacement, and elapsed time or throughput when the user asked for a benchmark. |
@@ -924,7 +924,6 @@ def _fetch(args: argparse.Namespace, client: PublicCatalogClient) -> dict[str, A
924
924
 
925
925
  CLOUD_PUBLIC_TABLE_QUERY_PATH = "/api/cli/public/tables/{table_id}/query"
926
926
  CLOUD_PUBLIC_TABLE_DOWNLOAD_URL_PATH = "/api/cli/public/tables/{table_id}/download-url"
927
- CLOUD_PUBLIC_TABLE_SEARCH_PATH = "/api/cli/public/tables/{table_id}/search"
928
927
  QUERY_SCHEMA = f"{THIN_SCHEMA_PREFIX}-v4-public-query.v1"
929
928
  DOWNLOAD_URL_SCHEMA = f"{THIN_SCHEMA_PREFIX}-v4-public-download-url.v1"
930
929
 
@@ -943,6 +942,72 @@ MAX_PUBLIC_QUERY_RESPONSE_MEMBERS = (
943
942
  )
944
943
 
945
944
 
945
+ class AgentSearchClient(PublicCatalogClient):
946
+ """Call the same indexed row tool as dataset chat, anonymously or with a use key."""
947
+
948
+ def search_table(self, table_id: str, body: Mapping[str, Any]) -> dict[str, Any]:
949
+ return self.call_tool("search_table", table_id, body)
950
+
951
+ def query_table(self, table_id: str, body: Mapping[str, Any]) -> dict[str, Any]:
952
+ return self.call_tool("query_table", table_id, body)
953
+
954
+ def call_tool(self, name: str, table_id: str, body: Mapping[str, Any]) -> dict[str, Any]:
955
+ from mostlyright.data_harness.thin.v4_public_pull import read_use_key
956
+
957
+ headers = self._headers(accept="application/json, text/event-stream")
958
+ headers["Content-Type"] = "application/json"
959
+ key = read_use_key()
960
+ if key:
961
+ headers["Authorization"] = f"Bearer {key}"
962
+ payload = {
963
+ "jsonrpc": "2.0",
964
+ "id": 1,
965
+ "method": "tools/call",
966
+ "params": {"name": name, "arguments": {**body, "table_id": table_id}},
967
+ }
968
+ status, raw, response_headers = self.transport.request(
969
+ "POST",
970
+ f"{self.cloud_url}/api/mcp",
971
+ headers,
972
+ json.dumps(payload).encode(),
973
+ MAX_PUBLIC_QUERY_RESPONSE_BYTES * 3,
974
+ )
975
+ try:
976
+ envelope = parse_foreign_json(
977
+ raw, max_members=MAX_PUBLIC_QUERY_RESPONSE_MEMBERS, wide_integers=True
978
+ )
979
+ except CanonicalJSONError:
980
+ envelope = None
981
+ self.response_metadata = cloud_response_metadata(status, envelope, response_headers)
982
+ if status != 200:
983
+ raise cloud_refusal(status, envelope, act="search a table", headers=response_headers)
984
+ if (
985
+ not isinstance(envelope, dict)
986
+ or envelope.get("id") != 1
987
+ or envelope.get("jsonrpc") != "2.0"
988
+ ):
989
+ raise ThinLaneError("THIN_RESPONSE_INVALID", "MCP answered without a matching response")
990
+ result = envelope.get("result")
991
+ answer = result.get("structuredContent") if isinstance(result, dict) else None
992
+ if not isinstance(answer, dict):
993
+ raise ThinLaneError(
994
+ "THIN_CLOUD_REFUSED", f"MCP could not run {name}; check tool access"
995
+ )
996
+ if result.get("isError"):
997
+ http_status = answer.get("http_status")
998
+ retry = answer.get("retry_after_seconds")
999
+ headers = dict(response_headers)
1000
+ if type(retry) is int:
1001
+ headers["Retry-After"] = str(retry)
1002
+ raise cloud_refusal(
1003
+ http_status if type(http_status) is int else 400,
1004
+ {**answer, "detail": answer.get("message") or answer.get("detail")},
1005
+ act="search a table",
1006
+ headers=headers,
1007
+ )
1008
+ return answer
1009
+
1010
+
946
1011
  class PublicQueryClient(CloudClient):
947
1012
  """Authenticated public table query + download-url over the device-key client."""
948
1013
 
@@ -983,22 +1048,6 @@ class PublicQueryClient(CloudClient):
983
1048
  self.response_metadata = self._query_client.response_metadata
984
1049
  return answer
985
1050
 
986
- def search_table(self, table_id: str, body: Mapping[str, Any]) -> dict[str, Any]:
987
- """One search through Cloud's search route, the one the dataset page and MCP use."""
988
-
989
- answer = self._query_client.call(
990
- "POST",
991
- CLOUD_PUBLIC_TABLE_SEARCH_PATH.format(table_id=table_id),
992
- act="search a public table",
993
- body=body,
994
- absent="no public table has that id",
995
- maximum=MAX_PUBLIC_QUERY_RESPONSE_BYTES,
996
- table_values=True,
997
- max_members=MAX_PUBLIC_QUERY_RESPONSE_MEMBERS,
998
- )
999
- self.response_metadata = self._query_client.response_metadata
1000
- return answer
1001
-
1002
1051
  def download_url(self, table_id: str) -> dict[str, Any]:
1003
1052
  """Read download instructions; keep download_not_enabled distinct from missing table.
1004
1053
 
@@ -1064,6 +1113,13 @@ def _auth_query_client(client: PublicQueryClient | None = None) -> PublicQueryCl
1064
1113
  return PublicQueryClient(credentials)
1065
1114
 
1066
1115
 
1116
+ def table_query_client(body: Mapping[str, Any]) -> PublicQueryClient | AgentSearchClient:
1117
+ search = body.get("search")
1118
+ if isinstance(search, Mapping) and search.get("engine") == "resident":
1119
+ return AgentSearchClient(resolve_public_origin())
1120
+ return _auth_query_client()
1121
+
1122
+
1067
1123
  def _read_query_body(args: argparse.Namespace) -> dict[str, Any]:
1068
1124
  raw = getattr(args, "body", None)
1069
1125
  path = getattr(args, "body_file", None)
@@ -1096,7 +1152,11 @@ def _read_query_body(args: argparse.Namespace) -> dict[str, Any]:
1096
1152
  def _query(args: argparse.Namespace, client: Any = None) -> dict[str, Any]:
1097
1153
  table_id = _require_table_id(getattr(args, "target", None))
1098
1154
  body = _read_query_body(args)
1099
- selected = _auth_query_client(client if isinstance(client, PublicQueryClient) else None)
1155
+ selected = (
1156
+ client
1157
+ if isinstance(client, PublicQueryClient | AgentSearchClient)
1158
+ else table_query_client(body)
1159
+ )
1100
1160
  answer = selected.query_table(table_id, body)
1101
1161
  metadata = getattr(selected, "response_metadata", {})
1102
1162
  if "timings" in metadata:
@@ -1238,7 +1298,6 @@ __all__ = [
1238
1298
  "ACTIONS",
1239
1299
  "CLOUD_PUBLIC_TABLE_DOWNLOAD_URL_PATH",
1240
1300
  "CLOUD_PUBLIC_TABLE_QUERY_PATH",
1241
- "CLOUD_PUBLIC_TABLE_SEARCH_PATH",
1242
1301
  "DATASETS_PATH",
1243
1302
  "DATASET_MARKDOWN_PATH",
1244
1303
  "DATASET_PATH",
@@ -1259,6 +1318,7 @@ __all__ = [
1259
1318
  "TABLES_SCHEMA",
1260
1319
  "TABLE_PREVIEW_PATH",
1261
1320
  "TABLE_SCHEMA_PATH",
1321
+ "AgentSearchClient",
1262
1322
  "PublicCatalogClient",
1263
1323
  "PublicQueryClient",
1264
1324
  "declare_arguments",
@@ -194,6 +194,11 @@ def declare_arguments(parser: argparse.ArgumentParser) -> None:
194
194
  action="store_true",
195
195
  help="answer as the search box does while someone types: no planner",
196
196
  )
197
+ sub.add_argument(
198
+ "--mode",
199
+ choices=("auto", "meaning", "image", "emoji"),
200
+ help="first page retrieval mode; meaning uses the semantic index",
201
+ )
197
202
  sub.add_argument("--cursor", help="next_cursor from the previous page")
198
203
  sub.add_argument("--page-size", dest="page_size", type=int, default=20)
199
204
  sub.add_argument("--count", action="store_true", help="also count matching rows")
@@ -780,9 +785,9 @@ def _bind_public(
780
785
 
781
786
 
782
787
  def _cloud_query(table_id: str, body: dict[str, Any], query_client: Any) -> tuple[dict, dict]:
783
- from mostlyright.data_harness.thin.v4_public import _auth_query_client
788
+ from mostlyright.data_harness.thin.v4_public import table_query_client
784
789
 
785
- selected = query_client or _auth_query_client()
790
+ selected = query_client or table_query_client(body)
786
791
  answer = selected.query_table(table_id, body)
787
792
  return answer, dict(getattr(selected, "response_metadata", {}) or {})
788
793
 
@@ -1110,6 +1115,8 @@ def _search_query(args: argparse.Namespace, query_client: Any) -> dict[str, Any]
1110
1115
  "settled": not args.unsettled,
1111
1116
  "page_size": page_size,
1112
1117
  }
1118
+ if args.mode is not None:
1119
+ body["mode"] = args.mode
1113
1120
  if plan is not None:
1114
1121
  body["plan"] = plan
1115
1122
  if args.cursor is not None:
@@ -1133,9 +1140,9 @@ def _search_query(args: argparse.Namespace, query_client: Any) -> dict[str, Any]
1133
1140
  if group is not None:
1134
1141
  body["group"] = group
1135
1142
 
1136
- from mostlyright.data_harness.thin.v4_public import _auth_query_client
1143
+ from mostlyright.data_harness.thin.v4_public import AgentSearchClient, resolve_public_origin
1137
1144
 
1138
- selected = query_client or _auth_query_client()
1145
+ selected = query_client or AgentSearchClient(resolve_public_origin())
1139
1146
  try:
1140
1147
  answer = selected.search_table(public_table_id, body)
1141
1148
  except ThinLaneError as refusal:
@@ -215,8 +215,8 @@ CLASSIFICATION: dict[str, Lane] = {
215
215
  HOSTED,
216
216
  "it prepares and tests versioned search through the server; index work runs in the hosted "
217
217
  "engine, while draft configuration and activation remain server-authorized. "
218
- "`search query` runs one search on a public table through Cloud's search route, the "
219
- "one the dataset page and MCP `search_table` use",
218
+ "`search query` runs one search on a public table through MCP, using the "
219
+ "`search_table` tool shared with dataset chat",
220
220
  ),
221
221
  "query": Lane(
222
222
  HOSTED,
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Mostly Right Data Build"
3
- short_description: "Build and verify reviewed datasets"
4
- default_prompt: "Use $mr-data-build to autonomously deliver the requested dataset outcome before inspecting CLI help, documentation, schemas, fixtures, examples, prior runs, or installed package details whenever the request uses, tests, demonstrates, or debugs mr-data. If the host requires a skill-use disclosure, send only one outcome-specific sentence naming $mr-data-build before the first tool call; otherwise start silently. Never narrate preparation, skill loading, CLI discovery, authentication, document or contract lookup, example searches, package versions, command batches, or acquisition-document authoring. Never narrate skill instructions, commands, receipts, events, protocols, status codes, service behavior, or notebook mechanics. Open the request's canonical Dataset page first and put its stable address into your FIRST chat message as a link, saying once that it is open; never print or send the single-use handoff address, and where the host has no in-app browser the link is the whole of it. Then ask the brief in one message -- two to four questions, each with a recommended answer -- and record each as a pending clarification on the dataset; default to one joined ML-ready table unless the user requests otherwise. Ask whether updates are needed, how often, and whether the cadence should be fixed or adaptive. Honor existing answers and explicit delegation within their scope; a request to build alone does not settle ongoing refresh decisions. Keep routine work and unchanged polling silent, but send one concise chat update for every newly observed hosted-run transition: accepted or queued, released after confirmation, started, failed with its supported cause, retried or replaced with both old and new run IDs, completed, and verified with elapsed time or throughput when benchmarking was requested. Include the current run ID in each lifecycle update so attempts cannot be confused. The Dataset page and app activity pill supplement these messages and never replace them. Fetch the published reference at https://mostlyright.md/docs/ for the recipe field, connector, Reader, transform, check, unit, command flag, error code, ceiling or worked example in front of you before drafting it; it is the contract, it wins over any memory of an older version, and fetching it is preparation you never narrate."