toolroll 0.9.55 → 0.9.56
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 +10 -0
- package/README.md +24 -8
- package/dist/action-ledger.d.ts +2 -4
- package/dist/action-ledger.js +2 -10
- package/dist/approval-policy.d.ts +5 -5
- package/dist/approval-policy.js +4 -4
- package/dist/approval-rules-ui.js +2 -2
- package/dist/browser/workspace.js +5 -5
- package/dist/browser-workspace.d.ts +12 -12
- package/dist/budget-alerts.js +3 -3
- package/dist/chat-actions.d.ts +23 -18
- package/dist/chat-actions.js +110 -88
- package/dist/chat-ask.d.ts +2 -2
- package/dist/chat-ask.js +5 -5
- package/dist/chat-channel.d.ts +15 -15
- package/dist/chat-channel.js +20 -20
- package/dist/chat-controls.d.ts +0 -4
- package/dist/chat-controls.js +0 -1
- package/dist/chat-core.js +1 -1
- package/dist/chat-delivery-state.js +2 -2
- package/dist/chat-delivery.d.ts +2 -2
- package/dist/chat-delivery.js +27 -34
- package/dist/chat-flow.js +3 -3
- package/dist/chat-messages.d.ts +1 -1
- package/dist/chat-messages.js +4 -4
- package/dist/chat-migration.d.ts +1 -1
- package/dist/chat-migration.js +11 -11
- package/dist/chat-rooms.js +3 -3
- package/dist/chat-warmth.d.ts +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +6 -7
- package/dist/contracts/chat-actions.d.ts +32 -27
- package/dist/contracts/chat-actions.js +29 -11
- package/dist/contracts/chat-content.d.ts +1 -1
- package/dist/contracts/chat-content.js +1 -1
- package/dist/contracts/chat-tables.js +4 -4
- package/dist/contracts/console-api.d.ts +6 -6
- package/dist/contracts/console-api.js +7 -7
- package/dist/contracts/flow-propose.d.ts +3 -3
- package/dist/contracts/flow.d.ts +132 -125
- package/dist/contracts/flow.js +27 -12
- package/dist/contracts/lead-context.d.ts +1 -1
- package/dist/contracts/lead-context.js +2 -2
- package/dist/contracts/lead-tools.d.ts +20 -18
- package/dist/contracts/lead-tools.js +15 -15
- package/dist/contracts/stage-output.d.ts +1 -1
- package/dist/contracts/stage-output.js +1 -1
- package/dist/contracts/store-json.d.ts +23 -22
- package/dist/contracts/store-json.js +17 -17
- package/dist/contracts/{teammate-turn.d.ts → subagent-turn.d.ts} +5 -5
- package/dist/contracts/{teammate-turn.js → subagent-turn.js} +7 -7
- package/dist/converse.d.ts +23 -23
- package/dist/converse.js +28 -28
- package/dist/coordinator-proposals.d.ts +2 -2
- package/dist/coordinator-proposals.js +1 -1
- package/dist/coordinator.js +1 -1
- package/dist/deprecations.d.ts +12 -0
- package/dist/deprecations.js +20 -0
- package/dist/desktop-update-gate.js +8 -4
- package/dist/desktop-update.js +6 -1
- package/dist/discord-chat.js +6 -6
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +1 -1
- package/dist/envelope.js +0 -1
- package/dist/export-ui.js +1 -1
- package/dist/export.js +7 -7
- package/dist/flow-engine.d.ts +2 -2
- package/dist/flow-engine.js +21 -21
- package/dist/flow-insights.d.ts +1 -1
- package/dist/flow-share.js +13 -8
- package/dist/flow-steps.d.ts +5 -5
- package/dist/flow-steps.js +19 -19
- package/dist/flow-triggers.d.ts +1 -1
- package/dist/flow-triggers.js +1 -1
- package/dist/flows-cli.js +1 -1
- package/dist/flows-ui.js +20 -20
- package/dist/flows.js +19 -19
- package/dist/guides.js +4 -3
- package/dist/invoke.js +1 -1
- package/dist/kits-ui.js +5 -5
- package/dist/kits.d.ts +12 -12
- package/dist/kits.js +31 -31
- package/dist/{mate-cli.d.ts → lead-cli.d.ts} +11 -11
- package/dist/{mate-cli.js → lead-cli.js} +38 -38
- package/dist/lead-commitments.js +4 -4
- package/dist/lead-context.d.ts +2 -2
- package/dist/lead-context.js +9 -9
- package/dist/{mate-contract.d.ts → lead-contract.d.ts} +3 -3
- package/dist/{mate-contract.js → lead-contract.js} +7 -6
- package/dist/{mate-doors.d.ts → lead-doors.d.ts} +6 -6
- package/dist/{mate-doors.js → lead-doors.js} +24 -24
- package/dist/lead-follow.d.ts +5 -5
- package/dist/lead-follow.js +9 -9
- package/dist/lead-people.d.ts +5 -5
- package/dist/lead-people.js +14 -14
- package/dist/{mate-progress.d.ts → lead-progress.d.ts} +9 -9
- package/dist/{mate-progress.js → lead-progress.js} +3 -3
- package/dist/{mate-tools.d.ts → lead-tools.d.ts} +19 -19
- package/dist/{mate-tools.js → lead-tools.js} +109 -101
- package/dist/{mate.d.ts → lead.d.ts} +27 -27
- package/dist/{mate.js → lead.js} +102 -102
- package/dist/limits-ui.d.ts +1 -1
- package/dist/limits-ui.js +1 -1
- package/dist/mcp-connect.d.ts +1 -1
- package/dist/mcp-connect.js +3 -3
- package/dist/mcp-core.js +1 -1
- package/dist/memory-pass.d.ts +2 -2
- package/dist/memory-pass.js +7 -7
- package/dist/notification-rows.d.ts +2 -2
- package/dist/operate.d.ts +3 -3
- package/dist/operate.js +35 -34
- package/dist/policy.d.ts +1 -1
- package/dist/principal.d.ts +1 -1
- package/dist/principal.js +2 -2
- package/dist/project-delete-ui.js +1 -1
- package/dist/project-delete.d.ts +1 -1
- package/dist/project-delete.js +26 -26
- package/dist/project-memory.js +1 -1
- package/dist/project-tools.d.ts +1 -1
- package/dist/project-tools.js +1 -1
- package/dist/recipe-ui.js +1 -1
- package/dist/retention.js +4 -4
- package/dist/scope.d.ts +2 -2
- package/dist/scout-report.d.ts +1 -1
- package/dist/scout-report.js +1 -1
- package/dist/serve.js +40 -45
- package/dist/server/chat.d.ts +4 -4
- package/dist/server/chat.js +97 -97
- package/dist/server/chrome.js +3 -3
- package/dist/server/flows.js +69 -62
- package/dist/server/guards.js +3 -3
- package/dist/server/http.d.ts +3 -3
- package/dist/server/http.js +1 -1
- package/dist/server/live.js +6 -6
- package/dist/server/people-tokens.js +1 -1
- package/dist/server/remote.js +12 -10
- package/dist/server/render-chat.d.ts +30 -30
- package/dist/server/render-chat.js +33 -33
- package/dist/server/render-pages.js +2 -2
- package/dist/server/render-settings.d.ts +7 -0
- package/dist/server/render-settings.js +3 -0
- package/dist/server/route-table.js +9 -7
- package/dist/server/runtime.d.ts +13 -13
- package/dist/server/settings.js +14 -13
- package/dist/server/tasks.js +6 -5
- package/dist/setup-guide.d.ts +2 -2
- package/dist/slack-chat.d.ts +2 -2
- package/dist/slack-chat.js +6 -6
- package/dist/spend-ui.d.ts +3 -3
- package/dist/spend-ui.js +9 -9
- package/dist/spend.d.ts +14 -14
- package/dist/spend.js +31 -31
- package/dist/store-baseline.d.ts +19 -0
- package/dist/store-baseline.js +2873 -0
- package/dist/store.d.ts +197 -249
- package/dist/store.js +747 -3084
- package/dist/subagent-admin.d.ts +53 -0
- package/dist/{teammate-admin.js → subagent-admin.js} +37 -37
- package/dist/{teammate-desk.d.ts → subagent-desk.d.ts} +22 -23
- package/dist/{teammate-desk.js → subagent-desk.js} +26 -35
- package/dist/{teammate-memory.d.ts → subagent-memory.d.ts} +17 -17
- package/dist/{teammate-memory.js → subagent-memory.js} +41 -41
- package/dist/{teammate-question.d.ts → subagent-question.d.ts} +6 -6
- package/dist/{teammate-question.js → subagent-question.js} +17 -17
- package/dist/{teammate-tools.d.ts → subagent-tools.d.ts} +18 -18
- package/dist/{teammate-tools.js → subagent-tools.js} +36 -36
- package/dist/{teammate-week.d.ts → subagent-week.d.ts} +10 -10
- package/dist/{teammate-week.js → subagent-week.js} +23 -23
- package/dist/{teammate-work.d.ts → subagent-work.d.ts} +21 -21
- package/dist/{teammate-work.js → subagent-work.js} +50 -50
- package/dist/subagents-ui.d.ts +22 -0
- package/dist/{teammates-ui.js → subagents-ui.js} +45 -45
- package/dist/{teammates.d.ts → subagents.d.ts} +11 -11
- package/dist/{teammates.js → subagents.js} +21 -21
- package/dist/subscription-chat.d.ts +13 -13
- package/dist/subscription-chat.js +19 -19
- package/dist/surface.d.ts +19 -2
- package/dist/surface.js +7 -31
- package/dist/team-cli.d.ts +1 -0
- package/dist/team-cli.js +14 -2
- package/dist/team-leads.js +13 -13
- package/dist/team-runtime.d.ts +2 -2
- package/dist/team-runtime.js +8 -8
- package/dist/teams-chat.js +6 -6
- package/dist/telegram-flow.d.ts +3 -3
- package/dist/telegram-flow.js +3 -3
- package/dist/{telegram-mate.d.ts → telegram-lead.d.ts} +5 -5
- package/dist/{telegram-mate.js → telegram-lead.js} +27 -27
- package/dist/telegram-status.js +1 -1
- package/dist/telegram-team.d.ts +1 -1
- package/dist/telegram-team.js +5 -5
- package/dist/telegram.d.ts +1 -1
- package/dist/telegram.js +9 -30
- package/dist/text-limits.d.ts +18 -18
- package/dist/text-limits.js +18 -18
- package/dist/toolroll-update.d.ts +8 -0
- package/dist/toolroll-update.js +45 -8
- package/package.json +1 -2
- package/dist/teammate-admin.d.ts +0 -53
- package/dist/teammates-ui.d.ts +0 -21
package/dist/store.d.ts
CHANGED
|
@@ -32,9 +32,9 @@ import { type LedgerChainReport } from "./ledger-chain.js";
|
|
|
32
32
|
import { type ApprovalGate, type ApprovalRules, type ApproverKind, type Filer } from "./approval-policy.js";
|
|
33
33
|
/** A lead reply stopped at its deadline, in the thread as plain words: what happened, what it means, one next step. The
|
|
34
34
|
* proposals it made before then are kept; the cost line only when an unknown cost paused chat. */
|
|
35
|
-
export declare function
|
|
35
|
+
export declare function leadTimeoutNotice(keptProposals: boolean, unknownCost?: boolean): string;
|
|
36
36
|
/** Whether a turn's proposals stand: it answered, or it stopped at its deadline after its completed tool calls proposed them. */
|
|
37
|
-
export declare function
|
|
37
|
+
export declare function leadTurnKeepsProposals(turn: {
|
|
38
38
|
state: string;
|
|
39
39
|
failureReason: string | null;
|
|
40
40
|
} | null): boolean;
|
|
@@ -63,7 +63,7 @@ export type TaskActRow = {
|
|
|
63
63
|
/** The lead's one question to its owner (no version bump): at most one per answered turn, two to four short options;
|
|
64
64
|
* "Something else" is implied. The tapped option comes back as the owner's next message, so nothing here is an answer:
|
|
65
65
|
* a question is open while no later message from the owner sits in its thread. */
|
|
66
|
-
export declare const
|
|
66
|
+
export declare const LEAD_ASK_SCHEMA = "\nCREATE TABLE IF NOT EXISTS lead_ask (\n turn INTEGER PRIMARY KEY REFERENCES mate_turn(id) ON DELETE CASCADE,\n thread INTEGER NOT NULL REFERENCES lead_thread(id) ON DELETE CASCADE,\n question TEXT NOT NULL,\n options_json TEXT NOT NULL,\n created_at TEXT NOT NULL\n);\nCREATE INDEX IF NOT EXISTS lead_ask_thread ON lead_ask (thread, turn);\n";
|
|
67
67
|
/** Decisions in the chat app (chat-decide.ts; no version bump: additive only). A token names one act on one card (the chat and message it rides); `digest` is
|
|
68
68
|
* what the card showed — a receipt, a revision source, a task stamp, a plan or a commit. */
|
|
69
69
|
/** A flow's "Send to me" and "Person chooses" zones (no version bump: additive only). flow_send keeps what one visit sent its
|
|
@@ -80,16 +80,16 @@ export declare const FLOW_SEND_SCHEMA = "\nCREATE TABLE IF NOT EXISTS flow_send
|
|
|
80
80
|
export declare const RUN_ACTIVITY_SCHEMA = "\nCREATE TABLE IF NOT EXISTS run_activity (\n run INTEGER PRIMARY KEY REFERENCES run(id) ON DELETE CASCADE,\n kind TEXT NOT NULL CHECK (kind IN ('session','message','edit','command','read','search','lookup','plan','delegate','tool')),\n at TEXT NOT NULL\n);\n";
|
|
81
81
|
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";
|
|
82
82
|
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";
|
|
83
|
-
export type
|
|
83
|
+
export type LeadAsk = {
|
|
84
84
|
turn: number;
|
|
85
85
|
thread: number;
|
|
86
86
|
question: string;
|
|
87
87
|
options: string[];
|
|
88
88
|
createdAt: string;
|
|
89
89
|
};
|
|
90
|
-
export declare const
|
|
90
|
+
export declare const LEAD_ASK_OTHER = "Something else";
|
|
91
91
|
/** How long the question's buttons work, on every channel. */
|
|
92
|
-
export declare const
|
|
92
|
+
export declare const LEAD_ASK_TTL_MS: number;
|
|
93
93
|
/** What a turn the lead starts itself for automatic crew updates says in the owner's place (lead-follow.ts): never their answer. */
|
|
94
94
|
export declare const LEAD_FOLLOW_MESSAGE = "Automatic crew update: inspect the saved results or decisions and tell me what needs attention. Do not rerun work.";
|
|
95
95
|
/** Settings → Integrations (no version bump): each integration's last check. `outcome` is ok, failed, or absent (the check found
|
|
@@ -152,7 +152,14 @@ export type SealedLedgerEntry = LedgerEntry & {
|
|
|
152
152
|
hash: string;
|
|
153
153
|
} | null;
|
|
154
154
|
};
|
|
155
|
-
export declare const SCHEMA_VERSION =
|
|
155
|
+
export declare const SCHEMA_VERSION = 117;
|
|
156
|
+
/** v117: each table renamed, by its old name. Rows, ids, foreign keys and indexes go with it (renameForV117). */
|
|
157
|
+
export declare const V117_RENAMED_TABLES: Readonly<Record<string, string>>;
|
|
158
|
+
/** v117: the columns renamed with them (by the table's new name): a subagent's rows name it `subagent`. */
|
|
159
|
+
export declare const V117_RENAMED_COLUMNS: readonly (readonly [table: string, from: string, to: string])[];
|
|
160
|
+
/** A row `PRAGMA foreign_key_check` reports, by today's table names: a row already pointing nowhere before v117 is the
|
|
161
|
+
* same row after it, though RENAME now reports it (and what it points at) under the new names. */
|
|
162
|
+
export declare function orphanKey(row: Record<string, unknown>): string;
|
|
156
163
|
/** v115: the tables migrateToV115 drops. */
|
|
157
164
|
export declare const V115_DROPPED_TABLES: readonly string[];
|
|
158
165
|
/**
|
|
@@ -163,6 +170,8 @@ export declare const V115_DROPPED_TABLES: readonly string[];
|
|
|
163
170
|
* needs the separate verified migration procedure. The desktop update never
|
|
164
171
|
* migrates and does not read this list.
|
|
165
172
|
*
|
|
173
|
+
* v108 only adds provider_auth_pause; v109 only adds task_ref.auth_wait_pause,
|
|
174
|
+
* so a database at the v107 baseline (0.5.0) takes the same update.
|
|
166
175
|
* v110 rebuilds action_ledger only to widen its source check ('api', 'mcp'):
|
|
167
176
|
* every row, id and hash-chain link is copied unchanged. v111 adds nullable
|
|
168
177
|
* api_token columns (project limit, rotation); existing tokens read as before.
|
|
@@ -183,7 +192,9 @@ export declare const V115_DROPPED_TABLES: readonly string[];
|
|
|
183
192
|
* separate procedure. v116 is the next declared exception: every row of the 70 old
|
|
184
193
|
* per-app chat tables moves into the shared chat tables keyed by provider, in one
|
|
185
194
|
* transaction that checks each count before the old tables are dropped; the
|
|
186
|
-
* rehearsal checks each moved table's rows arrived (HISTORY_RULES).
|
|
195
|
+
* rehearsal checks each moved table's rows arrived (HISTORY_RULES). v117 renames the mate's tables to the lead's and the
|
|
196
|
+
* teammates' to its subagents' (SQLite's RENAME, every row, id and link carried), renames their teammate column, and rewrites four internal kinds from 'teammate' to 'subagent' in place; the rehearsal checks
|
|
197
|
+
* each renamed table's rows arrived under its new name.
|
|
187
198
|
*/
|
|
188
199
|
export declare const UPDATE_SAFE_MIGRATIONS: readonly number[];
|
|
189
200
|
/** Whether a database settled at `version` reaches this build's schema through update-safe migrations alone. */
|
|
@@ -455,11 +466,11 @@ export type ChatTurn = {
|
|
|
455
466
|
acknowledgedBy: string | null;
|
|
456
467
|
replyBytes: number | null;
|
|
457
468
|
candidateCount: number | null;
|
|
458
|
-
/** 'chat' = fleet chat v13, one request; 'mate-step' = one request of a
|
|
469
|
+
/** 'chat' = fleet chat v13, one request; 'mate-step' = one request of a lead turn. */
|
|
459
470
|
kind: "chat" | "mate-step";
|
|
460
|
-
|
|
471
|
+
leadTurn: number | null;
|
|
461
472
|
};
|
|
462
|
-
export type
|
|
473
|
+
export type LeadSession = {
|
|
463
474
|
id: number;
|
|
464
475
|
approver: string;
|
|
465
476
|
approverGeneration: number;
|
|
@@ -474,7 +485,7 @@ export type MateSession = {
|
|
|
474
485
|
};
|
|
475
486
|
/** What one lead thread is about (v77): the lead conversation across every
|
|
476
487
|
* project, one project, or one task (keyed by its root id). */
|
|
477
|
-
export type
|
|
488
|
+
export type LeadThreadScope = {
|
|
478
489
|
kind: "lead";
|
|
479
490
|
} | {
|
|
480
491
|
kind: "project";
|
|
@@ -483,23 +494,23 @@ export type MateThreadScope = {
|
|
|
483
494
|
kind: "task";
|
|
484
495
|
key: string;
|
|
485
496
|
};
|
|
486
|
-
export declare const LEAD_THREAD:
|
|
487
|
-
export type
|
|
497
|
+
export declare const LEAD_THREAD: LeadThreadScope;
|
|
498
|
+
export type LeadThread = {
|
|
488
499
|
id: number;
|
|
489
500
|
approver: string;
|
|
490
501
|
ceilingDigest: string;
|
|
491
502
|
openedAt: string;
|
|
492
503
|
lastTurnAt: string | null;
|
|
493
504
|
closedAt: string | null;
|
|
494
|
-
scope:
|
|
505
|
+
scope: LeadThreadScope;
|
|
495
506
|
};
|
|
496
507
|
/** A thread as the chat list shows it: its scope and its latest message. */
|
|
497
|
-
export type
|
|
508
|
+
export type LeadThreadSummary = LeadThread & {
|
|
498
509
|
lastMessageAt: string | null;
|
|
499
510
|
lastMessage: string | null;
|
|
500
511
|
messages: number;
|
|
501
512
|
};
|
|
502
|
-
export type
|
|
513
|
+
export type LeadMessage = {
|
|
503
514
|
id: number;
|
|
504
515
|
thread: number;
|
|
505
516
|
turn: number | null;
|
|
@@ -508,9 +519,9 @@ export type MateMessage = {
|
|
|
508
519
|
activity: string | null;
|
|
509
520
|
createdAt: string;
|
|
510
521
|
};
|
|
511
|
-
export type
|
|
522
|
+
export type LeadProposalKind = "task" | "next" | "reserve" | "hold" | "unhold" | "steer" | "scope" | "cancel" | "answer" | "repair" | "agents" | "review" | "control" | "task_action" | "action";
|
|
512
523
|
/** A coordinator's proposal over the MCP gateway (mate arc v3): the same
|
|
513
|
-
* kinds as the
|
|
524
|
+
* kinds as the lead's (no `task` — filing has its own door), confirmed by
|
|
514
525
|
* any approver whose ceiling admits the repo. */
|
|
515
526
|
export type CoordinatorProposalKind = "next" | "reserve" | "hold" | "unhold" | "scope" | "cancel" | "answer";
|
|
516
527
|
export type CoordinatorProposalState = "pending" | "confirming" | "confirmed" | "refused" | "dismissed" | "expired";
|
|
@@ -528,24 +539,24 @@ export type CoordinatorProposal = {
|
|
|
528
539
|
resolvedBy: string | null;
|
|
529
540
|
outcome: Record<string, unknown> | null;
|
|
530
541
|
};
|
|
531
|
-
export type
|
|
532
|
-
export type
|
|
542
|
+
export type LeadProposalState = "drafting" | "pending" | "confirming" | "confirmed" | "refused" | "dismissed" | "expired";
|
|
543
|
+
export type LeadProposal = {
|
|
533
544
|
id: number;
|
|
534
545
|
thread: number;
|
|
535
546
|
turn: number;
|
|
536
|
-
kind:
|
|
547
|
+
kind: LeadProposalKind;
|
|
537
548
|
payload: Record<string, unknown>;
|
|
538
549
|
ceilingDigest: string;
|
|
539
|
-
state:
|
|
550
|
+
state: LeadProposalState;
|
|
540
551
|
createdAt: string;
|
|
541
552
|
resolvedAt: string | null;
|
|
542
553
|
resolvedBy: string | null;
|
|
543
554
|
outcome: Record<string, unknown> | null;
|
|
544
555
|
};
|
|
545
556
|
/** The zones a worker's step pass runs, one run per visit. */
|
|
546
|
-
export type FlowStepKind = "check" | "update" | "sort" | "draft" | "request" | "email" | "tool" | "
|
|
547
|
-
/**
|
|
548
|
-
export type
|
|
557
|
+
export type FlowStepKind = "check" | "update" | "sort" | "draft" | "request" | "email" | "tool" | "subagent";
|
|
558
|
+
/** A subagent (v92): who it is lives in its soul file; `handle` is how zones and chat name it. */
|
|
559
|
+
export type SubagentRow = {
|
|
549
560
|
id: number;
|
|
550
561
|
repo: string;
|
|
551
562
|
handle: string;
|
|
@@ -565,21 +576,21 @@ export type TeammateRow = {
|
|
|
565
576
|
/** v97: when its last weekly report went out. */
|
|
566
577
|
weeklyAt: string | null;
|
|
567
578
|
};
|
|
568
|
-
export type
|
|
569
|
-
export type
|
|
579
|
+
export type SubagentEventKind = "decided" | "handled" | "handed" | "asked" | "answered" | "note" | "paused" | "resumed" | "summary" | "failed";
|
|
580
|
+
export type SubagentEventRow = {
|
|
570
581
|
id: number;
|
|
571
|
-
|
|
582
|
+
subagent: number;
|
|
572
583
|
card: number | null;
|
|
573
584
|
entry: number | null;
|
|
574
|
-
kind:
|
|
585
|
+
kind: SubagentEventKind;
|
|
575
586
|
said: string;
|
|
576
587
|
detail: Record<string, unknown> | null;
|
|
577
588
|
by: string | null;
|
|
578
589
|
at: string;
|
|
579
590
|
};
|
|
580
|
-
export type
|
|
591
|
+
export type SubagentQuestionRow = {
|
|
581
592
|
id: number;
|
|
582
|
-
|
|
593
|
+
subagent: number;
|
|
583
594
|
card: number;
|
|
584
595
|
entry: number;
|
|
585
596
|
question: string;
|
|
@@ -595,17 +606,17 @@ export type TeammateQuestionRow = {
|
|
|
595
606
|
answeredVia: string | null;
|
|
596
607
|
answeredAt: string | null;
|
|
597
608
|
createdAt: string;
|
|
598
|
-
/** v94: the ask-first tool call this question approves (null: a question of the
|
|
609
|
+
/** v94: the ask-first tool call this question approves (null: a question of the subagent's own). */
|
|
599
610
|
toolCall: number | null;
|
|
600
611
|
/** v95: the rule change this question offers its manager (null: not one). */
|
|
601
612
|
suggestion: number | null;
|
|
602
613
|
};
|
|
603
|
-
/** v95: one thing a
|
|
604
|
-
export type
|
|
614
|
+
/** v95: one thing a subagent remembers: kept by it on a turn, or told it by a person. */
|
|
615
|
+
export type SubagentMemoryRow = {
|
|
605
616
|
id: number;
|
|
606
|
-
|
|
617
|
+
subagent: number;
|
|
607
618
|
text: string;
|
|
608
|
-
source: "
|
|
619
|
+
source: "subagent" | "person";
|
|
609
620
|
card: number | null;
|
|
610
621
|
createdBy: string;
|
|
611
622
|
createdAt: string;
|
|
@@ -613,10 +624,10 @@ export type TeammateMemoryRow = {
|
|
|
613
624
|
updatedAt: string;
|
|
614
625
|
usedAt: string | null;
|
|
615
626
|
};
|
|
616
|
-
/** v95: a rule change a
|
|
617
|
-
export type
|
|
627
|
+
/** v95: a rule change a subagent suggests from what its people approved. */
|
|
628
|
+
export type SubagentSuggestionRow = {
|
|
618
629
|
id: number;
|
|
619
|
-
|
|
630
|
+
subagent: number;
|
|
620
631
|
tool: string;
|
|
621
632
|
action: string;
|
|
622
633
|
rule: ToolRule;
|
|
@@ -630,10 +641,10 @@ export type TeammateSuggestionRow = {
|
|
|
630
641
|
};
|
|
631
642
|
/** v94: one action a project tool offers, as it described itself when listed. */
|
|
632
643
|
export type ToolActionInfo = SavedToolAction;
|
|
633
|
-
/** v94: a
|
|
644
|
+
/** v94: a subagent's rule for one action: do it, ask first, or never; "free" may ask first above a number in its input. */
|
|
634
645
|
export type ToolRule = SavedToolRule;
|
|
635
|
-
export type
|
|
636
|
-
|
|
646
|
+
export type SubagentGrantRow = {
|
|
647
|
+
subagent: number;
|
|
637
648
|
tool: string;
|
|
638
649
|
actions: ToolActionInfo[];
|
|
639
650
|
rules: Record<string, ToolRule>;
|
|
@@ -641,11 +652,11 @@ export type TeammateGrantRow = {
|
|
|
641
652
|
updatedBy: string;
|
|
642
653
|
updatedAt: string;
|
|
643
654
|
};
|
|
644
|
-
export type
|
|
645
|
-
/** v94: a tool call a
|
|
646
|
-
export type
|
|
655
|
+
export type SubagentCallState = "asked" | "approved" | "denied" | "refused" | "running" | "done" | "failed";
|
|
656
|
+
/** v94: a tool call a subagent made, or asked to make, on one visit of a card: the receipt. */
|
|
657
|
+
export type SubagentCallRow = {
|
|
647
658
|
id: number;
|
|
648
|
-
|
|
659
|
+
subagent: number;
|
|
649
660
|
card: number;
|
|
650
661
|
entry: number;
|
|
651
662
|
tool: string;
|
|
@@ -653,7 +664,7 @@ export type TeammateCallRow = {
|
|
|
653
664
|
input: Record<string, unknown>;
|
|
654
665
|
rule: ToolRule["use"];
|
|
655
666
|
why: string;
|
|
656
|
-
state:
|
|
667
|
+
state: SubagentCallState;
|
|
657
668
|
result: string | null;
|
|
658
669
|
decidedBy: string | null;
|
|
659
670
|
decidedAt: string | null;
|
|
@@ -664,10 +675,10 @@ export type TeammateCallRow = {
|
|
|
664
675
|
undoneBy: string | null;
|
|
665
676
|
undoneAt: string | null;
|
|
666
677
|
};
|
|
667
|
-
/** v97: one model turn a
|
|
668
|
-
export type
|
|
678
|
+
/** v97: one model turn a subagent took. */
|
|
679
|
+
export type SubagentTurnRow = {
|
|
669
680
|
id: number;
|
|
670
|
-
|
|
681
|
+
subagent: number;
|
|
671
682
|
card: number | null;
|
|
672
683
|
model: string;
|
|
673
684
|
ok: boolean;
|
|
@@ -781,7 +792,7 @@ export type FlowTriggerRow = {
|
|
|
781
792
|
updatedAt: string;
|
|
782
793
|
};
|
|
783
794
|
export type FlowEventOutcome = "created" | "ok" | "fail" | "moved" | "approved" | "sent-back" | "cancelled";
|
|
784
|
-
export type
|
|
795
|
+
export type LeadTurn = {
|
|
785
796
|
id: number;
|
|
786
797
|
approver: string;
|
|
787
798
|
session: number;
|
|
@@ -1328,7 +1339,7 @@ export type TelegramConversation = {
|
|
|
1328
1339
|
updateId: number;
|
|
1329
1340
|
messageId: string;
|
|
1330
1341
|
replyTo: string | null;
|
|
1331
|
-
/** The
|
|
1342
|
+
/** The lead request receipt identity: 32 hex, derived from bot, binding and update. */
|
|
1332
1343
|
request: string;
|
|
1333
1344
|
text: string;
|
|
1334
1345
|
/** Server-authored context for the turn — the exact task/result a reply bound to. */
|
|
@@ -1401,8 +1412,8 @@ export type TelegramConversationPartPlan = {
|
|
|
1401
1412
|
artifact: number;
|
|
1402
1413
|
sha256: string;
|
|
1403
1414
|
};
|
|
1404
|
-
/** One verified screenshot a
|
|
1405
|
-
export type
|
|
1415
|
+
/** One verified screenshot a lead turn selected for an exact result (v64): trusted identities only, never bytes or paths. */
|
|
1416
|
+
export type LeadTurnEvidence = {
|
|
1406
1417
|
turn: number;
|
|
1407
1418
|
ordinal: number;
|
|
1408
1419
|
taskId: string;
|
|
@@ -1609,69 +1620,6 @@ export declare const REVIEW_ROOT_ATTEMPTS = 3;
|
|
|
1609
1620
|
/** The receipt v114 keeps a notification's old single-destination delivery under. No sender claims it: every real
|
|
1610
1621
|
* destination is a kind and a 64-character hash, or a Telegram binding. */
|
|
1611
1622
|
export declare const LEGACY_NOTIFICATION_DESTINATION = "legacy:single-destination";
|
|
1612
|
-
/** v34: artifact.kind admits 'report'. A table already rebuilt to the v38
|
|
1613
|
-
* shape (migrate() runs unconditionally on every open, including a fresh
|
|
1614
|
-
* database created straight at the current shape) is a DONE shape too —
|
|
1615
|
-
* the same "old-shape-plus-later-widening" recognizer rebuildRunForV29
|
|
1616
|
-
* uses for V34_RUN_DDL. */
|
|
1617
|
-
export declare function rebuildArtifactForV34(db: Database): void;
|
|
1618
|
-
/** v34: incident.kind admits 'malformed-report'. Same v38-shape tolerance as rebuildArtifactForV34. */
|
|
1619
|
-
export declare function rebuildIncidentForV34(db: Database): void;
|
|
1620
|
-
/** v38: artifact.kind admits 'proof','check-log','screenshot'. */
|
|
1621
|
-
export declare function rebuildArtifactForV38(db: Database): void;
|
|
1622
|
-
/** v46: artifact.kind additionally admits structured-output. A table
|
|
1623
|
-
* already at the v51 shape is a DONE shape (migrate() runs every step on
|
|
1624
|
-
* every open). */
|
|
1625
|
-
export declare function rebuildArtifactForV46(db: Database): void;
|
|
1626
|
-
/** v51: artifact.kind additionally admits plan-contract and review-context. */
|
|
1627
|
-
export declare function rebuildArtifactForV51(db: Database): void;
|
|
1628
|
-
/** v38: incident.kind admits 'malformed-proof'. */
|
|
1629
|
-
export declare function rebuildIncidentForV38(db: Database): void;
|
|
1630
|
-
/**
|
|
1631
|
-
* v34: run.role admits 'scout'. An EXACT recognizer, like v29's and v33's:
|
|
1632
|
-
* the stored DDL must be the v29+v30 shape (either placement of the v30
|
|
1633
|
-
* columns is the same shape) or already v34; anything else refuses rather
|
|
1634
|
-
* than being guessed. Rows and ids are carried whole; foreign keys are
|
|
1635
|
-
* checked before commit; the indexes return with the post-migration block.
|
|
1636
|
-
*/
|
|
1637
|
-
export declare function rebuildRunForV34(db: Database): void;
|
|
1638
|
-
export declare function rebuildMateProposalForV66(db: Database): void;
|
|
1639
|
-
/** v74: Microsoft Teams joins the recorded surfaces a stop or an answer names. */
|
|
1640
|
-
export declare const DECISION_V74_DDL: (name: string) => string;
|
|
1641
|
-
export declare const RUN_STOP_V74_DDL: (name: string) => string;
|
|
1642
|
-
export declare function rebuildTeamsAuditForV74(db: Database): void;
|
|
1643
|
-
export declare const DECISION_V68_DDL_FOR_TESTS: (name: string) => string;
|
|
1644
|
-
export declare const RUN_STOP_V68_DDL_FOR_TESTS: (name: string) => string;
|
|
1645
|
-
export declare function rebuildDiscordAuditForV68(db: Database): void;
|
|
1646
|
-
export declare function rebuildSlackAuditForV67(db: Database): void;
|
|
1647
|
-
/** The v63 columns, in order: what an upgrade copies, and what a wind-back keeps. */
|
|
1648
|
-
export declare const TELEGRAM_CONVERSATION_PART_V63_COLUMNS: readonly ["conversation", "ordinal", "kind", "text", "reply_to", "proposal", "keyboard_json", "state", "message_id", "attempts", "uncertain", "next_attempt_at", "last_error", "created_at", "sent_at"];
|
|
1649
|
-
/** v64: image parts join the outbound conversation parts with typed media identity. Every v63 row, receipt, attempt and uncertain count is carried whole. */
|
|
1650
|
-
export declare function rebuildTelegramConversationPartForV64(db: Database): void;
|
|
1651
|
-
/** v62: the stop audit admits 'telegram'. Rows, ids and settlements are carried whole. */
|
|
1652
|
-
export declare function rebuildRunStopForV62(db: Database): void;
|
|
1653
|
-
export declare function rebuildMateProposalForV60(db: Database): void;
|
|
1654
|
-
/**
|
|
1655
|
-
* v33 (mate v3): `answer` joins mate_proposal's kinds — an EXACT recognizer
|
|
1656
|
-
* (v3 review, finding 9): the stored DDL must equal the v32 shape or the
|
|
1657
|
-
* v33 shape, byte for byte after canonicalization; anything else refuses
|
|
1658
|
-
* rather than being guessed. Rows and ids are carried whole; the one
|
|
1659
|
-
* shipped index is recreated; foreign keys are checked before commit.
|
|
1660
|
-
*/
|
|
1661
|
-
export declare function rebuildMateProposalForV33(db: Database): void;
|
|
1662
|
-
/** v42: `repair` joins the mate proposal kinds through the same exact,
|
|
1663
|
-
* row-preserving copy-rename used for v33. */
|
|
1664
|
-
export declare function rebuildMateProposalForV42(db: Database): void;
|
|
1665
|
-
/** v43: `steer` joins the mate proposal kinds through the same exact,
|
|
1666
|
-
* row-preserving copy-rename used for v33 and v42. */
|
|
1667
|
-
export declare function rebuildMateProposalForV43(db: Database): void;
|
|
1668
|
-
/** v48: `agents` joins the mate proposal kinds — the same exact,
|
|
1669
|
-
* row-preserving copy-rename as v33, v42, and v43. */
|
|
1670
|
-
export declare function rebuildMateProposalForV48(db: Database): void;
|
|
1671
|
-
/** v35: widen both persisted provider checks with exact-shape rebuilds. */
|
|
1672
|
-
export declare function rebuildChatProvidersForV35(db: Database): void;
|
|
1673
|
-
/** v36: remove the mate's artificial absolute expiry. */
|
|
1674
|
-
export declare function rebuildMateSessionForV36(db: Database): void;
|
|
1675
1623
|
/** Reporting never creates, migrates, or repairs a store. SQLite itself
|
|
1676
1624
|
* enforces read-only access, including the race where the file disappears. */
|
|
1677
1625
|
export declare function openStoreReadOnly(file: string): Store | null;
|
|
@@ -3105,7 +3053,7 @@ export declare class Store {
|
|
|
3105
3053
|
};
|
|
3106
3054
|
/** Comments to consume, or null when the brief has no comment batch (CI / criterion repair). */
|
|
3107
3055
|
commentIds: readonly number[] | null;
|
|
3108
|
-
/** v102: who asked for this revision (a person,
|
|
3056
|
+
/** v102: who asked for this revision (a person, a subagent's "Name (AI)", or none for machine repairs): its filer. */
|
|
3109
3057
|
requestedBy?: string | null;
|
|
3110
3058
|
/** Fresh mode filing coverage, re-proved by the caller INSIDE this
|
|
3111
3059
|
* transaction (never carried across one): its budget default may only
|
|
@@ -3866,7 +3814,7 @@ export declare class Store {
|
|
|
3866
3814
|
* where not — the same arithmetic the admission transaction uses. */
|
|
3867
3815
|
chatWeeklySpendMicrousd(credentialKey: string, now: Date): number;
|
|
3868
3816
|
private chatOnlyWeeklySpendMicrousd;
|
|
3869
|
-
/** The day's turns: fleet chat turns plus
|
|
3817
|
+
/** The day's turns: fleet chat turns plus lead turns — a lead turn is
|
|
3870
3818
|
* one turn however many steps it took (slice-1 review, finding 11). */
|
|
3871
3819
|
chatTurnsToday(approver: string, now: Date): number;
|
|
3872
3820
|
/** Turns blocking this credential until somebody owns the worst case. */
|
|
@@ -4340,7 +4288,7 @@ export declare class Store {
|
|
|
4340
4288
|
policyHistory(limit?: number): LedgerEntry[];
|
|
4341
4289
|
/** Why the policy stops a task's approved terms (its profile, every routed leg), or null. */
|
|
4342
4290
|
scopePolicyRefusal(taskId: string): string | null;
|
|
4343
|
-
/** Why the policy stops an agent on a provider and model now, or null (chats,
|
|
4291
|
+
/** Why the policy stops an agent on a provider and model now, or null (chats, subagents, flow steps). */
|
|
4344
4292
|
agentPolicyRefusal(provider: string, model: string | null): string | null;
|
|
4345
4293
|
/** Why the policy stops a planner, scout or native coding session (no profile to lower) on a provider and model, or null. */
|
|
4346
4294
|
sessionPolicyRefusal(provider: string, model: string | null, what: string): string | null;
|
|
@@ -4395,7 +4343,7 @@ export declare class Store {
|
|
|
4395
4343
|
budgetGate(now: Date): (work: {
|
|
4396
4344
|
project: string | null;
|
|
4397
4345
|
person: string | null;
|
|
4398
|
-
|
|
4346
|
+
subagent: number | null;
|
|
4399
4347
|
agents?: readonly BudgetAgent[];
|
|
4400
4348
|
}) => BudgetHold;
|
|
4401
4349
|
/** How each provider would bill new work now (see spend.billingOf). */
|
|
@@ -4407,11 +4355,11 @@ export declare class Store {
|
|
|
4407
4355
|
/** v105: how a run was really billed, from its own evidence, fixed before its usage is priced. */
|
|
4408
4356
|
fixRunBilling(id: number, billing: Billing, now: Date): void;
|
|
4409
4357
|
/** What a task's new work counts toward: its project, its filer (a person, or the person behind a coordinator), and
|
|
4410
|
-
* the
|
|
4358
|
+
* the subagent that filed it. A revision (an automatic repair included) counts as its source task's. */
|
|
4411
4359
|
budgetSubject(taskRef: number): {
|
|
4412
4360
|
project: string | null;
|
|
4413
4361
|
person: string | null;
|
|
4414
|
-
|
|
4362
|
+
subagent: number | null;
|
|
4415
4363
|
};
|
|
4416
4364
|
/**
|
|
4417
4365
|
* Stamp the machine's current phase on an OPEN run. A closed run's phase
|
|
@@ -4829,7 +4777,7 @@ export declare class Store {
|
|
|
4829
4777
|
/**
|
|
4830
4778
|
* Every live binding for a bot, oldest first — and only while each approver's credential generation still matches.
|
|
4831
4779
|
* A rotation that somehow missed the sweep reads as no binding at all, which is the failure direction that fails
|
|
4832
|
-
* closed. Several
|
|
4780
|
+
* closed. Several subagents may each hold one (v72); nothing here ranks them.
|
|
4833
4781
|
*/
|
|
4834
4782
|
liveTelegramBindings(botId: string): TelegramBinding[];
|
|
4835
4783
|
/** The live binding one Telegram user holds with a bot, if any. */
|
|
@@ -4841,7 +4789,7 @@ export declare class Store {
|
|
|
4841
4789
|
* `liveTelegramBindings` / `liveTelegramBindingFor` instead. */
|
|
4842
4790
|
liveTelegramBinding(botId: string): TelegramBinding | null;
|
|
4843
4791
|
/** Revoke every live binding one person holds with a bot, and everything
|
|
4844
|
-
* those chats could still do.
|
|
4792
|
+
* those chats could still do. Subagents' bindings are untouched. */
|
|
4845
4793
|
unpairTelegram(botId: string, by: string, now: Date): boolean;
|
|
4846
4794
|
createTelegramAction(...args: Parameters<ChatMessages["createDecisionAction"]>): ReturnType<ChatMessages["createDecisionAction"]>;
|
|
4847
4795
|
recordTelegramDecisionMessage(...args: Parameters<ChatMessages["recordDecisionMessage"]>): ReturnType<ChatMessages["recordDecisionMessage"]>;
|
|
@@ -5106,8 +5054,8 @@ export declare class Store {
|
|
|
5106
5054
|
model: string | null;
|
|
5107
5055
|
repo: string | null;
|
|
5108
5056
|
}[];
|
|
5109
|
-
/** Delegated chat spend, signed once: the row every
|
|
5110
|
-
|
|
5057
|
+
/** Delegated chat spend, signed once: the row every lead turn debits. */
|
|
5058
|
+
mintLeadSession(args: {
|
|
5111
5059
|
approver: string;
|
|
5112
5060
|
approverGeneration: number;
|
|
5113
5061
|
credentialKey: string;
|
|
@@ -5125,31 +5073,31 @@ export declare class Store {
|
|
|
5125
5073
|
termsDigest: string;
|
|
5126
5074
|
thread: number;
|
|
5127
5075
|
}, now: Date): number;
|
|
5128
|
-
teamMateSession(approver: string, thread: number):
|
|
5129
|
-
openTeamMateThread(approver: string, ceilingDigest: string, now: Date):
|
|
5076
|
+
teamMateSession(approver: string, thread: number): LeadSession | null;
|
|
5077
|
+
openTeamMateThread(approver: string, ceilingDigest: string, now: Date): LeadThread;
|
|
5130
5078
|
canUseTeamMateThread(approver: string, generation: number, thread: number): boolean;
|
|
5131
5079
|
/** Rechecked at admission; membership never grants project or approval standing. */
|
|
5132
5080
|
teamMateThreadAllows(thread: number, approver: string, generation: number): boolean;
|
|
5133
5081
|
/** The live session — explicitly ended or still active. Exhaustion is the caller's arithmetic. */
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5082
|
+
activeLeadSession(approver: string): LeadSession | null;
|
|
5083
|
+
getLeadSession(id: number): LeadSession | null;
|
|
5084
|
+
endLeadSession(id: number, by: string, now: Date): boolean;
|
|
5137
5085
|
/** Revocation's companion (ruling 10): an approver's standing ends every session it minted. */
|
|
5138
|
-
|
|
5086
|
+
endLeadSessionsFor(approver: string, by: string, now: Date): number;
|
|
5139
5087
|
/** The live thread for this approver and scope under THIS ceiling; a
|
|
5140
5088
|
* thread under another ceiling is closed first (ruling 9) — the surface
|
|
5141
5089
|
* says why. The lead conversation is the default scope. */
|
|
5142
|
-
|
|
5143
|
-
thread:
|
|
5090
|
+
openLeadThread(approver: string, ceilingDigest: string, now: Date, scope?: LeadThreadScope): {
|
|
5091
|
+
thread: LeadThread;
|
|
5144
5092
|
ceilingChanged: boolean;
|
|
5145
5093
|
};
|
|
5146
5094
|
/** The approver's live thread for one scope, read only — null when none is open. */
|
|
5147
|
-
|
|
5095
|
+
liveLeadThreadFor(approver: string, scope?: LeadThreadScope): LeadThread | null;
|
|
5148
5096
|
/** The lead thread a ceiling change closed just before `current` (ruling 9),
|
|
5149
5097
|
* read only and for display only: it never continues and never reaches the
|
|
5150
5098
|
* model. Null when there is none, when it was ended or revoked (its text is
|
|
5151
5099
|
* gone), or when it closed under the same ceiling. */
|
|
5152
|
-
replacedLeadThread(current:
|
|
5100
|
+
replacedLeadThread(current: LeadThread): LeadThread | null;
|
|
5153
5101
|
/** The task a paired chat is talking about (v78), or null for the lead conversation. */
|
|
5154
5102
|
chatFocus(surface: string, binding: number): string | null;
|
|
5155
5103
|
setChatFocus(surface: string, binding: number, task: string | null, now: Date): void;
|
|
@@ -5247,7 +5195,7 @@ export declare class Store {
|
|
|
5247
5195
|
failures: number;
|
|
5248
5196
|
lastOutcome: string | null;
|
|
5249
5197
|
}, now: Date): void;
|
|
5250
|
-
|
|
5198
|
+
createSubagent(mate: {
|
|
5251
5199
|
repo: string;
|
|
5252
5200
|
handle: string;
|
|
5253
5201
|
soul: string;
|
|
@@ -5255,42 +5203,42 @@ export declare class Store {
|
|
|
5255
5203
|
manager: string;
|
|
5256
5204
|
by: string;
|
|
5257
5205
|
}, now: Date): number;
|
|
5258
|
-
|
|
5259
|
-
/** The
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
/** A new version of a
|
|
5263
|
-
|
|
5264
|
-
|
|
5206
|
+
getSubagent(id: number): SubagentRow | null;
|
|
5207
|
+
/** The subagent a zone names in a project (paused ones too; never a removed one). */
|
|
5208
|
+
subagentByHandle(repo: string, handle: string): SubagentRow | null;
|
|
5209
|
+
subagents(repos: readonly string[]): SubagentRow[];
|
|
5210
|
+
/** A new version of a subagent's soul file; false when nothing changed. */
|
|
5211
|
+
saveSubagentSoul(id: number, soul: string, by: string, now: Date): boolean;
|
|
5212
|
+
subagentVersions(id: number): {
|
|
5265
5213
|
version: number;
|
|
5266
5214
|
soul: string;
|
|
5267
5215
|
savedBy: string;
|
|
5268
5216
|
savedAt: string;
|
|
5269
5217
|
}[];
|
|
5270
|
-
|
|
5271
|
-
state?:
|
|
5218
|
+
updateSubagent(id: number, change: {
|
|
5219
|
+
state?: SubagentRow["state"];
|
|
5272
5220
|
model?: string | null;
|
|
5273
5221
|
dailyTurns?: number;
|
|
5274
5222
|
manager?: string;
|
|
5275
5223
|
summaryAt?: string;
|
|
5276
5224
|
weeklyAt?: string;
|
|
5277
5225
|
}, by: string, now: Date): void;
|
|
5278
|
-
|
|
5279
|
-
|
|
5226
|
+
addSubagentEvent(event: {
|
|
5227
|
+
subagent: number;
|
|
5280
5228
|
card?: number | null;
|
|
5281
5229
|
entry?: number | null;
|
|
5282
|
-
kind:
|
|
5230
|
+
kind: SubagentEventKind;
|
|
5283
5231
|
said: string;
|
|
5284
5232
|
detail?: Record<string, unknown> | null;
|
|
5285
5233
|
by?: string | null;
|
|
5286
5234
|
}, now: Date): number;
|
|
5287
|
-
/** A
|
|
5288
|
-
|
|
5289
|
-
/** How many turns (decisions, handled cards, hand-offs, questions, failures, and v94 tool calls) a
|
|
5290
|
-
|
|
5235
|
+
/** A subagent's log, newest first; `since` bounds it (a day's summary). */
|
|
5236
|
+
subagentEvents(subagent: number, limit: number, since?: string | null): SubagentEventRow[];
|
|
5237
|
+
/** How many turns (decisions, handled cards, hand-offs, questions, failures, and v94 tool calls) a subagent took since a time: its daily limit. */
|
|
5238
|
+
subagentTurnsSince(subagent: number, since: string): number;
|
|
5291
5239
|
/** Ask a person about one visit of a card (v94: or to approve one tool call); null when that visit, or that call, already has its question. */
|
|
5292
|
-
|
|
5293
|
-
|
|
5240
|
+
openSubagentQuestion(question: {
|
|
5241
|
+
subagent: number;
|
|
5294
5242
|
card: number;
|
|
5295
5243
|
entry: number;
|
|
5296
5244
|
question: string;
|
|
@@ -5303,30 +5251,30 @@ export declare class Store {
|
|
|
5303
5251
|
suggestion?: number;
|
|
5304
5252
|
}, now: Date): number | null;
|
|
5305
5253
|
/** v94: the first question still open on one visit of a card: its own, or a tool call's approval. */
|
|
5306
|
-
|
|
5254
|
+
openSubagentQuestionOn(card: number, entry: number): SubagentQuestionRow | null;
|
|
5307
5255
|
/** v94: the approval question of one tool call. */
|
|
5308
|
-
|
|
5309
|
-
/** v96: the flow a
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5256
|
+
subagentQuestionForCall(call: number): SubagentQuestionRow | null;
|
|
5257
|
+
/** v96: the flow a subagent's desk is. */
|
|
5258
|
+
setSubagentDesk(id: number, flow: number): void;
|
|
5259
|
+
addSubagentMemory(memory: {
|
|
5260
|
+
subagent: number;
|
|
5313
5261
|
text: string;
|
|
5314
|
-
source:
|
|
5262
|
+
source: SubagentMemoryRow["source"];
|
|
5315
5263
|
card?: number | null;
|
|
5316
5264
|
by: string;
|
|
5317
5265
|
}, now: Date): number;
|
|
5318
|
-
|
|
5319
|
-
/** What a
|
|
5320
|
-
|
|
5321
|
-
source?:
|
|
5266
|
+
subagentMemory(id: number): SubagentMemoryRow | null;
|
|
5267
|
+
/** What a subagent remembers now, newest first: one source, and every word of `words` (any case), when given. */
|
|
5268
|
+
subagentMemories(subagent: number, options?: {
|
|
5269
|
+
source?: SubagentMemoryRow["source"];
|
|
5322
5270
|
words?: readonly string[];
|
|
5323
5271
|
limit?: number;
|
|
5324
|
-
}):
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5272
|
+
}): SubagentMemoryRow[];
|
|
5273
|
+
editSubagentMemory(id: number, text: string, by: string, now: Date): boolean;
|
|
5274
|
+
forgetSubagentMemory(id: number, by: string, now: Date): boolean;
|
|
5275
|
+
markSubagentMemoriesUsed(ids: readonly number[], now: Date): void;
|
|
5276
|
+
addSubagentSuggestion(suggestion: {
|
|
5277
|
+
subagent: number;
|
|
5330
5278
|
tool: string;
|
|
5331
5279
|
action: string;
|
|
5332
5280
|
rule: ToolRule;
|
|
@@ -5334,27 +5282,27 @@ export declare class Store {
|
|
|
5334
5282
|
evidence: number[];
|
|
5335
5283
|
said: string;
|
|
5336
5284
|
}, now: Date): number;
|
|
5337
|
-
|
|
5338
|
-
/** A
|
|
5339
|
-
|
|
5340
|
-
|
|
5285
|
+
subagentSuggestion(id: number): SubagentSuggestionRow | null;
|
|
5286
|
+
/** A subagent's suggestions about one action, newest first. */
|
|
5287
|
+
subagentSuggestionsFor(subagent: number, tool: string, action: string): SubagentSuggestionRow[];
|
|
5288
|
+
subagentSuggestions(subagent: number, limit?: number): SubagentSuggestionRow[];
|
|
5341
5289
|
/** Decide a suggestion, once: false when it was already decided. */
|
|
5342
|
-
|
|
5290
|
+
decideSubagentSuggestion(id: number, state: "accepted" | "dismissed" | "stale", by: string | null, now: Date): boolean;
|
|
5343
5291
|
/** v95: the question that offers a suggestion to its manager. */
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5292
|
+
subagentQuestionForSuggestion(suggestion: number): SubagentQuestionRow | null;
|
|
5293
|
+
subagentGrants(subagent: number): SubagentGrantRow[];
|
|
5294
|
+
subagentGrant(subagent: number, tool: string): SubagentGrantRow | null;
|
|
5347
5295
|
/** Grant a tool, or change what it offers and the rules: the whole row is written. `listedAt` undefined keeps it. */
|
|
5348
|
-
|
|
5349
|
-
|
|
5296
|
+
saveSubagentGrant(grant: {
|
|
5297
|
+
subagent: number;
|
|
5350
5298
|
tool: string;
|
|
5351
5299
|
actions: ToolActionInfo[];
|
|
5352
5300
|
rules: Record<string, ToolRule>;
|
|
5353
5301
|
listedAt?: string | null;
|
|
5354
5302
|
}, by: string, now: Date): void;
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5303
|
+
dropSubagentGrant(subagent: number, tool: string, by: string, now: Date): boolean;
|
|
5304
|
+
addSubagentCall(call: {
|
|
5305
|
+
subagent: number;
|
|
5358
5306
|
card: number;
|
|
5359
5307
|
entry: number;
|
|
5360
5308
|
tool: string;
|
|
@@ -5362,32 +5310,32 @@ export declare class Store {
|
|
|
5362
5310
|
input: Record<string, unknown>;
|
|
5363
5311
|
rule: ToolRule["use"];
|
|
5364
5312
|
why: string;
|
|
5365
|
-
state:
|
|
5313
|
+
state: SubagentCallState;
|
|
5366
5314
|
result?: string | null;
|
|
5367
5315
|
undoOf?: number;
|
|
5368
5316
|
decidedBy?: string;
|
|
5369
5317
|
}, now: Date): number;
|
|
5370
|
-
/** v103: a
|
|
5371
|
-
private
|
|
5318
|
+
/** v103: a subagent's tool call in the ledger, as the subagent (or the person who decided it), on its card's task. */
|
|
5319
|
+
private recordSubagentCall;
|
|
5372
5320
|
/** v97: a call was undone by a person; false when it already was. */
|
|
5373
|
-
|
|
5374
|
-
/** v97: cards someone moved by hand right after this actor (a
|
|
5321
|
+
markSubagentCallUndone(id: number, by: string, now: Date): boolean;
|
|
5322
|
+
/** v97: cards someone moved by hand right after this actor (a subagent) moved them, since a time: what people overrode. */
|
|
5375
5323
|
flowMovesOverridden(actor: string, since: string): {
|
|
5376
5324
|
card: number;
|
|
5377
5325
|
flow: number;
|
|
5378
5326
|
title: string;
|
|
5379
|
-
|
|
5327
|
+
subagentTo: string;
|
|
5380
5328
|
personTo: string;
|
|
5381
5329
|
by: string;
|
|
5382
5330
|
at: string;
|
|
5383
5331
|
}[];
|
|
5384
5332
|
/** v97: undo calls a person asked for that aren't made yet. */
|
|
5385
|
-
|
|
5333
|
+
pendingSubagentUndos(): SubagentCallRow[];
|
|
5386
5334
|
/** v97: an undo that failed leaves the call as it was. */
|
|
5387
|
-
|
|
5388
|
-
/** v97: one model turn a
|
|
5389
|
-
|
|
5390
|
-
|
|
5335
|
+
clearSubagentCallUndone(id: number, now: Date): void;
|
|
5336
|
+
/** v97: one model turn a subagent took, with what it cost. */
|
|
5337
|
+
addSubagentTurn(turn: {
|
|
5338
|
+
subagent: number;
|
|
5391
5339
|
card: number | null;
|
|
5392
5340
|
model: string;
|
|
5393
5341
|
ok: boolean;
|
|
@@ -5402,31 +5350,31 @@ export declare class Store {
|
|
|
5402
5350
|
model: string | null;
|
|
5403
5351
|
costUsd: number | null;
|
|
5404
5352
|
}, now: Date): void;
|
|
5405
|
-
|
|
5406
|
-
|
|
5353
|
+
subagentTurns(subagent: number, since: string): SubagentTurnRow[];
|
|
5354
|
+
subagentCall(id: number): SubagentCallRow | null;
|
|
5407
5355
|
/** Move a call on, only from the state it is known to be in: false when someone else moved it first. */
|
|
5408
|
-
|
|
5409
|
-
state:
|
|
5356
|
+
moveSubagentCall(id: number, from: readonly SubagentCallState[], change: {
|
|
5357
|
+
state: SubagentCallState;
|
|
5410
5358
|
result?: string | null;
|
|
5411
5359
|
decidedBy?: string;
|
|
5412
5360
|
}, now: Date): boolean;
|
|
5413
5361
|
/** A card's receipts, oldest first: one visit (`entry`), or every visit. */
|
|
5414
|
-
|
|
5415
|
-
/** A
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
/** The question a
|
|
5419
|
-
|
|
5420
|
-
/** Open questions for these
|
|
5421
|
-
|
|
5362
|
+
subagentCallsOn(card: number, entry?: number | null): SubagentCallRow[];
|
|
5363
|
+
/** A subagent's receipts, newest first; `since` bounds them (a day's summary). */
|
|
5364
|
+
subagentCallsOf(subagent: number, limit: number, since?: string | null): SubagentCallRow[];
|
|
5365
|
+
subagentQuestion(id: number): SubagentQuestionRow | null;
|
|
5366
|
+
/** The question a subagent asked of its own on one visit (never a tool call's approval). */
|
|
5367
|
+
subagentQuestionFor(card: number, entry: number): SubagentQuestionRow | null;
|
|
5368
|
+
/** Open questions for these subagents, oldest first. */
|
|
5369
|
+
openSubagentQuestions(subagents: readonly number[]): SubagentQuestionRow[];
|
|
5422
5370
|
/** The answer, once: false when it was already answered (or dropped). */
|
|
5423
|
-
|
|
5371
|
+
answerSubagentQuestion(id: number, answer: {
|
|
5424
5372
|
choice: string | null;
|
|
5425
5373
|
text: string | null;
|
|
5426
5374
|
by: string;
|
|
5427
5375
|
via: string;
|
|
5428
5376
|
}, now: Date): boolean;
|
|
5429
|
-
|
|
5377
|
+
dropSubagentQuestion(id: number, now: Date): void;
|
|
5430
5378
|
/** A step waiting on a person's answer becomes due now (the answer came). */
|
|
5431
5379
|
wakeFlowStep(card: number, entry: number, now: Date): void;
|
|
5432
5380
|
/** Cards arriving in one zone of a flow after a history line: what a trigger on another flow follows. */
|
|
@@ -5620,12 +5568,12 @@ export declare class Store {
|
|
|
5620
5568
|
recordTelegramTaskMessage(...args: Parameters<ChatMessages["recordTaskMessage"]>): ReturnType<ChatMessages["recordTaskMessage"]>;
|
|
5621
5569
|
/** The approver's live personal threads that have messages, most recent
|
|
5622
5570
|
* first — the chat list. Team conversations list themselves. */
|
|
5623
|
-
|
|
5624
|
-
|
|
5571
|
+
listLeadThreads(approver: string, limit?: number): LeadThreadSummary[];
|
|
5572
|
+
getLeadThread(id: number): LeadThread | null;
|
|
5625
5573
|
/** `--end` and revocation: the thread's text and every proposal in it are
|
|
5626
5574
|
* deleted; the thread row stays as closed metadata (when, whose). */
|
|
5627
|
-
|
|
5628
|
-
|
|
5575
|
+
closeLeadThreadsFor(approver: string, now: Date): number;
|
|
5576
|
+
appendLeadMessage(message: {
|
|
5629
5577
|
thread: number;
|
|
5630
5578
|
turn: number | null;
|
|
5631
5579
|
role: "operator" | "assistant";
|
|
@@ -5633,37 +5581,37 @@ export declare class Store {
|
|
|
5633
5581
|
activity?: string | null;
|
|
5634
5582
|
}, now: Date): number;
|
|
5635
5583
|
/** The last `limit` messages, oldest first. */
|
|
5636
|
-
|
|
5584
|
+
listLeadMessages(thread: number, limit: number): LeadMessage[];
|
|
5637
5585
|
/** A proposal is inert (`drafting`) until its turn finalizes. */
|
|
5638
|
-
|
|
5586
|
+
draftLeadProposal(proposal: {
|
|
5639
5587
|
thread: number;
|
|
5640
5588
|
turn: number;
|
|
5641
|
-
kind:
|
|
5589
|
+
kind: LeadProposalKind;
|
|
5642
5590
|
payload: Record<string, unknown>;
|
|
5643
5591
|
ceilingDigest: string;
|
|
5644
5592
|
}, now: Date): number;
|
|
5645
5593
|
/** Record this turn's one question; false when the turn already asked one. */
|
|
5646
|
-
|
|
5594
|
+
recordLeadAsk(ask: {
|
|
5647
5595
|
turn: number;
|
|
5648
5596
|
thread: number;
|
|
5649
5597
|
question: string;
|
|
5650
5598
|
options: readonly string[];
|
|
5651
5599
|
}, now: Date): boolean;
|
|
5652
5600
|
/** A failed turn keeps no question, as it keeps no drafts. */
|
|
5653
|
-
|
|
5601
|
+
dropLeadAsk(turn: number): void;
|
|
5654
5602
|
/** The question an ANSWERED turn asked; null when it asked none or did not answer. */
|
|
5655
|
-
|
|
5603
|
+
leadAsk(turn: number): LeadAsk | null;
|
|
5656
5604
|
/** What a tap on the question finds: open; answered (its owner has written in its thread since the reply that asked
|
|
5657
5605
|
* it, typed or tapped; a turn the lead started itself, or another person's message, is no answer); or expired (older
|
|
5658
|
-
* than
|
|
5659
|
-
|
|
5606
|
+
* than LEAD_ASK_TTL_MS, or the question or the reply that asked it is gone, as after a retention purge). */
|
|
5607
|
+
leadAskState(turn: number, now: Date): {
|
|
5660
5608
|
state: "open";
|
|
5661
|
-
ask:
|
|
5609
|
+
ask: LeadAsk;
|
|
5662
5610
|
} | {
|
|
5663
5611
|
state: "answered" | "expired";
|
|
5664
5612
|
};
|
|
5665
|
-
/** The question while it is open (see
|
|
5666
|
-
|
|
5613
|
+
/** The question while it is open (see leadAskState); null otherwise. */
|
|
5614
|
+
leadAskOpen(turn: number, now: Date): LeadAsk | null;
|
|
5667
5615
|
/**
|
|
5668
5616
|
* Record the screenshots one turn selected for an exact result, under the
|
|
5669
5617
|
* turn, so a channel that delivers files can plan them from the completed
|
|
@@ -5672,25 +5620,25 @@ export declare class Store {
|
|
|
5672
5620
|
* before upload. A turn holds at most `cap` images; the same artifact is
|
|
5673
5621
|
* recorded once. Returns how many of THESE rows are recorded after the call.
|
|
5674
5622
|
*/
|
|
5675
|
-
|
|
5623
|
+
recordLeadTurnEvidence(turn: number, rows: readonly Omit<LeadTurnEvidence, "turn" | "ordinal" | "createdAt">[], cap: number, now: Date): number;
|
|
5676
5624
|
/** The screenshots a turn selected, in selection order — meaningful only for a turn that ANSWERED (a failed turn's rows are deleted). */
|
|
5677
|
-
|
|
5625
|
+
listLeadTurnEvidence(turn: number): LeadTurnEvidence[];
|
|
5678
5626
|
/** A failed turn's selection is DELETED with its drafts: nothing a failed turn selected is ever sent. */
|
|
5679
|
-
|
|
5627
|
+
discardLeadTurnEvidence(turn: number): number;
|
|
5680
5628
|
/** Drafts become confirmable only under a turn that ANSWERED (review finding 12). */
|
|
5681
|
-
|
|
5629
|
+
promoteLeadProposals(turn: number): number;
|
|
5682
5630
|
/** A failed turn's drafts are DELETED — nothing a failed turn produced is durable (finding 4). */
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5631
|
+
discardLeadProposals(turn: number): number;
|
|
5632
|
+
getLeadProposal(id: number): LeadProposal | null;
|
|
5633
|
+
listLeadProposals(thread: number, states?: readonly LeadProposalState[]): LeadProposal[];
|
|
5686
5634
|
/** The state CAS confirmation rides on (ruling 7). */
|
|
5687
|
-
|
|
5635
|
+
casLeadProposal(id: number, from: LeadProposalState, to: LeadProposalState, by: string | null, outcome: Record<string, unknown> | null, now: Date): boolean;
|
|
5688
5636
|
/**
|
|
5689
5637
|
* The turn's reservation, in ONE transaction against the session and the
|
|
5690
5638
|
* weekly ledger, before any dispatch (ruling 5). One live turn per
|
|
5691
5639
|
* approver serializes the console and the CLI.
|
|
5692
5640
|
*/
|
|
5693
|
-
|
|
5641
|
+
openLeadTurn(args: {
|
|
5694
5642
|
approver: string;
|
|
5695
5643
|
session: number;
|
|
5696
5644
|
thread: number;
|
|
@@ -5707,17 +5655,17 @@ export declare class Store {
|
|
|
5707
5655
|
ok: false;
|
|
5708
5656
|
reason: "latched" | "concurrent" | "daily-cap" | "session-exhausted" | "session-ended" | "not-yours" | "thread-closed" | "over-budget" | "monthly-budget";
|
|
5709
5657
|
};
|
|
5710
|
-
|
|
5658
|
+
startLeadTurn(id: number, now: Date): {
|
|
5711
5659
|
ok: true;
|
|
5712
5660
|
generation: number;
|
|
5713
5661
|
} | {
|
|
5714
5662
|
ok: false;
|
|
5715
5663
|
};
|
|
5716
|
-
/** One provider request of a
|
|
5664
|
+
/** One provider request of a lead turn: a chat_turn row of kind
|
|
5717
5665
|
* 'mate-step', reserved at zero (the turn holds the reservation), with
|
|
5718
5666
|
* the same dispatch CAS, terminal CAS, and crash latch as fleet chat. */
|
|
5719
|
-
|
|
5720
|
-
|
|
5667
|
+
openLeadStep(args: {
|
|
5668
|
+
leadTurn: number;
|
|
5721
5669
|
generation: number;
|
|
5722
5670
|
approver: string;
|
|
5723
5671
|
credentialKey: string;
|
|
@@ -5739,7 +5687,7 @@ export declare class Store {
|
|
|
5739
5687
|
* releases money it cannot prove was not spent; acknowledging the step
|
|
5740
5688
|
* later does not refund it.
|
|
5741
5689
|
*/
|
|
5742
|
-
|
|
5690
|
+
finalizeLeadTurn(id: number, generation: number, outcome: {
|
|
5743
5691
|
state: "answered" | "failed";
|
|
5744
5692
|
settledMicrousd: number;
|
|
5745
5693
|
unknownSpend?: boolean;
|
|
@@ -5756,18 +5704,18 @@ export declare class Store {
|
|
|
5756
5704
|
}, now: Date): boolean;
|
|
5757
5705
|
/** A turn stopped at its deadline: the proposals its completed tool calls drafted (each validated when drafted) go pending, as an
|
|
5758
5706
|
* answered turn's do; anything the provider sent after them was never acted on. Every other failure still deletes its drafts. */
|
|
5759
|
-
private
|
|
5707
|
+
private keepTimedOutLeadProposals;
|
|
5760
5708
|
/** Revocation's companion for a loop in flight (finding 5): every live
|
|
5761
5709
|
* turn of the approver fails NOW, charged its whole reservation, its
|
|
5762
5710
|
* generation moved so the returning loop's terminal CAS loses. */
|
|
5763
|
-
|
|
5711
|
+
failLiveLeadTurnsFor(approver: string, reason: string, now: Date, privateOnly?: boolean): number;
|
|
5764
5712
|
/** The crash sweep for turns: past the deadline, failed. The session is
|
|
5765
5713
|
* charged the settled sum of the steps that answered — unless any step
|
|
5766
5714
|
* is unproven (dispatched and never settled, or latched), in which case
|
|
5767
5715
|
* the WHOLE reservation is charged (finding 1). Like a turn that stopped
|
|
5768
5716
|
* at its own deadline, it keeps the proposals its completed tool calls
|
|
5769
5717
|
* drafted and says, in the thread, that the reply took too long. */
|
|
5770
|
-
|
|
5718
|
+
sweepStaleLeadTurns(now: Date): number;
|
|
5771
5719
|
/** A task_ref by its row id: the external id and repo — for decisions, which hang off runs. */
|
|
5772
5720
|
refById(id: number): {
|
|
5773
5721
|
id: number;
|
|
@@ -5795,10 +5743,10 @@ export declare class Store {
|
|
|
5795
5743
|
casCoordinatorProposal(id: number, from: CoordinatorProposalState, to: CoordinatorProposalState, by: string | null, outcome: Record<string, unknown> | null, now: Date): boolean;
|
|
5796
5744
|
/** Pending rows expire after seven days; a revoked credential's pending rows expire at once. */
|
|
5797
5745
|
sweepCoordinatorProposals(now: Date, cid?: string): number;
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5746
|
+
recentLeadTurns(approver: string, limit?: number): LeadTurn[];
|
|
5747
|
+
getLeadTurn(id: number): LeadTurn | null;
|
|
5748
|
+
liveLeadTurnFor(approver: string): LeadTurn | null;
|
|
5749
|
+
leadStepsOf(leadTurn: number): ChatTurn[];
|
|
5802
5750
|
/** Remember a project was opened. Upsert keeps added_at; recency always moves.
|
|
5803
5751
|
* A project added for the first time starts on Quick checks. */
|
|
5804
5752
|
upsertProject(path: string, name: string, now: Date): void;
|
|
@@ -6524,7 +6472,7 @@ export declare class Store {
|
|
|
6524
6472
|
private bumpPushFailures;
|
|
6525
6473
|
/** A chat send receipt contains no message text. The session is part of
|
|
6526
6474
|
* its namespace; callers must prove that session before reading it. */
|
|
6527
|
-
|
|
6475
|
+
leadRequestReceipt(session: number, request: string): {
|
|
6528
6476
|
digest: string;
|
|
6529
6477
|
turn: number;
|
|
6530
6478
|
} | null;
|