feat(workbench): land M00–M06 runtime contracts and read-only view
Add capabilities/selection/usage/DocumentView/locator/RunContext with honest probes, LLM messages+cancel, sse-live cancel bridge, and CI workbench_contracts gate; record design evidence for verified slices. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
663a8ba2c0
commit
03396afd02
41 files changed
+2997
-68
No files matched your search
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "marqdo://contracts/DocumentViewV1",
|
||||
"title": "DocumentViewV1",
|
||||
"type": "object",
|
||||
"required": ["schema", "schema_version", "document", "execution", "completeness"],
|
||||
"properties": {
|
||||
"schema": { "const": "DocumentViewV1" },
|
||||
"schema_version": { "const": 1 },
|
||||
"document": {
|
||||
"type": "object",
|
||||
"required": ["id", "source_revision"],
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"source_revision": { "type": "string" },
|
||||
"semantic_digest": { "type": "string" },
|
||||
"generation_id": { "type": ["string", "null"] },
|
||||
"presentation_token": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"execution": {
|
||||
"type": "object",
|
||||
"required": ["state"],
|
||||
"properties": {
|
||||
"state": { "const": "not_run" },
|
||||
"run_id": { "type": ["string", "null"] }
|
||||
}
|
||||
},
|
||||
"completeness": { "enum": ["complete", "partial"] },
|
||||
"render": { "type": "object" },
|
||||
"outline": { "type": "array" },
|
||||
"nodes": { "type": "array" },
|
||||
"refs": { "type": "array" },
|
||||
"diagnostics": { "type": "array" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "marqdo://contracts/KnowledgeLocatorV1",
|
||||
"title": "KnowledgeLocatorV1",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "project_id", "document_id"],
|
||||
"properties": {
|
||||
"schema": { "const": "KnowledgeLocatorV1" },
|
||||
"schema_version": { "const": 1 },
|
||||
"project_id": { "type": "string" },
|
||||
"document_id": { "type": "string" },
|
||||
"source_revision": { "type": ["string", "null"] },
|
||||
"generation_id": { "type": ["string", "null"] },
|
||||
"artifact_id": { "type": ["string", "null"] },
|
||||
"node_id": { "type": ["string", "null"] },
|
||||
"relation": { "type": "string" },
|
||||
"resolution": {
|
||||
"enum": [
|
||||
"resolved",
|
||||
"stale",
|
||||
"unresolved",
|
||||
"ambiguous",
|
||||
"version_unavailable",
|
||||
"unsupported"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "marqdo://contracts/ModelCallUsageV1",
|
||||
"title": "ModelCallUsageV1",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema_version",
|
||||
"call_id",
|
||||
"attempt_id",
|
||||
"run_id",
|
||||
"status",
|
||||
"usage_state",
|
||||
"measurement_source"
|
||||
],
|
||||
"properties": {
|
||||
"schema": { "const": "ModelCallUsageV1" },
|
||||
"schema_version": { "const": 1 },
|
||||
"call_id": { "type": "string", "minLength": 1 },
|
||||
"attempt_id": { "type": "string", "minLength": 1 },
|
||||
"run_id": { "type": "string", "minLength": 1 },
|
||||
"status": {
|
||||
"enum": ["started", "succeeded", "failed", "cancelled", "interrupted"]
|
||||
},
|
||||
"usage_state": { "enum": ["pending", "partial", "final", "unknown"] },
|
||||
"measurement_source": { "enum": ["provider", "estimated", "none"] },
|
||||
"input_tokens": { "type": ["integer", "null"], "minimum": 0 },
|
||||
"output_tokens": { "type": ["integer", "null"], "minimum": 0 },
|
||||
"total_tokens": { "type": ["integer", "null"], "minimum": 0 },
|
||||
"revision": { "type": "integer", "minimum": 1 }
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "marqdo://contracts/ModelSelectionV1",
|
||||
"title": "ModelSelectionV1",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema_version",
|
||||
"selection_id",
|
||||
"provider_id",
|
||||
"model_id",
|
||||
"adapter",
|
||||
"upstream_model_id"
|
||||
],
|
||||
"properties": {
|
||||
"schema": { "const": "ModelSelectionV1" },
|
||||
"schema_version": { "const": 1 },
|
||||
"selection_id": { "type": "string", "minLength": 1 },
|
||||
"provider_id": { "type": "string", "minLength": 1 },
|
||||
"model_id": { "type": "string", "minLength": 1 },
|
||||
"adapter": { "type": "string" },
|
||||
"upstream_model_id": { "type": "string", "minLength": 1 },
|
||||
"provider_revision": { "type": ["integer", "null"] },
|
||||
"model_revision": { "type": ["integer", "null"] },
|
||||
"endpoint_ref": { "type": ["string", "null"] },
|
||||
"credential_ref": { "type": ["string", "null"] },
|
||||
"credential_version": { "type": ["integer", "null"] },
|
||||
"parameters": { "type": "object" },
|
||||
"fallback_policy": { "type": "string" },
|
||||
"auth_mode": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "marqdo://contracts/RuntimeEventV1",
|
||||
"title": "RuntimeEventV1",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema_version",
|
||||
"event_id",
|
||||
"seq",
|
||||
"run_id",
|
||||
"type",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"schema": { "const": "RuntimeEventV1" },
|
||||
"schema_version": { "const": 1 },
|
||||
"event_id": { "type": "string", "minLength": 1 },
|
||||
"seq": { "type": "integer", "minimum": 0 },
|
||||
"run_id": { "type": "string", "minLength": 1 },
|
||||
"type": { "type": "string", "minLength": 1 },
|
||||
"payload": { "type": "object" },
|
||||
"timestamp": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
Reference in new issue
Block a user