Skip to content
Merged
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
471 changes: 471 additions & 0 deletions designs/protocol/agent-control-api-atem.md

Large diffs are not rendered by default.

807 changes: 805 additions & 2 deletions designs/protocol/atem-session-v1.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
{
"name": "r8-approval-answer-with-acquire-is-refused",
"requires": "r8",
"setup": {
"host": {
"account_id": "account-a",
"atem_device_id": "host-a",
"host_trust_gen": 1,
"runtime_gen": "55555555-5555-4555-8555-555555555555",
"runtime_epoch": 7
},
"sessions": [
{
"session_id": "ses-aaaaaaaaaaaa",
"process_gen": "22222222-2222-4222-8222-222222222222",
"chat": true
}
],
"clients": [
{
"name": "c1",
"attachment_gen": "33333333-3333-4333-8333-333333333333",
"permissions": [
"view",
"control"
],
"client_kind": "native",
"holds_lease_epoch": 1
},
{
"name": "c2",
"attachment_gen": "66666666-6666-4666-8666-666666666666",
"permissions": [
"view",
"control"
],
"client_kind": "native"
}
]
},
"steps": [
{
"send": "c2",
"json": {
"type": "session",
"data": {
"v": 1,
"op": "list",
"id": "11111111-1111-4111-8111-000000000001"
}
}
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "sessions",
"re": "11111111-1111-4111-8111-000000000001",
"sessions.#": 1
}
},
{
"open_approval": "ses-aaaaaaaaaaaa",
"tool": "Bash",
"summary": "npm test",
"always_rules": [
{
"rule_id": "r-npm-test",
"label": "Bash(npm test:*)",
"scope": "this project"
}
]
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "approval_request",
"session_id": "ses-aaaaaaaaaaaa",
"process_gen": "22222222-2222-4222-8222-222222222222",
"tool": "Bash",
"summary": "npm test",
"always_rules": [
{
"rule_id": "r-npm-test",
"label": "Bash(npm test:*)",
"scope": "this project"
}
]
},
"capture": {
"a1": "approval_id"
}
},
{
"send": "c2",
"json": {
"type": "session",
"data": {
"v": 1,
"op": "submit",
"id": "11111111-1111-4111-8111-000000000002",
"binding": {
"target": {
"account_id": "account-a",
"atem_device_id": "host-a",
"host_trust_gen": 1,
"session_id": "ses-aaaaaaaaaaaa",
"process_gen": "22222222-2222-4222-8222-222222222222"
},
"attachment_gen": "66666666-6666-4666-8666-666666666666"
},
"request_id": "44444444-4444-4444-8444-000000000001",
"kind": "approval",
"payload": {
"approval_id": "${a1}",
"decision": "allow_once",
"acquire": true
}
}
}
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "error",
"re": "11111111-1111-4111-8111-000000000002",
"code": "unsupported_version"
}
},
{
"send": "c2",
"json": {
"type": "session",
"data": {
"v": 1,
"op": "submit",
"id": "11111111-1111-4111-8111-000000000003",
"binding": {
"target": {
"account_id": "account-a",
"atem_device_id": "host-a",
"host_trust_gen": 1,
"session_id": "ses-aaaaaaaaaaaa",
"process_gen": "22222222-2222-4222-8222-222222222222"
},
"attachment_gen": "66666666-6666-4666-8666-666666666666"
},
"request_id": "44444444-4444-4444-8444-000000000001",
"kind": "approval",
"payload": {
"approval_id": "${a1}",
"decision": "allow_once"
},
"acquire": true
}
}
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "error",
"re": "11111111-1111-4111-8111-000000000003",
"code": "unsupported_version"
}
},
{
"expect_none": "c1",
"for_ms": 0
},
{
"expect_none": "c2",
"for_ms": 0
},
{
"assert": {
"lease_holder": "c1",
"approvals_pending": 1,
"dispatch_attempts": 0,
"receipts_visible": {
"c2": 0
}
}
},
{
"send": "c2",
"json": {
"type": "session",
"data": {
"v": 1,
"op": "submit",
"id": "11111111-1111-4111-8111-000000000004",
"binding": {
"target": {
"account_id": "account-a",
"atem_device_id": "host-a",
"host_trust_gen": 1,
"session_id": "ses-aaaaaaaaaaaa",
"process_gen": "22222222-2222-4222-8222-222222222222"
},
"attachment_gen": "66666666-6666-4666-8666-666666666666"
},
"request_id": "44444444-4444-4444-8444-000000000001",
"kind": "approval",
"payload": {
"approval_id": "${a1}",
"decision": "allow_once"
}
}
}
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "receipt",
"request_id": "44444444-4444-4444-8444-000000000001",
"state": "accepted",
"re": "11111111-1111-4111-8111-000000000004",
"kind": "approval"
}
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "receipt",
"request_id": "44444444-4444-4444-8444-000000000001",
"state": "executing"
}
},
{
"expect": "c2",
"type": "session",
"match": {
"op": "approval_closed",
"approval_id": "${a1}",
"reason": "answered_remote"
}
},
{
"expect_none": "c1",
"for_ms": 0
},
{
"assert": {
"lease_holder": "c1",
"approvals_pending": 0,
"approval_decisions": [
{
"approval_id": "${a1}",
"decision": "allow_once"
}
]
}
}
],
"note": "acquire on an approval answer is a removed form in r8 (it took the lease in r7): in the payload or beside it, it is refused unsupported_version with no effect: the approval stays pending, nothing is recorded or handed over, the lease does not move. The plain answer then works without the lease."
}
Loading