Skip to content
43 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002)1-- Every workspace's built-in orchestrator, @g1t (docs/WORKSPACE.md, "g1t,
2-- the orchestrator"): an ordinary agent row marked builtin, made the first
3-- time the workspace's agents are asked for. One per workspace.
4ALTER TABLE agents ADD COLUMN builtin INTEGER NOT NULL DEFAULT 0;
5
6CREATE UNIQUE INDEX agents_builtin ON agents (workspace_id) WHERE builtin = 1;
7
8-- Each agent's face: the seed its generated pixel avatar is drawn from,
9-- set from the handle when it is made. Empty on older rows: the handle.
10ALTER TABLE agents ADD COLUMN avatar_seed TEXT NOT NULL DEFAULT '';
11
12-- Agents are hired into roles, not tasks (docs/WORKSPACE.md, "Roles, not
13-- tasks"): a title, a team (by slug) or a department label, a list of
14-- responsibilities and the subagents they keep (JSON lists), and whether
15-- they face the workspace's own people or customers (only `internal` yet).
16ALTER TABLE agents ADD COLUMN title TEXT NOT NULL DEFAULT '';
17ALTER TABLE agents ADD COLUMN team TEXT;
18ALTER TABLE agents ADD COLUMN department TEXT NOT NULL DEFAULT '';
19ALTER TABLE agents ADD COLUMN responsibilities TEXT NOT NULL DEFAULT '[]';
20ALTER TABLE agents ADD COLUMN subagents TEXT NOT NULL DEFAULT '[]';
21ALTER TABLE agents ADD COLUMN faces TEXT NOT NULL DEFAULT 'internal';
22
23-- Every read tool call a reply made (docs/WORKSPACE.md, "What an agent can
24-- and can't know", rule 7): the agent, who asked, a fingerprint of the
25-- audience, the tool and its arguments (long text cut), and whether it was
26-- read or withheld, with how much came back.
27CREATE TABLE agent_tool_calls (
28 id TEXT PRIMARY KEY,
29 reply_id TEXT NOT NULL,
30 agent_id TEXT NOT NULL,
31 workspace_id TEXT NOT NULL,
32 asked_by TEXT,
33 tool TEXT NOT NULL,
34 args TEXT NOT NULL,
35 audience_hash TEXT NOT NULL,
36 -- allowed, withheld, refused (a rail: the call budget, the hop limit, no ping-pong) or error.
37 outcome TEXT NOT NULL,
38 bytes INTEGER NOT NULL DEFAULT 0,
39 created_at TEXT NOT NULL
40);
41
42CREATE INDEX agent_tool_calls_reply ON agent_tool_calls (reply_id);
43CREATE INDEX agent_tool_calls_agent ON agent_tool_calls (agent_id, created_at);

This file's history is long; its oldest lines are credited to the oldest commit read.