Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 153 additions & 0 deletions crates/psyche-core/tests/fixtures/reference-client/profile.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"profile": "psyche.reference-client.profile.v1",
"title": "Psyche reference-client conformance profile",
"issue": "https://github.com/OpenCoven/psyche/issues/13",
"protocol": {
"registry": "psyche.schema.registry.v1",
"supported_major": 1,
"kinds": [
"identity_snapshot",
"intent",
"surface_event",
"graph",
"graph_node",
"delegation",
"budget",
"approval",
"execution_binding",
"evidence",
"verdict",
"recovery",
"addon",
"surface_effect",
"delivery",
"error"
]
},
"vectors": [
{
"id": "positive-intent",
"file": "vectors/positive-intent.json",
"digest": "sha256:524e359a0fbacd053eef01a2da0d62363d8053c8457516db14f66c44d41cd4ed",
"class": "positive",
"kind": "intent",
"persistable": true
},
{
"id": "positive-node",
"file": "vectors/positive-node.json",
"digest": "sha256:8db89dedb1ab2caf3e5362c410a41aade47dff5bfd8fb1d9f1b0339a7162a243",
"class": "positive",
"kind": "graph_node",
"persistable": true
},
{
"id": "positive-surface-event",
"file": "vectors/positive-surface-event.json",
"digest": "sha256:d445b2a5cf1058461bb82bcc7c2e97f265b7c019d99a3f1d99a7a93b9f0b97df",
"class": "positive",
"kind": "surface_event",
"persistable": true
},
{
"id": "positive-surface-effect",
"file": "vectors/positive-surface-effect.json",
"digest": "sha256:7acb7f0b214dd2a8fefd618f3b53e61c76475c7cf84e689d80a22a12b7c9a474",
"class": "positive",
"kind": "surface_effect",
"persistable": true
},
{
"id": "positive-delivery",
"file": "vectors/positive-delivery.json",
"digest": "sha256:a716800e3437a1d09ba36a24ef1da693fd7c787e2a346ab25af155e038c7f3ae",
"class": "positive",
"kind": "delivery",
"persistable": true
},
{
"id": "positive-error-envelope",
"file": "vectors/positive-error-envelope.json",
"digest": "sha256:d315330f8dc6756c2e0b194ddfe787c40eacbdb0f063d0ebffaa55e64056fef2",
"class": "positive",
"kind": "error",
"persistable": false
},
{
"id": "denial-downgrade-major-v0",
"file": "vectors/denial-downgrade-major-v0.json",
"digest": "sha256:b0113ac62eba9d20d18576fac59ac985d20963d07e1954d965f8e93e77b04289",
"class": "denial",
"reason": "unsupported_major",
"major": 0,
"persistable": false
},
{
"id": "denial-unknown-major-v2",
"file": "vectors/denial-unknown-major-v2.json",
"digest": "sha256:d62129f736a34cdeca3913c5dc7196f3592f6a4e4d3383b0f87b4e0ce88d9aa6",
"class": "denial",
"reason": "unsupported_major",
"major": 2,
"persistable": false
},
{
"id": "denial-unknown-kind",
"file": "vectors/denial-unknown-kind.json",
"digest": "sha256:e9b0856ad6892d252159e78c36d0589a4215d158565e1ae7a7900365687d0ad3",
"class": "denial",
"reason": "unknown_schema",
"persistable": false
},
{
"id": "denial-widened-intent",
"file": "vectors/denial-widened-intent.json",
"digest": "sha256:ef9dd00b638121d2610a08569d60a4890c45932c2ca85896412f75eb0ef33434",
"class": "denial",
"reason": "invalid_shape",
"schema": "intent",
"field": "document",
"persistable": false
},
{
"id": "denial-unknown-enum-node-state",
"file": "vectors/denial-unknown-enum-node-state.json",
"digest": "sha256:1423377ce3cabb0c117788ad33dc31216403a54f64022a4a98a0dcb324a0e9ca",
"class": "denial",
"reason": "unknown_enum_value",
"schema": "graph_node",
"field": "state",
"persistable": false
},
{
"id": "denial-unknown-error-code",
"file": "vectors/denial-unknown-error-code.json",
"digest": "sha256:d0bda0cd41ad25437716a2af0080eaf088d67e732cd3a974f2ac50b6e3b44fa0",
"class": "denial",
"reason": "unknown_enum_value",
"schema": "error",
"field": "code",
"persistable": false
},
{
"id": "denial-stale-effect-digest",
"file": "vectors/denial-stale-effect-digest.json",
"digest": "sha256:a30e46a816e345b7b721aff1b272ed55780705b22efad7350da0d16bc0886368",
"class": "denial",
"reason": "invalid_shape",
"schema": "delivery",
"field": "effect_digest",
"persistable": false
},
{
"id": "denial-ambiguous-duplicate-field",
"file": "vectors/denial-ambiguous-duplicate-field.json",
"digest": "sha256:0bd053b48f59b0da2ce7df4794437729bfa5683b355efa6c2b746a97c9ad4053",
"class": "denial",
"reason": "invalid_shape",
"schema": "error",
"field": "json",
"persistable": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"schema_version": "psyche.intent.v1",
"intent_id": "int_01ARZ3NDEKTSV4RRFFQ69G5FAV", "intent_id": "int_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"principal_id": "principal:val",
"familiar_snapshot_id": "ids_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"project_id": "project:sha256:0123456789abcdef",
"requested_outcome": "Review and verify the scoped change.",
"constraints": {},
"required_evidence": ["tests", "diff_review"],
"surface_event_id": null,
"created_at": "2026-08-01T00:00:00Z",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"schema_version": "psyche.intent.v0",
"intent_id": "int_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"principal_id": "principal:val",
"familiar_snapshot_id": "ids_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"project_id": "project:sha256:0123456789abcdef",
"requested_outcome": "Review and verify the scoped change.",
"constraints": {},
"required_evidence": ["tests", "diff_review"],
"surface_event_id": null,
"created_at": "2026-08-01T00:00:00Z",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"schema_version": "psyche.delivery.v1",
"delivery_id": "del_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"intent_id": "int_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"action_class": "telegram.reply.send",
"account_id": "main",
"chat_id": "-1001234567890",
"topic": {"kind": "forum", "id": "42"},
"relationship": "reply_same_topic",
"effect": {
"schema_version": "psyche.telegram_effect.v1",
"type": "send_message",
"format": "html",
"text": "Review complete!!",
"reply_to_message_id": "314",
"buttons": [],
"link_preview": {"enabled": true}
},
"effect_digest": "sha256:26fae759f51eafdfa1277616327d942068948182fb0aaa6b34bbedb0a8ca7dc7",
"surface_decision": {
"decision_id": "decision_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"request_digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"policy_revision": "policy:sha256:0123456789abcdef",
"expires_at": "2026-08-01T00:05:00Z",
"state": "reserved"
},
"logical_response_id": "response_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"logical_part": 0,
"state": "ready",
"attempt_count": 0,
"telegram_message_id": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"schema_version": "psyche.graph_node.v1",
"node_id": "nod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"graph_id": "grf_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"familiar_snapshot_id": "ids_01C3F7YQ4R2M8N6P5K1J9H0GTS",
"dependencies": [],
"delegation_id": null,
"budget_id": "bud_01D4G8ZR5S3N9P7Q6M2K0J1HTV",
"required_evidence": ["tests", "diff_review"],
"state": "done",
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"schema_version": "psyche.error.v1",
"error": {
"code": "storage_broken",
"message": "Storage is temporarily unavailable.",
"retryable": true,
"correlation_id": "corr-storage-1",
"details": {
"component": "sqlite",
"operation": "write"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"schema_version": "psyche.task.v1",
"task_id": "task-7f3a",
"cockpit_pane_id": "pane-1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"schema_version": "psyche.intent.v2",
"intent_id": "int_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"principal_id": "principal:val",
"familiar_snapshot_id": "ids_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"project_id": "project:sha256:0123456789abcdef",
"requested_outcome": "Review and verify the scoped change.",
"constraints": {},
"required_evidence": ["tests", "diff_review"],
"surface_event_id": null,
"created_at": "2026-08-01T00:00:00Z",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"schema_version": "psyche.intent.v1",
"intent_id": "int_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"principal_id": "principal:val",
"familiar_snapshot_id": "ids_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"project_id": "project:sha256:0123456789abcdef",
"requested_outcome": "Review and verify the scoped change.",
"constraints": {},
"cockpit_task_id": "task-7f3a",
"required_evidence": ["tests", "diff_review"],
"surface_event_id": null,
"created_at": "2026-08-01T00:00:00Z",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"schema_version": "psyche.delivery.v1",
"delivery_id": "del_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"intent_id": "int_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"action_class": "telegram.reply.send",
"account_id": "main",
"chat_id": "-1001234567890",
"topic": {"kind": "forum", "id": "42"},
"relationship": "reply_same_topic",
"effect": {
"schema_version": "psyche.telegram_effect.v1",
"type": "send_message",
"format": "html",
"text": "Review complete.",
"reply_to_message_id": "314",
"buttons": [],
"link_preview": {"enabled": true}
},
"effect_digest": "sha256:26fae759f51eafdfa1277616327d942068948182fb0aaa6b34bbedb0a8ca7dc7",
"surface_decision": {
"decision_id": "decision_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"request_digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"policy_revision": "policy:sha256:0123456789abcdef",
"expires_at": "2026-08-01T00:05:00Z",
"state": "reserved"
},
"logical_response_id": "response_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"logical_part": 0,
"state": "ready",
"attempt_count": 0,
"telegram_message_id": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"schema_version": "psyche.error.v1",
"error": {
"code": "storage_unavailable",
"message": "Storage is temporarily unavailable.",
"retryable": true,
"correlation_id": "corr-storage-1",
"details": {
"component": "sqlite",
"operation": "write"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"schema_version": "psyche.intent.v1",
"intent_id": "int_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"principal_id": "principal:val",
"familiar_snapshot_id": "ids_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"project_id": "project:sha256:0123456789abcdef",
"requested_outcome": "Review and verify the scoped change.",
"constraints": {},
"required_evidence": ["tests", "diff_review"],
"surface_event_id": null,
"created_at": "2026-08-01T00:00:00Z",
"digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"schema_version": "psyche.graph_node.v1",
"node_id": "nod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"graph_id": "grf_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"familiar_snapshot_id": "ids_01C3F7YQ4R2M8N6P5K1J9H0GTS",
"dependencies": [],
"delegation_id": null,
"budget_id": "bud_01D4G8ZR5S3N9P7Q6M2K0J1HTV",
"required_evidence": ["tests", "diff_review"],
"state": "ready",
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schema_version": "psyche.surface_effect.v1",
"surface_effect_id": "sfx_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"intent_id": "int_01BX5ZZKBKACTAV9WEVGEMMVRZ",
"graph_id": "grf_01C3F7YQ4R2M8N6P5K1J9H0GTS",
"node_id": "nod_01D4G8ZR5S3N9P7Q6M2K0J1HTV",
"attempt_id": "att_01E5H90S6T4P0Q8R7N3M1K2JVW",
"familiar_snapshot_id": "ids_01F6JA1T7V5Q1R9S8P4N2M3KWX",
"project_id": "project:sha256:0123456789abcdef",
"action_class": "telegram.reply.send",
"account_id": "main",
"locator": {"chat_id": "-100123", "message_id": "42"},
"effect": {"type": "message", "text": "Review complete."},
"effect_digest": "sha256:c16ac6fce1ddecbddc6bf0b51544975741901289ec2248ddeffe6951fc8be995",
"created_at": "2026-08-01T00:01:00Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"schema_version": "psyche.surface_event.v1",
"surface_event_id": "sev_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"adapter_id": "telegram",
"account_id": "main",
"actor": {"type": "user", "id": "123"},
"locator": {"type": "message", "chat_id": "-100123", "message_id": "42"},
"adapter_event_digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"received_at": "2026-08-01T00:00:00Z",
"content": {"type": "text", "text": "Please review this."}
}
Loading