Repository navigation
Document the read_document_history context action #362
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ | |
| "post": { | ||
| "operationId": "contextOperation", | ||
| "summary": "Ingest, read, or compile context briefs", | ||
| "description": "Save reusable music context, read progress, or compile a task-specific evidence brief. This reference documents the ingestion, read, brief, save_brief and read_brief actions of the shared HTTP/MCP operation. Brief compilation combines up to ten completed or partial requests in one authorized workspace, reuses saved evidence without provider or model calls, and returns bounded Markdown plus the selected input versions. Creative direction prioritizes lyrics and artwork; playlist pitching prioritizes catalog/audio metadata. Shared artist evidence appears once, with coverage reported separately for each request. Briefs are evidence packets, not generated creative concepts or finished outreach. Inspect readiness, request_coverage and gaps. The brief action is read-only; use save_brief with the same inputs and an idempotency_key to freeze the server-compiled output, then read_brief with its brief_id to retrieve it without recompilation. A newer document revision marks the snapshot superseded without rewriting it. Withdrawn/unavailable evidence, cancelled requests, or removed subject scope withhold the payload. Saving rechecks current evidence before committing. Apply the companion snapshot migration before using save_brief/read_brief. Ingestion dispatches a durable workflow; retry the same input and idempotency key after dispatch failure.", | ||
| "description": "Save reusable music context, read progress, or compile a task-specific evidence brief. This reference documents the ingestion, read, brief, save_brief and read_brief actions of the shared HTTP/MCP operation. Brief compilation combines up to ten completed or partial requests in one authorized workspace, reuses saved evidence without provider or model calls, and returns bounded Markdown plus the selected input versions. Creative direction prioritizes lyrics and artwork; playlist pitching prioritizes catalog/audio metadata. Shared artist evidence appears once, with coverage reported separately for each request. Briefs are evidence packets, not generated creative concepts or finished outreach. Inspect readiness, request_coverage and gaps. The brief action is read-only; use save_brief with the same inputs and an idempotency_key to freeze the server-compiled output, then read_brief with its brief_id to retrieve it without recompilation. A newer document revision marks the snapshot superseded without rewriting it. Withdrawn/unavailable evidence, cancelled requests, or removed subject scope withhold the payload. Saving rechecks current evidence before committing. Apply the companion snapshot migration before using save_brief/read_brief. Ingestion dispatches a durable workflow; retry the same input and idempotency key after dispatch failure. read_document_history reads the immutable revision history of one saved context document in the authorized workspace, without provider or model calls.", | ||
| "security": [ | ||
| { | ||
| "ApiKey": [] | ||
|
|
@@ -253,6 +253,42 @@ | |
| "description": "Optional organization that owns the private context. Current membership is checked." | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "action", | ||
| "document_id" | ||
| ], | ||
| "properties": { | ||
| "action": { | ||
| "type": "string", | ||
| "const": "read_document_history" | ||
| }, | ||
| "document_id": { | ||
| "type": "string", | ||
| "format": "uuid", | ||
| "description": "A context document ID from a brief or saved brief response: documents[].id or input_manifest.documents[].documentId." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The new Prompt for AI agents |
||
| }, | ||
| "organization_id": { | ||
| "type": "string", | ||
| "format": "uuid", | ||
| "description": "Optional organization that owns the private context. Current membership is checked." | ||
| }, | ||
| "before_revision": { | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "description": "Exclusive cursor: return revisions below this number. Use next_before from the previous page; revision 0 is never recorded." | ||
| }, | ||
| "limit": { | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "maximum": 100, | ||
| "default": 50, | ||
| "description": "Page size, newest revision first." | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
|
|
@@ -284,6 +320,14 @@ | |
| "action": "read_brief", | ||
| "brief_id": "33333333-3333-4333-8333-333333333333" | ||
| } | ||
| }, | ||
| "readDocumentHistory": { | ||
| "summary": "Read the revision history of one saved document", | ||
| "value": { | ||
| "action": "read_document_history", | ||
| "document_id": "44444444-4444-4444-8444-444444444444", | ||
| "limit": 20 | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -294,7 +338,7 @@ | |
| "description": "Saved ingestion request; inspect request.status and use read to poll. Existing completed/partial requests return without provider work." | ||
| }, | ||
| "200": { | ||
| "description": "Read returns request. Brief returns request_id, request_ids, purpose, readiness, bounded Markdown text and text_characters, documents and their serialized characters count, missingTopics, guidance, gaps, request_coverage, and input_manifest. Each coverage entry includes requestId, readiness and missingTopics; overall readiness remains partial if any request has a gap or partial evidence. The manifest includes compilerVersion, method, requestIds, excludedTopics, and selected documents with documentId, resultId (null only if unavailable), subjectId, topic, version and sourceVersionIds. The result is returned without creating a saved brief record. Save/read brief return {snapshot: {id, created_at, purpose, state, superseded, brief}}. state is saved or unavailable; unavailable snapshots return brief: null. saved snapshots return the exact compiled response including its input manifest. Another workspace cannot read the record." | ||
| "description": "Read returns request. Brief returns request_id, request_ids, purpose, readiness, bounded Markdown text and text_characters, documents and their serialized characters count, missingTopics, guidance, gaps, request_coverage, and input_manifest. Each coverage entry includes requestId, readiness and missingTopics; overall readiness remains partial if any request has a gap or partial evidence. The manifest includes compilerVersion, method, requestIds, excludedTopics, and selected documents with documentId, resultId (null only if unavailable), subjectId, topic, version and sourceVersionIds. The result is returned without creating a saved brief record. Save/read brief return {snapshot: {id, created_at, purpose, state, superseded, brief}}. state is saved or unavailable; unavailable snapshots return brief: null. saved snapshots return the exact compiled response including its input manifest. Another workspace cannot read the record. read_document_history returns {state, document, versions, has_more, next_before}. state is found or not_found; another workspace's or an unknown document is not_found with document: null and no versions, never confirming existence. document carries id, subject_id, topic, current_revision, current_result_id and updated_at. versions are newest first; each has revision, result_id (null for a cleared revision), change (accepted or cleared), backfilled, recorded_at, the result's current result_status and evidence_kind, source_version_ids and source_state (live, withdrawn, removed, or null when cleared). A superseded brief's manifest version resolves to the result that was current at that revision. History rows are immutable; the current pointer stays on the document. Apply the companion document-version migration before using read_document_history." | ||
| }, | ||
| "400": { | ||
| "description": "Invalid input" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The operation description still enumerates the documented actions as "ingestion, read, brief, save_brief and read_brief" while the same PR adds and documents
read_document_history. Update the enumeration to includeread_document_historyso the contract's action list matches the new oneOf variant.Prompt for AI agents