toolroll 0.9.63 → 0.9.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/README.md +15 -5
- package/dist/acp-agents.d.ts +43 -0
- package/dist/acp-agents.js +62 -0
- package/dist/acp-attest.d.ts +44 -0
- package/dist/acp-attest.js +269 -0
- package/dist/acp-check.d.ts +28 -0
- package/dist/acp-check.js +410 -0
- package/dist/acp-client.d.ts +163 -0
- package/dist/acp-client.js +738 -0
- package/dist/acp-inspect.d.ts +23 -0
- package/dist/acp-inspect.js +109 -0
- package/dist/agent-board.d.ts +19 -6
- package/dist/agent-board.js +30 -9
- package/dist/agent-fence.d.ts +50 -2
- package/dist/agent-fence.js +157 -10
- package/dist/agent-pulse.js +9 -2
- package/dist/agent-state-words.d.ts +19 -0
- package/dist/agent-state-words.js +20 -0
- package/dist/agent-state.d.ts +65 -0
- package/dist/agent-state.js +229 -0
- package/dist/agentconfig.js +36 -13
- package/dist/agents-board.d.ts +34 -2
- package/dist/agents-board.js +110 -1
- package/dist/approval-rules-ui.js +2 -2
- package/dist/assignment-delivery.d.ts +14 -0
- package/dist/assignment-delivery.js +13 -0
- package/dist/assignment.js +13 -0
- package/dist/attest.js +7 -0
- package/dist/backup-ui.js +2 -2
- package/dist/browser/THIRD_PARTY_NOTICES.txt +48 -0
- package/dist/browser/terminal.css +37 -0
- package/dist/browser/terminal.js +117 -0
- package/dist/browser/workspace.css +2 -2
- package/dist/browser/workspace.js +42 -38
- package/dist/browser-shell.js +6 -3
- package/dist/browser-workspace.d.ts +235 -1
- package/dist/browser-workspace.js +60 -0
- package/dist/builder.d.ts +6 -1
- package/dist/builder.js +34 -13
- package/dist/chat-actions.d.ts +13 -1
- package/dist/chat-actions.js +197 -15
- package/dist/chat-ask.d.ts +4 -0
- package/dist/chat-ask.js +14 -0
- package/dist/chat-channel.js +20 -0
- package/dist/chat-continuity.js +5 -4
- package/dist/chat-decide.d.ts +0 -14
- package/dist/chat-decide.js +4 -1
- package/dist/chat-delivery.d.ts +9 -0
- package/dist/chat-delivery.js +45 -6
- package/dist/chat-messages.d.ts +8 -0
- package/dist/chat-messages.js +36 -4
- package/dist/check-levels-ui.js +2 -2
- package/dist/checkout-proof.d.ts +28 -0
- package/dist/checkout-proof.js +62 -0
- package/dist/claim.d.ts +12 -0
- package/dist/claim.js +19 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +4 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +21 -2
- package/dist/coding-ui.js +6 -4
- package/dist/console-instance.d.ts +124 -0
- package/dist/console-instance.js +337 -0
- package/dist/contracts/chat-actions.d.ts +16 -0
- package/dist/contracts/chat-actions.js +4 -0
- package/dist/contracts/chat-content.d.ts +19 -0
- package/dist/contracts/chat-content.js +6 -0
- package/dist/contracts/console-api.d.ts +12 -4
- package/dist/contracts/console-api.js +12 -4
- package/dist/contracts/flow-card.d.ts +4 -0
- package/dist/contracts/flow-card.js +3 -0
- package/dist/contracts/flow.d.ts +46 -0
- package/dist/contracts/flow.js +11 -2
- package/dist/contracts/lead-tools.d.ts +92 -0
- package/dist/contracts/lead-tools.js +13 -0
- package/dist/contracts/provider.d.ts +11 -1
- package/dist/contracts/provider.js +1 -1
- package/dist/contracts/route.d.ts +76 -1
- package/dist/contracts/route.js +1 -1
- package/dist/contracts/store-json.d.ts +2 -0
- package/dist/control-setup.d.ts +1 -1
- package/dist/control-ui.js +2 -2
- package/dist/converse.d.ts +16 -0
- package/dist/converse.js +32 -4
- package/dist/demo-chat.js +4 -4
- package/dist/demo.js +2 -2
- package/dist/desktop-update-gate.js +6 -0
- package/dist/desktop-update.d.ts +1 -1
- package/dist/discord-chat.js +4 -1
- package/dist/doctor.js +1 -1
- package/dist/egress-bridge.d.ts +17 -0
- package/dist/egress-bridge.js +111 -0
- package/dist/egress.d.ts +119 -0
- package/dist/egress.js +423 -0
- package/dist/exec.d.ts +78 -0
- package/dist/exec.js +367 -9
- package/dist/export-ui.js +2 -2
- package/dist/flow-engine.js +24 -5
- package/dist/flow-gallery-ui.js +2 -2
- package/dist/flow-gallery.js +27 -8
- package/dist/flow-share.js +16 -5
- package/dist/flow-triggers.d.ts +77 -8
- package/dist/flow-triggers.js +517 -70
- package/dist/flows-cli.js +8 -2
- package/dist/flows-ui.d.ts +0 -2
- package/dist/flows-ui.js +52 -4
- package/dist/flows.d.ts +4 -0
- package/dist/flows.js +9 -1
- package/dist/html.d.ts +9 -0
- package/dist/html.js +11 -0
- package/dist/invoke.d.ts +17 -0
- package/dist/invoke.js +217 -21
- package/dist/keys.d.ts +18 -14
- package/dist/keys.js +5 -0
- package/dist/lead-capabilities.js +3 -2
- package/dist/lead-contract.js +2 -0
- package/dist/lead-doors.d.ts +2 -0
- package/dist/lead-doors.js +7 -0
- package/dist/lead-follow.d.ts +2 -0
- package/dist/lead-follow.js +58 -2
- package/dist/lead-progress.js +1 -0
- package/dist/lead-queue-runtime.d.ts +46 -0
- package/dist/lead-queue-runtime.js +191 -0
- package/dist/lead-queue.d.ts +104 -0
- package/dist/lead-queue.js +187 -0
- package/dist/lead-sweep.d.ts +67 -0
- package/dist/lead-sweep.js +99 -0
- package/dist/lead-tools.d.ts +22 -0
- package/dist/lead-tools.js +152 -1
- package/dist/lead.d.ts +13 -5
- package/dist/lead.js +89 -29
- package/dist/limits-ui.d.ts +8 -1
- package/dist/limits-ui.js +26 -0
- package/dist/live-bus.d.ts +8 -0
- package/dist/live-bus.js +40 -4
- package/dist/live-detail.d.ts +27 -0
- package/dist/live-detail.js +57 -0
- package/dist/live-notes.d.ts +20 -0
- package/dist/live-notes.js +47 -0
- package/dist/live-records.d.ts +140 -0
- package/dist/live-records.js +935 -0
- package/dist/live-terminal.d.ts +258 -0
- package/dist/live-terminal.js +649 -0
- package/dist/live.d.ts +38 -27
- package/dist/live.js +142 -124
- package/dist/mcp-oauth.d.ts +6 -3
- package/dist/mcp-oauth.js +8 -4
- package/dist/memory-pass.js +2 -2
- package/dist/mobile-viewport.d.ts +5 -1
- package/dist/mobile-viewport.js +18 -2
- package/dist/model-catalog.js +4 -0
- package/dist/monitoring-ui.js +2 -2
- package/dist/needs-you.d.ts +1 -1
- package/dist/needs-you.js +11 -4
- package/dist/operate.d.ts +2 -0
- package/dist/operate.js +275 -17
- package/dist/passwordless.d.ts +23 -0
- package/dist/passwordless.js +26 -0
- package/dist/peek-cli.d.ts +12 -4
- package/dist/peek-cli.js +19 -11
- package/dist/phase-routing.js +10 -3
- package/dist/planner-source.d.ts +3 -0
- package/dist/planner-source.js +14 -0
- package/dist/planner.d.ts +2 -1
- package/dist/planner.js +7 -1
- package/dist/policy-ui.js +2 -2
- package/dist/policy.d.ts +1 -20
- package/dist/policy.js +29 -2
- package/dist/project-delete-ui.d.ts +12 -0
- package/dist/project-delete-ui.js +41 -9
- package/dist/project-delete.js +2 -2
- package/dist/project-memory.d.ts +3 -1
- package/dist/project-memory.js +57 -25
- package/dist/project-tools.d.ts +5 -3
- package/dist/project-tools.js +12 -9
- package/dist/provider-auth.d.ts +4 -3
- package/dist/provider-auth.js +5 -4
- package/dist/provider-connection.d.ts +2 -1
- package/dist/provider-connection.js +5 -0
- package/dist/provider.d.ts +25 -2
- package/dist/provider.js +63 -9
- package/dist/pull-request-ui.js +2 -2
- package/dist/push.js +1 -1
- package/dist/quick-start.d.ts +24 -0
- package/dist/quick-start.js +127 -0
- package/dist/release.d.ts +3 -0
- package/dist/release.js +14 -8
- package/dist/request-budget-ui.js +2 -2
- package/dist/result-review.d.ts +1 -1
- package/dist/result-review.js +9 -3
- package/dist/retention-ui.js +2 -2
- package/dist/retention.js +10 -1
- package/dist/run-efficiency.d.ts +73 -0
- package/dist/run-efficiency.js +228 -0
- package/dist/runner.d.ts +5 -1
- package/dist/runner.js +22 -1
- package/dist/scope.d.ts +170 -5
- package/dist/scope.js +251 -31
- package/dist/scout-net.d.ts +4 -1
- package/dist/scout-net.js +37 -12
- package/dist/scout.d.ts +20 -6
- package/dist/scout.js +27 -3
- package/dist/serve.js +247 -40
- package/dist/server/chat.d.ts +1 -1
- package/dist/server/chat.js +122 -31
- package/dist/server/chrome.d.ts +6 -1
- package/dist/server/chrome.js +18 -7
- package/dist/server/console.css +52 -38
- package/dist/server/flows.js +38 -8
- package/dist/server/guards.d.ts +1 -0
- package/dist/server/guards.js +23 -9
- package/dist/server/http.d.ts +7 -0
- package/dist/server/http.js +3 -2
- package/dist/server/live.d.ts +34 -1
- package/dist/server/live.js +39 -17
- package/dist/server/pages-assets.js +5 -0
- package/dist/server/pages.js +90 -13
- package/dist/server/people-tokens.d.ts +3 -0
- package/dist/server/people-tokens.js +55 -17
- package/dist/server/remote-hooks.js +12 -6
- package/dist/server/remote.d.ts +2 -1
- package/dist/server/remote.js +14 -5
- package/dist/server/render-chat.d.ts +12 -3
- package/dist/server/render-chat.js +47 -16
- package/dist/server/render-pages.d.ts +4 -1
- package/dist/server/render-pages.js +5 -4
- package/dist/server/render-people.d.ts +3 -2
- package/dist/server/render-people.js +3 -2
- package/dist/server/render-results.d.ts +18 -2
- package/dist/server/render-results.js +37 -28
- package/dist/server/render-settings.js +6 -5
- package/dist/server/render-tasks.d.ts +35 -10
- package/dist/server/render-tasks.js +110 -27
- package/dist/server/request-context.d.ts +2 -0
- package/dist/server/request-context.js +2 -1
- package/dist/server/route-table.d.ts +3 -0
- package/dist/server/route-table.js +46 -5
- package/dist/server/runtime.d.ts +33 -2
- package/dist/server/session.d.ts +25 -1
- package/dist/server/session.js +18 -4
- package/dist/server/settings.js +121 -10
- package/dist/server/sweeps.d.ts +4 -0
- package/dist/server/sweeps.js +58 -0
- package/dist/server/task-views.d.ts +2 -1
- package/dist/server/task-views.js +96 -6
- package/dist/server/tasks.js +320 -74
- package/dist/server/terminals.d.ts +31 -0
- package/dist/server/terminals.js +365 -0
- package/dist/setup-guide.js +3 -2
- package/dist/slack-chat.js +4 -1
- package/dist/spend-ui.js +3 -3
- package/dist/spend.js +2 -1
- package/dist/steer-capabilities.d.ts +32 -0
- package/dist/steer-capabilities.js +60 -0
- package/dist/steer-controls.d.ts +14 -0
- package/dist/steer-controls.js +36 -0
- package/dist/steer-status.js +2 -2
- package/dist/storage-ui.js +4 -4
- package/dist/store-baseline.d.ts +1 -1
- package/dist/store-baseline.js +1 -1
- package/dist/store.d.ts +430 -15
- package/dist/store.js +1041 -52
- package/dist/subagent-desk.js +1 -1
- package/dist/summary.js +3 -0
- package/dist/task-source.d.ts +58 -0
- package/dist/task-source.js +93 -0
- package/dist/team-leads.js +1 -1
- package/dist/teams-chat.js +4 -1
- package/dist/telegram-lead.d.ts +3 -0
- package/dist/telegram-lead.js +44 -7
- package/dist/telegram.d.ts +11 -2
- package/dist/telegram.js +51 -17
- package/dist/terminal-catalog.d.ts +11 -0
- package/dist/terminal-catalog.js +129 -0
- package/dist/text-limits.d.ts +2 -0
- package/dist/text-limits.js +2 -0
- package/dist/tool-broker.d.ts +2 -0
- package/dist/tool-broker.js +1 -0
- package/dist/toolroll-update-ui.js +2 -2
- package/dist/toolroll-update.js +13 -3
- package/dist/tools-ui.js +2 -2
- package/dist/webhook-limits.d.ts +23 -0
- package/dist/webhook-limits.js +30 -0
- package/dist/webhook-readers.d.ts +56 -0
- package/dist/webhook-readers.js +138 -0
- package/dist/webhook-signing.d.ts +27 -0
- package/dist/webhook-signing.js +119 -0
- package/dist/work-index.d.ts +29 -0
- package/dist/work-index.js +16 -2
- package/dist/workspace-revision.js +3 -1
- package/package.json +11 -2
package/dist/store.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type ProjectNetwork, type RunNetworkRecord } from "./egress.js";
|
|
2
|
+
import { type AcpLaunch } from "./acp-attest.js";
|
|
1
3
|
import { type ChatBinding } from "./chat-core.js";
|
|
2
4
|
import { ChatMessages, TELEGRAM_HOLD_REASONS, TELEGRAM_SKIPPED_ELSEWHERE, TELEGRAM_SKIPPED_OTHER_CHAT, TELEGRAM_SKIPPED_QUIET } from "./chat-messages.js";
|
|
3
5
|
import { isLifecycleNotification, isTelegramProgressNotification, LIFECYCLE_KEY_PREFIX, LIFECYCLE_KINDS, proposalTaskOf, type LifecycleKind } from "./notification-rows.js";
|
|
@@ -41,6 +43,10 @@ export declare function leadTurnKeepsProposals(turn: {
|
|
|
41
43
|
/** What the lead promised to follow up on (lead-commitments.ts; no version bump: additive only, so a build that
|
|
42
44
|
* predates it still opens the store). `condition_json` is a task, attempt, check or time; `check_at` is when to look
|
|
43
45
|
* next; `channel` is where it reports (`chat`: the conversation it was promised in); a promise lapses at `expires_at`. */
|
|
46
|
+
/** Lead fan-out (docs/plans/lead-fan-out.md): a sweep is N ordinary tasks under one shared brief, started with one yes,
|
|
47
|
+
* at most `max_parallel` of them claimed at once. Membership is by task family root, so a revision of a child is that
|
|
48
|
+
* child. Additive (no schema version bump), like lead_commitment. */
|
|
49
|
+
export declare const LEAD_SWEEP_SCHEMA = "\nCREATE TABLE IF NOT EXISTS lead_sweep (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n owner TEXT NOT NULL,\n thread INTEGER,\n repo TEXT NOT NULL,\n title TEXT NOT NULL,\n brief TEXT NOT NULL,\n max_parallel INTEGER NOT NULL CHECK (max_parallel BETWEEN 1 AND 16),\n proposal INTEGER UNIQUE,\n created_at TEXT NOT NULL\n);\nCREATE TABLE IF NOT EXISTS lead_sweep_task (\n sweep INTEGER NOT NULL REFERENCES lead_sweep(id),\n root_task TEXT NOT NULL UNIQUE,\n ordinal INTEGER NOT NULL,\n label TEXT NOT NULL,\n PRIMARY KEY (sweep, ordinal)\n);\n";
|
|
44
50
|
export declare const LEAD_COMMITMENT_SCHEMA = "\nCREATE TABLE IF NOT EXISTS lead_commitment (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n owner TEXT NOT NULL,\n repo TEXT,\n thread INTEGER NOT NULL,\n turn INTEGER,\n channel TEXT NOT NULL DEFAULT 'chat',\n what TEXT NOT NULL,\n condition_json TEXT NOT NULL,\n check_at TEXT NOT NULL,\n expires_at TEXT NOT NULL,\n state TEXT NOT NULL DEFAULT 'open' CHECK (state IN ('open', 'done', 'cancelled', 'expired')),\n created_at TEXT NOT NULL,\n checked_at TEXT,\n closed_at TEXT,\n closed_by TEXT,\n outcome TEXT\n);\nCREATE INDEX IF NOT EXISTS lead_commitment_due ON lead_commitment (state, check_at);\nCREATE INDEX IF NOT EXISTS lead_commitment_owner ON lead_commitment (owner, state, id);\n";
|
|
45
51
|
/** What stops a finished run reading stopped (Store.stopQuiescenceFact). */
|
|
46
52
|
export type StopFactKind = "open" | "alive" | "elsewhere" | "unprovable" | "unknown" | "settling";
|
|
@@ -92,6 +98,8 @@ export declare const BRANCH_BASE_MOVE_SCHEMA = "\nCREATE TABLE IF NOT EXISTS bra
|
|
|
92
98
|
* continues a paused build with a short continue frame and no note: one row per request, bound to the exact paused run;
|
|
93
99
|
* sent_at when the frame was written, ended_at when the run was no longer paused to take it. */
|
|
94
100
|
export declare const LIVE_STEER_SCHEMA = "\nCREATE TABLE IF NOT EXISTS run_pause (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n run INTEGER NOT NULL REFERENCES run(id) ON DELETE CASCADE,\n task_ref INTEGER NOT NULL REFERENCES task_ref(id) ON DELETE CASCADE,\n request_id TEXT NOT NULL UNIQUE,\n requested_by TEXT NOT NULL,\n requested_via TEXT NOT NULL CHECK (requested_via IN ('cli','web','chat')),\n requested_at TEXT NOT NULL,\n note INTEGER REFERENCES task_steer(id) ON DELETE SET NULL,\n sent_at TEXT,\n paused_at TEXT,\n resumed_at TEXT,\n ended_at TEXT\n);\nCREATE INDEX IF NOT EXISTS run_pause_by_run ON run_pause (run, id);\nCREATE TABLE IF NOT EXISTS run_resume (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n run INTEGER NOT NULL REFERENCES run(id) ON DELETE CASCADE,\n task_ref INTEGER NOT NULL REFERENCES task_ref(id) ON DELETE CASCADE,\n request_id TEXT NOT NULL UNIQUE,\n requested_by TEXT NOT NULL,\n requested_via TEXT NOT NULL CHECK (requested_via IN ('cli','web','chat')),\n requested_at TEXT NOT NULL,\n sent_at TEXT,\n ended_at TEXT\n);\nCREATE INDEX IF NOT EXISTS run_resume_by_run ON run_resume (run, id);\n";
|
|
101
|
+
/** A project's "Show commands in the live view" (live-detail.ts): absent means off. */
|
|
102
|
+
export declare const LIVE_DETAIL_SCHEMA = "\nCREATE TABLE IF NOT EXISTS live_detail_setting (\n repo TEXT PRIMARY KEY,\n commands INTEGER NOT NULL CHECK (commands IN (0,1)),\n updated_by TEXT NOT NULL,\n updated_at TEXT NOT NULL\n);\n-- Every run a steering note reached, kept as it happens (live-notes.ts): a\n-- note's own attached/mailed fields move to the next attempt, this does not.\nCREATE TABLE IF NOT EXISTS steer_note_run (\n note INTEGER NOT NULL REFERENCES task_steer(id) ON DELETE CASCADE,\n run INTEGER NOT NULL REFERENCES run(id) ON DELETE CASCADE,\n how TEXT NOT NULL CHECK (how IN ('attached','mailed','read')),\n at TEXT NOT NULL,\n PRIMARY KEY (note, run, how)\n);\nCREATE INDEX IF NOT EXISTS steer_note_run_by_run ON steer_note_run (run, note);\n";
|
|
95
103
|
export declare const CHAT_APPROVAL_SCHEMA = "\nCREATE TABLE IF NOT EXISTS chat_approval_setting (\n approver TEXT NOT NULL,\n scope TEXT NOT NULL,\n enabled INTEGER NOT NULL CHECK (enabled IN (0,1)),\n full_access INTEGER NOT NULL DEFAULT 0 CHECK (full_access IN (0,1)),\n attempt_cap_microusd INTEGER CHECK (attempt_cap_microusd IS NULL OR attempt_cap_microusd >= 0),\n generation INTEGER NOT NULL,\n digest TEXT NOT NULL,\n updated_by TEXT NOT NULL,\n updated_at TEXT NOT NULL,\n PRIMARY KEY (approver, scope)\n);\n";
|
|
96
104
|
export declare const CHAT_DECIDE_SCHEMA = "\nCREATE TABLE IF NOT EXISTS chat_decide_action (\n token TEXT PRIMARY KEY,\n channel TEXT NOT NULL,\n binding INTEGER NOT NULL,\n chat TEXT NOT NULL,\n message TEXT,\n act TEXT NOT NULL CHECK (act IN ('accept','changes','retry','approve','not-now','merge')),\n phase TEXT NOT NULL CHECK (phase IN ('offer','yes','cancel')),\n task_id TEXT NOT NULL,\n run INTEGER,\n digest TEXT NOT NULL,\n created_at TEXT NOT NULL,\n expires_at TEXT NOT NULL,\n consumed_at TEXT\n);\nCREATE INDEX IF NOT EXISTS chat_decide_action_message ON chat_decide_action (channel, chat, message);\nCREATE TABLE IF NOT EXISTS chat_decide_prompt (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n channel TEXT NOT NULL,\n binding INTEGER NOT NULL,\n chat TEXT NOT NULL,\n task_id TEXT NOT NULL,\n run INTEGER NOT NULL,\n digest TEXT NOT NULL,\n message TEXT,\n created_at TEXT NOT NULL,\n expires_at TEXT NOT NULL,\n consumed_at TEXT\n);\nCREATE INDEX IF NOT EXISTS chat_decide_prompt_open ON chat_decide_prompt (channel, binding, consumed_at);\n";
|
|
97
105
|
export type LeadAsk = {
|
|
@@ -170,7 +178,7 @@ export type SealedLedgerEntry = LedgerEntry & {
|
|
|
170
178
|
hash: string;
|
|
171
179
|
} | null;
|
|
172
180
|
};
|
|
173
|
-
export declare const SCHEMA_VERSION =
|
|
181
|
+
export declare const SCHEMA_VERSION = 130;
|
|
174
182
|
/** v118: the tables merged into `credential`, in the order they move (a person's API tokens keep their ids first). */
|
|
175
183
|
export declare const V118_MERGED_TABLES: Readonly<Record<string, CredentialKind>>;
|
|
176
184
|
/**
|
|
@@ -232,7 +240,10 @@ export declare const V115_DROPPED_TABLES: readonly string[];
|
|
|
232
240
|
* new tables and the columns in V121_ADDED_COLUMNS (null, or no sends), checked the same way. v122 only adds a new
|
|
233
241
|
* table (branch_base_move) and the nullable column in V122_ADDED_COLUMNS (a project's recorded remote), checked the
|
|
234
242
|
* same way. v123 only adds new tables (unattended flows, tool secrets) and the columns in V123_ADDED_COLUMNS ('mode',
|
|
235
|
-
* 0 or null), checked the same way.
|
|
243
|
+
* 0 or null), checked the same way. v124 only adds new tables (the live conversation's setting and note history).
|
|
244
|
+
* v125 rebuilds five tables with wider CHECKs, every row and id carried over (the rehearsal's history rules find them
|
|
245
|
+
* unchanged), and adds the nullable column in V125_ADDED_COLUMNS, checked the same way. v126 only adds a new table
|
|
246
|
+
* (task_source) and the columns in V126_ADDED_COLUMNS (null or 0), checked the same way.
|
|
236
247
|
*/
|
|
237
248
|
export declare const UPDATE_SAFE_MIGRATIONS: readonly number[];
|
|
238
249
|
/** v119: the columns it adds, by table, with the value every row saved before it reads (toolroll-update's HISTORY_RULES). */
|
|
@@ -275,6 +286,45 @@ export declare const V123_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record
|
|
|
275
286
|
definition: string;
|
|
276
287
|
saved: string;
|
|
277
288
|
}>>>>;
|
|
289
|
+
/** v125: the column it adds, with the value every row saved before it reads: what a run's ACP agent itself reported it
|
|
290
|
+
* used (acp-client.ts; never priced). Runs saved before it read none. */
|
|
291
|
+
export declare const V125_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
292
|
+
definition: string;
|
|
293
|
+
saved: string;
|
|
294
|
+
}>>>>;
|
|
295
|
+
/** v126: the columns it adds, with the value every row saved before it reads (docs/plans/webhook-tasks.md). A saved
|
|
296
|
+
* receipt reads no state (accepted when it has a card, skipped otherwise), no acceptance time (its arrival counts) and
|
|
297
|
+
* no held item; a saved trigger is on its first credential generation with nothing turned away; a saved card was made
|
|
298
|
+
* by a person. */
|
|
299
|
+
export declare const V126_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
300
|
+
definition: string;
|
|
301
|
+
saved: string;
|
|
302
|
+
}>>>>;
|
|
303
|
+
/** v128: whether a lead message waits for its turn. A message saved before v128 waits exactly when it is an operator
|
|
304
|
+
* message that a team queue row holds and no turn has taken (the team runtime's own unadmitted messages); every other
|
|
305
|
+
* saved message is history (`saved` is evaluated per row). */
|
|
306
|
+
export declare const V128_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
307
|
+
definition: string;
|
|
308
|
+
saved: string;
|
|
309
|
+
}>>>>;
|
|
310
|
+
/** v129: how a run went (docs/plans/run-efficiency.md). Recorded from now on; a saved row reads unknown (NULL), never 0. */
|
|
311
|
+
export declare const V129_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
312
|
+
definition: string;
|
|
313
|
+
saved: string;
|
|
314
|
+
}>>>>;
|
|
315
|
+
/** v130: a project's network (an approver's setting, egress.ts ProjectNetwork as JSON) and the installation's choice
|
|
316
|
+
* whether an agent may run where no OS confinement exists (one row; 0 until an instance operator turns it on). */
|
|
317
|
+
export declare const CONFINEMENT_SCHEMA = "\nCREATE TABLE IF NOT EXISTS project_network (\n repo TEXT PRIMARY KEY,\n network_json TEXT NOT NULL CHECK (length(network_json) <= 16384),\n updated_at TEXT NOT NULL,\n updated_by TEXT NOT NULL\n);\nCREATE TABLE IF NOT EXISTS confinement_setting (\n id INTEGER PRIMARY KEY CHECK (id = 1),\n unfenced_allowed INTEGER NOT NULL DEFAULT 0 CHECK (unfenced_allowed IN (0, 1)),\n updated_at TEXT,\n updated_by TEXT\n);\nINSERT OR IGNORE INTO confinement_setting (id, unfenced_allowed) VALUES (1, 0);\n";
|
|
318
|
+
/** v129: a finished run's How it ran, derived from its own records on first view (display only: never a verdict). Its
|
|
319
|
+
* parser version says when to derive again; `steps` says how complete the step detail was, and why not. */
|
|
320
|
+
export declare const RUN_EFFICIENCY_SCHEMA = "\nCREATE TABLE IF NOT EXISTS run_efficiency (\n run INTEGER PRIMARY KEY REFERENCES run(id) ON DELETE CASCADE,\n parser_version INTEGER NOT NULL,\n steps TEXT NOT NULL CHECK (steps IN ('complete','truncated','expired','absent')),\n steps_reason TEXT,\n payload_json TEXT NOT NULL CHECK (length(payload_json) <= 16384),\n derived_at TEXT NOT NULL\n);\n";
|
|
321
|
+
/** v128: the personal lead queue (docs/plans/lead-message-queue.md). A message sent while one of its author's personal
|
|
322
|
+
* lead turns runs (or while earlier ones wait) waits here, one turn per message, in order. Its words are the
|
|
323
|
+
* lead_message row (pending until admitted); terminal rows keep only their request identity (a tombstone). */
|
|
324
|
+
export declare const LEAD_QUEUE_SCHEMA = "\nCREATE TABLE IF NOT EXISTS lead_queue (\n message INTEGER PRIMARY KEY REFERENCES lead_message(id) ON DELETE CASCADE,\n thread INTEGER NOT NULL REFERENCES lead_thread(id) ON DELETE CASCADE,\n approver TEXT NOT NULL,\n approver_generation INTEGER NOT NULL,\n session INTEGER NOT NULL,\n ceiling_digest TEXT NOT NULL,\n request_id TEXT NOT NULL,\n payload_hash TEXT NOT NULL,\n context_json TEXT,\n status TEXT NOT NULL CHECK (status IN ('queued','running','answered','failed','cancelled','uncertain')),\n revision INTEGER NOT NULL DEFAULT 1,\n generation INTEGER NOT NULL DEFAULT 0,\n runner TEXT,\n claimed_at TEXT,\n turn_id INTEGER REFERENCES mate_turn(id),\n error TEXT,\n created_at TEXT NOT NULL,\n settled_at TEXT,\n UNIQUE (session, request_id)\n);\nCREATE INDEX IF NOT EXISTS lead_queue_backlog ON lead_queue (approver, status, message);\nCREATE UNIQUE INDEX IF NOT EXISTS lead_queue_one_running ON lead_queue (approver) WHERE status = 'running';\nCREATE INDEX IF NOT EXISTS lead_queue_admitted ON lead_queue (turn_id) WHERE turn_id IS NOT NULL;\n";
|
|
325
|
+
/** v126: the outside source a task was filed from, kept with the task (a card's own task link moves on; this never
|
|
326
|
+
* does). Written in the filing's transaction, copied whole to a revision, never changed. */
|
|
327
|
+
export declare const TASK_SOURCE_SCHEMA = "\nCREATE TABLE IF NOT EXISTS task_source (\n task_id TEXT PRIMARY KEY,\n flow INTEGER NOT NULL,\n card INTEGER NOT NULL,\n card_entry INTEGER NOT NULL,\n source_json TEXT NOT NULL,\n at TEXT NOT NULL\n);\nCREATE TRIGGER IF NOT EXISTS task_source_immutable BEFORE UPDATE ON task_source\nBEGIN\n SELECT RAISE(ABORT, 'a task source is immutable');\nEND;\nCREATE INDEX IF NOT EXISTS flow_trigger_event_accepted ON flow_trigger_event (trigger, accepted_at);\n";
|
|
278
328
|
/** Whether a database settled at `version` reaches this build's schema through update-safe migrations alone. */
|
|
279
329
|
export declare function updateSafeSchema(version: number | null): boolean;
|
|
280
330
|
export type OAuthClientRow = {
|
|
@@ -599,6 +649,8 @@ export type LeadMessage = {
|
|
|
599
649
|
text: string;
|
|
600
650
|
activity: string | null;
|
|
601
651
|
createdAt: string;
|
|
652
|
+
/** v128: still waiting for its turn (a queued message); absent when admitted or never queued. */
|
|
653
|
+
pending?: true;
|
|
602
654
|
};
|
|
603
655
|
export type LeadProposalKind = "task" | "next" | "reserve" | "hold" | "unhold" | "steer" | "scope" | "cancel" | "answer" | "repair" | "agents" | "review" | "control" | "task_action" | "action";
|
|
604
656
|
/** A coordinator's proposal over the MCP gateway (mate arc v3): the same
|
|
@@ -833,6 +885,13 @@ export type FlowCardSource = {
|
|
|
833
885
|
subject: string;
|
|
834
886
|
from: string;
|
|
835
887
|
};
|
|
888
|
+
/** v126: a webhook delivery's sender that proved it ("none": unsigned), the outside thing it names, and its receipt's key. */
|
|
889
|
+
verified?: string;
|
|
890
|
+
external?: {
|
|
891
|
+
id: string | null;
|
|
892
|
+
url: string | null;
|
|
893
|
+
};
|
|
894
|
+
receipt?: string;
|
|
836
895
|
chat?: {
|
|
837
896
|
app: string;
|
|
838
897
|
installation: string;
|
|
@@ -871,6 +930,22 @@ export type FlowTriggerRow = {
|
|
|
871
930
|
createdBy: string;
|
|
872
931
|
createdAt: string;
|
|
873
932
|
updatedAt: string;
|
|
933
|
+
/** v126: which saved secret proves this trigger's deliveries: "legacy" (the address every secret saved before v126
|
|
934
|
+
* has), "" (none yet: refused until one is saved), or the id of a secret written whole before the trigger pointed at it. */
|
|
935
|
+
hookCredential: string;
|
|
936
|
+
/** v126: deliveries turned away because the hold queue was full, and since when, until a person clears them. */
|
|
937
|
+
droppedCount: number;
|
|
938
|
+
droppedSince: string | null;
|
|
939
|
+
};
|
|
940
|
+
/** v126: what a trigger did with one delivery. Saved before v126: accepted when it made a card, skipped otherwise. */
|
|
941
|
+
export type FlowReceiptState = "accepted" | "skipped" | "held" | "ignored";
|
|
942
|
+
export type FlowReceipt = {
|
|
943
|
+
state: FlowReceiptState;
|
|
944
|
+
card: number | null;
|
|
945
|
+
note: string | null;
|
|
946
|
+
at: string;
|
|
947
|
+
acceptedAt: string | null;
|
|
948
|
+
itemJson: string | null;
|
|
874
949
|
};
|
|
875
950
|
export type FlowEventOutcome = "created" | "ok" | "fail" | "moved" | "approved" | "sent-back" | "cancelled";
|
|
876
951
|
export type LeadTurn = {
|
|
@@ -1159,6 +1234,8 @@ export type Run = {
|
|
|
1159
1234
|
tokensIn: number | null;
|
|
1160
1235
|
tokensOut: number | null;
|
|
1161
1236
|
costUsd: number | null;
|
|
1237
|
+
/** v129: the agent's turns where its provider reports them (Claude's num_turns); null when unknown. */
|
|
1238
|
+
agentTurns?: number | null;
|
|
1162
1239
|
/** HEAD after the agent, as accepted — what a publication may push. */
|
|
1163
1240
|
headRevision: string | null;
|
|
1164
1241
|
/** The validated terminal handoff's conclusion. */
|
|
@@ -1173,7 +1250,7 @@ export type Run = {
|
|
|
1173
1250
|
* How this attempt authenticated (v30) — 'subscription' or 'api-key' —
|
|
1174
1251
|
* stamped by the gateway. Decides which exhaustion class a match yields.
|
|
1175
1252
|
*/
|
|
1176
|
-
authMode?: "subscription" | "api-key" | null;
|
|
1253
|
+
authMode?: "subscription" | "api-key" | "agent-login" | null;
|
|
1177
1254
|
/**
|
|
1178
1255
|
* The gateway's honest classification of how this attempt ENDED (v30),
|
|
1179
1256
|
* computed where the structural terminal still exists (exhaustion.ts).
|
|
@@ -1762,6 +1839,77 @@ export declare const REVIEW_ROOT_ATTEMPTS = 3;
|
|
|
1762
1839
|
/** The receipt v114 keeps a notification's old single-destination delivery under. No sender claims it: every real
|
|
1763
1840
|
* destination is a kind and a 64-character hash, or a Telegram binding. */
|
|
1764
1841
|
export declare const LEGACY_NOTIFICATION_DESTINATION = "legacy:single-destination";
|
|
1842
|
+
/**
|
|
1843
|
+
* v125: an ACP agent's passed conformance checks (acp-attest.ts): per provider and runner, how to launch the exact
|
|
1844
|
+
* binary that passed and every file that launch depends on, what the agent said it is, the models it offered and the
|
|
1845
|
+
* checks it passed. At most one live row per agent and runner; revoking keeps the row as history.
|
|
1846
|
+
*/
|
|
1847
|
+
export declare const ACP_ATTESTATION_SCHEMA = "\nCREATE TABLE IF NOT EXISTS acp_attestation (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n provider TEXT NOT NULL CHECK (provider IN ('opencode','cursor','cline','qwen','goose')),\n runner TEXT NOT NULL,\n conformance_version INTEGER NOT NULL,\n launch_json TEXT NOT NULL,\n agent_name TEXT NOT NULL,\n agent_version TEXT NOT NULL,\n cli_version TEXT NOT NULL,\n models_json TEXT NOT NULL,\n checks_json TEXT NOT NULL,\n recorded_at TEXT NOT NULL,\n recorded_by TEXT NOT NULL,\n revoked_at TEXT,\n revoked_by TEXT\n);\nCREATE UNIQUE INDEX IF NOT EXISTS acp_attestation_live ON acp_attestation (provider, runner) WHERE revoked_at IS NULL;\n";
|
|
1848
|
+
/**
|
|
1849
|
+
* v125: how an ACP agent's work on one model is billed, per runner (docs/plans/acp-adapter.md § Billing): metered
|
|
1850
|
+
* (the default, and what no row means — cost unknown, charged as unknown cost is) or the agent's own plan ($0,
|
|
1851
|
+
* counted as unmeasured). Each change is a new row; the newest is the declaration, its id the revision a run stamps.
|
|
1852
|
+
*/
|
|
1853
|
+
/**
|
|
1854
|
+
* v125: a requested ACP agent check (docs/plans/acp-adapter.md § Layer E): asked for with a password, claimed and run
|
|
1855
|
+
* by one watch of the named runner — one running check per runner, which the partial unique index holds — through two
|
|
1856
|
+
* bounded steps, each bound to its run and graded on plane evidence; the attestation is recorded only in the same
|
|
1857
|
+
* transaction that marks the request passed.
|
|
1858
|
+
*/
|
|
1859
|
+
export declare const ACP_CHECK_SCHEMA = "\nCREATE TABLE IF NOT EXISTS acp_check_request (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n provider TEXT NOT NULL CHECK (provider IN ('opencode','cursor','cline','qwen','goose')),\n runner TEXT NOT NULL,\n model TEXT NOT NULL,\n conformance_version INTEGER NOT NULL,\n requested_by TEXT NOT NULL,\n requested_at TEXT NOT NULL,\n expires_at TEXT NOT NULL,\n state TEXT NOT NULL DEFAULT 'pending' CHECK (state IN ('pending','running','passed','failed','expired')),\n watch_repo TEXT,\n watch_owner TEXT,\n task_ref INTEGER REFERENCES task_ref(id),\n launch_json TEXT,\n lease_id TEXT,\n steps_used INTEGER NOT NULL DEFAULT 0 CHECK (steps_used BETWEEN 0 AND 2),\n step1_run INTEGER REFERENCES run(id),\n step2_run INTEGER REFERENCES run(id),\n step1_passed INTEGER NOT NULL DEFAULT 0 CHECK (step1_passed IN (0,1)),\n step2_passed INTEGER NOT NULL DEFAULT 0 CHECK (step2_passed IN (0,1)),\n result TEXT,\n finished_at TEXT,\n settled_at TEXT,\n settle_by TEXT,\n settle_until TEXT\n);\nCREATE UNIQUE INDEX IF NOT EXISTS acp_check_running ON acp_check_request (runner) WHERE state = 'running';\n";
|
|
1860
|
+
/** A check request as the job and the screens read it. */
|
|
1861
|
+
export type AcpCheckRequest = {
|
|
1862
|
+
id: number;
|
|
1863
|
+
provider: string;
|
|
1864
|
+
runner: string;
|
|
1865
|
+
model: string;
|
|
1866
|
+
conformanceVersion: number;
|
|
1867
|
+
requestedBy: string;
|
|
1868
|
+
requestedAt: string;
|
|
1869
|
+
expiresAt: string;
|
|
1870
|
+
state: "pending" | "running" | "passed" | "failed" | "expired";
|
|
1871
|
+
watch: {
|
|
1872
|
+
repo: string;
|
|
1873
|
+
owner: string;
|
|
1874
|
+
} | null;
|
|
1875
|
+
taskRef: number | null;
|
|
1876
|
+
launchJson: string | null;
|
|
1877
|
+
/** The claim the check took on its task: the only one its cleanup may release. */
|
|
1878
|
+
leaseId: string | null;
|
|
1879
|
+
stepsUsed: number;
|
|
1880
|
+
step1Run: number | null;
|
|
1881
|
+
step2Run: number | null;
|
|
1882
|
+
step1Passed: boolean;
|
|
1883
|
+
step2Passed: boolean;
|
|
1884
|
+
result: string | null;
|
|
1885
|
+
finishedAt: string | null;
|
|
1886
|
+
/** When everything the finished check held (claim, checkout, task) was let go. */
|
|
1887
|
+
settledAt: string | null;
|
|
1888
|
+
};
|
|
1889
|
+
export declare const ACP_BILLING_SCHEMA = "\nCREATE TABLE IF NOT EXISTS acp_billing (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n provider TEXT NOT NULL CHECK (provider IN ('opencode','cursor','cline','qwen','goose')),\n runner TEXT NOT NULL,\n model TEXT NOT NULL,\n kind TEXT NOT NULL CHECK (kind IN ('metered','plan')),\n set_at TEXT NOT NULL,\n set_by TEXT NOT NULL\n);\nCREATE INDEX IF NOT EXISTS acp_billing_by ON acp_billing (provider, runner, model, id);\n";
|
|
1890
|
+
/** An ACP run's billing as stamped when the run was admitted: never re-read from the live declaration. */
|
|
1891
|
+
export type AcpBillingStamp = {
|
|
1892
|
+
kind: "metered" | "plan";
|
|
1893
|
+
revision: number;
|
|
1894
|
+
model: string;
|
|
1895
|
+
};
|
|
1896
|
+
/** An ACP agent's live attestation, as the gateway reads it. */
|
|
1897
|
+
export type AcpAttestation = {
|
|
1898
|
+
id: number;
|
|
1899
|
+
provider: string;
|
|
1900
|
+
runner: string;
|
|
1901
|
+
conformanceVersion: number;
|
|
1902
|
+
launch: AcpLaunch;
|
|
1903
|
+
agent: {
|
|
1904
|
+
name: string;
|
|
1905
|
+
version: string;
|
|
1906
|
+
};
|
|
1907
|
+
cliVersion: string;
|
|
1908
|
+
models: string[];
|
|
1909
|
+
checks: string[];
|
|
1910
|
+
recordedAt: string;
|
|
1911
|
+
recordedBy: string;
|
|
1912
|
+
};
|
|
1765
1913
|
/** Reporting never creates, migrates, or repairs a store. SQLite itself
|
|
1766
1914
|
* enforces read-only access, including the race where the file disappears. */
|
|
1767
1915
|
export declare function openStoreReadOnly(file: string): Store | null;
|
|
@@ -3170,6 +3318,19 @@ export declare class Store {
|
|
|
3170
3318
|
} | null;
|
|
3171
3319
|
/** Stamp a task as the revision it is: source task + immutable brief. */
|
|
3172
3320
|
markRevision(taskRef: number, revisionOf: string, briefArtifact: number): void;
|
|
3321
|
+
/** v126: where a task came from, written once in its filing's transaction (task-source.ts), never changed. */
|
|
3322
|
+
recordTaskSource(taskId: string, from: {
|
|
3323
|
+
flow: number;
|
|
3324
|
+
card: number;
|
|
3325
|
+
entry: number;
|
|
3326
|
+
}, sourceJson: string, now: Date): void;
|
|
3327
|
+
/** v126: where a task came from, as kept when it (or the task it revises) was filed; null for every other task. */
|
|
3328
|
+
taskSourceOf(taskId: string): {
|
|
3329
|
+
flow: number;
|
|
3330
|
+
card: number;
|
|
3331
|
+
entry: number;
|
|
3332
|
+
sourceJson: string;
|
|
3333
|
+
} | null;
|
|
3173
3334
|
/**
|
|
3174
3335
|
* Seal a revision in ONE transaction (Codex M5-M8 audit, C-3; contract
|
|
3175
3336
|
* handoff task 2): the SOURCE BINDING is proven here, against live rows,
|
|
@@ -3469,13 +3630,19 @@ export declare class Store {
|
|
|
3469
3630
|
* verified, attested or accepted, or its branch was published (revised
|
|
3470
3631
|
* through its pull request). Null when `requeueTask` may run it again. */
|
|
3471
3632
|
finalResultReason(runId: number): "accepted-result" | "published" | null;
|
|
3472
|
-
requeueTask(taskId: string, by: string, now: Date
|
|
3633
|
+
requeueTask(taskId: string, by: string, now: Date,
|
|
3634
|
+
/** Approve & build again: requeue only while this exact build is the finished task's latest result and the scope
|
|
3635
|
+
* is still the one just approved, read inside this transaction ("moved" otherwise). */
|
|
3636
|
+
expect?: {
|
|
3637
|
+
run: number;
|
|
3638
|
+
scopeDigest: string;
|
|
3639
|
+
}): {
|
|
3473
3640
|
ok: true;
|
|
3474
3641
|
resolvedIncidents: number;
|
|
3475
3642
|
rejectedRun: number | null;
|
|
3476
3643
|
} | {
|
|
3477
3644
|
ok: false;
|
|
3478
|
-
reason: "unknown-task" | "not-stalled" | "claimed" | "accepted-result" | "published";
|
|
3645
|
+
reason: "unknown-task" | "not-stalled" | "claimed" | "accepted-result" | "published" | "moved";
|
|
3479
3646
|
};
|
|
3480
3647
|
/**
|
|
3481
3648
|
* Cancel, aware of who might be building right now. A live claim wins:
|
|
@@ -3982,6 +4149,9 @@ export declare class Store {
|
|
|
3982
4149
|
unknownSpend?: boolean;
|
|
3983
4150
|
replyBytes?: number;
|
|
3984
4151
|
candidateCount?: number;
|
|
4152
|
+
/** v129: the request's cache read and write tokens, where its provider reports them (unknown stays NULL). */
|
|
4153
|
+
cacheReadTokens?: number | null;
|
|
4154
|
+
cacheWriteTokens?: number | null;
|
|
3985
4155
|
}, now: Date): boolean;
|
|
3986
4156
|
/**
|
|
3987
4157
|
* The crash sweep: turns past their deadline become failed('crashed'),
|
|
@@ -4439,7 +4609,92 @@ export declare class Store {
|
|
|
4439
4609
|
* structural signal is gone. `auth-expired` pauses its provider; every
|
|
4440
4610
|
* other class is observational.
|
|
4441
4611
|
*/
|
|
4442
|
-
|
|
4612
|
+
/**
|
|
4613
|
+
* Record an ACP agent's passed conformance check on a runner (acp-attest.ts), replacing the live one — one
|
|
4614
|
+
* transaction, so there is never a moment with two or with a gap that reads as the old one.
|
|
4615
|
+
*/
|
|
4616
|
+
recordAcpAttestation(input: Omit<AcpAttestation, "id" | "recordedAt" | "conformanceVersion"> & {
|
|
4617
|
+
conformanceVersion?: number;
|
|
4618
|
+
}, now: Date): number;
|
|
4619
|
+
/** An ACP agent's live attestation on a runner, under this build's conformance version; null when there is none. */
|
|
4620
|
+
acpAttestationFor(provider: string, runner: string): AcpAttestation | null;
|
|
4621
|
+
/** Declare how an ACP agent's work on one model is billed on a runner; the new revision. */
|
|
4622
|
+
declareAcpBilling(input: {
|
|
4623
|
+
provider: string;
|
|
4624
|
+
runner: string;
|
|
4625
|
+
model: string;
|
|
4626
|
+
kind: "metered" | "plan";
|
|
4627
|
+
by: string;
|
|
4628
|
+
}, now: Date): number;
|
|
4629
|
+
/** The billing declaration standing for an ACP agent's model on a runner: metered, revision 0, when none was made. */
|
|
4630
|
+
acpBillingFor(provider: string, runner: string, model: string): AcpBillingStamp;
|
|
4631
|
+
/** The billing an ACP run was admitted under, or null (not an ACP run, or unreadable — then it is metered). */
|
|
4632
|
+
acpBillingOfRun(runId: number): AcpBillingStamp | null;
|
|
4633
|
+
/** Ask for an ACP agent check on a runner (the caller proved the password); the request's id. Valid 30 minutes. */
|
|
4634
|
+
requestAcpCheck(input: {
|
|
4635
|
+
provider: string;
|
|
4636
|
+
runner: string;
|
|
4637
|
+
model: string;
|
|
4638
|
+
by: string;
|
|
4639
|
+
}, now: Date): number;
|
|
4640
|
+
acpCheck(id: number): AcpCheckRequest | null;
|
|
4641
|
+
/** The checks asked for an agent, newest first (for the providers screen). */
|
|
4642
|
+
acpChecksFor(provider: string, limit?: number): AcpCheckRequest[];
|
|
4643
|
+
/** The SQL that proves a watch still holds its lease (runner, repo, owner) at `?` — appended with its bindings. */
|
|
4644
|
+
private static readonly WATCH_LIVE;
|
|
4645
|
+
/**
|
|
4646
|
+
* Claim the oldest pending, unexpired check for this runner, for the watch that will run it — one statement; the
|
|
4647
|
+
* partial unique index refuses a second running check on the runner. Null when there is none (or another runs).
|
|
4648
|
+
*/
|
|
4649
|
+
claimAcpCheck(runner: string, watch: {
|
|
4650
|
+
repo: string;
|
|
4651
|
+
owner: string;
|
|
4652
|
+
}, now: Date): AcpCheckRequest | null;
|
|
4653
|
+
/** Bind a running check, still owned and unexpired, to its task and the launch it inspected. */
|
|
4654
|
+
bindAcpCheck(id: number, binding: {
|
|
4655
|
+
taskRef: number;
|
|
4656
|
+
launchJson: string;
|
|
4657
|
+
leaseId: string;
|
|
4658
|
+
}, now: Date): boolean;
|
|
4659
|
+
/** Consume step 1 or 2 for its run: in order, once, owned, unexpired. */
|
|
4660
|
+
consumeAcpCheckStep(id: number, step: 1 | 2, runId: number, now: Date): boolean;
|
|
4661
|
+
/** Record a step as passed, once its grading did: owned, unexpired, and only for the run the step was bound to. */
|
|
4662
|
+
passAcpCheckStep(id: number, step: 1 | 2, runId: number, now: Date): boolean;
|
|
4663
|
+
/**
|
|
4664
|
+
* Publish a passed check: in one transaction, the request moves to passed — only if it is still running, unexpired,
|
|
4665
|
+
* owned by its live watch, with both steps used, bound and passed, and both their runs finished as agent-check
|
|
4666
|
+
* refusals — and the attestation is recorded. Anything else publishes nothing.
|
|
4667
|
+
*/
|
|
4668
|
+
publishAcpCheck(id: number, attestation: Omit<AcpAttestation, "id" | "recordedAt" | "conformanceVersion">, now: Date): boolean;
|
|
4669
|
+
/** The check request, when it still admits this run as its current step: running, unexpired, its watch's lease
|
|
4670
|
+
* live, and the step bound to exactly this run. Null otherwise. */
|
|
4671
|
+
acpCheckAdmitting(id: number, step: 1 | 2, runId: number, now: Date): AcpCheckRequest | null;
|
|
4672
|
+
/** Fail a check that hasn't finished, with its words. */
|
|
4673
|
+
failAcpCheck(id: number, words: string, now: Date): boolean;
|
|
4674
|
+
/** Running checks on this runner no live watch holds any more, or past their time: the ones recovery may close. */
|
|
4675
|
+
abandonedAcpChecks(runner: string, now: Date): AcpCheckRequest[];
|
|
4676
|
+
/** Finished checks on this runner whose claim, checkout and task are not yet let go: cleanup's to-do, retried each pass. */
|
|
4677
|
+
unsettledAcpChecks(runner: string): AcpCheckRequest[];
|
|
4678
|
+
/** The claim a finished check's cleanup now holds on its task (its first one expired): the only one it may release. */
|
|
4679
|
+
setAcpCheckLease(id: number, leaseId: string): boolean;
|
|
4680
|
+
/** A finished check holds something again (a checkout that landed after recovery settled it): cleanup reopens. */
|
|
4681
|
+
unsettleAcpCheck(id: number): boolean;
|
|
4682
|
+
/** Take — or renew — the one cleanup attempt a finished check may have at a time: free, lapsed, or already this one. */
|
|
4683
|
+
holdAcpSettle(id: number, attempt: string, now: Date, ttlMs: number): boolean;
|
|
4684
|
+
/** Whether this cleanup attempt still holds the check. */
|
|
4685
|
+
holdsAcpSettle(id: number, attempt: string, now: Date): boolean;
|
|
4686
|
+
/** Let go of a cleanup attempt (only this one). */
|
|
4687
|
+
endAcpSettle(id: number, attempt: string): void;
|
|
4688
|
+
/** Mark a finished check's holdings let go — by the attempt holding it, and only if no checkout of its branch is
|
|
4689
|
+
* left (one that landed late keeps it open, whatever the attempt last saw). */
|
|
4690
|
+
settleAcpCheck(id: number, attempt: string, branch: string, now: Date): boolean;
|
|
4691
|
+
/** Pending checks past their time are expired, untouched. */
|
|
4692
|
+
expireAcpChecks(now: Date): number;
|
|
4693
|
+
/** Revoke an ACP agent's live attestation on a runner; whether there was one. */
|
|
4694
|
+
revokeAcpAttestation(provider: string, runner: string, by: string, now: Date): boolean;
|
|
4695
|
+
/** What a run's ACP agent itself reported it used (never priced; acp-client.ts). */
|
|
4696
|
+
stampAgentReportedUsage(id: number, usage: string | null): void;
|
|
4697
|
+
stampTerminalClass(id: number, authMode: "subscription" | "api-key" | "agent-login", terminalClass: TerminalClass): void;
|
|
4443
4698
|
/** A launch refused before any model turn (an installed CLI too old for a
|
|
4444
4699
|
* build's flags): the start stamp goes, its version and evidence stay. Only
|
|
4445
4700
|
* while the run is open, so a settled run's account never changes. */
|
|
@@ -4453,6 +4708,7 @@ export declare class Store {
|
|
|
4453
4708
|
tokensOut?: number;
|
|
4454
4709
|
costUsd?: number;
|
|
4455
4710
|
usageJson?: string;
|
|
4711
|
+
agentTurns?: number;
|
|
4456
4712
|
}): void;
|
|
4457
4713
|
/** v105: price a run as it stands (reported cost, or tokens at the catalogue price, or unpriced), frozen at the
|
|
4458
4714
|
* price of the moment it's settled. Settled again whenever its usage changes. */
|
|
@@ -4547,6 +4803,9 @@ export declare class Store {
|
|
|
4547
4803
|
subagent: number | null;
|
|
4548
4804
|
agents?: readonly BudgetAgent[];
|
|
4549
4805
|
}) => BudgetHold;
|
|
4806
|
+
/** How one agent would bill new work now: an ACP agent by its declaration for that exact model on that runner
|
|
4807
|
+
* (plan reads as a plan, anything else as metered), every other provider as agentsFor says. */
|
|
4808
|
+
agentFor(provider: string, model: string | null, runner: string | null): BudgetAgent;
|
|
4550
4809
|
/** How each provider would bill new work now (see spend.billingOf). */
|
|
4551
4810
|
agentsFor(providers: readonly string[]): BudgetAgent[];
|
|
4552
4811
|
/** v105: how a provider's CLI was seen billing (a Claude stream's key source, Codex's account mode). */
|
|
@@ -4800,6 +5059,27 @@ export declare class Store {
|
|
|
4800
5059
|
reason: "unknown-task" | "task-finished" | "invalid-note";
|
|
4801
5060
|
problem?: string;
|
|
4802
5061
|
};
|
|
5062
|
+
/**
|
|
5063
|
+
* File a note for the exact run a person is watching (live-conversation.md
|
|
5064
|
+
* §6): in ONE transaction, the run must still be the task's live attempt
|
|
5065
|
+
* (or, `onward`, any attempt of this task: the note goes to the next one),
|
|
5066
|
+
* and a repeated `key` from the same author hands back the same note — only
|
|
5067
|
+
* for the same task, run and text, whichever of the two ways it was sent;
|
|
5068
|
+
* any other reuse is refused. Nothing is filed on a refusal.
|
|
5069
|
+
*/
|
|
5070
|
+
fileSteerNoteForRun(taskId: string, author: VerifiedAuthor, note: string, now: Date, expect: {
|
|
5071
|
+
run: number;
|
|
5072
|
+
key: string | null;
|
|
5073
|
+
onward?: boolean;
|
|
5074
|
+
}): {
|
|
5075
|
+
ok: true;
|
|
5076
|
+
id: number;
|
|
5077
|
+
replayed: boolean;
|
|
5078
|
+
} | {
|
|
5079
|
+
ok: false;
|
|
5080
|
+
reason: "unknown-task" | "task-finished" | "invalid-note" | "attempt-ended" | "key-reused";
|
|
5081
|
+
problem?: string;
|
|
5082
|
+
};
|
|
4803
5083
|
/** One verified note, with the identity a running build's stdin copy is sent under: filing it is also what queues
|
|
4804
5084
|
* its live delivery, in the same transaction (the builder's dispatcher sends whatever is filed and unsent). */
|
|
4805
5085
|
private insertSteerNote;
|
|
@@ -4845,6 +5125,10 @@ export declare class Store {
|
|
|
4845
5125
|
/** The pulse wrote this note into the run's steering folder. Mailing is not
|
|
4846
5126
|
* reading: delivery settles only on the agent's own acknowledgement. */
|
|
4847
5127
|
markSteerMailed(noteId: number, runId: number, now: Date): boolean;
|
|
5128
|
+
/** One run a note reached, kept for its live conversation (live-notes.ts); display state, so a failure never blocks steering. */
|
|
5129
|
+
private noteSteerReached;
|
|
5130
|
+
/** The notes this run reached, filing order — attached to its brief, mailed into its folder, or read by it. */
|
|
5131
|
+
steerNotesReaching(runId: number): SteerNote[];
|
|
4848
5132
|
/**
|
|
4849
5133
|
* The agent moved this note to handled/ (v120): it was read, by THIS run.
|
|
4850
5134
|
* Acknowledgement is the only road from mailed to delivered — a hook firing
|
|
@@ -5433,12 +5717,16 @@ export declare class Store {
|
|
|
5433
5717
|
by: string;
|
|
5434
5718
|
}, now: Date): boolean;
|
|
5435
5719
|
archiveFlow(id: number, by: string, now: Date): boolean;
|
|
5720
|
+
/** A new card. `byKind` (v126) is decided where the card is made, never read from `by`: a delivery, a poll, a schedule
|
|
5721
|
+
* a public form or a chat channel's message is automation whatever its label says; a signed-in person's own card is a
|
|
5722
|
+
* person's. Every caller says which: filing passes it on exactly, and never reads it from `by`. */
|
|
5436
5723
|
addFlowCard(card: {
|
|
5437
5724
|
flow: number;
|
|
5438
5725
|
title: string;
|
|
5439
5726
|
description: string | null;
|
|
5440
5727
|
stage: string;
|
|
5441
5728
|
by: string;
|
|
5729
|
+
byKind: "person" | "automation";
|
|
5442
5730
|
source?: FlowCardSource;
|
|
5443
5731
|
}, now: Date): number;
|
|
5444
5732
|
getFlowCard(id: number): FlowCardRow | null;
|
|
@@ -5808,6 +6096,47 @@ export declare class Store {
|
|
|
5808
6096
|
* firing) the task it filed. False when it was already recorded.
|
|
5809
6097
|
*/
|
|
5810
6098
|
recordFlowTriggerEvent(trigger: number, key: string, card: number | null, note: string | null, now: Date, task?: string | null, onTime?: boolean, ranScript?: string | null): boolean;
|
|
6099
|
+
/**
|
|
6100
|
+
* v126: point a trigger at another saved secret ("" for none), and (when given) its new settings, in one write — only
|
|
6101
|
+
* from the secret and settings the caller read, so of two changes at once exactly one lands. False when it changed
|
|
6102
|
+
* meanwhile (or the trigger is gone): the caller then removes only the secret it wrote itself.
|
|
6103
|
+
*/
|
|
6104
|
+
swapFlowHookCredential(id: number, from: {
|
|
6105
|
+
credential: string;
|
|
6106
|
+
configJson: string;
|
|
6107
|
+
hookHash: string | null;
|
|
6108
|
+
}, to: {
|
|
6109
|
+
credential: string;
|
|
6110
|
+
hookHash?: string;
|
|
6111
|
+
}, configJson: string | null, now: Date): boolean;
|
|
6112
|
+
/** v126: what a trigger did with one delivery, or null when it never received it. */
|
|
6113
|
+
flowReceipt(trigger: number, key: string): FlowReceipt | null;
|
|
6114
|
+
/** v126: a delivery received but made no card for: ignored (not for this flow), or held until there's room (its
|
|
6115
|
+
* prepared item kept whole). False when the key was already received. */
|
|
6116
|
+
recordFlowReceipt(trigger: number, key: string, state: "ignored" | "held", note: string | null, itemJson: string | null, now: Date): boolean;
|
|
6117
|
+
/** v126: a held delivery became its card. Only ever from held, in the card's own transaction: false (the caller rolls
|
|
6118
|
+
* the card back) when it is no longer held. */
|
|
6119
|
+
acceptHeldReceipt(trigger: number, key: string, card: number, now: Date): boolean;
|
|
6120
|
+
/** v126: the cards a trigger made since `since`, counted when each was made (a held delivery counts when it became
|
|
6121
|
+
* its card, not when it arrived). A receipt saved before v126 counts at its arrival. */
|
|
6122
|
+
flowCardsAcceptedSince(trigger: number, since: Date): number;
|
|
6123
|
+
/** v126: a trigger's held deliveries, oldest first. */
|
|
6124
|
+
heldFlowReceipts(trigger: number, limit: number): {
|
|
6125
|
+
key: string;
|
|
6126
|
+
itemJson: string;
|
|
6127
|
+
at: string;
|
|
6128
|
+
}[];
|
|
6129
|
+
/** v126: a held delivery that can't become its card (its words no longer pass): left out, with why. */
|
|
6130
|
+
skipHeldReceipt(trigger: number, key: string, note: string): boolean;
|
|
6131
|
+
/** v126: how many deliveries a trigger holds. */
|
|
6132
|
+
heldFlowReceiptCount(trigger: number): number;
|
|
6133
|
+
/** v126: one delivery turned away because the hold queue was full: counted, and since when, until a person clears it. */
|
|
6134
|
+
noteFlowDeliveryDropped(trigger: number, now: Date): void;
|
|
6135
|
+
/** v126: a person has seen the turned-away deliveries. */
|
|
6136
|
+
clearFlowDeliveriesDropped(trigger: number): void;
|
|
6137
|
+
/** v126: whether this hour's "too many" note on a trigger is still to be written: true at most once an hour, claimed
|
|
6138
|
+
* atomically so two deliveries at once write it once. */
|
|
6139
|
+
claimFlowLimitNote(trigger: number, now: Date): boolean;
|
|
5811
6140
|
/** The last card a trigger made, if any. */
|
|
5812
6141
|
lastFlowTriggerCard(trigger: number): number | null;
|
|
5813
6142
|
/**
|
|
@@ -5865,6 +6194,9 @@ export declare class Store {
|
|
|
5865
6194
|
method: string;
|
|
5866
6195
|
paths: number;
|
|
5867
6196
|
}, now: Date): void;
|
|
6197
|
+
/** What one attempt's network was and what its proxy saw (egress.ts), kept beside its fence. */
|
|
6198
|
+
recordRunNetwork(run: number, network: RunNetworkRecord, now: Date): void;
|
|
6199
|
+
runNetwork(run: number): RunNetworkRecord | null;
|
|
5868
6200
|
runFence(run: number): {
|
|
5869
6201
|
method: string;
|
|
5870
6202
|
paths: number;
|
|
@@ -5887,13 +6219,20 @@ export declare class Store {
|
|
|
5887
6219
|
/** `--end` and revocation: the thread's text and every proposal in it are
|
|
5888
6220
|
* deleted; the thread row stays as closed metadata (when, whose). */
|
|
5889
6221
|
closeLeadThreadsFor(approver: string, now: Date): number;
|
|
6222
|
+
/** `pending`: a queued message (personal or team) that waits for its turn — out of the model's history until the
|
|
6223
|
+
* admission that binds it clears the flag in the same statement (v128). */
|
|
5890
6224
|
appendLeadMessage(message: {
|
|
5891
6225
|
thread: number;
|
|
5892
6226
|
turn: number | null;
|
|
5893
6227
|
role: "operator" | "assistant";
|
|
5894
6228
|
text: string;
|
|
5895
6229
|
activity?: string | null;
|
|
6230
|
+
pending?: boolean;
|
|
5896
6231
|
}, now: Date): number;
|
|
6232
|
+
/** The model's history: the last `limit` ADMITTED messages, oldest first — a message still waiting for its turn (or
|
|
6233
|
+
* removed, expired or refused while waiting) is never read back to the lead. An index range scan whatever the backlog
|
|
6234
|
+
* (lead_message_history). People see the whole thread through listLeadMessages. */
|
|
6235
|
+
listLeadHistory(thread: number, limit: number): LeadMessage[];
|
|
5897
6236
|
/** The last `limit` messages, oldest first. */
|
|
5898
6237
|
listLeadMessages(thread: number, limit: number): LeadMessage[];
|
|
5899
6238
|
/** A proposal is inert (`drafting`) until its turn finalizes. */
|
|
@@ -5962,12 +6301,18 @@ export declare class Store {
|
|
|
5962
6301
|
weeklyCeilingMicrousd: number;
|
|
5963
6302
|
deadlineMs: number;
|
|
5964
6303
|
provider?: string;
|
|
6304
|
+
/** The personal queue claim this turn runs (lead-queue.ts): the only admission the backlog lets through. */
|
|
6305
|
+
queueClaim?: {
|
|
6306
|
+
message: number;
|
|
6307
|
+
runner: string;
|
|
6308
|
+
generation: number;
|
|
6309
|
+
};
|
|
5965
6310
|
}, now: Date): {
|
|
5966
6311
|
ok: true;
|
|
5967
6312
|
id: number;
|
|
5968
6313
|
} | {
|
|
5969
6314
|
ok: false;
|
|
5970
|
-
reason: "latched" | "concurrent" | "daily-cap" | "session-exhausted" | "session-ended" | "not-yours" | "thread-closed" | "over-budget" | "monthly-budget";
|
|
6315
|
+
reason: "latched" | "concurrent" | "backlog" | "daily-cap" | "session-exhausted" | "session-ended" | "not-yours" | "thread-closed" | "over-budget" | "monthly-budget";
|
|
5971
6316
|
};
|
|
5972
6317
|
startLeadTurn(id: number, now: Date): {
|
|
5973
6318
|
ok: true;
|
|
@@ -6147,7 +6492,7 @@ export declare class Store {
|
|
|
6147
6492
|
handoff: string | null;
|
|
6148
6493
|
costUsd: number | null;
|
|
6149
6494
|
provider: string | null;
|
|
6150
|
-
authMode: "subscription" | "api-key" | null;
|
|
6495
|
+
authMode: "subscription" | "api-key" | "agent-login" | null;
|
|
6151
6496
|
ranMinutes: number | null;
|
|
6152
6497
|
prNumber: number | null;
|
|
6153
6498
|
prUrl: string | null;
|
|
@@ -6181,7 +6526,7 @@ export declare class Store {
|
|
|
6181
6526
|
startedAt: string;
|
|
6182
6527
|
ranMinutes: number | null;
|
|
6183
6528
|
costUsd: number | null;
|
|
6184
|
-
authMode: "subscription" | "api-key" | null;
|
|
6529
|
+
authMode: "subscription" | "api-key" | "agent-login" | null;
|
|
6185
6530
|
prNumber: number | null;
|
|
6186
6531
|
prUrl: string | null;
|
|
6187
6532
|
}[];
|
|
@@ -6393,6 +6738,8 @@ export declare class Store {
|
|
|
6393
6738
|
* note couldn't be read has stopped. */
|
|
6394
6739
|
private workspaceConfirmedByApprover;
|
|
6395
6740
|
reserveRunProcess(runId: number, now: Date, group?: boolean): number;
|
|
6741
|
+
/** The run's process witnesses not yet proved exited — after first saving whatever exit evidence is available. */
|
|
6742
|
+
openRunProcessCount(runId: number, now: Date): number;
|
|
6396
6743
|
/** Save positive OS exit evidence while it is available, before a numeric
|
|
6397
6744
|
* PID can be reused. Completion, missing ancestry and age prove nothing.
|
|
6398
6745
|
* Existing rows stay intact; only a previously unknown exit is recorded.
|
|
@@ -6490,14 +6837,14 @@ export declare class Store {
|
|
|
6490
6837
|
scope?: string;
|
|
6491
6838
|
reason: string;
|
|
6492
6839
|
resetAt?: Date;
|
|
6493
|
-
authMode?: "subscription" | "api-key";
|
|
6840
|
+
authMode?: "subscription" | "api-key" | "agent-login";
|
|
6494
6841
|
credentialFp?: string;
|
|
6495
6842
|
}, now: Date): void;
|
|
6496
6843
|
/**
|
|
6497
6844
|
* The quota gate's answer, with the lazy exhausted→half-open transition at
|
|
6498
6845
|
* the known reset. Null means no recorded constraint.
|
|
6499
6846
|
*/
|
|
6500
|
-
quotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key", credentialFp?: string): {
|
|
6847
|
+
quotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): {
|
|
6501
6848
|
state: "exhausted" | "half-open";
|
|
6502
6849
|
reason: string;
|
|
6503
6850
|
resetAt: string | null;
|
|
@@ -6505,7 +6852,7 @@ export declare class Store {
|
|
|
6505
6852
|
/** Read-only quota observation for status surfaces. A passed reset reads
|
|
6506
6853
|
* half-open, matching quotaState's lazy transition, but this method never
|
|
6507
6854
|
* consumes or changes the probe slot. */
|
|
6508
|
-
readQuotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key", credentialFp?: string): {
|
|
6855
|
+
readQuotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): {
|
|
6509
6856
|
state: "exhausted" | "half-open";
|
|
6510
6857
|
reason: string;
|
|
6511
6858
|
resetAt: string | null;
|
|
@@ -6517,9 +6864,9 @@ export declare class Store {
|
|
|
6517
6864
|
* while the probe flies. The probe's success clears the row; the same
|
|
6518
6865
|
* structured signal that stamped it re-stamps on failure.
|
|
6519
6866
|
*/
|
|
6520
|
-
consumeHalfOpen(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key", credentialFp?: string): boolean;
|
|
6867
|
+
consumeHalfOpen(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): boolean;
|
|
6521
6868
|
/** A structured all-clear (or an operator's), by name. */
|
|
6522
|
-
clearQuota(runner: string, provider: string, scope: string, authMode?: "subscription" | "api-key", credentialFp?: string): boolean;
|
|
6869
|
+
clearQuota(runner: string, provider: string, scope: string, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): boolean;
|
|
6523
6870
|
/**
|
|
6524
6871
|
* Live claims this runner holds right now — the occupied slots of §8's
|
|
6525
6872
|
* capacity gate.
|
|
@@ -6530,6 +6877,16 @@ export declare class Store {
|
|
|
6530
6877
|
/** Every builder's live attempts, by project: what `status` shows against each project's limit. */
|
|
6531
6878
|
runningBuildsByRepo(now: Date): Map<string, number>;
|
|
6532
6879
|
/** A project's build concurrency changed (project-concurrency.ts): the ledger keeps before → after. */
|
|
6880
|
+
/** A project's network (egress.ts): its saved setting, or the default when none is saved or it doesn't read. */
|
|
6881
|
+
projectNetwork(repo: string): ProjectNetwork;
|
|
6882
|
+
/** An approver changed a project's network: saved, and in the ledger as before → after. */
|
|
6883
|
+
setProjectNetwork(repo: string, network: ProjectNetwork, by: string, now: Date): {
|
|
6884
|
+
before: ProjectNetwork;
|
|
6885
|
+
after: ProjectNetwork;
|
|
6886
|
+
};
|
|
6887
|
+
/** Whether this installation lets an agent run where no OS confinement exists (off unless an operator said so). */
|
|
6888
|
+
unfencedAgentsAllowed(): boolean;
|
|
6889
|
+
setUnfencedAgentsAllowed(allowed: boolean, by: string, now: Date): void;
|
|
6533
6890
|
recordProjectConcurrency(by: string, repo: string, before: number, after: number, now: Date): void;
|
|
6534
6891
|
/** Review 827: a project's demo URL changed (`off` when it has none). */
|
|
6535
6892
|
recordProjectDemo(by: string, repo: string, before: string | null, after: string | null, now: Date): void;
|
|
@@ -6550,6 +6907,7 @@ export declare class Store {
|
|
|
6550
6907
|
advanceBridgeCursor(botId: string, owner: string, generation: number, cursor: number, now: Date): boolean;
|
|
6551
6908
|
markTelegramUpdateApplied(...args: Parameters<ChatMessages["markUpdateApplied"]>): ReturnType<ChatMessages["markUpdateApplied"]>;
|
|
6552
6909
|
enqueueTelegramConversation(...args: Parameters<ChatMessages["enqueueMessage"]>): ReturnType<ChatMessages["enqueueMessage"]>;
|
|
6910
|
+
telegramMessagesWaiting(binding: number): number;
|
|
6553
6911
|
telegramConversationWaitingOn(...args: Parameters<ChatMessages["messageWaitingOn"]>): ReturnType<ChatMessages["messageWaitingOn"]>;
|
|
6554
6912
|
getTelegramConversation(...args: Parameters<ChatMessages["getMessage"]>): ReturnType<ChatMessages["getMessage"]>;
|
|
6555
6913
|
listTelegramConversations(...args: Parameters<ChatMessages["listMessages"]>): ReturnType<ChatMessages["listMessages"]>;
|
|
@@ -6577,6 +6935,7 @@ export declare class Store {
|
|
|
6577
6935
|
telegramRetryAt(botId: string): string;
|
|
6578
6936
|
deferTelegram(botId: string, until: string): void;
|
|
6579
6937
|
telegramDeliveryProblem(...args: Parameters<ChatMessages["deliveryProblem"]>): ReturnType<ChatMessages["deliveryProblem"]>;
|
|
6938
|
+
telegramWatchFence(...args: Parameters<ChatMessages["watchFence"]>): ReturnType<ChatMessages["watchFence"]>;
|
|
6580
6939
|
recordTelegramMessage(...args: Parameters<ChatMessages["recordMessage"]>): ReturnType<ChatMessages["recordMessage"]>;
|
|
6581
6940
|
telegramMessageOf(...args: Parameters<ChatMessages["messageOf"]>): ReturnType<ChatMessages["messageOf"]>;
|
|
6582
6941
|
finalizeTelegramDelivery(...args: Parameters<ChatMessages["finalizeDelivery"]>): ReturnType<ChatMessages["finalizeDelivery"]>;
|
|
@@ -6777,7 +7136,7 @@ export declare class Store {
|
|
|
6777
7136
|
* the subscription live under its enrolled generation, the notification
|
|
6778
7137
|
* unresolved and still stamped. Null = do not transmit.
|
|
6779
7138
|
*/
|
|
6780
|
-
pushSendFence(id: number, owner: string, generation: number): (PushPair & {
|
|
7139
|
+
pushSendFence(id: number, owner: string, generation: number, now?: Date): (PushPair & {
|
|
6781
7140
|
subscriptionRow: PushSubscription;
|
|
6782
7141
|
notificationRow: Notification;
|
|
6783
7142
|
}) | null;
|
|
@@ -6822,6 +7181,62 @@ export declare class Store {
|
|
|
6822
7181
|
*/
|
|
6823
7182
|
replay<T>(mutation: Mutation, operation: string, body: () => T, worthRecording?: (result: T) => boolean): T;
|
|
6824
7183
|
private once;
|
|
7184
|
+
/** A kept web session's changes: never inserts, so a session ended elsewhere is not brought back by a cached copy.
|
|
7185
|
+
* False when it is gone. (Kept last in the class: the freshness tripwire pins method positions.) */
|
|
7186
|
+
updateWebSession(session: Pick<WebSessionRow, "idHash" | "lastSeen" | "project" | "projectRevision" | "ssoAt">): boolean;
|
|
7187
|
+
/** A new sweep record (inside the caller's filing transaction). */
|
|
7188
|
+
createSweep(input: {
|
|
7189
|
+
owner: string;
|
|
7190
|
+
thread: number | null;
|
|
7191
|
+
repo: string;
|
|
7192
|
+
title: string;
|
|
7193
|
+
brief: string;
|
|
7194
|
+
maxParallel: number;
|
|
7195
|
+
proposal: number | null;
|
|
7196
|
+
}, now: Date): number;
|
|
7197
|
+
/** Link one filed child (its family root) to its sweep, in order. */
|
|
7198
|
+
addSweepTask(sweep: number, rootTask: string, ordinal: number, label: string): void;
|
|
7199
|
+
getSweep(id: number): {
|
|
7200
|
+
id: number;
|
|
7201
|
+
owner: string;
|
|
7202
|
+
thread: number | null;
|
|
7203
|
+
repo: string;
|
|
7204
|
+
title: string;
|
|
7205
|
+
brief: string;
|
|
7206
|
+
maxParallel: number;
|
|
7207
|
+
proposal: number | null;
|
|
7208
|
+
createdAt: string;
|
|
7209
|
+
} | null;
|
|
7210
|
+
/** The sweep a proposal filed, if it did (a replayed confirm finds it). */
|
|
7211
|
+
sweepOfProposal(proposal: number): number | null;
|
|
7212
|
+
/** A sweep's children, in order: each one's family root and its label. */
|
|
7213
|
+
sweepTasks(sweep: number): {
|
|
7214
|
+
rootTask: string;
|
|
7215
|
+
ordinal: number;
|
|
7216
|
+
label: string;
|
|
7217
|
+
}[];
|
|
7218
|
+
/** The sweep a task belongs to through its family root (a revision of a child belongs too), or null. */
|
|
7219
|
+
sweepOfTask(taskId: string): {
|
|
7220
|
+
id: number;
|
|
7221
|
+
maxParallel: number;
|
|
7222
|
+
} | null;
|
|
7223
|
+
/**
|
|
7224
|
+
* How many of a sweep's families hold a live claim now (the latest lease of any task in the family, unreleased and
|
|
7225
|
+
* unexpired, across every runner) — claimed-but-not-started counts. `except` leaves one task_ref out (the one being
|
|
7226
|
+
* claimed). Read inside acquire's own write transaction, so two runners can't both take the last slot.
|
|
7227
|
+
*/
|
|
7228
|
+
sweepLiveClaims(sweep: number, stamp: string, except?: number | null): number;
|
|
7229
|
+
/** Whether a request of this lead turn ended with its cost unknown and that cost is still unconfirmed — the turn is
|
|
7230
|
+
* what keeps chat paused on its credential. Once confirmed, it no longer is. */
|
|
7231
|
+
leadTurnCostUnconfirmed(leadTurn: number): boolean;
|
|
7232
|
+
/** The lead turn a chat step belongs to (a lead reply's request), or null for a standalone chat turn. */
|
|
7233
|
+
leadTurnOfStep(step: number): LeadTurn | null;
|
|
7234
|
+
/** A waiting message that will never run keeps nothing of what it said (v128 lead queue): its words, the context it was
|
|
7235
|
+
* sent with, and any copy the memory search made of it. Only while it is still pending — a message a turn took stays. */
|
|
7236
|
+
/** Whether a send of this session reached the plane: the engine took it, or the lead queue holds it (waiting, run,
|
|
7237
|
+
* removed or expired — any of those means the composer's draft was accepted and must not be sent again). */
|
|
7238
|
+
leadRequestReceived(session: number, request: string): boolean;
|
|
7239
|
+
forgetQueuedLeadMessage(message: number): void;
|
|
6825
7240
|
}
|
|
6826
7241
|
/** The receipt a bot's first pairing writes over pre-pairing history: an
|
|
6827
7242
|
* explicit skip, with no delivered timestamp and no attempt, so suppressed
|