Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

15.9 KB
Raw Blame
{
  "_comment": "A turn with work in it: what the agent did, what it said, and what it stopped to ask. Sits beside examples.json rather than inside it because that file is a byte-identical lift and cannot be edited here. `audience` is gone from the contract, so no item carries one any more. `turnEnd` stops the same turn where it stands: nobody answered the permission, so the request closes unanswered and the edit it was waiting on is left unfinished. Deliberately messy, because a tidy turn proves nothing: tools overlap and are revised out of the order they opened in, one title is longer than Slack will take on a task card and one detail is longer than the room left after it, a step is declined rather than failed, and the titles mix prose with the tool-call shape a host is as likely to emit — nothing produces these events yet, so the renderer has to survive both.",
  "initialSnapshot": {
    "contractVersion": 1,
    "throughSequence": 0,
    "session": {
      "sessionId": "session-activity",
      "agentId": "agent-demo",
      "provider": "claude",
      "hostId": "host-demo",
      "epoch": "epoch-activity",
      "status": "running",
      "connectivity": "online",
      "capabilities": {
        "input": "queue",
        "approvals": true,
        "questions": true,
        "interrupt": true,
        "reset": false,
        "compact": false,
        "modelChange": false,
        "attachmentMimeTypes": []
      },
      "pendingRequestIds": []
    },
    "turns": [],
    "items": [],
    "requests": [],
    "commandStatuses": [],
    "nextPageToken": null
  },
  "turnActivity": [
    {
      "contractVersion": 1,
      "eventId": "event-a1",
      "sessionId": "session-activity",
      "sequence": 1,
      "occurredAt": "2026-09-08T09:00:00Z",
      "body": {
        "type": "turn.upsert",
        "turnId": "turn-activity",
        "status": "running",
        "commandId": "message-activity"
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a2",
      "sessionId": "session-activity",
      "sequence": 2,
      "occurredAt": "2026-09-08T09:00:01Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-asked",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "user-message",
          "status": "completed",
          "title": "",
          "text": "The login test has been flaky all week. Can you find out why?",
          "attachments": [],
          "origin": {
            "surface": "slack",
            "actorId": "operator",
            "roomId": "room-activity",
            "threadId": null,
            "messageId": "message-activity"
          }
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a3",
      "sessionId": "session-activity",
      "sequence": 3,
      "occurredAt": "2026-09-08T09:00:04Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-search",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Searching for the login tests",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a4",
      "sessionId": "session-activity",
      "sequence": 4,
      "occurredAt": "2026-09-08T09:00:06Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-read-test",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Read(tests/auth/test_login.py)",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a5",
      "sessionId": "session-activity",
      "sequence": 5,
      "occurredAt": "2026-09-08T09:00:08Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-search",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "completed",
          "title": "Searched for the login tests",
          "text": "4 files",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a6",
      "sessionId": "session-activity",
      "sequence": 6,
      "occurredAt": "2026-09-08T09:00:10Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-read-conftest",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Read(tests/auth/conftest.py)",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a7",
      "sessionId": "session-activity",
      "sequence": 7,
      "occurredAt": "2026-09-08T09:00:12Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-read-test",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "completed",
          "title": "Read(tests/auth/test_login.py)",
          "text": "312 lines",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a8",
      "sessionId": "session-activity",
      "sequence": 8,
      "occurredAt": "2026-09-08T09:00:14Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-grep",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Grep(fixture_user)",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a9",
      "sessionId": "session-activity",
      "sequence": 9,
      "occurredAt": "2026-09-08T09:00:16Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-read-conftest",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "completed",
          "title": "Read(tests/auth/conftest.py)",
          "text": "88 lines",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a10",
      "sessionId": "session-activity",
      "sequence": 10,
      "occurredAt": "2026-09-08T09:00:18Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-grep",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "completed",
          "title": "Grep(fixture_user)",
          "text": "17 matches in 6 files",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a11",
      "sessionId": "session-activity",
      "sequence": 11,
      "occurredAt": "2026-09-08T09:00:20Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-suite",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Bash(uv run --project core pytest core/tests/switch_core/bridges/collaboration/test_session_login_fixture_isolation.py -x -q --no-header)",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a12",
      "sessionId": "session-activity",
      "sequence": 12,
      "occurredAt": "2026-09-08T09:00:22Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-suite",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "failed",
          "title": "Bash(uv run --project core pytest core/tests/switch_core/bridges/collaboration/test_session_login_fixture_isolation.py -x -q --no-header)",
          "text": "1 failed, 41 passed in 12.44s — tests/auth/test_login.py::test_login_rejects_a_stale_session",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a13",
      "sessionId": "session-activity",
      "sequence": 13,
      "occurredAt": "2026-09-08T09:00:24Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-run",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Running tests/auth/test_login.py",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a14",
      "sessionId": "session-activity",
      "sequence": 14,
      "occurredAt": "2026-09-08T09:00:26Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-read-session",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Read(tests/session/test_session.py)",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a15",
      "sessionId": "session-activity",
      "sequence": 15,
      "occurredAt": "2026-09-08T09:00:28Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-run",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "failed",
          "title": "Ran tests/auth/test_login.py",
          "text": "1 failed, 41 passed",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a16",
      "sessionId": "session-activity",
      "sequence": 16,
      "occurredAt": "2026-09-08T09:00:30Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-read-session",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "completed",
          "title": "Read(tests/session/test_session.py)",
          "text": "204 lines",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a17",
      "sessionId": "session-activity",
      "sequence": 17,
      "occurredAt": "2026-09-08T09:00:32Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-blame",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Bash(git log -L :fixture_user:tests/auth/conftest.py)",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a18",
      "sessionId": "session-activity",
      "sequence": 18,
      "occurredAt": "2026-09-08T09:00:34Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-blame",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "declined",
          "title": "Bash(git log -L :fixture_user:tests/auth/conftest.py)",
          "text": "Not permitted in this session",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a19",
      "sessionId": "session-activity",
      "sequence": 19,
      "occurredAt": "2026-09-08T09:00:36Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-said",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "assistant-message",
          "status": "in-progress",
          "title": "",
          "text": "It fails whenever it runs after the session test:",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a20",
      "sessionId": "session-activity",
      "sequence": 20,
      "occurredAt": "2026-09-08T09:00:38Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-said",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "assistant-message",
          "status": "completed",
          "title": "",
          "text": "It fails whenever it runs after the session test: both write to the same fixture user, and only the second one has to notice. Pinning the fixture to one user per test fixes it.",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a21",
      "sessionId": "session-activity",
      "sequence": 21,
      "occurredAt": "2026-09-08T09:00:40Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-write",
          "turnId": "turn-activity",
          "revision": 1,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Editing tests/auth/conftest.py",
          "text": "",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a22",
      "sessionId": "session-activity",
      "sequence": 22,
      "occurredAt": "2026-09-08T09:00:42Z",
      "body": {
        "type": "item.upsert",
        "item": {
          "itemId": "item-write",
          "turnId": "turn-activity",
          "revision": 2,
          "kind": "tool-activity",
          "status": "in-progress",
          "title": "Editing tests/auth/conftest.py",
          "text": "Waiting for permission",
          "attachments": [],
          "origin": null
        }
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-a23",
      "sessionId": "session-activity",
      "sequence": 23,
      "occurredAt": "2026-09-08T09:00:44Z",
      "body": {
        "type": "request.opened",
        "request": {
          "requestId": "request-activity",
          "turnId": "turn-activity",
          "revision": 1,
          "state": "open",
          "content": {
            "kind": "approval",
            "title": "Edit tests/auth/conftest.py?",
            "detail": "Pins the fixture user per test, so the two suites stop sharing one.",
            "options": [
              {
                "optionId": "allow",
                "label": "Edit it",
                "decision": "accept"
              },
              {
                "optionId": "allow-session",
                "label": "Edit tests without asking again",
                "decision": "acceptForSession"
              },
              {
                "optionId": "deny",
                "label": "Leave it alone",
                "decision": "decline"
              }
            ]
          },
          "expiresAt": null
        }
      }
    }
  ],
  "turnEnd": [
    {
      "contractVersion": 1,
      "eventId": "event-z1",
      "sessionId": "session-activity",
      "sequence": 24,
      "occurredAt": "2026-09-08T09:00:46Z",
      "body": {
        "type": "request.settled",
        "requestId": "request-activity",
        "revision": 2,
        "outcome": "interrupted",
        "commandId": null,
        "result": null
      }
    },
    {
      "contractVersion": 1,
      "eventId": "event-z2",
      "sessionId": "session-activity",
      "sequence": 25,
      "occurredAt": "2026-09-08T09:00:48Z",
      "body": {
        "type": "turn.upsert",
        "turnId": "turn-activity",
        "status": "interrupted",
        "commandId": "message-activity"
      }
    }
  ]
}