mostlyright-data 0.31.42__tar.gz → 0.31.45__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.
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/PKG-INFO +1 -1
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/SKILL.md +4 -1
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/patterns.md +152 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/preparing-table-search.md +15 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/sources.md +47 -4
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/user-communication-contract.md +3 -2
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe_explain.py +12 -1
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe_lint.py +94 -4
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/studio_capabilities.py +6 -1
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/table_search_contract.json +1 -1
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4.py +2 -2
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_search.py +17 -3
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/.gitignore +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/README.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/pyproject.toml +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/scripts/hatch_build.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/agents/openai.yaml +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/agent-protocol.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/boundaries.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/commands.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/enriching-with-small-models.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/live-run.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/making-a-table-incremental.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/narrating-the-run.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/one-install.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/predicting-with-tabular-models.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/prediction-labels.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/promote.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/readers.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/receipts.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/recipe-test.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/reference-pages.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/required-protocol.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/satellite-signals.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/source-credentials.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/transforms.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/__init__.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/agent_protocol.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/canonical.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/key_seam.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/page_coverage.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/session_probes.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/skill_assets.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/table_manifest.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/__init__.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/activity.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/backoff.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/categories.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/dataset_layout.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/delivery.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/description_shape.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/download.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/enrichment.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/fast_features.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/matching_benchmark.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/probe.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/progress_rate.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe_forecast.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe_test.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/refresh_rehearsal.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/release_check.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/research.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/router.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/run_diagnose.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/run_prefix.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/runs.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/session.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/stream.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/support.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/table_view.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/transport.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_datasets.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_matching.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_public.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_public_pull.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_runs.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_search_contract.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_stream.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_tables.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/vocabulary.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/__init__.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/attendance.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/clarification.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/credentials.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/login.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/remediation.py +0 -0
- {mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/render.py +0 -0
|
@@ -68,6 +68,7 @@ the source shape that fits.
|
|
|
68
68
|
| API that takes a date range | `window.request` | `lookback_seconds` | [date range](references/patterns.md#api-that-takes-a-date-range) |
|
|
69
69
|
| Many pages behind one index | `public.https.collection@2.0.0` | the gap | [collection](references/patterns.md#many-pages-behind-one-index) |
|
|
70
70
|
| One request per row of another source | a per-row `request`, with `batch` when a `GET` takes a list of ids | the gap | [per-row](references/patterns.md#one-request-per-row-many-ids-per-request) |
|
|
71
|
+
| A SOAP or XML service asked once per row | a keyless per-row `POST` with `body_text` | `content_type`, the gap | [SOAP per-row](references/patterns.md#one-soap-request-per-row) |
|
|
71
72
|
| Bulk dump beside a windowed source | `reference` | `recheck_seconds` | [reference](references/patterns.md#bulk-dump-beside-a-windowed-source) |
|
|
72
73
|
| Live `wss://` feed | a recorded stream | see [Streams](references/recording-a-stream-venue.md) | none |
|
|
73
74
|
| A join of tables this workspace already built, rebuilt when one promotes | `table.version@1.0.0` sources with `refresh: upstream_promoted` and `rebuild` (server 4.38) | one shared `data_classification`, `debounce_seconds` | [table sources](references/sources.md#reading-another-table-of-this-workspace) |
|
|
@@ -226,7 +227,7 @@ step 6. The stage 3 reference holds its rule. Gate 4 is step 6.
|
|
|
226
227
|
started, failed, retried or replaced, completed, and verified. Include the run ID so the user can
|
|
227
228
|
tell attempts apart; state the supported failure cause, name both the old and new run IDs for a
|
|
228
229
|
retry or replacement, and include elapsed time or throughput when the user requested a benchmark.
|
|
229
|
-
Do not repeat an unchanged poll, and never treat the app activity pill as a substitute for these
|
|
230
|
+
Combine transitions observed together in one short update, including completion and verification when both are known. Do not repeat an unchanged poll, and never treat the app activity pill as a substitute for these
|
|
230
231
|
updates.
|
|
231
232
|
|
|
232
233
|
## Work in parallel
|
|
@@ -461,6 +462,8 @@ are separate features to verify against the brief.
|
|
|
461
462
|
|
|
462
463
|
## Communication and boundaries
|
|
463
464
|
|
|
465
|
+
Lead with the answer. For a routine question, one to three sentences usually suffice. If a card or table shows the records, give the takeaway or top pick and one reason. Skip the row-by-row recap, routine tool narration and follow-up offers. Mention limitations that change the answer. Expand when asked.
|
|
466
|
+
|
|
464
467
|
Keep routine operations quiet except where the host requires progress updates. Explain material
|
|
465
468
|
findings, decisions and limitations in plain language. Write useful build messages to the dataset
|
|
466
469
|
record as well as chat. Read [build narration](references/narrating-the-run.md) before the first
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/patterns.md
RENAMED
|
@@ -29,6 +29,7 @@ table before any full run.
|
|
|
29
29
|
| API that takes a date range | [Date-range window](#api-that-takes-a-date-range) | Yes, by window |
|
|
30
30
|
| Many pages behind one index | [Page collection](#many-pages-behind-one-index) | No. A refresh of a collection returns `RESYNC_REQUIRED` |
|
|
31
31
|
| One request per row of another source | [Per-row request with `batch`](#one-request-per-row-many-ids-per-request) | Yes, through the upstream window |
|
|
32
|
+
| A SOAP or XML service asked once per row | [SOAP per-row request](#one-soap-request-per-row) | No. Its upstream file is `closed` |
|
|
32
33
|
| Bulk dump beside a windowed source | [Reference beside a window](#bulk-dump-beside-a-windowed-source) | Yes. The dump is read again on its own cadence |
|
|
33
34
|
|
|
34
35
|
A live `wss://` feed has no recipe here. Read [Streams](recording-a-stream-venue.md).
|
|
@@ -793,6 +794,157 @@ first. [Authoring a per-row request](sources.md#authoring-a-per-row-request) and
|
|
|
793
794
|
}
|
|
794
795
|
```
|
|
795
796
|
|
|
797
|
+
### One SOAP request per row
|
|
798
|
+
|
|
799
|
+
A keyless per-row `POST` whose `body_text` is a SOAP envelope (Needs server 4.71). Use it only when
|
|
800
|
+
`row_request_text_body` is literal `true` in `studio_capabilities`. The request here asks the Czech
|
|
801
|
+
VAT payer register about each `dic` in an upstream file, and an `xml.tabular` Reader decodes each
|
|
802
|
+
answer. `SOAPAction` is a literal header, and the worker sets `Content-Type` from
|
|
803
|
+
`body_text.content_type`. Each `{dic}` is XML-escaped, so a cell adds no markup. A text body is
|
|
804
|
+
never batched, so the register is asked once per row: 2,000 calls an hour and 10,000 a day are
|
|
805
|
+
its limits, so the source states a 1,800 ms gap, which also keeps it inside 4 calls at once, and
|
|
806
|
+
9,000 fetches a run.
|
|
807
|
+
|
|
808
|
+
`xml.tabular` refuses a selector that matches more than one element, so a payer's repeated
|
|
809
|
+
`zverejneneUcty/ucet` accounts are not columns here. Read them with a second per-row source whose
|
|
810
|
+
`record_selector` ends at `roz:ucet`, carrying `dic`, and pay for its calls too. A saved answer
|
|
811
|
+
is reused for as long as the server holds it; for a flag that changes, read
|
|
812
|
+
[a freshness bound on per-row answers](making-a-table-incremental.md#a-freshness-bound-on-per-row-answers)
|
|
813
|
+
first.
|
|
814
|
+
[Authoring a per-row request](sources.md#a-text-body-for-a-soap-or-xml-service) has the rules.
|
|
815
|
+
|
|
816
|
+
```json
|
|
817
|
+
{
|
|
818
|
+
"dataset": {"id": "00000000-0000-4000-8000-000000000000", "name": "Czech VAT payer status"},
|
|
819
|
+
"question": {"text": "Is each Czech VAT payer in the list reliable, and what is its registered name?"},
|
|
820
|
+
"table": {
|
|
821
|
+
"name": "vat_payer_status",
|
|
822
|
+
"description": "One row per VAT id with the register's reliability flag and name.",
|
|
823
|
+
"grain": ["dic"],
|
|
824
|
+
"columns": [
|
|
825
|
+
{"name": "dic", "type": "string", "nullable": false, "description": "The VAT id without its CZ prefix."},
|
|
826
|
+
{
|
|
827
|
+
"name": "unreliable",
|
|
828
|
+
"type": "boolean",
|
|
829
|
+
"nullable": false,
|
|
830
|
+
"description": "Whether the register lists the payer as unreliable (ANO)."
|
|
831
|
+
},
|
|
832
|
+
{"name": "tax_office", "type": "string", "nullable": true, "description": "The register's tax office number."},
|
|
833
|
+
{"name": "subject_name", "type": "string", "nullable": true, "description": "The registered name."},
|
|
834
|
+
{"name": "city", "type": "string", "nullable": true, "description": "The registered address's town."}
|
|
835
|
+
]
|
|
836
|
+
},
|
|
837
|
+
"sources": [
|
|
838
|
+
{
|
|
839
|
+
"name": "payers",
|
|
840
|
+
"description": "The list of VAT ids to look up.",
|
|
841
|
+
"source_class": "user_url",
|
|
842
|
+
"data_classification": "public",
|
|
843
|
+
"locator": {"kind": "https_url", "display_locator": "https://data.example.cz/vat/payers.csv"},
|
|
844
|
+
"rights_claim": {
|
|
845
|
+
"claimed_basis": "public_domain_asserted",
|
|
846
|
+
"claim_evidence_digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
847
|
+
"claim_note": "Replace with the terms you read and their digest."
|
|
848
|
+
},
|
|
849
|
+
"connector": {
|
|
850
|
+
"adapter_id": "public.https",
|
|
851
|
+
"credential_mode": "none",
|
|
852
|
+
"origin": "https://data.example.cz",
|
|
853
|
+
"parameters": [
|
|
854
|
+
{"name": "reader.family_id", "value": "delimited_text"},
|
|
855
|
+
{"name": "reader.family_version", "value": "2.0.0"},
|
|
856
|
+
{
|
|
857
|
+
"name": "reader.decode_options",
|
|
858
|
+
"value": "{\"columns\":[{\"expected_header\":\"dic\",\"index\":0,\"name\":\"dic\"}],\"delimiter\":\",\",\"doublequote\":true,\"encoding\":\"utf-8\",\"escapechar\":null,\"header\":true,\"quotechar\":\"\\\"\",\"skip_blank_rows\":false,\"skip_rows\":0,\"unselected_columns\":\"require_empty\"}"
|
|
859
|
+
}
|
|
860
|
+
]
|
|
861
|
+
},
|
|
862
|
+
"limits": {"max_source_bytes": 16777216, "max_rows": 9000, "max_requests": 1},
|
|
863
|
+
"closed": true
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"name": "vat_status",
|
|
867
|
+
"description": "The register's answer for each VAT id, one SOAP call each.",
|
|
868
|
+
"source_class": "user_api",
|
|
869
|
+
"data_classification": "public",
|
|
870
|
+
"locator": {
|
|
871
|
+
"kind": "https_url",
|
|
872
|
+
"display_locator": "https://adisrws.mfcr.cz/dpr/axis2/services/rozhraniCRPDPH.rozhraniCRPDPHSOAP"
|
|
873
|
+
},
|
|
874
|
+
"rights_claim": {
|
|
875
|
+
"claimed_basis": "terms_of_service_asserted",
|
|
876
|
+
"claim_evidence_digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
877
|
+
"claim_note": "Replace with the terms you read and their digest."
|
|
878
|
+
},
|
|
879
|
+
"connector": {
|
|
880
|
+
"adapter_id": "public.https.collection@2.0.0",
|
|
881
|
+
"credential_mode": "none",
|
|
882
|
+
"origin": "https://adisrws.mfcr.cz",
|
|
883
|
+
"parameters": [
|
|
884
|
+
{"name": "reader.family_id", "value": "xml.tabular"},
|
|
885
|
+
{"name": "reader.family_version", "value": "1.0.0"},
|
|
886
|
+
{
|
|
887
|
+
"name": "reader.decode_options",
|
|
888
|
+
"value": "{\"columns\":[{\"name\":\"answered_dic\",\"required\":true,\"selector\":\"@dic\"},{\"name\":\"unreliable\",\"required\":true,\"selector\":\"@nespolehlivyPlatce\"},{\"name\":\"tax_office\",\"required\":false,\"selector\":\"@cisloFu\"},{\"name\":\"subject_name\",\"required\":false,\"selector\":\"roz:nazevSubjektu/text()\"},{\"name\":\"city\",\"required\":false,\"selector\":\"roz:adresa/roz:mesto/text()\"}],\"namespaces\":{\"roz\":\"http://adis.mfcr.cz/rozhraniCRPDPH/\",\"soapenv\":\"http://schemas.xmlsoap.org/soap/envelope/\"},\"record_selector\":\"/soapenv:Envelope/soapenv:Body/roz:StatusNespolehlivyPlatceRozsirenyResponse/roz:statusPlatceDPH\"}"
|
|
889
|
+
}
|
|
890
|
+
]
|
|
891
|
+
},
|
|
892
|
+
"limits": {"max_source_bytes": 67108864, "max_rows": 9000, "max_requests": 27000},
|
|
893
|
+
"collection": {
|
|
894
|
+
"discovery": {
|
|
895
|
+
"kind": "source_rows",
|
|
896
|
+
"source": "payers",
|
|
897
|
+
"request": {
|
|
898
|
+
"origin": "https://adisrws.mfcr.cz",
|
|
899
|
+
"method": "POST",
|
|
900
|
+
"path_template": "/dpr/axis2/services/rozhraniCRPDPH.rozhraniCRPDPHSOAP",
|
|
901
|
+
"static_query": [],
|
|
902
|
+
"static_headers": [
|
|
903
|
+
{"name": "SOAPAction", "value": "\"http://adis.mfcr.cz/rozhraniCRPDPH/getStatusNespolehlivyPlatceRozsireny\""}
|
|
904
|
+
],
|
|
905
|
+
"parameters": [{"name": "dic", "type": "string", "required": true}],
|
|
906
|
+
"body_text": {
|
|
907
|
+
"content_type": "text/xml; charset=UTF-8",
|
|
908
|
+
"template": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:roz=\"http://adis.mfcr.cz/rozhraniCRPDPH/\"><soapenv:Body><roz:StatusNespolehlivyPlatceRozsirenyRequest><roz:dic>{dic}</roz:dic></roz:StatusNespolehlivyPlatceRozsirenyRequest></soapenv:Body></soapenv:Envelope>"
|
|
909
|
+
},
|
|
910
|
+
"carry_columns": ["dic"]
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
"pages": {
|
|
914
|
+
"allowed_origins": ["https://adisrws.mfcr.cz"],
|
|
915
|
+
"max_pages": 9000,
|
|
916
|
+
"max_fetches_per_run": 9000,
|
|
917
|
+
"min_interval_milliseconds": 1800,
|
|
918
|
+
"retries": 2,
|
|
919
|
+
"revisit": {"kind": "never"}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
],
|
|
924
|
+
"transform": {
|
|
925
|
+
"engine": "duckdb_sql",
|
|
926
|
+
"steps": [
|
|
927
|
+
{
|
|
928
|
+
"step_id": "vat_payer_status",
|
|
929
|
+
"description": "Read the per-row source alone, type the flag and trim the register's padding.",
|
|
930
|
+
"sql": "select dic, unreliable = 'ANO' as unreliable, tax_office, trim(subject_name) as subject_name, trim(city) as city from vat_status"
|
|
931
|
+
}
|
|
932
|
+
]
|
|
933
|
+
},
|
|
934
|
+
"checks": [
|
|
935
|
+
{
|
|
936
|
+
"check_id": "one_row_per_dic",
|
|
937
|
+
"kind": "key_uniqueness",
|
|
938
|
+
"enforcement": "required",
|
|
939
|
+
"columns": ["dic"],
|
|
940
|
+
"description": "One row per VAT id."
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
"units": [],
|
|
944
|
+
"timezone": "UTC"
|
|
945
|
+
}
|
|
946
|
+
```
|
|
947
|
+
|
|
796
948
|
### Bulk dump beside a windowed source
|
|
797
949
|
|
|
798
950
|
A windowed source and a `reference` source in one table. A refresh reuses the reference's sealed
|
|
@@ -547,6 +547,21 @@ mr-data search query PUBLIC_TABLE_ID --query "dune" --count --json
|
|
|
547
547
|
mr-data search query PUBLIC_TABLE_ID --query "dune" --plan plan.json --cursor NEXT_CURSOR --json
|
|
548
548
|
```
|
|
549
549
|
|
|
550
|
+
Choose the request from the question and the published schema:
|
|
551
|
+
- Use a text query for names, prefixes and misspellings. For a paraphrase use
|
|
552
|
+
`--mode meaning` when semantic columns are indexed. For neighbors of a specific
|
|
553
|
+
record, resolve the seed first and pass its package row ID with `--like ROW_ID`.
|
|
554
|
+
- Read `capabilities.search.indexed_plan` when available. Put hard conditions on
|
|
555
|
+
declared filterable columns in `predicates`, explicit sort keys in `order`,
|
|
556
|
+
and supported optional values in `prefer`. Keep the remaining topic in a
|
|
557
|
+
`description` plan for combined keyword and embedding retrieval.
|
|
558
|
+
- Use a `browse` plan with empty text for an ordered list across matching rows.
|
|
559
|
+
Sorting topical hits applies to the relevance window. For totals, grouped
|
|
560
|
+
statistics or unsupported exact constraints use a table query.
|
|
561
|
+
- When choosing across searches, keep row IDs from one table version and
|
|
562
|
+
package generation. Return the chosen IDs in order in the final plan’s
|
|
563
|
+
`rerank.ids`, and cite the rows that call confirms.
|
|
564
|
+
|
|
550
565
|
The calling agent supplies filters and ordering in an explicit plan. `--page-size` is 1 to 100 (default 20). `--count` asks
|
|
551
566
|
for the number of matching rows. To read the next page, save the answer's `plan` to a file and
|
|
552
567
|
pass it with `--plan` beside `--cursor NEXT_CURSOR`; a cursor continues one plan.
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/sources.md
RENAMED
|
@@ -234,13 +234,15 @@ Write the request by these rules.
|
|
|
234
234
|
|
|
235
235
|
- `origin` is the host the request goes to. `pages.allowed_origins` names it too, and nothing
|
|
236
236
|
else when the request presents a key.
|
|
237
|
-
- `method` is `GET` or `POST`. A `POST` states `body_template`,
|
|
237
|
+
- `method` is `GET` or `POST`. A `POST` states `body_template`, or a keyless `body_text`
|
|
238
|
+
([below](#a-text-body-for-a-soap-or-xml-service)), and a `GET` states neither.
|
|
238
239
|
- Each `{name}` placeholder takes the upstream row's cell in the column of that name.
|
|
239
240
|
- Every placeholder is a declared parameter, and every parameter is used.
|
|
240
241
|
- A literal brace is written twice, `{{` or `}}`. Any other brace is refused. A SPARQL query can
|
|
241
242
|
ride in a query value this way.
|
|
242
243
|
- Every parameter and every entry of `carry_columns` is a column of the upstream source.
|
|
243
|
-
- A header value is a literal. The worker writes `Content-Type` itself.
|
|
244
|
+
- A header value is a literal. The worker writes `Content-Type` itself. A SOAP `SOAPAction`
|
|
245
|
+
with a quoted URL value is a literal header like any other.
|
|
244
246
|
- Every literal the request sends is printable ASCII, with no trailing newline.
|
|
245
247
|
- The body nests at most 32 levels deep.
|
|
246
248
|
- `pages.revisit` is `never` or left out: an answer is reused for as long as the server holds it. A
|
|
@@ -256,7 +258,7 @@ breaks a rule above.
|
|
|
256
258
|
|
|
257
259
|
| `credential_mode` | State | Use it for |
|
|
258
260
|
| --- | --- | --- |
|
|
259
|
-
| `none` | no `credential` and no `auth`. A `GET`, or a `POST` with `body_template` (Needs server 4.49) | a public API that takes no key |
|
|
261
|
+
| `none` | no `credential` and no `auth`. A `GET`, or a `POST` with `body_template` (Needs server 4.49) or `body_text` (Needs server 4.71) | a public API that takes no key |
|
|
260
262
|
| `opaque_reference` | `credential.secret_name` and `request.auth` | a key the user enrolled with `mr-data keys set` |
|
|
261
263
|
| `platform` | no `credential` and no `auth` | an endpoint Mostly Right holds a key for |
|
|
262
264
|
|
|
@@ -296,9 +298,50 @@ at 0 there is no second attempt, so the first answer too large fails the run. Ra
|
|
|
296
298
|
|
|
297
299
|
If the API takes a list of ids in one query parameter, add `request.batch` and send up to 100
|
|
298
300
|
members in one call. It keeps every member id and saved answer. It refuses a POST, a
|
|
299
|
-
`body_template` and a `platform` credential.
|
|
301
|
+
`body_template`, a `body_text` and a `platform` credential.
|
|
300
302
|
[`batch`](making-a-table-incremental.md#batch-many-rows-in-one-request) has the grammar.
|
|
301
303
|
|
|
304
|
+
#### A text body for a SOAP or XML service
|
|
305
|
+
|
|
306
|
+
A SOAP service, or any API that reads an XML or plain-text body, takes a keyless `POST` with
|
|
307
|
+
`body_text` in place of `body_template` (Needs server 4.71). Use it only when
|
|
308
|
+
`row_request_text_body` is literal `true` in `studio_capabilities`. Otherwise the client refuses
|
|
309
|
+
with `THIN_GRAMMAR_NOT_SERVED` and names `request/body_text`, marked `(row_request_text_body)`.
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
"request": {
|
|
313
|
+
"origin": "https://adisrws.mfcr.cz",
|
|
314
|
+
"method": "POST",
|
|
315
|
+
"path_template": "/dpr/axis2/services/rozhraniCRPDPH.rozhraniCRPDPHSOAP",
|
|
316
|
+
"static_query": [],
|
|
317
|
+
"static_headers": [
|
|
318
|
+
{"name": "SOAPAction", "value": "\"http://adis.mfcr.cz/rozhraniCRPDPH/getStatusNespolehlivyPlatceRozsireny\""}
|
|
319
|
+
],
|
|
320
|
+
"parameters": [{"name": "dic", "type": "string", "required": true}],
|
|
321
|
+
"body_text": {
|
|
322
|
+
"content_type": "text/xml; charset=UTF-8",
|
|
323
|
+
"template": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:roz=\"http://adis.mfcr.cz/rozhraniCRPDPH/\"><soapenv:Body><roz:StatusNespolehlivyPlatceRozsirenyRequest><roz:dic>{dic}</roz:dic></roz:StatusNespolehlivyPlatceRozsirenyRequest></soapenv:Body></soapenv:Envelope>"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
- `content_type` is `text/xml; charset=UTF-8`, `application/soap+xml; charset=UTF-8` or
|
|
329
|
+
`text/plain; charset=UTF-8`, and nothing else. The worker sends it as `Content-Type`. A SOAP 1.2
|
|
330
|
+
service that needs an `action` parameter in its content type cannot be called this way.
|
|
331
|
+
- `template` is 1 to 8,192 characters, sent as UTF-8. Its placeholders and braces follow the rules
|
|
332
|
+
above. Its own markup is sent as written.
|
|
333
|
+
- In the two XML types each value is XML-escaped (`&`, `<`, `>`, `"` and `'`), so a cell cannot
|
|
334
|
+
add an element. In `text/plain` a value is sent as it is.
|
|
335
|
+
- A row whose value holds a control character other than tab, LF or CR sends nothing.
|
|
336
|
+
- `credential_mode` is `none`. A text body is never sent with a key.
|
|
337
|
+
- A text body states no `batch`, so each row is one call. Size the gap and
|
|
338
|
+
`pages.max_fetches_per_run` to the service's own call limits.
|
|
339
|
+
- Decode the answer with an `xml.tabular` pin whose `namespaces` name the envelope's prefixes.
|
|
340
|
+
`xml.tabular` refuses a selector that matches twice in one record, so read a repeated child
|
|
341
|
+
with a second source whose `record_selector` ends at that child.
|
|
342
|
+
|
|
343
|
+
[One SOAP request per row](patterns.md#one-soap-request-per-row) is a complete recipe.
|
|
344
|
+
|
|
302
345
|
A collection whose calls are paid for is sized from evidence, not from its ceiling. Run
|
|
303
346
|
`mr-data recipe forecast RECIPE_ID --digest DIGEST --json` before any `--full`, and cap
|
|
304
347
|
`pages.max_fetches_per_run` at the suggestion it prints. A cap near the real count refuses a corpus
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
## User communication contract
|
|
2
2
|
|
|
3
|
+
Lead with the answer. For a routine question, one to three sentences usually suffice. If a card or table shows the records, give the takeaway or top pick and one reason. Skip the row-by-row recap, routine tool narration and follow-up offers. Mention limitations that change the answer. Expand when asked. For a build milestone, use one sentence for what changed and any action needed. Keep required run IDs and approval details.
|
|
4
|
+
|
|
3
5
|
**Routine work is silent.** Authentication checks, command execution, source queries, receipt
|
|
4
6
|
parsing, reconnects and waiting produce no message and no cell. Never narrate preparation
|
|
5
7
|
— capability discovery, documentation lookup, fixture searches, package-version lookup, command
|
|
@@ -22,8 +24,7 @@ outcome-oriented sentence about the dataset stage or an observed result, inventi
|
|
|
22
24
|
| Any stage | Work that needs the user's action: the product consequence and the one action that resolves it. |
|
|
23
25
|
|
|
24
26
|
Report each meaningful lifecycle transition once; an unchanged poll, repeated event, reconnect or
|
|
25
|
-
quiet interval stays silent.
|
|
26
|
-
second update with both run IDs. A delegation recorded at stage 2 removes questions only within
|
|
27
|
+
quiet interval stays silent. When several transitions are observed together, combine them in one short update. For a failed run already retried, give the cause and both run IDs together. A delegation recorded at stage 2 removes questions only within
|
|
27
28
|
its stated scope, without removing the statements: say what you chose and what it projects, and do
|
|
28
29
|
not ask again about a settled decision. Ongoing refresh needs its own answer or explicit
|
|
29
30
|
delegation, including whether the cadence is fixed or adaptive; general build permission does not
|
|
@@ -146,6 +146,7 @@ CAPABILITY_NAMES: tuple[str, ...] = (
|
|
|
146
146
|
"keyless_window",
|
|
147
147
|
"keyless_post",
|
|
148
148
|
"table_source_snapshot",
|
|
149
|
+
"row_request_text_body",
|
|
149
150
|
)
|
|
150
151
|
|
|
151
152
|
#: What a Studio that answers 404 or 405 from the explanation routes serves.
|
|
@@ -1387,6 +1388,12 @@ def not_served_detail(missing: Sequence[tuple[str, str]], why: str, *, known: bo
|
|
|
1387
1388
|
"Wait for the server deployment that enables hourly snapshot captures; do not "
|
|
1388
1389
|
"silently change the requested capture interval."
|
|
1389
1390
|
)
|
|
1391
|
+
if any(capability == "row_request_text_body" for _, capability in missing):
|
|
1392
|
+
return (
|
|
1393
|
+
f"not available on this server yet: {listed}. {why}. Nothing was registered. "
|
|
1394
|
+
"Wait for the server deployment that sends a per-row text body (contract 4.71.0); a "
|
|
1395
|
+
"per-row request has no other way to send an XML or plain-text body."
|
|
1396
|
+
)
|
|
1390
1397
|
if any(capability == "table_source_snapshot" for _, capability in missing):
|
|
1391
1398
|
return (
|
|
1392
1399
|
f"not available on this server yet: {listed}. {why}. Nothing was registered. "
|
|
@@ -1449,7 +1456,8 @@ def gated_grammar(document: Mapping[str, Any]) -> list[tuple[str, str]]:
|
|
|
1449
1456
|
request, or a per-row request under ``credential_mode: none``. Its pointer is the method. A
|
|
1450
1457
|
``table.version@1.0.0`` source that states a ``window`` or a ``row_filter`` (4.70.0) needs
|
|
1451
1458
|
``table_source_snapshot``, as Studio's capabilities say: a client that reads false registers
|
|
1452
|
-
no snapshot on a table source.
|
|
1459
|
+
no snapshot on a table source. A per-row request that states ``body_text`` (4.71.0) needs
|
|
1460
|
+
``row_request_text_body``, pointed at that member.
|
|
1453
1461
|
"""
|
|
1454
1462
|
|
|
1455
1463
|
gated: list[tuple[str, str]] = []
|
|
@@ -1527,6 +1535,9 @@ def gated_grammar(document: Mapping[str, Any]) -> list[tuple[str, str]]:
|
|
|
1527
1535
|
and request.get("method") == "POST"
|
|
1528
1536
|
):
|
|
1529
1537
|
gated.append((f"/sources/{index}/collection/discovery/request/method", "keyless_post"))
|
|
1538
|
+
if isinstance(request, Mapping) and "body_text" in request:
|
|
1539
|
+
pointer = f"/sources/{index}/collection/discovery/request/body_text"
|
|
1540
|
+
gated.append((pointer, "row_request_text_body"))
|
|
1530
1541
|
return gated
|
|
1531
1542
|
|
|
1532
1543
|
|
|
@@ -168,6 +168,17 @@ KEYLESS_API_ADAPTER_ID = "public.https.api@1.0.0"
|
|
|
168
168
|
#: credential of the predict binding it names, and sends no per-row request.
|
|
169
169
|
PREDICT_ADAPTER_ID = PREDICT_ADAPTER
|
|
170
170
|
|
|
171
|
+
#: The content types ``recipe.schema.json#/$defs/collection_row_request_body_text`` admits (4.71.0).
|
|
172
|
+
ROW_REQUEST_TEXT_CONTENT_TYPES: frozenset[str] = frozenset(
|
|
173
|
+
{
|
|
174
|
+
"text/xml; charset=UTF-8",
|
|
175
|
+
"application/soap+xml; charset=UTF-8",
|
|
176
|
+
"text/plain; charset=UTF-8",
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
#: The longest ``body_text.template``, in characters.
|
|
180
|
+
ROW_REQUEST_TEXT_MAX_CHARS = 8_192
|
|
181
|
+
|
|
171
182
|
#: One per-row template token, read left to right: an escaped brace, a ``{name}`` placeholder, a
|
|
172
183
|
#: lone brace, or a run of text with no brace. The registration route and the worker read every
|
|
173
184
|
#: per-row template with this same expression, and no per-row template pattern of
|
|
@@ -1361,7 +1372,8 @@ def _row_request_credentials(sources: Any) -> list[Finding]:
|
|
|
1361
1372
|
``auth``, which says how that secret is presented.
|
|
1362
1373
|
- ``none`` states no ``auth``.
|
|
1363
1374
|
|
|
1364
|
-
Whatever the mode, a request sends a GET with no
|
|
1375
|
+
Whatever the mode, a request sends a GET with no body, or a POST with a ``body_template``. A
|
|
1376
|
+
POST under ``none`` may send a ``body_text`` in its place (4.71.0), and no other mode may.
|
|
1365
1377
|
``batch`` stays GET-only, which :func:`_row_request_batch_coherence` holds.
|
|
1366
1378
|
|
|
1367
1379
|
Each is a schema rule, so each finding carries :data:`DOCUMENT_INVALID`. Which binding admits
|
|
@@ -1470,18 +1482,89 @@ def _row_request_credentials(sources: Any) -> list[Finding]:
|
|
|
1470
1482
|
"name one with 'opaque_reference', or drop it",
|
|
1471
1483
|
)
|
|
1472
1484
|
)
|
|
1485
|
+
if request is not None and "body_text" in request:
|
|
1486
|
+
findings.extend(_row_request_body_text(request["body_text"], at=f"{at}/body_text"))
|
|
1487
|
+
if mode != "none":
|
|
1488
|
+
findings.append(
|
|
1489
|
+
Finding(
|
|
1490
|
+
DOCUMENT_INCOHERENT,
|
|
1491
|
+
f"{at}/body_text",
|
|
1492
|
+
"a text body is sent only with credential_mode none",
|
|
1493
|
+
)
|
|
1494
|
+
)
|
|
1473
1495
|
if request is not None:
|
|
1474
|
-
findings.extend(
|
|
1496
|
+
findings.extend(
|
|
1497
|
+
_request_method(request, at=at, subject="A per-row request", text_body=True)
|
|
1498
|
+
)
|
|
1499
|
+
return findings
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
def _row_request_body_text(body: Any, *, at: str) -> list[Finding]:
|
|
1503
|
+
"""A per-row ``body_text``: exactly a closed ``content_type`` and a non-empty ``template``."""
|
|
1504
|
+
|
|
1505
|
+
if not isinstance(body, Mapping):
|
|
1506
|
+
return [Finding(DOCUMENT_INVALID, at, "is not one JSON object")]
|
|
1507
|
+
findings = [
|
|
1508
|
+
Finding(DOCUMENT_INVALID, f"{at}/{_escape(str(member))}", "is not a body_text member")
|
|
1509
|
+
for member in body
|
|
1510
|
+
if member not in ("content_type", "template")
|
|
1511
|
+
]
|
|
1512
|
+
content_type = body.get("content_type")
|
|
1513
|
+
if content_type not in ROW_REQUEST_TEXT_CONTENT_TYPES:
|
|
1514
|
+
findings.append(
|
|
1515
|
+
Finding(
|
|
1516
|
+
DOCUMENT_INVALID,
|
|
1517
|
+
f"{at}/content_type",
|
|
1518
|
+
f"is {content_type!r}, and a text body is sent as one of "
|
|
1519
|
+
f"{', '.join(sorted(ROW_REQUEST_TEXT_CONTENT_TYPES))}",
|
|
1520
|
+
)
|
|
1521
|
+
)
|
|
1522
|
+
template = body.get("template")
|
|
1523
|
+
if (
|
|
1524
|
+
not isinstance(template, str)
|
|
1525
|
+
or not 1 <= len(template) <= ROW_REQUEST_TEXT_MAX_CHARS
|
|
1526
|
+
or any(ord(character) < 0x20 and character not in "\t\n\r" for character in template)
|
|
1527
|
+
):
|
|
1528
|
+
findings.append(
|
|
1529
|
+
Finding(
|
|
1530
|
+
DOCUMENT_INVALID,
|
|
1531
|
+
f"{at}/template",
|
|
1532
|
+
f"must be 1 to {ROW_REQUEST_TEXT_MAX_CHARS} characters with no control "
|
|
1533
|
+
"character but tab, LF and CR",
|
|
1534
|
+
)
|
|
1535
|
+
)
|
|
1475
1536
|
return findings
|
|
1476
1537
|
|
|
1477
1538
|
|
|
1478
|
-
def _request_method(
|
|
1539
|
+
def _request_method(
|
|
1540
|
+
request: Mapping[str, Any], *, at: str, subject: str, text_body: bool = False
|
|
1541
|
+
) -> list[Finding]:
|
|
1479
1542
|
"""The generic request rule: a GET states no ``body_template``, and a POST states one.
|
|
1480
1543
|
|
|
1481
1544
|
``subject`` begins the sentence a wrong method earns. A request that states no method is the
|
|
1482
|
-
schema's missing-member fault, and nothing is read off it here.
|
|
1545
|
+
schema's missing-member fault, and nothing is read off it here. ``text_body`` admits a per-row
|
|
1546
|
+
request's ``body_text`` as a POST's one body in place of ``body_template``.
|
|
1483
1547
|
"""
|
|
1484
1548
|
|
|
1549
|
+
if text_body and "body_text" in request:
|
|
1550
|
+
if "body_template" in request:
|
|
1551
|
+
return [
|
|
1552
|
+
Finding(
|
|
1553
|
+
DOCUMENT_INVALID,
|
|
1554
|
+
f"{at}/body_text",
|
|
1555
|
+
"is stated beside body_template, and a POST sends one body; drop one",
|
|
1556
|
+
)
|
|
1557
|
+
]
|
|
1558
|
+
if request.get("method") != "POST":
|
|
1559
|
+
return [
|
|
1560
|
+
Finding(
|
|
1561
|
+
DOCUMENT_INVALID,
|
|
1562
|
+
f"{at}/body_text",
|
|
1563
|
+
"is stated on a request that is not a POST. Make it a POST, or drop it",
|
|
1564
|
+
)
|
|
1565
|
+
]
|
|
1566
|
+
return []
|
|
1567
|
+
|
|
1485
1568
|
if "method" not in request:
|
|
1486
1569
|
return []
|
|
1487
1570
|
method = request.get("method")
|
|
@@ -1613,6 +1696,9 @@ def _row_request_templates(sources: Any) -> list[Finding]:
|
|
|
1613
1696
|
check(f"{at}/static_query/{position}/value", pair.get("value"))
|
|
1614
1697
|
if "body_template" in request:
|
|
1615
1698
|
walk(f"{at}/body_template", request["body_template"])
|
|
1699
|
+
body_text = request.get("body_text")
|
|
1700
|
+
if isinstance(body_text, Mapping):
|
|
1701
|
+
check(f"{at}/body_text/template", body_text.get("template"))
|
|
1616
1702
|
return findings
|
|
1617
1703
|
|
|
1618
1704
|
|
|
@@ -1731,6 +1817,10 @@ def _request_placeholder_sites(request: Mapping[str, Any], at: str) -> list[tupl
|
|
|
1731
1817
|
|
|
1732
1818
|
if "body_template" in request:
|
|
1733
1819
|
walk(f"{at}/body_template", request["body_template"])
|
|
1820
|
+
body_text = request.get("body_text")
|
|
1821
|
+
if isinstance(body_text, Mapping):
|
|
1822
|
+
pointer = f"{at}/body_text/template"
|
|
1823
|
+
sites.extend((pointer, name) for name in _placeholders(body_text.get("template")))
|
|
1734
1824
|
return sites
|
|
1735
1825
|
|
|
1736
1826
|
|
|
@@ -43,9 +43,12 @@ KEYLESS_POST = "keyless_post"
|
|
|
43
43
|
#: Served by a 4.70.0 API: whether it registers a ``table.version@1.0.0`` source that states a
|
|
44
44
|
#: daily ``window.snapshot`` and a ``row_filter``. An older API omits it.
|
|
45
45
|
TABLE_SOURCE_SNAPSHOT = "table_source_snapshot"
|
|
46
|
+
#: Served by a 4.71.0 API, which lets a keyless per-row POST send a ``body_text``. An older API
|
|
47
|
+
#: omits it.
|
|
48
|
+
ROW_REQUEST_TEXT_BODY = "row_request_text_body"
|
|
46
49
|
#: The capabilities whose grammar an older API's schema refuses with 422 before it can answer.
|
|
47
50
|
SCHEMA_GATED_CAPABILITIES: frozenset[str] = frozenset(
|
|
48
|
-
{KEYLESS_WINDOW, KEYLESS_POST, TABLE_SOURCE_SNAPSHOT}
|
|
51
|
+
{KEYLESS_WINDOW, KEYLESS_POST, TABLE_SOURCE_SNAPSHOT, ROW_REQUEST_TEXT_BODY}
|
|
49
52
|
)
|
|
50
53
|
CAPABILITY_NAMES: tuple[str, ...] = (
|
|
51
54
|
ROW_FILTER,
|
|
@@ -55,6 +58,7 @@ CAPABILITY_NAMES: tuple[str, ...] = (
|
|
|
55
58
|
ROW_REQUEST_BATCH,
|
|
56
59
|
KEYLESS_WINDOW,
|
|
57
60
|
KEYLESS_POST,
|
|
61
|
+
ROW_REQUEST_TEXT_BODY,
|
|
58
62
|
HOURLY_SNAPSHOT_REFRESH,
|
|
59
63
|
TABLE_SOURCE_SNAPSHOT,
|
|
60
64
|
)
|
|
@@ -139,6 +143,7 @@ __all__ = [
|
|
|
139
143
|
"PER_ROW_REVISIT_INTERVAL",
|
|
140
144
|
"ROW_FILTER",
|
|
141
145
|
"ROW_REQUEST_BATCH",
|
|
146
|
+
"ROW_REQUEST_TEXT_BODY",
|
|
142
147
|
"SCHEMA_GATED_CAPABILITIES",
|
|
143
148
|
"SNAPSHOT_REFRESH",
|
|
144
149
|
"TABLE_SOURCE_SNAPSHOT",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "mostlyright-thin-table-search-contract.v1",
|
|
3
|
-
"source_commit": "
|
|
3
|
+
"source_commit": "3bd6bb3b812fbf6bea4777e252f1408a287fef5e",
|
|
4
4
|
"recipe_search_definition": "recipe_search",
|
|
5
5
|
"$defs": {
|
|
6
6
|
"common.safe_integer": {
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4.py
RENAMED
|
@@ -147,8 +147,8 @@ from mostlyright.data_harness.thin.v4_matching import CONTRACT_PATHS as MATCHING
|
|
|
147
147
|
#: ``JOB_INVALID`` outright, which in production was every refresh a collection epoch was offered
|
|
148
148
|
#: for rather than only the collection runs. This package must not reach a Studio older than the
|
|
149
149
|
#: commit it pins; ``docs/V4-WORKER-PROTOCOL.md`` states it beside the layout's own ordering rule.
|
|
150
|
-
PINNED_V4_OPENAPI_SOURCE_SHA256 = "
|
|
151
|
-
PINNED_V4_CONTRACT_VERSION = "4.
|
|
150
|
+
PINNED_V4_OPENAPI_SOURCE_SHA256 = "18ffc34ec04bb718886535374b92e8e65943b945527573d0cf93a66ae2f503fb"
|
|
151
|
+
PINNED_V4_CONTRACT_VERSION = "4.71.0"
|
|
152
152
|
|
|
153
153
|
#: The ``schema_version`` every command body that predates 4.14.0 stamps: ``dataset activity``,
|
|
154
154
|
#: ``table rename``, ``table archive`` and ``dataset archive``. It is the number the 0.25 line
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_search.py
RENAMED
|
@@ -187,6 +187,7 @@ def declare_arguments(parser: argparse.ArgumentParser) -> None:
|
|
|
187
187
|
sub.add_argument("--limit", type=int, default=10)
|
|
188
188
|
sub.add_argument("--columns", help="comma-separated display columns")
|
|
189
189
|
if verb == "query":
|
|
190
|
+
sub.add_argument("--like", type=int, help="find neighbors of a row ID from this index")
|
|
190
191
|
sub.add_argument("--query", help="the search text, at most 512 characters")
|
|
191
192
|
sub.add_argument("--plan", type=Path, help="an explicit table-search-plan.v2 file")
|
|
192
193
|
sub.add_argument(
|
|
@@ -1098,16 +1099,27 @@ def _search_query(args: argparse.Namespace, query_client: Any) -> dict[str, Any]
|
|
|
1098
1099
|
raise ThinLaneError("THIN_ARGUMENT_INVALID", f"--page-size must be 1 to {MAX_QUERY_PAGE}")
|
|
1099
1100
|
plan = None if args.plan is None else _read_plan(args.plan)
|
|
1100
1101
|
text = args.query
|
|
1102
|
+
like = getattr(args, "like", None)
|
|
1103
|
+
if like is not None:
|
|
1104
|
+
if not 0 <= like <= 2**53 - 1 or plan is not None or args.mode not in (None, "auto"):
|
|
1105
|
+
raise ThinLaneError(
|
|
1106
|
+
"THIN_ARGUMENT_INVALID",
|
|
1107
|
+
"--like needs a valid row ID and no plan or explicit retrieval mode",
|
|
1108
|
+
)
|
|
1109
|
+
if text is None:
|
|
1110
|
+
text = ""
|
|
1101
1111
|
if text is None:
|
|
1102
1112
|
if plan is None:
|
|
1103
1113
|
raise ThinLaneError("THIN_ARGUMENT_INVALID", "search query needs --query or --plan")
|
|
1104
1114
|
text = plan.get("text")
|
|
1105
|
-
if not isinstance(text, str) or
|
|
1115
|
+
if not isinstance(text, str) or (
|
|
1116
|
+
not text.strip() and plan.get("kind") not in {"browse", "similar"}
|
|
1117
|
+
):
|
|
1106
1118
|
raise ThinLaneError(
|
|
1107
1119
|
"THIN_ARGUMENT_INVALID", "the plan states no text, so pass it with --query"
|
|
1108
1120
|
)
|
|
1109
|
-
elif not text.strip():
|
|
1110
|
-
raise ThinLaneError("THIN_ARGUMENT_INVALID", "--query cannot be
|
|
1121
|
+
elif text and not text.strip():
|
|
1122
|
+
raise ThinLaneError("THIN_ARGUMENT_INVALID", "--query cannot be whitespace")
|
|
1111
1123
|
if len(text) > 512:
|
|
1112
1124
|
raise ThinLaneError("THIN_ARGUMENT_INVALID", "a search query holds at most 512 characters")
|
|
1113
1125
|
body: dict[str, Any] = {
|
|
@@ -1115,6 +1127,8 @@ def _search_query(args: argparse.Namespace, query_client: Any) -> dict[str, Any]
|
|
|
1115
1127
|
"settled": not args.unsettled,
|
|
1116
1128
|
"page_size": page_size,
|
|
1117
1129
|
}
|
|
1130
|
+
if like is not None:
|
|
1131
|
+
body["like"] = like
|
|
1118
1132
|
if args.mode is not None:
|
|
1119
1133
|
body["mode"] = args.mode
|
|
1120
1134
|
if plan is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/agents/openai.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/boundaries.md
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/commands.md
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/live-run.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/one-install.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/promote.md
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/readers.md
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/receipts.md
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/recipe-test.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/skills/mr-data-build/references/transforms.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/__init__.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/agent_protocol.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/canonical.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/key_seam.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/page_coverage.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/session_probes.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/skill_assets.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/table_manifest.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/__init__.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/activity.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/backoff.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/delivery.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/download.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/probe.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/recipe.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/research.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/router.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/runs.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/session.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/stream.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/support.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/transport.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_public.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_query.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_reader.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_runs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_stream.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/thin/v4_tables.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/__init__.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/attendance.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/cloud_auth.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/credentials.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/login.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/path_kind.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/plain_file.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/remediation.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.42 → mostlyright_data-0.31.45}/src/mostlyright/data_harness/ux/render.py
RENAMED
|
File without changes
|