toolroll 0.9.53 → 0.9.55
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 +17 -0
- package/README.md +5 -4
- package/dist/agent-onboard.js +4 -1
- package/dist/approval-rules-ui.d.ts +3 -2
- package/dist/approval-rules-ui.js +15 -20
- package/dist/assignment-ui.d.ts +3 -2
- package/dist/assignment-ui.js +4 -11
- package/dist/backup-ui.d.ts +2 -1
- package/dist/backup-ui.js +16 -27
- package/dist/brand-mark.d.ts +3 -2
- package/dist/brand-mark.js +4 -4
- package/dist/browser/workspace.css +1 -1
- package/dist/browser/workspace.js +25 -25
- package/dist/browser-shell.d.ts +2 -1
- package/dist/browser-shell.js +9 -9
- package/dist/browser-workspace.d.ts +2 -3
- package/dist/browser-workspace.js +0 -3
- package/dist/chat-ask.js +8 -8
- package/dist/chat-core.d.ts +171 -0
- package/dist/chat-core.js +288 -0
- package/dist/chat-decide.d.ts +10 -8
- package/dist/chat-decide.js +26 -21
- package/dist/chat-delivery-state.d.ts +51 -75
- package/dist/chat-delivery-state.js +140 -170
- package/dist/chat-delivery.d.ts +21 -2
- package/dist/chat-delivery.js +313 -194
- package/dist/chat-flow.d.ts +29 -1
- package/dist/chat-flow.js +24 -50
- package/dist/chat-messages.d.ts +319 -0
- package/dist/chat-messages.js +841 -0
- package/dist/chat-migration.d.ts +30 -0
- package/dist/chat-migration.js +802 -0
- package/dist/chat-polish.d.ts +5 -4
- package/dist/chat-polish.js +9 -10
- package/dist/chat-quiet.d.ts +3 -0
- package/dist/chat-quiet.js +5 -0
- package/dist/check-levels-ui.d.ts +2 -1
- package/dist/check-levels-ui.js +26 -53
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +9 -3
- package/dist/coding-shipping-ui.d.ts +2 -1
- package/dist/coding-shipping-ui.js +6 -6
- package/dist/coding-ui.d.ts +3 -1
- package/dist/coding-ui.js +30 -29
- package/dist/contracts/chat-content.d.ts +71 -2
- package/dist/contracts/chat-content.js +22 -3
- package/dist/contracts/chat-tables.d.ts +11 -4
- package/dist/contracts/chat-tables.js +165 -87
- package/dist/contracts/cli.d.ts +1 -3
- package/dist/contracts/console-api.d.ts +1 -1
- package/dist/contracts/console-api.js +6 -5
- package/dist/contracts/discord-callback.js +2 -1
- package/dist/contracts/health.d.ts +1 -3
- package/dist/contracts/slack-callback.js +3 -2
- package/dist/contracts/store-json.d.ts +1 -5
- package/dist/contracts/store-json.js +1 -4
- package/dist/contracts/teams-callback.js +2 -1
- package/dist/control-ui.d.ts +5 -4
- package/dist/control-ui.js +9 -34
- package/dist/credentials-ui.d.ts +5 -4
- package/dist/credentials-ui.js +23 -24
- package/dist/demo-chat.d.ts +3 -3
- package/dist/demo-chat.js +29 -76
- package/dist/discord-chat.js +19 -38
- package/dist/discord-settings.d.ts +3 -2
- package/dist/discord-settings.js +21 -55
- package/dist/discord.js +4 -14
- package/dist/envelope.js +10 -0
- package/dist/evidence-pack.d.ts +2 -1
- package/dist/evidence-pack.js +45 -49
- package/dist/export-ui.d.ts +7 -2
- package/dist/export-ui.js +4 -10
- package/dist/export.js +4 -4
- package/dist/flow-gallery-ui.d.ts +4 -3
- package/dist/flow-gallery-ui.js +28 -43
- package/dist/flow-starters-ui.d.ts +2 -1
- package/dist/flow-starters-ui.js +12 -15
- package/dist/flow-triggers.d.ts +1 -0
- package/dist/flow-triggers.js +16 -14
- package/dist/flows-ui.d.ts +4 -3
- package/dist/flows-ui.js +19 -30
- package/dist/flows.js +2 -1
- package/dist/guides.js +108 -3
- package/dist/html.d.ts +76 -0
- package/dist/html.js +173 -0
- package/dist/integrations-ui.d.ts +2 -1
- package/dist/integrations-ui.js +19 -23
- package/dist/kits-ui.d.ts +5 -4
- package/dist/kits-ui.js +18 -20
- package/dist/knowledge-ui.d.ts +6 -5
- package/dist/knowledge-ui.js +26 -25
- package/dist/lead-context.d.ts +11 -1
- package/dist/lead-context.js +6 -8
- package/dist/ledger-view.d.ts +2 -1
- package/dist/ledger-view.js +27 -29
- package/dist/limits-ui.d.ts +2 -1
- package/dist/limits-ui.js +7 -7
- package/dist/live-bus.d.ts +50 -8
- package/dist/live-bus.js +133 -50
- package/dist/mate-tools.js +3 -2
- package/dist/mcp-oauth.js +35 -36
- package/dist/models-ui.d.ts +2 -1
- package/dist/models-ui.js +25 -35
- package/dist/modes.d.ts +13 -1
- package/dist/modes.js +17 -1
- package/dist/monitoring-ui.d.ts +4 -3
- package/dist/monitoring-ui.js +13 -26
- package/dist/notification-rows.d.ts +30 -0
- package/dist/notification-rows.js +102 -0
- package/dist/openrouter-models.d.ts +2 -1
- package/dist/openrouter-models.js +5 -9
- package/dist/operate.js +16 -9
- package/dist/people-audit-ui.d.ts +2 -1
- package/dist/people-audit-ui.js +13 -13
- package/dist/plane-review.js +5 -11
- package/dist/policy-ui.d.ts +3 -2
- package/dist/policy-ui.js +17 -23
- package/dist/project-delete-ui.d.ts +4 -3
- package/dist/project-delete-ui.js +15 -27
- package/dist/project-delete.js +21 -26
- package/dist/pull-request-ui.d.ts +2 -1
- package/dist/pull-request-ui.js +17 -32
- package/dist/recipe-ui.d.ts +8 -7
- package/dist/recipe-ui.js +39 -32
- package/dist/release-adapters.d.ts +60 -0
- package/dist/release-adapters.js +435 -0
- package/dist/release-cli.d.ts +24 -0
- package/dist/release-cli.js +181 -0
- package/dist/release-gate.d.ts +80 -0
- package/dist/release-gate.js +150 -0
- package/dist/release-links.d.ts +29 -0
- package/dist/release-links.js +102 -0
- package/dist/release.d.ts +331 -0
- package/dist/release.js +550 -0
- package/dist/reply-shape.d.ts +2 -1
- package/dist/reply-shape.js +5 -5
- package/dist/repository-context-ui.d.ts +2 -1
- package/dist/repository-context-ui.js +2 -7
- package/dist/request-budget-ui.d.ts +2 -1
- package/dist/request-budget-ui.js +16 -16
- package/dist/result-review.d.ts +2 -3
- package/dist/result-review.js +3 -9
- package/dist/result-shots.js +2 -2
- package/dist/retention-ui.d.ts +7 -1
- package/dist/retention-ui.js +7 -11
- package/dist/retention.js +1 -1
- package/dist/serve.d.ts +11 -2
- package/dist/serve.js +69 -58
- package/dist/server/chat.d.ts +3 -6
- package/dist/server/chat.js +969 -1006
- package/dist/server/chrome.d.ts +291 -0
- package/dist/server/chrome.js +747 -0
- package/dist/server/console.css +2819 -0
- package/dist/server/flows.d.ts +2 -6
- package/dist/server/flows.js +840 -766
- package/dist/server/guards.d.ts +1 -1
- package/dist/server/guards.js +5 -2
- package/dist/server/handler-context.d.ts +1 -1
- package/dist/server/handler-context.js +1 -1
- package/dist/server/handler-registry.d.ts +8 -6
- package/dist/server/handler-registry.js +14 -2
- package/dist/server/http.d.ts +274 -0
- package/dist/server/http.js +239 -0
- package/dist/server/live.d.ts +34 -0
- package/dist/server/live.js +309 -0
- package/dist/server/pages.d.ts +2 -6
- package/dist/server/pages.js +808 -789
- package/dist/server/people-tokens.d.ts +1 -6
- package/dist/server/people-tokens.js +580 -572
- package/dist/server/remote.d.ts +4 -7
- package/dist/server/remote.js +37 -70
- package/dist/server/render-chat.d.ts +402 -0
- package/dist/server/render-chat.js +927 -0
- package/dist/server/render-pages.d.ts +535 -0
- package/dist/server/render-pages.js +1277 -0
- package/dist/server/render-people.d.ts +32 -0
- package/dist/server/render-people.js +121 -0
- package/dist/server/render-results.d.ts +744 -0
- package/dist/server/render-results.js +2237 -0
- package/dist/server/render-settings.d.ts +147 -0
- package/dist/server/render-settings.js +577 -0
- package/dist/server/render-tasks.d.ts +632 -0
- package/dist/server/render-tasks.js +2345 -0
- package/dist/server/request-context.d.ts +46 -0
- package/dist/server/request-context.js +17 -0
- package/dist/server/route-table.d.ts +25 -3
- package/dist/server/route-table.js +163 -75
- package/dist/server/runtime.d.ts +15 -7
- package/dist/server/runtime.js +7 -1
- package/dist/server/session.d.ts +138 -0
- package/dist/server/session.js +94 -0
- package/dist/server/settings.d.ts +1 -5
- package/dist/server/settings.js +2182 -2117
- package/dist/server/task-views.d.ts +11 -4
- package/dist/server/task-views.js +26 -22
- package/dist/server/tasks.d.ts +9 -9
- package/dist/server/tasks.js +1486 -1418
- package/dist/server-telemetry.d.ts +4 -3
- package/dist/server-telemetry.js +4 -8
- package/dist/skills-ui.d.ts +4 -3
- package/dist/skills-ui.js +14 -17
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +2 -1
- package/dist/slack-api.d.ts +5 -1
- package/dist/slack-api.js +2 -2
- package/dist/slack-chat.d.ts +9 -4
- package/dist/slack-chat.js +29 -52
- package/dist/slack-settings.d.ts +3 -2
- package/dist/slack-settings.js +23 -57
- package/dist/slack.js +6 -16
- package/dist/spend-ui.d.ts +2 -1
- package/dist/spend-ui.js +9 -32
- package/dist/sso-ui.d.ts +3 -2
- package/dist/sso-ui.js +26 -27
- package/dist/storage-ui.d.ts +2 -1
- package/dist/storage-ui.js +14 -33
- package/dist/store.d.ts +97 -364
- package/dist/store.js +207 -1531
- package/dist/surface.js +14 -3
- package/dist/task-composer.d.ts +2 -1
- package/dist/task-composer.js +7 -7
- package/dist/task-status.d.ts +4 -3
- package/dist/task-status.js +15 -16
- package/dist/team-http.d.ts +5 -9
- package/dist/team-http.js +5 -63
- package/dist/team-ui.d.ts +2 -1
- package/dist/team-ui.js +2 -5
- package/dist/teammate-question.js +12 -12
- package/dist/teammates-ui.d.ts +5 -4
- package/dist/teammates-ui.js +61 -90
- package/dist/teams-chat.js +12 -9
- package/dist/teams-settings.d.ts +3 -2
- package/dist/teams-settings.js +22 -33
- package/dist/teams.js +4 -5
- package/dist/telegram-flow.js +5 -5
- package/dist/telegram-settings.d.ts +3 -2
- package/dist/telegram-settings.js +14 -25
- package/dist/telegram.js +4 -4
- package/dist/toolroll-update-ui.d.ts +3 -2
- package/dist/toolroll-update-ui.js +35 -39
- package/dist/toolroll-update.d.ts +10 -0
- package/dist/toolroll-update.js +50 -3
- package/dist/tools-ui.d.ts +5 -2
- package/dist/tools-ui.js +31 -31
- package/dist/when-html.d.ts +11 -3
- package/dist/when-html.js +5 -6
- package/dist/workspace-revision.js +3 -1
- package/dist/workspace-ui.d.ts +4 -2
- package/dist/workspace-ui.js +10 -10
- package/package.json +1 -1
- package/dist/server/shared.d.ts +0 -3151
- package/dist/server/shared.js +0 -12001
- package/dist/slack-state.d.ts +0 -13
- package/dist/slack-state.js +0 -10
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
/** Everyday console pages: home, inbox, board, work, projects, fleet and the queue. */
|
|
2
|
+
import { type Html } from "../html.js";
|
|
3
|
+
import { type AssignmentSnapshot } from "../assignment.js";
|
|
4
|
+
import { type BoardCard } from "../board.js";
|
|
5
|
+
import { type BrowserLimits } from "../browser-workspace.js";
|
|
6
|
+
import { type CheckLevel } from "../check-levels.js";
|
|
7
|
+
import { type DispatchDiagnosis } from "../dispatch.js";
|
|
8
|
+
import { type FirstRunStep } from "../first-run.js";
|
|
9
|
+
import { type Gap } from "../gaps.js";
|
|
10
|
+
import { type ListOutcome } from "../onboard.js";
|
|
11
|
+
import { type parseBaseTreeSnapshot } from "../peek.js";
|
|
12
|
+
import { type CriterionMatrixRow } from "../proof.js";
|
|
13
|
+
import { type QualityMode } from "../quality.js";
|
|
14
|
+
import { type Runner } from "../runner.js";
|
|
15
|
+
import { type Scope, type UnattendedPermissionMode } from "../scope.js";
|
|
16
|
+
import { type Decision, type Incident, type RepairChainRow, type Run, type Store, type Task, type TaskState, type WorktreeRow } from "../store.js";
|
|
17
|
+
import { tally } from "../summary.js";
|
|
18
|
+
import { type WorkIndexGroup, type WorkIndexPage } from "../work-index.js";
|
|
19
|
+
import { type WorkFacts, type WorkStatus, type WorkView } from "../workspace-ui.js";
|
|
20
|
+
import { type Chrome, type Screen } from "./chrome.js";
|
|
21
|
+
import { type PlanContractView, type RouteView } from "./render-tasks.js";
|
|
22
|
+
export declare const TASK_STATES: readonly TaskState[];
|
|
23
|
+
/**
|
|
24
|
+
* The inbox (v3): only things stalling progress without a person, one card
|
|
25
|
+
* per underlying stall, each with its verb inline or one step away. No
|
|
26
|
+
* auto-refresh — approval links lead to the step-up screen, and a page
|
|
27
|
+
* that might hold typed input never re-renders itself.
|
|
28
|
+
*/
|
|
29
|
+
export type InboxTab = "needs-you" | "ready" | "running" | "all";
|
|
30
|
+
export declare const INBOX_TABS: readonly {
|
|
31
|
+
id: InboxTab;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
export declare function parseInboxTab(raw: string | null): InboxTab | undefined;
|
|
35
|
+
/** What each tab holds, as a short fingerprint: a tab is unread when its
|
|
36
|
+
* fingerprint differs from the one this browser saw there last. */
|
|
37
|
+
export declare function inboxFingerprints(data: Pick<Parameters<typeof inboxPage>[1], "decisions" | "approvals" | "requeueables" | "cancelledBlockers" | "gaps" | "needsVerification" | "ready" | "running">): Record<InboxTab, string>;
|
|
38
|
+
export declare function inboxPage(chrome: Chrome, data: {
|
|
39
|
+
csrf: string;
|
|
40
|
+
revision: number;
|
|
41
|
+
/** No project open in scoped mode: every admitted project at once,
|
|
42
|
+
* chips on every row, links only — acting means opening the project. */
|
|
43
|
+
rollup: boolean;
|
|
44
|
+
/** A project is OPEN: only then do decisions answer on the card. The
|
|
45
|
+
* legacy unscoped projectless inbox stays links-only too (commit-1
|
|
46
|
+
* review, finding 4) — the partial belongs to a chosen project. */
|
|
47
|
+
interactive: boolean;
|
|
48
|
+
decisions: (Decision & {
|
|
49
|
+
taskId: string;
|
|
50
|
+
repo?: string | null;
|
|
51
|
+
})[];
|
|
52
|
+
approvals: {
|
|
53
|
+
taskId: string;
|
|
54
|
+
title: string;
|
|
55
|
+
goal: string;
|
|
56
|
+
proposedAt: string;
|
|
57
|
+
repo?: string | null; /** v48 authority repair: the closed consent door's title, or null when a yes could bind. */
|
|
58
|
+
closed?: string | null;
|
|
59
|
+
}[];
|
|
60
|
+
requeueables: {
|
|
61
|
+
taskId: string;
|
|
62
|
+
title: string;
|
|
63
|
+
state: TaskState;
|
|
64
|
+
strikes: number;
|
|
65
|
+
incidentCount: number;
|
|
66
|
+
repo?: string | null;
|
|
67
|
+
}[];
|
|
68
|
+
cancelledBlockers: {
|
|
69
|
+
blockerId: string;
|
|
70
|
+
dependentCount: number;
|
|
71
|
+
exampleDependent: string;
|
|
72
|
+
repo?: string | null;
|
|
73
|
+
blockerRepo?: string | null;
|
|
74
|
+
}[];
|
|
75
|
+
gaps: Gap[];
|
|
76
|
+
/** A completed task whose proof is short or refuted and not yet accepted
|
|
77
|
+
* (Priority 2) — reads "needs verification" here too, never silently
|
|
78
|
+
* "done" just because the inbox does not otherwise look at finished work. */
|
|
79
|
+
needsVerification: {
|
|
80
|
+
taskId: string;
|
|
81
|
+
title: string;
|
|
82
|
+
verdict: "short" | "refuted";
|
|
83
|
+
repo?: string | null;
|
|
84
|
+
matrix?: CriterionMatrixRow[];
|
|
85
|
+
repairChain?: RepairChainRow | null;
|
|
86
|
+
}[];
|
|
87
|
+
/** The first-run steps; null once the installation has had its first Ready result. */
|
|
88
|
+
wizard: FirstRunStep[] | null;
|
|
89
|
+
/** Whether any worker is answering right now — said at the top when none is. */
|
|
90
|
+
worker: {
|
|
91
|
+
answering: number;
|
|
92
|
+
registered: number;
|
|
93
|
+
lastHeard: string | null;
|
|
94
|
+
};
|
|
95
|
+
now: Date;
|
|
96
|
+
/** Console v2: the tab shown, results ready to review, work running now,
|
|
97
|
+
* and the tabs holding something this browser hasn't seen (dots on a phone). */
|
|
98
|
+
tab?: InboxTab;
|
|
99
|
+
ready?: {
|
|
100
|
+
taskId: string;
|
|
101
|
+
title: string;
|
|
102
|
+
detail: string;
|
|
103
|
+
repo: string | null;
|
|
104
|
+
}[];
|
|
105
|
+
running?: {
|
|
106
|
+
taskId: string;
|
|
107
|
+
title: string;
|
|
108
|
+
detail: string;
|
|
109
|
+
repo: string | null;
|
|
110
|
+
}[];
|
|
111
|
+
unread?: readonly InboxTab[];
|
|
112
|
+
}): Screen;
|
|
113
|
+
/** System: the machinery — workers, background service, workspaces. */
|
|
114
|
+
export declare function systemPage(chrome: Chrome, data: {
|
|
115
|
+
agents: {
|
|
116
|
+
phase: "plan" | "build" | "repair" | "review";
|
|
117
|
+
provider?: string;
|
|
118
|
+
model?: string | null;
|
|
119
|
+
source?: "pinned" | "flag" | "project" | "installation" | "default";
|
|
120
|
+
problem?: string;
|
|
121
|
+
setBy: string | null;
|
|
122
|
+
}[];
|
|
123
|
+
building: {
|
|
124
|
+
taskId: string;
|
|
125
|
+
runner: string;
|
|
126
|
+
claimedAt: string;
|
|
127
|
+
expiresAt: string;
|
|
128
|
+
model: string | null;
|
|
129
|
+
}[];
|
|
130
|
+
runners: Runner[];
|
|
131
|
+
worktrees: WorktreeRow[];
|
|
132
|
+
episode: {
|
|
133
|
+
id: number;
|
|
134
|
+
startedAt: string;
|
|
135
|
+
endedAt: string | null;
|
|
136
|
+
ticks: number;
|
|
137
|
+
built: number;
|
|
138
|
+
broke: number;
|
|
139
|
+
} | null;
|
|
140
|
+
outboxPending: number;
|
|
141
|
+
externalWork?: {
|
|
142
|
+
remoteRepo: string;
|
|
143
|
+
blocked: string | null;
|
|
144
|
+
openEpisode: string | null;
|
|
145
|
+
}[];
|
|
146
|
+
now: Date;
|
|
147
|
+
}): Screen;
|
|
148
|
+
/**
|
|
149
|
+
* The board: the pipeline as lanes, position as meaning — attention, then
|
|
150
|
+
* queued, then waiting, then building, then recently done. Read-only by
|
|
151
|
+
* construction (every card is a link, no forms, no nonces), which is what
|
|
152
|
+
* makes it safe to re-render itself while somebody watches.
|
|
153
|
+
*/
|
|
154
|
+
export declare function boardBody(data: {
|
|
155
|
+
cards: BoardCard[];
|
|
156
|
+
done: ReturnType<Store["listCompletedWorkScoped"]>;
|
|
157
|
+
saturated: boolean;
|
|
158
|
+
now: Date;
|
|
159
|
+
/** The rolled-up view: every project inside the ceiling at once. */
|
|
160
|
+
all: boolean;
|
|
161
|
+
project: string | null;
|
|
162
|
+
delta: {
|
|
163
|
+
agoMinutes: number;
|
|
164
|
+
built: number;
|
|
165
|
+
failed: number;
|
|
166
|
+
questions: number;
|
|
167
|
+
} | null;
|
|
168
|
+
}, ciRed: (pr: number) => boolean): Html;
|
|
169
|
+
/** Completed work: one row per done task, its final run and PR attached. */
|
|
170
|
+
export declare function donePage(chrome: Chrome, rows: ReturnType<Store["listCompletedWorkScoped"]>, ciRed: (pr: number) => boolean): Screen;
|
|
171
|
+
export declare function homePage(chrome: Chrome, data: {
|
|
172
|
+
csrf: string;
|
|
173
|
+
taskCount: number;
|
|
174
|
+
repo: string | null;
|
|
175
|
+
building: {
|
|
176
|
+
taskId: string;
|
|
177
|
+
runner: string;
|
|
178
|
+
claimedAt: string;
|
|
179
|
+
expiresAt: string;
|
|
180
|
+
model: string | null;
|
|
181
|
+
}[];
|
|
182
|
+
runners: Runner[];
|
|
183
|
+
worktrees: WorktreeRow[];
|
|
184
|
+
episode: {
|
|
185
|
+
id: number;
|
|
186
|
+
startedAt: string;
|
|
187
|
+
endedAt: string | null;
|
|
188
|
+
ticks: number;
|
|
189
|
+
built: number;
|
|
190
|
+
broke: number;
|
|
191
|
+
} | null;
|
|
192
|
+
summary: ReturnType<typeof tally<Run & {
|
|
193
|
+
taskId: string;
|
|
194
|
+
}>>;
|
|
195
|
+
decisions: (Decision & {
|
|
196
|
+
taskId: string;
|
|
197
|
+
})[];
|
|
198
|
+
incidents: (Incident & {
|
|
199
|
+
taskId: string;
|
|
200
|
+
})[];
|
|
201
|
+
stranded: {
|
|
202
|
+
id: string;
|
|
203
|
+
blockedBy: string[];
|
|
204
|
+
}[];
|
|
205
|
+
gaps: Gap[] | null;
|
|
206
|
+
outboxPending: number;
|
|
207
|
+
settings: boolean;
|
|
208
|
+
now: Date;
|
|
209
|
+
}): Screen;
|
|
210
|
+
export type TaskComposerPrefill = {
|
|
211
|
+
title: string;
|
|
212
|
+
goal: string;
|
|
213
|
+
not: string;
|
|
214
|
+
touches: string;
|
|
215
|
+
acceptance: string;
|
|
216
|
+
values?: URLSearchParams;
|
|
217
|
+
};
|
|
218
|
+
/** The one front door for new work. The common path is one prompt and one
|
|
219
|
+
* button; the detailed contract remains available in-place for templates,
|
|
220
|
+
* experts, and the rare task that should skip repository-aware planning. */
|
|
221
|
+
/** Where new work goes when no project is open: a choice from the projects
|
|
222
|
+
* this person already has, never a typed path; a new project is one link
|
|
223
|
+
* away. Same-named checkouts show their parent folder to tell them apart. */
|
|
224
|
+
export declare function projectPickerHtml(projects: {
|
|
225
|
+
path: string;
|
|
226
|
+
name: string;
|
|
227
|
+
}[], chosen: string): Html;
|
|
228
|
+
export declare function taskComposerHtml(data: {
|
|
229
|
+
project: string | null;
|
|
230
|
+
projectRevision?: number;
|
|
231
|
+
prefill?: TaskComposerPrefill | null;
|
|
232
|
+
candidates?: {
|
|
233
|
+
id: string;
|
|
234
|
+
title: string;
|
|
235
|
+
}[];
|
|
236
|
+
permissionDefault: UnattendedPermissionMode;
|
|
237
|
+
qualityDefault: QualityMode;
|
|
238
|
+
/** Projects this person may place work in, most recently opened first. */
|
|
239
|
+
projects?: {
|
|
240
|
+
path: string;
|
|
241
|
+
name: string;
|
|
242
|
+
}[];
|
|
243
|
+
}): Html;
|
|
244
|
+
export type WorkRow = WorkFacts & {
|
|
245
|
+
assignment?: AssignmentSnapshot | null;
|
|
246
|
+
assignmentProblem?: boolean;
|
|
247
|
+
executionId?: string;
|
|
248
|
+
familyNotice?: string | null;
|
|
249
|
+
status: WorkStatus;
|
|
250
|
+
resultRunId: number | null;
|
|
251
|
+
};
|
|
252
|
+
export declare const TASK_GROUP_LABEL: Readonly<Record<WorkIndexGroup, string>>;
|
|
253
|
+
export declare function workPage(chrome: Chrome, data: {
|
|
254
|
+
view: WorkView;
|
|
255
|
+
projectFilter?: string;
|
|
256
|
+
work: WorkIndexPage;
|
|
257
|
+
previous: boolean;
|
|
258
|
+
multiProject: boolean;
|
|
259
|
+
now: Date;
|
|
260
|
+
limits?: BrowserLimits | null;
|
|
261
|
+
}): Screen;
|
|
262
|
+
export declare function tasksPage(chrome: Chrome, tasks: Task[], state: TaskState | null, problem: string | null, repo?: string | null, prefill?: TaskComposerPrefill | null, permissionDefault?: UnattendedPermissionMode, qualityDefault?: QualityMode, replaced?: ReadonlyMap<string, string>): Screen;
|
|
263
|
+
export declare function browsePage(chrome: Chrome, data: {
|
|
264
|
+
at: string;
|
|
265
|
+
root: string;
|
|
266
|
+
roots: string[];
|
|
267
|
+
parent: string | null;
|
|
268
|
+
entries: {
|
|
269
|
+
name: string;
|
|
270
|
+
path: string;
|
|
271
|
+
git: boolean;
|
|
272
|
+
}[];
|
|
273
|
+
/** Unused: postForm adds the request's CSRF field. Kept for callers. */
|
|
274
|
+
csrf: string;
|
|
275
|
+
}): Screen;
|
|
276
|
+
/** The compact completed row shared by both halves of the control room. */
|
|
277
|
+
export type WorkbenchDone = {
|
|
278
|
+
taskId: string;
|
|
279
|
+
title: string;
|
|
280
|
+
outcome: string | null;
|
|
281
|
+
repo: string | null;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* The control-room rail (attended A1): every state that matters while a
|
|
285
|
+
* person supervises, ordered by intervention cost. The project chip is
|
|
286
|
+
* deliberately repeated on every row — a title is not a workspace, and
|
|
287
|
+
* switching context must never depend on remembering which repo is open.
|
|
288
|
+
*/
|
|
289
|
+
export declare function workbenchRail(data: {
|
|
290
|
+
attention: BoardCard[];
|
|
291
|
+
building: BoardCard[];
|
|
292
|
+
waiting: BoardCard[];
|
|
293
|
+
queued: BoardCard[];
|
|
294
|
+
done: WorkbenchDone[];
|
|
295
|
+
selected: string | null;
|
|
296
|
+
saturated: boolean;
|
|
297
|
+
}): Html;
|
|
298
|
+
/**
|
|
299
|
+
* The portfolio overview (arc slice 1a): what waits on you, what the last
|
|
300
|
+
* 24 hours of run starts amounted to, what is running, and the terminal-run
|
|
301
|
+
* ledger — all of it across every admitted project, a project chip on every
|
|
302
|
+
* row. The caller has already applied admission and per-row visibility.
|
|
303
|
+
*/
|
|
304
|
+
export declare function portfolioOverview(data: {
|
|
305
|
+
attention: BoardCard[];
|
|
306
|
+
building: BoardCard[];
|
|
307
|
+
waiting: BoardCard[];
|
|
308
|
+
queued: BoardCard[];
|
|
309
|
+
done: WorkbenchDone[];
|
|
310
|
+
saturated: boolean;
|
|
311
|
+
decisions: (Decision & {
|
|
312
|
+
taskId: string;
|
|
313
|
+
repo?: string | null;
|
|
314
|
+
})[];
|
|
315
|
+
approvals: {
|
|
316
|
+
taskId: string;
|
|
317
|
+
title: string;
|
|
318
|
+
goal: string;
|
|
319
|
+
proposedAt: string;
|
|
320
|
+
repo?: string | null; /** v48 authority repair: the closed consent door's title, or null when a yes could bind. */
|
|
321
|
+
closed?: string | null;
|
|
322
|
+
}[];
|
|
323
|
+
requeueables: {
|
|
324
|
+
taskId: string;
|
|
325
|
+
title: string;
|
|
326
|
+
state: TaskState;
|
|
327
|
+
strikes: number;
|
|
328
|
+
incidentCount: number;
|
|
329
|
+
repo?: string | null;
|
|
330
|
+
}[];
|
|
331
|
+
cancelledBlockers: {
|
|
332
|
+
blockerId: string;
|
|
333
|
+
dependentCount: number;
|
|
334
|
+
exampleDependent: string;
|
|
335
|
+
repo?: string | null;
|
|
336
|
+
blockerRepo?: string | null;
|
|
337
|
+
}[];
|
|
338
|
+
gaps: Gap[];
|
|
339
|
+
gapsProject: string | null;
|
|
340
|
+
runs24: (Run & {
|
|
341
|
+
taskId: string;
|
|
342
|
+
})[];
|
|
343
|
+
live: {
|
|
344
|
+
taskId: string;
|
|
345
|
+
runner: string;
|
|
346
|
+
claimedAt: string;
|
|
347
|
+
expiresAt: string;
|
|
348
|
+
model: string | null;
|
|
349
|
+
repo: string | null;
|
|
350
|
+
}[];
|
|
351
|
+
ledger: {
|
|
352
|
+
runId: number;
|
|
353
|
+
taskId: string;
|
|
354
|
+
title: string;
|
|
355
|
+
repo: string | null;
|
|
356
|
+
outcome: string;
|
|
357
|
+
role: string;
|
|
358
|
+
provider: string | null;
|
|
359
|
+
model: string | null;
|
|
360
|
+
startedAt: string;
|
|
361
|
+
ranMinutes: number | null;
|
|
362
|
+
costUsd: number | null;
|
|
363
|
+
authMode: "subscription" | "api-key" | null;
|
|
364
|
+
prNumber: number | null;
|
|
365
|
+
prUrl: string | null;
|
|
366
|
+
}[];
|
|
367
|
+
/** "" when there is no session token: then no form renders. postForm adds the field itself. */
|
|
368
|
+
csrf: string;
|
|
369
|
+
now: Date;
|
|
370
|
+
}): Html;
|
|
371
|
+
export type OnboardCardState = {
|
|
372
|
+
enabled: false;
|
|
373
|
+
why: string;
|
|
374
|
+
} | {
|
|
375
|
+
enabled: true;
|
|
376
|
+
roots: readonly string[];
|
|
377
|
+
record: [string, {
|
|
378
|
+
nameWithOwner: string;
|
|
379
|
+
rootIndex: number;
|
|
380
|
+
target: string;
|
|
381
|
+
diskUsageKib: number | null;
|
|
382
|
+
large: boolean;
|
|
383
|
+
mintedAt: number;
|
|
384
|
+
}] | null;
|
|
385
|
+
};
|
|
386
|
+
export type ProjectPeek = {
|
|
387
|
+
waiting: number;
|
|
388
|
+
queued: number;
|
|
389
|
+
running: number;
|
|
390
|
+
doneRecently: number;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* owner/name from a git remote URL — FULLY ANCHORED https/ssh github.com
|
|
394
|
+
* forms only (ghlist review, finding 2): a foreign host carrying
|
|
395
|
+
* "github.com" in its path, or a non-github host, must never read as a
|
|
396
|
+
* GitHub identity. Everything else is null.
|
|
397
|
+
*/
|
|
398
|
+
export declare function githubIdentityOf(remoteUrl: string): string | null;
|
|
399
|
+
/**
|
|
400
|
+
* The `origin` remote's url from a repository's OWN .git/config. BOUNDED
|
|
401
|
+
* I/O by construction (ghlist review, finding 1): the final component may
|
|
402
|
+
* not be a symlink (O_NOFOLLOW + lstat), must be a REGULAR file under a
|
|
403
|
+
* size cap, and at most 64 KiB are ever read — a sparse monster or a fifo
|
|
404
|
+
* planted as a "config" reads as null, never as a hang. Parsed LINE BY
|
|
405
|
+
* LINE with real section tracking (finding 2): a `[remote "origin"]`
|
|
406
|
+
* embedded inside some other value never opens the section. null when
|
|
407
|
+
* unreadable or origin-less; a worktree-style `.git` FILE (gitdir pointer)
|
|
408
|
+
* reads null too, which is honest — its identity lives elsewhere. The
|
|
409
|
+
* answer is ADVISORY metadata for offering a button: the /projects/open
|
|
410
|
+
* road re-proves path, ceiling, and git-ness before anything mutates, and
|
|
411
|
+
* a config that lies about its origin can only mislabel a repository the
|
|
412
|
+
* operator was already allowed to open.
|
|
413
|
+
*/
|
|
414
|
+
export declare function originUrlOf(repoPath: string): string | null;
|
|
415
|
+
/** The GitHub listing page: the account's repositories with ONE honest
|
|
416
|
+
* action each. Names, descriptions, and paths are gh/filesystem DATA —
|
|
417
|
+
* escaped at the sink like everything else. */
|
|
418
|
+
export declare function githubReposPage(chrome: Chrome, data: {
|
|
419
|
+
listed: ListOutcome;
|
|
420
|
+
local: Map<string, string>;
|
|
421
|
+
registered: Set<string>;
|
|
422
|
+
/** Unused: postForm adds the request's CSRF field. Kept for callers. */
|
|
423
|
+
csrf: string;
|
|
424
|
+
cloneReady: boolean;
|
|
425
|
+
openProject: string | null;
|
|
426
|
+
}): Screen;
|
|
427
|
+
export declare function projectsPage(chrome: Chrome, recent: {
|
|
428
|
+
path: string;
|
|
429
|
+
name: string;
|
|
430
|
+
lastOpenedAt: string;
|
|
431
|
+
}[], candidates: string[], open: string | null, problem: string | null, _unscopedMode: boolean, browsable?: boolean, onboard?: OnboardCardState | null, peeks?: Record<string, ProjectPeek | null>, returnTo?: string, pullRequestsOn?: (path: string) => boolean, checkLevelOf?: (path: string) => CheckLevel): Screen;
|
|
432
|
+
/** The no-script "move to the front" sentinel: the form cannot name the
|
|
433
|
+
* front of a partition, so the handler resolves it (slice 1b, fix 1). */
|
|
434
|
+
export declare const QUEUE_FRONT = "__TOP__";
|
|
435
|
+
export type QueueCardTask = ReturnType<Store["queueScoped"]>[number] & {
|
|
436
|
+
dispatch?: DispatchDiagnosis | null;
|
|
437
|
+
};
|
|
438
|
+
export declare function queueCard(one: QueueCardTask, revision: number, queueRevision: number, workers: {
|
|
439
|
+
name: string;
|
|
440
|
+
retired: boolean;
|
|
441
|
+
}[], column: string): Html;
|
|
442
|
+
/** The queue columns fragment — shared queue first, then each worker. */
|
|
443
|
+
export declare function queueBody(tasks: QueueCardTask[], workers: {
|
|
444
|
+
name: string;
|
|
445
|
+
retired: boolean;
|
|
446
|
+
note: string | null;
|
|
447
|
+
capacity: number;
|
|
448
|
+
building: number;
|
|
449
|
+
}[], revision: number, queueRevision: number): Html;
|
|
450
|
+
/**
|
|
451
|
+
* The fleet screen — one lane per runner, and the work in front of it.
|
|
452
|
+
* Building claims pin to the top of their worker's lane (live — never
|
|
453
|
+
* draggable); queued reservations sit below it (draggable to another
|
|
454
|
+
* worker, re-reserving them). Every card wears its project chip, which is
|
|
455
|
+
* the whole point: which agent is on which project is the page's answer.
|
|
456
|
+
* Form-free like the board, except the per-worker note, so the lane stack
|
|
457
|
+
* can re-render itself while somebody watches.
|
|
458
|
+
*/
|
|
459
|
+
export declare function fleetBody(queued: ReturnType<Store["fleetQueue"]>, building: ReturnType<Store["liveClaims"]>, runners: Runner[], queueRevision: number, visibleRepo: (repo: string | null) => boolean): Html;
|
|
460
|
+
/** Identical drag mechanics to the queue — the pointer events land on the worker's column. */
|
|
461
|
+
export declare function fleetScript(): string;
|
|
462
|
+
/** The /queue page's one nonce'd script: delegated pointer-event drag (it
|
|
463
|
+
* survives every fragment swap — finding 17) plus a poller that re-checks
|
|
464
|
+
* focus, dirty inputs, and an in-flight drag AT SWAP TIME, never only
|
|
465
|
+
* before the fetch. Select dirtiness compares against data-initial
|
|
466
|
+
* (finding 18); missing that, a select counts clean.
|
|
467
|
+
*/
|
|
468
|
+
export declare function queueScript(): string;
|
|
469
|
+
export declare function newTaskPage(chrome: Chrome, project: string | null, projectRevision: number, problem: string | null, candidates?: {
|
|
470
|
+
id: string;
|
|
471
|
+
title: string;
|
|
472
|
+
}[], permissionDefault?: UnattendedPermissionMode, qualityDefault?: QualityMode, projects?: {
|
|
473
|
+
path: string;
|
|
474
|
+
name: string;
|
|
475
|
+
}[]): Screen;
|
|
476
|
+
/**
|
|
477
|
+
* The triage flow: everything waiting on a person, one card at a time.
|
|
478
|
+
* Full context ON the card, the act inline, and every act lands back here
|
|
479
|
+
* — clearing the queue is taps, not navigation. Read state travels in the
|
|
480
|
+
* URL (the bounded skip cursor), never in the session: two tabs cannot
|
|
481
|
+
* fight, and a shared link shows the same queue.
|
|
482
|
+
*/
|
|
483
|
+
export declare function nextPage(chrome: Chrome, data: {
|
|
484
|
+
item: {
|
|
485
|
+
key: string;
|
|
486
|
+
kind: "decision";
|
|
487
|
+
decision: Decision & {
|
|
488
|
+
taskId: string;
|
|
489
|
+
};
|
|
490
|
+
} | {
|
|
491
|
+
key: string;
|
|
492
|
+
kind: "approval";
|
|
493
|
+
approval: {
|
|
494
|
+
taskId: string;
|
|
495
|
+
title: string;
|
|
496
|
+
goal: string;
|
|
497
|
+
digest: string;
|
|
498
|
+
proposedAt: string;
|
|
499
|
+
};
|
|
500
|
+
} | {
|
|
501
|
+
key: string;
|
|
502
|
+
kind: "requeue";
|
|
503
|
+
stalled: {
|
|
504
|
+
taskId: string;
|
|
505
|
+
title: string;
|
|
506
|
+
strikes: number;
|
|
507
|
+
incidentCount: number;
|
|
508
|
+
};
|
|
509
|
+
} | {
|
|
510
|
+
key: string;
|
|
511
|
+
kind: "gap";
|
|
512
|
+
gap: Gap;
|
|
513
|
+
} | null;
|
|
514
|
+
scope: Scope | null;
|
|
515
|
+
planDocument: string | null;
|
|
516
|
+
planContract?: PlanContractView | null;
|
|
517
|
+
approvalDigest: string | null;
|
|
518
|
+
/** v34: said inside the ceremony when the yes buys a report, not a branch. */
|
|
519
|
+
deliverable?: "branch" | "report";
|
|
520
|
+
/** v48: the agents the yes freezes — the one block every ceremony shows. */
|
|
521
|
+
route: RouteView | null;
|
|
522
|
+
csrf: string;
|
|
523
|
+
nonce: string;
|
|
524
|
+
remaining: number;
|
|
525
|
+
skipped: string[];
|
|
526
|
+
now: Date;
|
|
527
|
+
}): Screen;
|
|
528
|
+
export type PeekAdmission = {
|
|
529
|
+
run: Run;
|
|
530
|
+
/** The run's checkout, PROVEN non-null by the guards: a reviewer run
|
|
531
|
+
* (v29, artifact-only) is refused before admission ever forms. */
|
|
532
|
+
worktree: string;
|
|
533
|
+
epoch: string;
|
|
534
|
+
entries: ReturnType<typeof parseBaseTreeSnapshot>;
|
|
535
|
+
};
|