Download this file
| 1 | -- Where each person's Base operations live, and the token Base minted for |
| 2 | -- them, sealed with the instance key. |
| 3 | CREATE TABLE chat_assistant_hosts (person text PRIMARY KEY, origin text, token text, revision integer, updated_at datetime); |
| 4 | -- An Assistant call to a provider waits outside the tool call's |
| 5 | -- transaction: pending (being made), waiting (on an earlier call with the |
| 6 | -- same ledger key) or done. Rows from before have none, and are done. |
| 7 | -- args holds a pending call's arguments until it is done, so the next |
| 8 | -- process can make it after a restart. |
| 9 | ALTER TABLE chat_tool_calls ADD COLUMN state text; |
| 10 | ALTER TABLE chat_tool_calls ADD COLUMN operation text; |
| 11 | ALTER TABLE chat_tool_calls ADD COLUMN ledger_key text; |
| 12 | ALTER TABLE chat_tool_calls ADD COLUMN args text; |
| 13 | CREATE INDEX chat_tool_call_state ON chat_tool_calls(state); |
| 14 | |