toolroll 0.9.63 → 0.9.67
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 +108 -0
- package/README.md +33 -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 +117 -2
- package/dist/agent-fence.js +439 -12
- 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 +39 -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/batch-checks.js +3 -2
- package/dist/browser/THIRD_PARTY_NOTICES.txt +94 -0
- package/dist/browser/terminal.css +37 -0
- package/dist/browser/terminal.js +228 -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 +10 -1
- package/dist/builder.js +87 -24
- 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 +13 -4
- package/dist/contracts/console-api.js +13 -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 +35 -0
- package/dist/invoke.js +347 -28
- 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 +269 -0
- package/dist/live-terminal.js +686 -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 +4 -0
- package/dist/operate.js +335 -19
- 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 +18 -0
- package/dist/project-delete-ui.js +60 -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-adapters.d.ts +6 -0
- package/dist/release-adapters.js +70 -3
- package/dist/release.d.ts +10 -1
- package/dist/release.js +34 -15
- package/dist/request-budget-ui.js +2 -2
- package/dist/result-follow-ups.js +3 -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 +183 -5
- package/dist/scope.js +256 -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 +248 -40
- package/dist/server/chat.d.ts +1 -1
- package/dist/server/chat.js +122 -31
- package/dist/server/chrome.d.ts +16 -2
- package/dist/server/chrome.js +63 -11
- package/dist/server/console.css +107 -42
- 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 +32 -4
- package/dist/server/render-pages.js +83 -13
- 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 +111 -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 +47 -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 +142 -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 +327 -78
- 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 +440 -15
- package/dist/store.js +1072 -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/teardown-git.d.ts +22 -0
- package/dist/teardown-git.js +136 -2
- 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 +14 -0
- package/dist/tool-broker.js +67 -2
- package/dist/toolroll-update-ui.js +2 -2
- package/dist/toolroll-update.js +13 -3
- package/dist/tools-ui.js +2 -2
- package/dist/unfenced-test-support.d.ts +2 -0
- package/dist/unfenced-test-support.js +11 -0
- 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/dist/writes-mode.d.ts +9 -0
- package/dist/writes-mode.js +8 -0
- package/package.json +15 -2
package/dist/store.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type WritesMode } from "./writes-mode.js";
|
|
2
|
+
import { type ProjectNetwork, type RunNetworkRecord } from "./egress.js";
|
|
3
|
+
import { type AcpLaunch } from "./acp-attest.js";
|
|
1
4
|
import { type ChatBinding } from "./chat-core.js";
|
|
2
5
|
import { ChatMessages, TELEGRAM_HOLD_REASONS, TELEGRAM_SKIPPED_ELSEWHERE, TELEGRAM_SKIPPED_OTHER_CHAT, TELEGRAM_SKIPPED_QUIET } from "./chat-messages.js";
|
|
3
6
|
import { isLifecycleNotification, isTelegramProgressNotification, LIFECYCLE_KEY_PREFIX, LIFECYCLE_KINDS, proposalTaskOf, type LifecycleKind } from "./notification-rows.js";
|
|
@@ -41,6 +44,10 @@ export declare function leadTurnKeepsProposals(turn: {
|
|
|
41
44
|
/** What the lead promised to follow up on (lead-commitments.ts; no version bump: additive only, so a build that
|
|
42
45
|
* predates it still opens the store). `condition_json` is a task, attempt, check or time; `check_at` is when to look
|
|
43
46
|
* next; `channel` is where it reports (`chat`: the conversation it was promised in); a promise lapses at `expires_at`. */
|
|
47
|
+
/** Lead fan-out (docs/plans/lead-fan-out.md): a sweep is N ordinary tasks under one shared brief, started with one yes,
|
|
48
|
+
* at most `max_parallel` of them claimed at once. Membership is by task family root, so a revision of a child is that
|
|
49
|
+
* child. Additive (no schema version bump), like lead_commitment. */
|
|
50
|
+
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
51
|
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
52
|
/** What stops a finished run reading stopped (Store.stopQuiescenceFact). */
|
|
46
53
|
export type StopFactKind = "open" | "alive" | "elsewhere" | "unprovable" | "unknown" | "settling";
|
|
@@ -92,6 +99,8 @@ export declare const BRANCH_BASE_MOVE_SCHEMA = "\nCREATE TABLE IF NOT EXISTS bra
|
|
|
92
99
|
* continues a paused build with a short continue frame and no note: one row per request, bound to the exact paused run;
|
|
93
100
|
* sent_at when the frame was written, ended_at when the run was no longer paused to take it. */
|
|
94
101
|
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";
|
|
102
|
+
/** A project's "Show commands in the live view" (live-detail.ts): absent means off. */
|
|
103
|
+
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
104
|
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
105
|
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
106
|
export type LeadAsk = {
|
|
@@ -170,7 +179,7 @@ export type SealedLedgerEntry = LedgerEntry & {
|
|
|
170
179
|
hash: string;
|
|
171
180
|
} | null;
|
|
172
181
|
};
|
|
173
|
-
export declare const SCHEMA_VERSION =
|
|
182
|
+
export declare const SCHEMA_VERSION = 131;
|
|
174
183
|
/** v118: the tables merged into `credential`, in the order they move (a person's API tokens keep their ids first). */
|
|
175
184
|
export declare const V118_MERGED_TABLES: Readonly<Record<string, CredentialKind>>;
|
|
176
185
|
/**
|
|
@@ -232,7 +241,10 @@ export declare const V115_DROPPED_TABLES: readonly string[];
|
|
|
232
241
|
* new tables and the columns in V121_ADDED_COLUMNS (null, or no sends), checked the same way. v122 only adds a new
|
|
233
242
|
* table (branch_base_move) and the nullable column in V122_ADDED_COLUMNS (a project's recorded remote), checked the
|
|
234
243
|
* 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.
|
|
244
|
+
* 0 or null), checked the same way. v124 only adds new tables (the live conversation's setting and note history).
|
|
245
|
+
* v125 rebuilds five tables with wider CHECKs, every row and id carried over (the rehearsal's history rules find them
|
|
246
|
+
* unchanged), and adds the nullable column in V125_ADDED_COLUMNS, checked the same way. v126 only adds a new table
|
|
247
|
+
* (task_source) and the columns in V126_ADDED_COLUMNS (null or 0), checked the same way.
|
|
236
248
|
*/
|
|
237
249
|
export declare const UPDATE_SAFE_MIGRATIONS: readonly number[];
|
|
238
250
|
/** v119: the columns it adds, by table, with the value every row saved before it reads (toolroll-update's HISTORY_RULES). */
|
|
@@ -275,6 +287,47 @@ export declare const V123_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record
|
|
|
275
287
|
definition: string;
|
|
276
288
|
saved: string;
|
|
277
289
|
}>>>>;
|
|
290
|
+
/** v125: the column it adds, with the value every row saved before it reads: what a run's ACP agent itself reported it
|
|
291
|
+
* used (acp-client.ts; never priced). Runs saved before it read none. */
|
|
292
|
+
export declare const V125_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
293
|
+
definition: string;
|
|
294
|
+
saved: string;
|
|
295
|
+
}>>>>;
|
|
296
|
+
/** v126: the columns it adds, with the value every row saved before it reads (docs/plans/webhook-tasks.md). A saved
|
|
297
|
+
* receipt reads no state (accepted when it has a card, skipped otherwise), no acceptance time (its arrival counts) and
|
|
298
|
+
* no held item; a saved trigger is on its first credential generation with nothing turned away; a saved card was made
|
|
299
|
+
* by a person. */
|
|
300
|
+
export declare const V126_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
301
|
+
definition: string;
|
|
302
|
+
saved: string;
|
|
303
|
+
}>>>>;
|
|
304
|
+
/** v128: whether a lead message waits for its turn. A message saved before v128 waits exactly when it is an operator
|
|
305
|
+
* message that a team queue row holds and no turn has taken (the team runtime's own unadmitted messages); every other
|
|
306
|
+
* saved message is history (`saved` is evaluated per row). */
|
|
307
|
+
export declare const V128_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
308
|
+
definition: string;
|
|
309
|
+
saved: string;
|
|
310
|
+
}>>>>;
|
|
311
|
+
/** v129: how a run went (docs/plans/run-efficiency.md). Recorded from now on; a saved row reads unknown (NULL), never 0. */
|
|
312
|
+
export declare const V129_ADDED_COLUMNS: Readonly<Record<string, Readonly<Record<string, {
|
|
313
|
+
definition: string;
|
|
314
|
+
saved: string;
|
|
315
|
+
}>>>>;
|
|
316
|
+
/** v130: a project's network (an approver's setting, egress.ts ProjectNetwork as JSON) and the installation's choice
|
|
317
|
+
* whether an agent may run where no OS confinement exists (one row; 0 until an instance operator turns it on). */
|
|
318
|
+
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";
|
|
319
|
+
/** v131: where a project's builds may write (an approver's setting, agent-fence.ts WritesMode). */
|
|
320
|
+
export declare const PROJECT_WRITES_SCHEMA = "\nCREATE TABLE IF NOT EXISTS project_writes (\n repo TEXT PRIMARY KEY,\n mode TEXT NOT NULL CHECK (mode IN ('workspace', 'anywhere')),\n updated_at TEXT NOT NULL,\n updated_by TEXT NOT NULL\n);\n";
|
|
321
|
+
/** v129: a finished run's How it ran, derived from its own records on first view (display only: never a verdict). Its
|
|
322
|
+
* parser version says when to derive again; `steps` says how complete the step detail was, and why not. */
|
|
323
|
+
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";
|
|
324
|
+
/** v128: the personal lead queue (docs/plans/lead-message-queue.md). A message sent while one of its author's personal
|
|
325
|
+
* lead turns runs (or while earlier ones wait) waits here, one turn per message, in order. Its words are the
|
|
326
|
+
* lead_message row (pending until admitted); terminal rows keep only their request identity (a tombstone). */
|
|
327
|
+
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";
|
|
328
|
+
/** v126: the outside source a task was filed from, kept with the task (a card's own task link moves on; this never
|
|
329
|
+
* does). Written in the filing's transaction, copied whole to a revision, never changed. */
|
|
330
|
+
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
331
|
/** Whether a database settled at `version` reaches this build's schema through update-safe migrations alone. */
|
|
279
332
|
export declare function updateSafeSchema(version: number | null): boolean;
|
|
280
333
|
export type OAuthClientRow = {
|
|
@@ -599,6 +652,8 @@ export type LeadMessage = {
|
|
|
599
652
|
text: string;
|
|
600
653
|
activity: string | null;
|
|
601
654
|
createdAt: string;
|
|
655
|
+
/** v128: still waiting for its turn (a queued message); absent when admitted or never queued. */
|
|
656
|
+
pending?: true;
|
|
602
657
|
};
|
|
603
658
|
export type LeadProposalKind = "task" | "next" | "reserve" | "hold" | "unhold" | "steer" | "scope" | "cancel" | "answer" | "repair" | "agents" | "review" | "control" | "task_action" | "action";
|
|
604
659
|
/** A coordinator's proposal over the MCP gateway (mate arc v3): the same
|
|
@@ -833,6 +888,13 @@ export type FlowCardSource = {
|
|
|
833
888
|
subject: string;
|
|
834
889
|
from: string;
|
|
835
890
|
};
|
|
891
|
+
/** v126: a webhook delivery's sender that proved it ("none": unsigned), the outside thing it names, and its receipt's key. */
|
|
892
|
+
verified?: string;
|
|
893
|
+
external?: {
|
|
894
|
+
id: string | null;
|
|
895
|
+
url: string | null;
|
|
896
|
+
};
|
|
897
|
+
receipt?: string;
|
|
836
898
|
chat?: {
|
|
837
899
|
app: string;
|
|
838
900
|
installation: string;
|
|
@@ -871,6 +933,22 @@ export type FlowTriggerRow = {
|
|
|
871
933
|
createdBy: string;
|
|
872
934
|
createdAt: string;
|
|
873
935
|
updatedAt: string;
|
|
936
|
+
/** v126: which saved secret proves this trigger's deliveries: "legacy" (the address every secret saved before v126
|
|
937
|
+
* has), "" (none yet: refused until one is saved), or the id of a secret written whole before the trigger pointed at it. */
|
|
938
|
+
hookCredential: string;
|
|
939
|
+
/** v126: deliveries turned away because the hold queue was full, and since when, until a person clears them. */
|
|
940
|
+
droppedCount: number;
|
|
941
|
+
droppedSince: string | null;
|
|
942
|
+
};
|
|
943
|
+
/** v126: what a trigger did with one delivery. Saved before v126: accepted when it made a card, skipped otherwise. */
|
|
944
|
+
export type FlowReceiptState = "accepted" | "skipped" | "held" | "ignored";
|
|
945
|
+
export type FlowReceipt = {
|
|
946
|
+
state: FlowReceiptState;
|
|
947
|
+
card: number | null;
|
|
948
|
+
note: string | null;
|
|
949
|
+
at: string;
|
|
950
|
+
acceptedAt: string | null;
|
|
951
|
+
itemJson: string | null;
|
|
874
952
|
};
|
|
875
953
|
export type FlowEventOutcome = "created" | "ok" | "fail" | "moved" | "approved" | "sent-back" | "cancelled";
|
|
876
954
|
export type LeadTurn = {
|
|
@@ -1159,6 +1237,8 @@ export type Run = {
|
|
|
1159
1237
|
tokensIn: number | null;
|
|
1160
1238
|
tokensOut: number | null;
|
|
1161
1239
|
costUsd: number | null;
|
|
1240
|
+
/** v129: the agent's turns where its provider reports them (Claude's num_turns); null when unknown. */
|
|
1241
|
+
agentTurns?: number | null;
|
|
1162
1242
|
/** HEAD after the agent, as accepted — what a publication may push. */
|
|
1163
1243
|
headRevision: string | null;
|
|
1164
1244
|
/** The validated terminal handoff's conclusion. */
|
|
@@ -1173,7 +1253,7 @@ export type Run = {
|
|
|
1173
1253
|
* How this attempt authenticated (v30) — 'subscription' or 'api-key' —
|
|
1174
1254
|
* stamped by the gateway. Decides which exhaustion class a match yields.
|
|
1175
1255
|
*/
|
|
1176
|
-
authMode?: "subscription" | "api-key" | null;
|
|
1256
|
+
authMode?: "subscription" | "api-key" | "agent-login" | null;
|
|
1177
1257
|
/**
|
|
1178
1258
|
* The gateway's honest classification of how this attempt ENDED (v30),
|
|
1179
1259
|
* computed where the structural terminal still exists (exhaustion.ts).
|
|
@@ -1762,6 +1842,77 @@ export declare const REVIEW_ROOT_ATTEMPTS = 3;
|
|
|
1762
1842
|
/** The receipt v114 keeps a notification's old single-destination delivery under. No sender claims it: every real
|
|
1763
1843
|
* destination is a kind and a 64-character hash, or a Telegram binding. */
|
|
1764
1844
|
export declare const LEGACY_NOTIFICATION_DESTINATION = "legacy:single-destination";
|
|
1845
|
+
/**
|
|
1846
|
+
* v125: an ACP agent's passed conformance checks (acp-attest.ts): per provider and runner, how to launch the exact
|
|
1847
|
+
* binary that passed and every file that launch depends on, what the agent said it is, the models it offered and the
|
|
1848
|
+
* checks it passed. At most one live row per agent and runner; revoking keeps the row as history.
|
|
1849
|
+
*/
|
|
1850
|
+
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";
|
|
1851
|
+
/**
|
|
1852
|
+
* v125: how an ACP agent's work on one model is billed, per runner (docs/plans/acp-adapter.md § Billing): metered
|
|
1853
|
+
* (the default, and what no row means — cost unknown, charged as unknown cost is) or the agent's own plan ($0,
|
|
1854
|
+
* counted as unmeasured). Each change is a new row; the newest is the declaration, its id the revision a run stamps.
|
|
1855
|
+
*/
|
|
1856
|
+
/**
|
|
1857
|
+
* v125: a requested ACP agent check (docs/plans/acp-adapter.md § Layer E): asked for with a password, claimed and run
|
|
1858
|
+
* by one watch of the named runner — one running check per runner, which the partial unique index holds — through two
|
|
1859
|
+
* bounded steps, each bound to its run and graded on plane evidence; the attestation is recorded only in the same
|
|
1860
|
+
* transaction that marks the request passed.
|
|
1861
|
+
*/
|
|
1862
|
+
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";
|
|
1863
|
+
/** A check request as the job and the screens read it. */
|
|
1864
|
+
export type AcpCheckRequest = {
|
|
1865
|
+
id: number;
|
|
1866
|
+
provider: string;
|
|
1867
|
+
runner: string;
|
|
1868
|
+
model: string;
|
|
1869
|
+
conformanceVersion: number;
|
|
1870
|
+
requestedBy: string;
|
|
1871
|
+
requestedAt: string;
|
|
1872
|
+
expiresAt: string;
|
|
1873
|
+
state: "pending" | "running" | "passed" | "failed" | "expired";
|
|
1874
|
+
watch: {
|
|
1875
|
+
repo: string;
|
|
1876
|
+
owner: string;
|
|
1877
|
+
} | null;
|
|
1878
|
+
taskRef: number | null;
|
|
1879
|
+
launchJson: string | null;
|
|
1880
|
+
/** The claim the check took on its task: the only one its cleanup may release. */
|
|
1881
|
+
leaseId: string | null;
|
|
1882
|
+
stepsUsed: number;
|
|
1883
|
+
step1Run: number | null;
|
|
1884
|
+
step2Run: number | null;
|
|
1885
|
+
step1Passed: boolean;
|
|
1886
|
+
step2Passed: boolean;
|
|
1887
|
+
result: string | null;
|
|
1888
|
+
finishedAt: string | null;
|
|
1889
|
+
/** When everything the finished check held (claim, checkout, task) was let go. */
|
|
1890
|
+
settledAt: string | null;
|
|
1891
|
+
};
|
|
1892
|
+
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";
|
|
1893
|
+
/** An ACP run's billing as stamped when the run was admitted: never re-read from the live declaration. */
|
|
1894
|
+
export type AcpBillingStamp = {
|
|
1895
|
+
kind: "metered" | "plan";
|
|
1896
|
+
revision: number;
|
|
1897
|
+
model: string;
|
|
1898
|
+
};
|
|
1899
|
+
/** An ACP agent's live attestation, as the gateway reads it. */
|
|
1900
|
+
export type AcpAttestation = {
|
|
1901
|
+
id: number;
|
|
1902
|
+
provider: string;
|
|
1903
|
+
runner: string;
|
|
1904
|
+
conformanceVersion: number;
|
|
1905
|
+
launch: AcpLaunch;
|
|
1906
|
+
agent: {
|
|
1907
|
+
name: string;
|
|
1908
|
+
version: string;
|
|
1909
|
+
};
|
|
1910
|
+
cliVersion: string;
|
|
1911
|
+
models: string[];
|
|
1912
|
+
checks: string[];
|
|
1913
|
+
recordedAt: string;
|
|
1914
|
+
recordedBy: string;
|
|
1915
|
+
};
|
|
1765
1916
|
/** Reporting never creates, migrates, or repairs a store. SQLite itself
|
|
1766
1917
|
* enforces read-only access, including the race where the file disappears. */
|
|
1767
1918
|
export declare function openStoreReadOnly(file: string): Store | null;
|
|
@@ -3170,6 +3321,19 @@ export declare class Store {
|
|
|
3170
3321
|
} | null;
|
|
3171
3322
|
/** Stamp a task as the revision it is: source task + immutable brief. */
|
|
3172
3323
|
markRevision(taskRef: number, revisionOf: string, briefArtifact: number): void;
|
|
3324
|
+
/** v126: where a task came from, written once in its filing's transaction (task-source.ts), never changed. */
|
|
3325
|
+
recordTaskSource(taskId: string, from: {
|
|
3326
|
+
flow: number;
|
|
3327
|
+
card: number;
|
|
3328
|
+
entry: number;
|
|
3329
|
+
}, sourceJson: string, now: Date): void;
|
|
3330
|
+
/** v126: where a task came from, as kept when it (or the task it revises) was filed; null for every other task. */
|
|
3331
|
+
taskSourceOf(taskId: string): {
|
|
3332
|
+
flow: number;
|
|
3333
|
+
card: number;
|
|
3334
|
+
entry: number;
|
|
3335
|
+
sourceJson: string;
|
|
3336
|
+
} | null;
|
|
3173
3337
|
/**
|
|
3174
3338
|
* Seal a revision in ONE transaction (Codex M5-M8 audit, C-3; contract
|
|
3175
3339
|
* handoff task 2): the SOURCE BINDING is proven here, against live rows,
|
|
@@ -3469,13 +3633,19 @@ export declare class Store {
|
|
|
3469
3633
|
* verified, attested or accepted, or its branch was published (revised
|
|
3470
3634
|
* through its pull request). Null when `requeueTask` may run it again. */
|
|
3471
3635
|
finalResultReason(runId: number): "accepted-result" | "published" | null;
|
|
3472
|
-
requeueTask(taskId: string, by: string, now: Date
|
|
3636
|
+
requeueTask(taskId: string, by: string, now: Date,
|
|
3637
|
+
/** Approve & build again: requeue only while this exact build is the finished task's latest result and the scope
|
|
3638
|
+
* is still the one just approved, read inside this transaction ("moved" otherwise). */
|
|
3639
|
+
expect?: {
|
|
3640
|
+
run: number;
|
|
3641
|
+
scopeDigest: string;
|
|
3642
|
+
}): {
|
|
3473
3643
|
ok: true;
|
|
3474
3644
|
resolvedIncidents: number;
|
|
3475
3645
|
rejectedRun: number | null;
|
|
3476
3646
|
} | {
|
|
3477
3647
|
ok: false;
|
|
3478
|
-
reason: "unknown-task" | "not-stalled" | "claimed" | "accepted-result" | "published";
|
|
3648
|
+
reason: "unknown-task" | "not-stalled" | "claimed" | "accepted-result" | "published" | "moved";
|
|
3479
3649
|
};
|
|
3480
3650
|
/**
|
|
3481
3651
|
* Cancel, aware of who might be building right now. A live claim wins:
|
|
@@ -3982,6 +4152,9 @@ export declare class Store {
|
|
|
3982
4152
|
unknownSpend?: boolean;
|
|
3983
4153
|
replyBytes?: number;
|
|
3984
4154
|
candidateCount?: number;
|
|
4155
|
+
/** v129: the request's cache read and write tokens, where its provider reports them (unknown stays NULL). */
|
|
4156
|
+
cacheReadTokens?: number | null;
|
|
4157
|
+
cacheWriteTokens?: number | null;
|
|
3985
4158
|
}, now: Date): boolean;
|
|
3986
4159
|
/**
|
|
3987
4160
|
* The crash sweep: turns past their deadline become failed('crashed'),
|
|
@@ -4439,7 +4612,92 @@ export declare class Store {
|
|
|
4439
4612
|
* structural signal is gone. `auth-expired` pauses its provider; every
|
|
4440
4613
|
* other class is observational.
|
|
4441
4614
|
*/
|
|
4442
|
-
|
|
4615
|
+
/**
|
|
4616
|
+
* Record an ACP agent's passed conformance check on a runner (acp-attest.ts), replacing the live one — one
|
|
4617
|
+
* transaction, so there is never a moment with two or with a gap that reads as the old one.
|
|
4618
|
+
*/
|
|
4619
|
+
recordAcpAttestation(input: Omit<AcpAttestation, "id" | "recordedAt" | "conformanceVersion"> & {
|
|
4620
|
+
conformanceVersion?: number;
|
|
4621
|
+
}, now: Date): number;
|
|
4622
|
+
/** An ACP agent's live attestation on a runner, under this build's conformance version; null when there is none. */
|
|
4623
|
+
acpAttestationFor(provider: string, runner: string): AcpAttestation | null;
|
|
4624
|
+
/** Declare how an ACP agent's work on one model is billed on a runner; the new revision. */
|
|
4625
|
+
declareAcpBilling(input: {
|
|
4626
|
+
provider: string;
|
|
4627
|
+
runner: string;
|
|
4628
|
+
model: string;
|
|
4629
|
+
kind: "metered" | "plan";
|
|
4630
|
+
by: string;
|
|
4631
|
+
}, now: Date): number;
|
|
4632
|
+
/** The billing declaration standing for an ACP agent's model on a runner: metered, revision 0, when none was made. */
|
|
4633
|
+
acpBillingFor(provider: string, runner: string, model: string): AcpBillingStamp;
|
|
4634
|
+
/** The billing an ACP run was admitted under, or null (not an ACP run, or unreadable — then it is metered). */
|
|
4635
|
+
acpBillingOfRun(runId: number): AcpBillingStamp | null;
|
|
4636
|
+
/** Ask for an ACP agent check on a runner (the caller proved the password); the request's id. Valid 30 minutes. */
|
|
4637
|
+
requestAcpCheck(input: {
|
|
4638
|
+
provider: string;
|
|
4639
|
+
runner: string;
|
|
4640
|
+
model: string;
|
|
4641
|
+
by: string;
|
|
4642
|
+
}, now: Date): number;
|
|
4643
|
+
acpCheck(id: number): AcpCheckRequest | null;
|
|
4644
|
+
/** The checks asked for an agent, newest first (for the providers screen). */
|
|
4645
|
+
acpChecksFor(provider: string, limit?: number): AcpCheckRequest[];
|
|
4646
|
+
/** The SQL that proves a watch still holds its lease (runner, repo, owner) at `?` — appended with its bindings. */
|
|
4647
|
+
private static readonly WATCH_LIVE;
|
|
4648
|
+
/**
|
|
4649
|
+
* Claim the oldest pending, unexpired check for this runner, for the watch that will run it — one statement; the
|
|
4650
|
+
* partial unique index refuses a second running check on the runner. Null when there is none (or another runs).
|
|
4651
|
+
*/
|
|
4652
|
+
claimAcpCheck(runner: string, watch: {
|
|
4653
|
+
repo: string;
|
|
4654
|
+
owner: string;
|
|
4655
|
+
}, now: Date): AcpCheckRequest | null;
|
|
4656
|
+
/** Bind a running check, still owned and unexpired, to its task and the launch it inspected. */
|
|
4657
|
+
bindAcpCheck(id: number, binding: {
|
|
4658
|
+
taskRef: number;
|
|
4659
|
+
launchJson: string;
|
|
4660
|
+
leaseId: string;
|
|
4661
|
+
}, now: Date): boolean;
|
|
4662
|
+
/** Consume step 1 or 2 for its run: in order, once, owned, unexpired. */
|
|
4663
|
+
consumeAcpCheckStep(id: number, step: 1 | 2, runId: number, now: Date): boolean;
|
|
4664
|
+
/** Record a step as passed, once its grading did: owned, unexpired, and only for the run the step was bound to. */
|
|
4665
|
+
passAcpCheckStep(id: number, step: 1 | 2, runId: number, now: Date): boolean;
|
|
4666
|
+
/**
|
|
4667
|
+
* Publish a passed check: in one transaction, the request moves to passed — only if it is still running, unexpired,
|
|
4668
|
+
* owned by its live watch, with both steps used, bound and passed, and both their runs finished as agent-check
|
|
4669
|
+
* refusals — and the attestation is recorded. Anything else publishes nothing.
|
|
4670
|
+
*/
|
|
4671
|
+
publishAcpCheck(id: number, attestation: Omit<AcpAttestation, "id" | "recordedAt" | "conformanceVersion">, now: Date): boolean;
|
|
4672
|
+
/** The check request, when it still admits this run as its current step: running, unexpired, its watch's lease
|
|
4673
|
+
* live, and the step bound to exactly this run. Null otherwise. */
|
|
4674
|
+
acpCheckAdmitting(id: number, step: 1 | 2, runId: number, now: Date): AcpCheckRequest | null;
|
|
4675
|
+
/** Fail a check that hasn't finished, with its words. */
|
|
4676
|
+
failAcpCheck(id: number, words: string, now: Date): boolean;
|
|
4677
|
+
/** Running checks on this runner no live watch holds any more, or past their time: the ones recovery may close. */
|
|
4678
|
+
abandonedAcpChecks(runner: string, now: Date): AcpCheckRequest[];
|
|
4679
|
+
/** Finished checks on this runner whose claim, checkout and task are not yet let go: cleanup's to-do, retried each pass. */
|
|
4680
|
+
unsettledAcpChecks(runner: string): AcpCheckRequest[];
|
|
4681
|
+
/** The claim a finished check's cleanup now holds on its task (its first one expired): the only one it may release. */
|
|
4682
|
+
setAcpCheckLease(id: number, leaseId: string): boolean;
|
|
4683
|
+
/** A finished check holds something again (a checkout that landed after recovery settled it): cleanup reopens. */
|
|
4684
|
+
unsettleAcpCheck(id: number): boolean;
|
|
4685
|
+
/** Take — or renew — the one cleanup attempt a finished check may have at a time: free, lapsed, or already this one. */
|
|
4686
|
+
holdAcpSettle(id: number, attempt: string, now: Date, ttlMs: number): boolean;
|
|
4687
|
+
/** Whether this cleanup attempt still holds the check. */
|
|
4688
|
+
holdsAcpSettle(id: number, attempt: string, now: Date): boolean;
|
|
4689
|
+
/** Let go of a cleanup attempt (only this one). */
|
|
4690
|
+
endAcpSettle(id: number, attempt: string): void;
|
|
4691
|
+
/** Mark a finished check's holdings let go — by the attempt holding it, and only if no checkout of its branch is
|
|
4692
|
+
* left (one that landed late keeps it open, whatever the attempt last saw). */
|
|
4693
|
+
settleAcpCheck(id: number, attempt: string, branch: string, now: Date): boolean;
|
|
4694
|
+
/** Pending checks past their time are expired, untouched. */
|
|
4695
|
+
expireAcpChecks(now: Date): number;
|
|
4696
|
+
/** Revoke an ACP agent's live attestation on a runner; whether there was one. */
|
|
4697
|
+
revokeAcpAttestation(provider: string, runner: string, by: string, now: Date): boolean;
|
|
4698
|
+
/** What a run's ACP agent itself reported it used (never priced; acp-client.ts). */
|
|
4699
|
+
stampAgentReportedUsage(id: number, usage: string | null): void;
|
|
4700
|
+
stampTerminalClass(id: number, authMode: "subscription" | "api-key" | "agent-login", terminalClass: TerminalClass): void;
|
|
4443
4701
|
/** A launch refused before any model turn (an installed CLI too old for a
|
|
4444
4702
|
* build's flags): the start stamp goes, its version and evidence stay. Only
|
|
4445
4703
|
* while the run is open, so a settled run's account never changes. */
|
|
@@ -4453,6 +4711,7 @@ export declare class Store {
|
|
|
4453
4711
|
tokensOut?: number;
|
|
4454
4712
|
costUsd?: number;
|
|
4455
4713
|
usageJson?: string;
|
|
4714
|
+
agentTurns?: number;
|
|
4456
4715
|
}): void;
|
|
4457
4716
|
/** v105: price a run as it stands (reported cost, or tokens at the catalogue price, or unpriced), frozen at the
|
|
4458
4717
|
* price of the moment it's settled. Settled again whenever its usage changes. */
|
|
@@ -4547,6 +4806,9 @@ export declare class Store {
|
|
|
4547
4806
|
subagent: number | null;
|
|
4548
4807
|
agents?: readonly BudgetAgent[];
|
|
4549
4808
|
}) => BudgetHold;
|
|
4809
|
+
/** How one agent would bill new work now: an ACP agent by its declaration for that exact model on that runner
|
|
4810
|
+
* (plan reads as a plan, anything else as metered), every other provider as agentsFor says. */
|
|
4811
|
+
agentFor(provider: string, model: string | null, runner: string | null): BudgetAgent;
|
|
4550
4812
|
/** How each provider would bill new work now (see spend.billingOf). */
|
|
4551
4813
|
agentsFor(providers: readonly string[]): BudgetAgent[];
|
|
4552
4814
|
/** v105: how a provider's CLI was seen billing (a Claude stream's key source, Codex's account mode). */
|
|
@@ -4800,6 +5062,27 @@ export declare class Store {
|
|
|
4800
5062
|
reason: "unknown-task" | "task-finished" | "invalid-note";
|
|
4801
5063
|
problem?: string;
|
|
4802
5064
|
};
|
|
5065
|
+
/**
|
|
5066
|
+
* File a note for the exact run a person is watching (live-conversation.md
|
|
5067
|
+
* §6): in ONE transaction, the run must still be the task's live attempt
|
|
5068
|
+
* (or, `onward`, any attempt of this task: the note goes to the next one),
|
|
5069
|
+
* and a repeated `key` from the same author hands back the same note — only
|
|
5070
|
+
* for the same task, run and text, whichever of the two ways it was sent;
|
|
5071
|
+
* any other reuse is refused. Nothing is filed on a refusal.
|
|
5072
|
+
*/
|
|
5073
|
+
fileSteerNoteForRun(taskId: string, author: VerifiedAuthor, note: string, now: Date, expect: {
|
|
5074
|
+
run: number;
|
|
5075
|
+
key: string | null;
|
|
5076
|
+
onward?: boolean;
|
|
5077
|
+
}): {
|
|
5078
|
+
ok: true;
|
|
5079
|
+
id: number;
|
|
5080
|
+
replayed: boolean;
|
|
5081
|
+
} | {
|
|
5082
|
+
ok: false;
|
|
5083
|
+
reason: "unknown-task" | "task-finished" | "invalid-note" | "attempt-ended" | "key-reused";
|
|
5084
|
+
problem?: string;
|
|
5085
|
+
};
|
|
4803
5086
|
/** One verified note, with the identity a running build's stdin copy is sent under: filing it is also what queues
|
|
4804
5087
|
* its live delivery, in the same transaction (the builder's dispatcher sends whatever is filed and unsent). */
|
|
4805
5088
|
private insertSteerNote;
|
|
@@ -4845,6 +5128,10 @@ export declare class Store {
|
|
|
4845
5128
|
/** The pulse wrote this note into the run's steering folder. Mailing is not
|
|
4846
5129
|
* reading: delivery settles only on the agent's own acknowledgement. */
|
|
4847
5130
|
markSteerMailed(noteId: number, runId: number, now: Date): boolean;
|
|
5131
|
+
/** One run a note reached, kept for its live conversation (live-notes.ts); display state, so a failure never blocks steering. */
|
|
5132
|
+
private noteSteerReached;
|
|
5133
|
+
/** The notes this run reached, filing order — attached to its brief, mailed into its folder, or read by it. */
|
|
5134
|
+
steerNotesReaching(runId: number): SteerNote[];
|
|
4848
5135
|
/**
|
|
4849
5136
|
* The agent moved this note to handled/ (v120): it was read, by THIS run.
|
|
4850
5137
|
* Acknowledgement is the only road from mailed to delivered — a hook firing
|
|
@@ -5433,12 +5720,16 @@ export declare class Store {
|
|
|
5433
5720
|
by: string;
|
|
5434
5721
|
}, now: Date): boolean;
|
|
5435
5722
|
archiveFlow(id: number, by: string, now: Date): boolean;
|
|
5723
|
+
/** A new card. `byKind` (v126) is decided where the card is made, never read from `by`: a delivery, a poll, a schedule
|
|
5724
|
+
* a public form or a chat channel's message is automation whatever its label says; a signed-in person's own card is a
|
|
5725
|
+
* person's. Every caller says which: filing passes it on exactly, and never reads it from `by`. */
|
|
5436
5726
|
addFlowCard(card: {
|
|
5437
5727
|
flow: number;
|
|
5438
5728
|
title: string;
|
|
5439
5729
|
description: string | null;
|
|
5440
5730
|
stage: string;
|
|
5441
5731
|
by: string;
|
|
5732
|
+
byKind: "person" | "automation";
|
|
5442
5733
|
source?: FlowCardSource;
|
|
5443
5734
|
}, now: Date): number;
|
|
5444
5735
|
getFlowCard(id: number): FlowCardRow | null;
|
|
@@ -5808,6 +6099,47 @@ export declare class Store {
|
|
|
5808
6099
|
* firing) the task it filed. False when it was already recorded.
|
|
5809
6100
|
*/
|
|
5810
6101
|
recordFlowTriggerEvent(trigger: number, key: string, card: number | null, note: string | null, now: Date, task?: string | null, onTime?: boolean, ranScript?: string | null): boolean;
|
|
6102
|
+
/**
|
|
6103
|
+
* v126: point a trigger at another saved secret ("" for none), and (when given) its new settings, in one write — only
|
|
6104
|
+
* from the secret and settings the caller read, so of two changes at once exactly one lands. False when it changed
|
|
6105
|
+
* meanwhile (or the trigger is gone): the caller then removes only the secret it wrote itself.
|
|
6106
|
+
*/
|
|
6107
|
+
swapFlowHookCredential(id: number, from: {
|
|
6108
|
+
credential: string;
|
|
6109
|
+
configJson: string;
|
|
6110
|
+
hookHash: string | null;
|
|
6111
|
+
}, to: {
|
|
6112
|
+
credential: string;
|
|
6113
|
+
hookHash?: string;
|
|
6114
|
+
}, configJson: string | null, now: Date): boolean;
|
|
6115
|
+
/** v126: what a trigger did with one delivery, or null when it never received it. */
|
|
6116
|
+
flowReceipt(trigger: number, key: string): FlowReceipt | null;
|
|
6117
|
+
/** v126: a delivery received but made no card for: ignored (not for this flow), or held until there's room (its
|
|
6118
|
+
* prepared item kept whole). False when the key was already received. */
|
|
6119
|
+
recordFlowReceipt(trigger: number, key: string, state: "ignored" | "held", note: string | null, itemJson: string | null, now: Date): boolean;
|
|
6120
|
+
/** v126: a held delivery became its card. Only ever from held, in the card's own transaction: false (the caller rolls
|
|
6121
|
+
* the card back) when it is no longer held. */
|
|
6122
|
+
acceptHeldReceipt(trigger: number, key: string, card: number, now: Date): boolean;
|
|
6123
|
+
/** v126: the cards a trigger made since `since`, counted when each was made (a held delivery counts when it became
|
|
6124
|
+
* its card, not when it arrived). A receipt saved before v126 counts at its arrival. */
|
|
6125
|
+
flowCardsAcceptedSince(trigger: number, since: Date): number;
|
|
6126
|
+
/** v126: a trigger's held deliveries, oldest first. */
|
|
6127
|
+
heldFlowReceipts(trigger: number, limit: number): {
|
|
6128
|
+
key: string;
|
|
6129
|
+
itemJson: string;
|
|
6130
|
+
at: string;
|
|
6131
|
+
}[];
|
|
6132
|
+
/** v126: a held delivery that can't become its card (its words no longer pass): left out, with why. */
|
|
6133
|
+
skipHeldReceipt(trigger: number, key: string, note: string): boolean;
|
|
6134
|
+
/** v126: how many deliveries a trigger holds. */
|
|
6135
|
+
heldFlowReceiptCount(trigger: number): number;
|
|
6136
|
+
/** v126: one delivery turned away because the hold queue was full: counted, and since when, until a person clears it. */
|
|
6137
|
+
noteFlowDeliveryDropped(trigger: number, now: Date): void;
|
|
6138
|
+
/** v126: a person has seen the turned-away deliveries. */
|
|
6139
|
+
clearFlowDeliveriesDropped(trigger: number): void;
|
|
6140
|
+
/** v126: whether this hour's "too many" note on a trigger is still to be written: true at most once an hour, claimed
|
|
6141
|
+
* atomically so two deliveries at once write it once. */
|
|
6142
|
+
claimFlowLimitNote(trigger: number, now: Date): boolean;
|
|
5811
6143
|
/** The last card a trigger made, if any. */
|
|
5812
6144
|
lastFlowTriggerCard(trigger: number): number | null;
|
|
5813
6145
|
/**
|
|
@@ -5865,6 +6197,9 @@ export declare class Store {
|
|
|
5865
6197
|
method: string;
|
|
5866
6198
|
paths: number;
|
|
5867
6199
|
}, now: Date): void;
|
|
6200
|
+
/** What one attempt's network was and what its proxy saw (egress.ts), kept beside its fence. */
|
|
6201
|
+
recordRunNetwork(run: number, network: RunNetworkRecord, now: Date): void;
|
|
6202
|
+
runNetwork(run: number): RunNetworkRecord | null;
|
|
5868
6203
|
runFence(run: number): {
|
|
5869
6204
|
method: string;
|
|
5870
6205
|
paths: number;
|
|
@@ -5887,13 +6222,20 @@ export declare class Store {
|
|
|
5887
6222
|
/** `--end` and revocation: the thread's text and every proposal in it are
|
|
5888
6223
|
* deleted; the thread row stays as closed metadata (when, whose). */
|
|
5889
6224
|
closeLeadThreadsFor(approver: string, now: Date): number;
|
|
6225
|
+
/** `pending`: a queued message (personal or team) that waits for its turn — out of the model's history until the
|
|
6226
|
+
* admission that binds it clears the flag in the same statement (v128). */
|
|
5890
6227
|
appendLeadMessage(message: {
|
|
5891
6228
|
thread: number;
|
|
5892
6229
|
turn: number | null;
|
|
5893
6230
|
role: "operator" | "assistant";
|
|
5894
6231
|
text: string;
|
|
5895
6232
|
activity?: string | null;
|
|
6233
|
+
pending?: boolean;
|
|
5896
6234
|
}, now: Date): number;
|
|
6235
|
+
/** The model's history: the last `limit` ADMITTED messages, oldest first — a message still waiting for its turn (or
|
|
6236
|
+
* removed, expired or refused while waiting) is never read back to the lead. An index range scan whatever the backlog
|
|
6237
|
+
* (lead_message_history). People see the whole thread through listLeadMessages. */
|
|
6238
|
+
listLeadHistory(thread: number, limit: number): LeadMessage[];
|
|
5897
6239
|
/** The last `limit` messages, oldest first. */
|
|
5898
6240
|
listLeadMessages(thread: number, limit: number): LeadMessage[];
|
|
5899
6241
|
/** A proposal is inert (`drafting`) until its turn finalizes. */
|
|
@@ -5962,12 +6304,18 @@ export declare class Store {
|
|
|
5962
6304
|
weeklyCeilingMicrousd: number;
|
|
5963
6305
|
deadlineMs: number;
|
|
5964
6306
|
provider?: string;
|
|
6307
|
+
/** The personal queue claim this turn runs (lead-queue.ts): the only admission the backlog lets through. */
|
|
6308
|
+
queueClaim?: {
|
|
6309
|
+
message: number;
|
|
6310
|
+
runner: string;
|
|
6311
|
+
generation: number;
|
|
6312
|
+
};
|
|
5965
6313
|
}, now: Date): {
|
|
5966
6314
|
ok: true;
|
|
5967
6315
|
id: number;
|
|
5968
6316
|
} | {
|
|
5969
6317
|
ok: false;
|
|
5970
|
-
reason: "latched" | "concurrent" | "daily-cap" | "session-exhausted" | "session-ended" | "not-yours" | "thread-closed" | "over-budget" | "monthly-budget";
|
|
6318
|
+
reason: "latched" | "concurrent" | "backlog" | "daily-cap" | "session-exhausted" | "session-ended" | "not-yours" | "thread-closed" | "over-budget" | "monthly-budget";
|
|
5971
6319
|
};
|
|
5972
6320
|
startLeadTurn(id: number, now: Date): {
|
|
5973
6321
|
ok: true;
|
|
@@ -6147,7 +6495,7 @@ export declare class Store {
|
|
|
6147
6495
|
handoff: string | null;
|
|
6148
6496
|
costUsd: number | null;
|
|
6149
6497
|
provider: string | null;
|
|
6150
|
-
authMode: "subscription" | "api-key" | null;
|
|
6498
|
+
authMode: "subscription" | "api-key" | "agent-login" | null;
|
|
6151
6499
|
ranMinutes: number | null;
|
|
6152
6500
|
prNumber: number | null;
|
|
6153
6501
|
prUrl: string | null;
|
|
@@ -6181,7 +6529,7 @@ export declare class Store {
|
|
|
6181
6529
|
startedAt: string;
|
|
6182
6530
|
ranMinutes: number | null;
|
|
6183
6531
|
costUsd: number | null;
|
|
6184
|
-
authMode: "subscription" | "api-key" | null;
|
|
6532
|
+
authMode: "subscription" | "api-key" | "agent-login" | null;
|
|
6185
6533
|
prNumber: number | null;
|
|
6186
6534
|
prUrl: string | null;
|
|
6187
6535
|
}[];
|
|
@@ -6393,6 +6741,8 @@ export declare class Store {
|
|
|
6393
6741
|
* note couldn't be read has stopped. */
|
|
6394
6742
|
private workspaceConfirmedByApprover;
|
|
6395
6743
|
reserveRunProcess(runId: number, now: Date, group?: boolean): number;
|
|
6744
|
+
/** The run's process witnesses not yet proved exited — after first saving whatever exit evidence is available. */
|
|
6745
|
+
openRunProcessCount(runId: number, now: Date): number;
|
|
6396
6746
|
/** Save positive OS exit evidence while it is available, before a numeric
|
|
6397
6747
|
* PID can be reused. Completion, missing ancestry and age prove nothing.
|
|
6398
6748
|
* Existing rows stay intact; only a previously unknown exit is recorded.
|
|
@@ -6490,14 +6840,14 @@ export declare class Store {
|
|
|
6490
6840
|
scope?: string;
|
|
6491
6841
|
reason: string;
|
|
6492
6842
|
resetAt?: Date;
|
|
6493
|
-
authMode?: "subscription" | "api-key";
|
|
6843
|
+
authMode?: "subscription" | "api-key" | "agent-login";
|
|
6494
6844
|
credentialFp?: string;
|
|
6495
6845
|
}, now: Date): void;
|
|
6496
6846
|
/**
|
|
6497
6847
|
* The quota gate's answer, with the lazy exhausted→half-open transition at
|
|
6498
6848
|
* the known reset. Null means no recorded constraint.
|
|
6499
6849
|
*/
|
|
6500
|
-
quotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key", credentialFp?: string): {
|
|
6850
|
+
quotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): {
|
|
6501
6851
|
state: "exhausted" | "half-open";
|
|
6502
6852
|
reason: string;
|
|
6503
6853
|
resetAt: string | null;
|
|
@@ -6505,7 +6855,7 @@ export declare class Store {
|
|
|
6505
6855
|
/** Read-only quota observation for status surfaces. A passed reset reads
|
|
6506
6856
|
* half-open, matching quotaState's lazy transition, but this method never
|
|
6507
6857
|
* consumes or changes the probe slot. */
|
|
6508
|
-
readQuotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key", credentialFp?: string): {
|
|
6858
|
+
readQuotaState(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): {
|
|
6509
6859
|
state: "exhausted" | "half-open";
|
|
6510
6860
|
reason: string;
|
|
6511
6861
|
resetAt: string | null;
|
|
@@ -6517,9 +6867,9 @@ export declare class Store {
|
|
|
6517
6867
|
* while the probe flies. The probe's success clears the row; the same
|
|
6518
6868
|
* structured signal that stamped it re-stamps on failure.
|
|
6519
6869
|
*/
|
|
6520
|
-
consumeHalfOpen(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key", credentialFp?: string): boolean;
|
|
6870
|
+
consumeHalfOpen(runner: string, provider: string, scope: string, now: Date, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): boolean;
|
|
6521
6871
|
/** 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;
|
|
6872
|
+
clearQuota(runner: string, provider: string, scope: string, authMode?: "subscription" | "api-key" | "agent-login", credentialFp?: string): boolean;
|
|
6523
6873
|
/**
|
|
6524
6874
|
* Live claims this runner holds right now — the occupied slots of §8's
|
|
6525
6875
|
* capacity gate.
|
|
@@ -6530,6 +6880,23 @@ export declare class Store {
|
|
|
6530
6880
|
/** Every builder's live attempts, by project: what `status` shows against each project's limit. */
|
|
6531
6881
|
runningBuildsByRepo(now: Date): Map<string, number>;
|
|
6532
6882
|
/** A project's build concurrency changed (project-concurrency.ts): the ledger keeps before → after. */
|
|
6883
|
+
/** A project's network (egress.ts): its saved setting, or the default when none is saved or it doesn't read. */
|
|
6884
|
+
projectNetwork(repo: string): ProjectNetwork;
|
|
6885
|
+
/** An approver changed a project's network: saved, and in the ledger as before → after. */
|
|
6886
|
+
setProjectNetwork(repo: string, network: ProjectNetwork, by: string, now: Date): {
|
|
6887
|
+
before: ProjectNetwork;
|
|
6888
|
+
after: ProjectNetwork;
|
|
6889
|
+
};
|
|
6890
|
+
/** Where a project's builds may write (agent-fence.ts): its saved setting, or only their workspace. */
|
|
6891
|
+
projectWrites(repo: string): WritesMode;
|
|
6892
|
+
/** An approver changed where a project's builds may write: saved, and in the ledger as before → after. */
|
|
6893
|
+
setProjectWrites(repo: string, mode: WritesMode, by: string, now: Date): {
|
|
6894
|
+
before: WritesMode;
|
|
6895
|
+
after: WritesMode;
|
|
6896
|
+
};
|
|
6897
|
+
/** Whether this installation lets an agent run where no OS confinement exists (off unless an operator said so). */
|
|
6898
|
+
unfencedAgentsAllowed(): boolean;
|
|
6899
|
+
setUnfencedAgentsAllowed(allowed: boolean, by: string, now: Date): void;
|
|
6533
6900
|
recordProjectConcurrency(by: string, repo: string, before: number, after: number, now: Date): void;
|
|
6534
6901
|
/** Review 827: a project's demo URL changed (`off` when it has none). */
|
|
6535
6902
|
recordProjectDemo(by: string, repo: string, before: string | null, after: string | null, now: Date): void;
|
|
@@ -6550,6 +6917,7 @@ export declare class Store {
|
|
|
6550
6917
|
advanceBridgeCursor(botId: string, owner: string, generation: number, cursor: number, now: Date): boolean;
|
|
6551
6918
|
markTelegramUpdateApplied(...args: Parameters<ChatMessages["markUpdateApplied"]>): ReturnType<ChatMessages["markUpdateApplied"]>;
|
|
6552
6919
|
enqueueTelegramConversation(...args: Parameters<ChatMessages["enqueueMessage"]>): ReturnType<ChatMessages["enqueueMessage"]>;
|
|
6920
|
+
telegramMessagesWaiting(binding: number): number;
|
|
6553
6921
|
telegramConversationWaitingOn(...args: Parameters<ChatMessages["messageWaitingOn"]>): ReturnType<ChatMessages["messageWaitingOn"]>;
|
|
6554
6922
|
getTelegramConversation(...args: Parameters<ChatMessages["getMessage"]>): ReturnType<ChatMessages["getMessage"]>;
|
|
6555
6923
|
listTelegramConversations(...args: Parameters<ChatMessages["listMessages"]>): ReturnType<ChatMessages["listMessages"]>;
|
|
@@ -6577,6 +6945,7 @@ export declare class Store {
|
|
|
6577
6945
|
telegramRetryAt(botId: string): string;
|
|
6578
6946
|
deferTelegram(botId: string, until: string): void;
|
|
6579
6947
|
telegramDeliveryProblem(...args: Parameters<ChatMessages["deliveryProblem"]>): ReturnType<ChatMessages["deliveryProblem"]>;
|
|
6948
|
+
telegramWatchFence(...args: Parameters<ChatMessages["watchFence"]>): ReturnType<ChatMessages["watchFence"]>;
|
|
6580
6949
|
recordTelegramMessage(...args: Parameters<ChatMessages["recordMessage"]>): ReturnType<ChatMessages["recordMessage"]>;
|
|
6581
6950
|
telegramMessageOf(...args: Parameters<ChatMessages["messageOf"]>): ReturnType<ChatMessages["messageOf"]>;
|
|
6582
6951
|
finalizeTelegramDelivery(...args: Parameters<ChatMessages["finalizeDelivery"]>): ReturnType<ChatMessages["finalizeDelivery"]>;
|
|
@@ -6777,7 +7146,7 @@ export declare class Store {
|
|
|
6777
7146
|
* the subscription live under its enrolled generation, the notification
|
|
6778
7147
|
* unresolved and still stamped. Null = do not transmit.
|
|
6779
7148
|
*/
|
|
6780
|
-
pushSendFence(id: number, owner: string, generation: number): (PushPair & {
|
|
7149
|
+
pushSendFence(id: number, owner: string, generation: number, now?: Date): (PushPair & {
|
|
6781
7150
|
subscriptionRow: PushSubscription;
|
|
6782
7151
|
notificationRow: Notification;
|
|
6783
7152
|
}) | null;
|
|
@@ -6822,6 +7191,62 @@ export declare class Store {
|
|
|
6822
7191
|
*/
|
|
6823
7192
|
replay<T>(mutation: Mutation, operation: string, body: () => T, worthRecording?: (result: T) => boolean): T;
|
|
6824
7193
|
private once;
|
|
7194
|
+
/** A kept web session's changes: never inserts, so a session ended elsewhere is not brought back by a cached copy.
|
|
7195
|
+
* False when it is gone. (Kept last in the class: the freshness tripwire pins method positions.) */
|
|
7196
|
+
updateWebSession(session: Pick<WebSessionRow, "idHash" | "lastSeen" | "project" | "projectRevision" | "ssoAt">): boolean;
|
|
7197
|
+
/** A new sweep record (inside the caller's filing transaction). */
|
|
7198
|
+
createSweep(input: {
|
|
7199
|
+
owner: string;
|
|
7200
|
+
thread: number | null;
|
|
7201
|
+
repo: string;
|
|
7202
|
+
title: string;
|
|
7203
|
+
brief: string;
|
|
7204
|
+
maxParallel: number;
|
|
7205
|
+
proposal: number | null;
|
|
7206
|
+
}, now: Date): number;
|
|
7207
|
+
/** Link one filed child (its family root) to its sweep, in order. */
|
|
7208
|
+
addSweepTask(sweep: number, rootTask: string, ordinal: number, label: string): void;
|
|
7209
|
+
getSweep(id: number): {
|
|
7210
|
+
id: number;
|
|
7211
|
+
owner: string;
|
|
7212
|
+
thread: number | null;
|
|
7213
|
+
repo: string;
|
|
7214
|
+
title: string;
|
|
7215
|
+
brief: string;
|
|
7216
|
+
maxParallel: number;
|
|
7217
|
+
proposal: number | null;
|
|
7218
|
+
createdAt: string;
|
|
7219
|
+
} | null;
|
|
7220
|
+
/** The sweep a proposal filed, if it did (a replayed confirm finds it). */
|
|
7221
|
+
sweepOfProposal(proposal: number): number | null;
|
|
7222
|
+
/** A sweep's children, in order: each one's family root and its label. */
|
|
7223
|
+
sweepTasks(sweep: number): {
|
|
7224
|
+
rootTask: string;
|
|
7225
|
+
ordinal: number;
|
|
7226
|
+
label: string;
|
|
7227
|
+
}[];
|
|
7228
|
+
/** The sweep a task belongs to through its family root (a revision of a child belongs too), or null. */
|
|
7229
|
+
sweepOfTask(taskId: string): {
|
|
7230
|
+
id: number;
|
|
7231
|
+
maxParallel: number;
|
|
7232
|
+
} | null;
|
|
7233
|
+
/**
|
|
7234
|
+
* How many of a sweep's families hold a live claim now (the latest lease of any task in the family, unreleased and
|
|
7235
|
+
* unexpired, across every runner) — claimed-but-not-started counts. `except` leaves one task_ref out (the one being
|
|
7236
|
+
* claimed). Read inside acquire's own write transaction, so two runners can't both take the last slot.
|
|
7237
|
+
*/
|
|
7238
|
+
sweepLiveClaims(sweep: number, stamp: string, except?: number | null): number;
|
|
7239
|
+
/** Whether a request of this lead turn ended with its cost unknown and that cost is still unconfirmed — the turn is
|
|
7240
|
+
* what keeps chat paused on its credential. Once confirmed, it no longer is. */
|
|
7241
|
+
leadTurnCostUnconfirmed(leadTurn: number): boolean;
|
|
7242
|
+
/** The lead turn a chat step belongs to (a lead reply's request), or null for a standalone chat turn. */
|
|
7243
|
+
leadTurnOfStep(step: number): LeadTurn | null;
|
|
7244
|
+
/** A waiting message that will never run keeps nothing of what it said (v128 lead queue): its words, the context it was
|
|
7245
|
+
* sent with, and any copy the memory search made of it. Only while it is still pending — a message a turn took stays. */
|
|
7246
|
+
/** Whether a send of this session reached the plane: the engine took it, or the lead queue holds it (waiting, run,
|
|
7247
|
+
* removed or expired — any of those means the composer's draft was accepted and must not be sent again). */
|
|
7248
|
+
leadRequestReceived(session: number, request: string): boolean;
|
|
7249
|
+
forgetQueuedLeadMessage(message: number): void;
|
|
6825
7250
|
}
|
|
6826
7251
|
/** The receipt a bot's first pairing writes over pre-pairing history: an
|
|
6827
7252
|
* explicit skip, with no delivered timestamp and no attempt, so suppressed
|