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,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `toolroll release <branch>` (D10): the whole release of Toolroll itself as one resumable command. The owner's
|
|
3
|
+
* approval of the release scope is the only human step; everything else runs headless, each waiting step with a time
|
|
4
|
+
* limit:
|
|
5
|
+
*
|
|
6
|
+
* gate → approval → check → complete → quiet → deploy → link → ci → merge → tree → tag → publish → homebrew → done
|
|
7
|
+
*
|
|
8
|
+
* gate files a prepared-candidate task pinned to the branch's exact commit, with the full release check. approval
|
|
9
|
+
* waits for an active approver's yes to that exact scope (never a mode's, an AI's or the lead's). check requires a Full
|
|
10
|
+
* result of that commit: a failed check stops the release and stays visible, nothing reruns it. complete marks that
|
|
11
|
+
* exact result Complete through the task's own authorization. quiet waits until nothing builds. deploy runs the
|
|
12
|
+
* candidate's own deploy (scripts/deploy-browser.mjs: drain, backup, rehearsal, swap, health) and keeps the runtime its
|
|
13
|
+
* final JSON names; an interrupted one is recovered from its saved stage (--phase recover) before anything else. link
|
|
14
|
+
* points both CLI names at that runtime's bin.js, putting them back if either doesn't answer, and goes on only when
|
|
15
|
+
* the console, worker and both names run the gated commit. ci waits for every
|
|
16
|
+
* reported pull-request check on that same commit to pass, with every required check present: pending, missing,
|
|
17
|
+
* skipped or failed never merges. merge
|
|
18
|
+
* squash-merges with the head pinned to the gated commit, tree proves main's new commit has exactly the gated tree,
|
|
19
|
+
* and only then tag pushes the version tag, whose macOS matrix must pass before npm publication (publish.yml). publish
|
|
20
|
+
* waits for npm, the GitHub release and the macOS checks; homebrew updates the tap's formula and merges it.
|
|
21
|
+
*
|
|
22
|
+
* A private journal (mode 0600, written whole then renamed) records what each step is about to do before it does
|
|
23
|
+
* anything outside this machine, and what it saw after. A stop — a time limit, a failure, a crash, Ctrl-C — leaves the
|
|
24
|
+
* journal at its step; running the same command again finds what already happened (the task, the completion, the
|
|
25
|
+
* merge, the tag, the package, the tap change) instead of doing it twice, and continues from the first unfinished
|
|
26
|
+
* step. A branch, pull request or tag that no longer matches what was gated stops the release rather than guess.
|
|
27
|
+
*
|
|
28
|
+
* Everything outside this module is an adapter (release-adapters.ts), so the state machine is tested without git,
|
|
29
|
+
* GitHub, npm or a running Toolroll.
|
|
30
|
+
*/
|
|
31
|
+
/** The pull-request checks a release waits for, by exact job name (.github/workflows/ci.yml). Every one must have
|
|
32
|
+
* concluded `success` on the gated commit; src/ci-workflow.test.ts holds the workflow to this list. */
|
|
33
|
+
export declare const REQUIRED_PR_CHECKS: readonly ["node 22 · ubuntu-latest", "node 24 · ubuntu-latest", "linux native containment · delegated cgroup v2", "Windows Job Object containment"];
|
|
34
|
+
/** The checks a release tag runs (.github/workflows/publish.yml), awaited before Homebrew moves. */
|
|
35
|
+
export declare const RELEASE_TAG_CHECKS: readonly ["node 22 · macos-latest", "node 24 · macos-latest", "publish"];
|
|
36
|
+
export declare const RELEASE_STEPS: readonly ["gate", "approval", "check", "complete", "quiet", "deploy", "link", "ci", "merge", "tree", "tag", "publish", "homebrew", "done"];
|
|
37
|
+
export type ReleaseStep = typeof RELEASE_STEPS[number];
|
|
38
|
+
type WaitingStep = "approval" | "check" | "quiet" | "deploy" | "ci" | "publish" | "homebrew";
|
|
39
|
+
/** How long each waiting step may take, in minutes, before the release stops there (rerunning continues from it). */
|
|
40
|
+
export declare const RELEASE_LIMITS: Readonly<Record<WaitingStep, number>>;
|
|
41
|
+
export type CheckRun = {
|
|
42
|
+
name: string;
|
|
43
|
+
status: string;
|
|
44
|
+
conclusion: string | null;
|
|
45
|
+
};
|
|
46
|
+
export type PullRequest = {
|
|
47
|
+
number: number;
|
|
48
|
+
state: "open" | "closed" | "merged";
|
|
49
|
+
head: string;
|
|
50
|
+
base: string;
|
|
51
|
+
mergeCommit: string | null;
|
|
52
|
+
};
|
|
53
|
+
/** The release task as Toolroll records it (`task show --json`). */
|
|
54
|
+
export type GateState = {
|
|
55
|
+
exists: boolean;
|
|
56
|
+
candidate: string | null;
|
|
57
|
+
scopeDigest: string | null;
|
|
58
|
+
/** The current approval of the scope: by whom, of which digest, and how (`password` or `chat` is a person's yes). */
|
|
59
|
+
approval: {
|
|
60
|
+
by: string;
|
|
61
|
+
at: string;
|
|
62
|
+
digest: string;
|
|
63
|
+
basis: string | null;
|
|
64
|
+
role: string | null;
|
|
65
|
+
active: boolean;
|
|
66
|
+
} | null;
|
|
67
|
+
/** The newest finished build of the task: its sealed result and check. */
|
|
68
|
+
result: {
|
|
69
|
+
run: number;
|
|
70
|
+
head: string | null;
|
|
71
|
+
check: string;
|
|
72
|
+
level: string | null;
|
|
73
|
+
receipt: string;
|
|
74
|
+
worktree: string | null;
|
|
75
|
+
} | null;
|
|
76
|
+
/** A finished build that left no result to complete (it failed before the check), in words. */
|
|
77
|
+
failed: string | null;
|
|
78
|
+
completion: {
|
|
79
|
+
actor: string;
|
|
80
|
+
at: string;
|
|
81
|
+
digest: string;
|
|
82
|
+
} | null;
|
|
83
|
+
};
|
|
84
|
+
export type Installed = {
|
|
85
|
+
services: string[];
|
|
86
|
+
clis: {
|
|
87
|
+
name: string;
|
|
88
|
+
runtime: string | null;
|
|
89
|
+
}[];
|
|
90
|
+
};
|
|
91
|
+
/** A CLI name's link on PATH and where it pointed before the release moved it (release-links.ts). */
|
|
92
|
+
export type SavedLink = {
|
|
93
|
+
name: string;
|
|
94
|
+
path: string;
|
|
95
|
+
before: string | null;
|
|
96
|
+
foreign?: true;
|
|
97
|
+
};
|
|
98
|
+
/** A deployment that stopped and couldn't recover. `gate`: the update pause it left, when its journal is before the swap. */
|
|
99
|
+
export type DeployStop = {
|
|
100
|
+
ok: false;
|
|
101
|
+
message: string;
|
|
102
|
+
gate?: {
|
|
103
|
+
id: string;
|
|
104
|
+
phase: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export type HomebrewState = {
|
|
108
|
+
kind: "current";
|
|
109
|
+
} | {
|
|
110
|
+
kind: "proposed";
|
|
111
|
+
pr: number;
|
|
112
|
+
head: string;
|
|
113
|
+
} | {
|
|
114
|
+
kind: "missing";
|
|
115
|
+
};
|
|
116
|
+
export type ReleaseAdapters = {
|
|
117
|
+
now(): Date;
|
|
118
|
+
sleep(ms: number): Promise<void>;
|
|
119
|
+
say(line: string): void;
|
|
120
|
+
repo: {
|
|
121
|
+
/** owner/name of the gate checkout's origin. */
|
|
122
|
+
github(): Promise<string>;
|
|
123
|
+
/** Fetch the branch and main into the gate checkout (main fast-forwarded), so the gate diffs from today's main. */
|
|
124
|
+
sync(branch: string): Promise<void>;
|
|
125
|
+
remoteHead(branch: string): Promise<string | null>;
|
|
126
|
+
/** Delete only this exact branch head, with a lease; an already absent branch is finished. */
|
|
127
|
+
deleteBranch(branch: string, head: string): Promise<void>;
|
|
128
|
+
tree(sha: string): Promise<string>;
|
|
129
|
+
fileAt(sha: string, path: string): Promise<string | null>;
|
|
130
|
+
/** origin/main as the last sync fetched it. */
|
|
131
|
+
mainHead(): Promise<string>;
|
|
132
|
+
/** Whether `ancestor` is in `sha`'s history. */
|
|
133
|
+
contains(sha: string, ancestor: string): Promise<boolean>;
|
|
134
|
+
};
|
|
135
|
+
toolroll: {
|
|
136
|
+
/** Which runtime each launchd service and each CLI name (`toolroll`, `standing-orders`) runs from. */
|
|
137
|
+
installed(): Promise<Installed>;
|
|
138
|
+
/** The exact commit recorded in the deployment's runtime/package.json. */
|
|
139
|
+
runtimeCommit(runtime: string): Promise<string | null>;
|
|
140
|
+
gate(taskId: string): Promise<GateState>;
|
|
141
|
+
fileGate(input: {
|
|
142
|
+
taskId: string;
|
|
143
|
+
title: string;
|
|
144
|
+
checkout: string;
|
|
145
|
+
candidate: string;
|
|
146
|
+
goal: string;
|
|
147
|
+
acceptance: string;
|
|
148
|
+
}): Promise<{
|
|
149
|
+
scopeDigest: string;
|
|
150
|
+
}>;
|
|
151
|
+
complete(taskId: string, receipt: string): Promise<{
|
|
152
|
+
ok: true;
|
|
153
|
+
} | {
|
|
154
|
+
ok: false;
|
|
155
|
+
message: string;
|
|
156
|
+
}>;
|
|
157
|
+
busy(): Promise<{
|
|
158
|
+
running: number;
|
|
159
|
+
tasks: string[];
|
|
160
|
+
}>;
|
|
161
|
+
/** scripts/deploy-browser.mjs --run --stage --yes from the builder's checkout; runtime is its final JSON's `runtime`. */
|
|
162
|
+
deploy(input: {
|
|
163
|
+
run: number;
|
|
164
|
+
worktree: string;
|
|
165
|
+
stage: string;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
ok: true;
|
|
168
|
+
runtime: string;
|
|
169
|
+
} | DeployStop>;
|
|
170
|
+
/** scripts/deploy-browser.mjs --stage --phase recover for a stage that was launched; a stage never prepared is ok. */
|
|
171
|
+
recoverDeploy(input: {
|
|
172
|
+
run: number;
|
|
173
|
+
worktree: string;
|
|
174
|
+
stage: string;
|
|
175
|
+
}): Promise<{
|
|
176
|
+
ok: true;
|
|
177
|
+
} | DeployStop>;
|
|
178
|
+
/** Where both CLI names are on PATH now. */
|
|
179
|
+
cliLinks(): Promise<SavedLink[]>;
|
|
180
|
+
/** Point every saved link at `bin` and check each answers `version`; on any failure every link goes back to its
|
|
181
|
+
* saved `before` and this throws. */
|
|
182
|
+
switchLinks(links: readonly SavedLink[], bin: string, version: string): Promise<void>;
|
|
183
|
+
};
|
|
184
|
+
github: {
|
|
185
|
+
authenticated(): Promise<boolean>;
|
|
186
|
+
pullRequest(repo: string, branch: string): Promise<PullRequest | null>;
|
|
187
|
+
checks(repo: string, sha: string): Promise<CheckRun[]>;
|
|
188
|
+
merge(repo: string, pr: number, head: string): Promise<string>;
|
|
189
|
+
tag(repo: string, tag: string): Promise<string | null>;
|
|
190
|
+
createTag(repo: string, tag: string, sha: string): Promise<void>;
|
|
191
|
+
release(repo: string, tag: string): Promise<boolean>;
|
|
192
|
+
};
|
|
193
|
+
registry: {
|
|
194
|
+
published(name: string, version: string): Promise<boolean>;
|
|
195
|
+
};
|
|
196
|
+
homebrew: {
|
|
197
|
+
repo: string;
|
|
198
|
+
state(version: string): Promise<HomebrewState>;
|
|
199
|
+
propose(version: string): Promise<{
|
|
200
|
+
pr: number;
|
|
201
|
+
head: string;
|
|
202
|
+
}>;
|
|
203
|
+
merge(pr: number, head: string): Promise<void>;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
export type ReleaseJournal = {
|
|
207
|
+
version: 1;
|
|
208
|
+
id: string;
|
|
209
|
+
github: string;
|
|
210
|
+
checkout: string;
|
|
211
|
+
branch: string;
|
|
212
|
+
candidate: {
|
|
213
|
+
sha: string;
|
|
214
|
+
tree: string;
|
|
215
|
+
};
|
|
216
|
+
packageName: string;
|
|
217
|
+
packageVersion: string;
|
|
218
|
+
tag: string;
|
|
219
|
+
pr: number;
|
|
220
|
+
step: ReleaseStep;
|
|
221
|
+
task: {
|
|
222
|
+
id: string;
|
|
223
|
+
scopeDigest: string | null;
|
|
224
|
+
};
|
|
225
|
+
approval: {
|
|
226
|
+
by: string;
|
|
227
|
+
at: string;
|
|
228
|
+
} | null;
|
|
229
|
+
check: {
|
|
230
|
+
run: number;
|
|
231
|
+
receipt: string;
|
|
232
|
+
worktree: string;
|
|
233
|
+
} | null;
|
|
234
|
+
completion: {
|
|
235
|
+
actor: string;
|
|
236
|
+
at: string;
|
|
237
|
+
} | null;
|
|
238
|
+
deploy: {
|
|
239
|
+
runtime: string;
|
|
240
|
+
at: string;
|
|
241
|
+
} | null;
|
|
242
|
+
/** Saved before launching deploy, so a killed coordinator can recover that exact attempt first. */
|
|
243
|
+
deployAttempt?: {
|
|
244
|
+
stage: string;
|
|
245
|
+
} | null;
|
|
246
|
+
/** Where both CLI names pointed before link moved them: saved first, so a resumed or failed relink can put them back. */
|
|
247
|
+
links?: SavedLink[] | null;
|
|
248
|
+
ci: {
|
|
249
|
+
checks: string[];
|
|
250
|
+
at: string;
|
|
251
|
+
} | null;
|
|
252
|
+
merge: {
|
|
253
|
+
sha: string;
|
|
254
|
+
tree: string | null;
|
|
255
|
+
} | null;
|
|
256
|
+
tagged: {
|
|
257
|
+
sha: string;
|
|
258
|
+
} | null;
|
|
259
|
+
published: {
|
|
260
|
+
at: string;
|
|
261
|
+
} | null;
|
|
262
|
+
homebrew: {
|
|
263
|
+
pr: number | null;
|
|
264
|
+
head: string | null;
|
|
265
|
+
merged: boolean;
|
|
266
|
+
} | null;
|
|
267
|
+
/** When each step was about to change something outside this machine: what a resume must look for before acting. */
|
|
268
|
+
intents: Partial<Record<ReleaseStep, string>>;
|
|
269
|
+
stopped: {
|
|
270
|
+
step: ReleaseStep;
|
|
271
|
+
reason: string;
|
|
272
|
+
message: string;
|
|
273
|
+
at: string;
|
|
274
|
+
} | null;
|
|
275
|
+
createdAt: string;
|
|
276
|
+
updatedAt: string;
|
|
277
|
+
};
|
|
278
|
+
export type ReleaseOutcome = {
|
|
279
|
+
ok: true;
|
|
280
|
+
journal: ReleaseJournal;
|
|
281
|
+
file: string;
|
|
282
|
+
} | {
|
|
283
|
+
ok: false;
|
|
284
|
+
reason: string;
|
|
285
|
+
message: string;
|
|
286
|
+
step: ReleaseStep | "preflight";
|
|
287
|
+
journal: ReleaseJournal | null;
|
|
288
|
+
file: string;
|
|
289
|
+
resume: string;
|
|
290
|
+
};
|
|
291
|
+
export type ReleaseOptions = {
|
|
292
|
+
branch: string;
|
|
293
|
+
/** The gate checkout: a clone of the repository the release check runs in. */
|
|
294
|
+
checkout: string;
|
|
295
|
+
/** Where journals live (the installation's state folder). */
|
|
296
|
+
stateDir: string;
|
|
297
|
+
limits?: Partial<Record<WaitingStep, number>>;
|
|
298
|
+
/** Start over for a new commit on the branch, keeping the old journal aside. Refused once merging began. */
|
|
299
|
+
fresh?: boolean;
|
|
300
|
+
pollMs?: number;
|
|
301
|
+
};
|
|
302
|
+
export declare const journalFile: (stateDir: string, branch: string) => string;
|
|
303
|
+
export declare const resumeCommand: (branch: string, checkout: string) => string;
|
|
304
|
+
/** Whole or not at all: a private temp file, synced, renamed into place, its folder synced. */
|
|
305
|
+
export declare function writeJournal(file: string, journal: ReleaseJournal): void;
|
|
306
|
+
export declare function readJournal(file: string): ReleaseJournal | null;
|
|
307
|
+
/** The release task's id: one per exact commit, so a rerun finds the task it filed instead of filing another. */
|
|
308
|
+
export declare const gateTaskId: (version: string, sha: string) => string;
|
|
309
|
+
/** Whether the scope's approval is the owner's own yes to these exact bytes: a person through the password (or
|
|
310
|
+
* identity) ceremony or a chat confirmation — never a mode's coverage, an AI teammate, a routine or the lead. */
|
|
311
|
+
export declare function ownerApproval(gate: GateState, digest: string | null): {
|
|
312
|
+
ok: true;
|
|
313
|
+
by: string;
|
|
314
|
+
at: string;
|
|
315
|
+
} | {
|
|
316
|
+
ok: false;
|
|
317
|
+
why: string;
|
|
318
|
+
};
|
|
319
|
+
/** Every required check present, and every reported check's newest attempt completed successfully. */
|
|
320
|
+
export declare function checksVerdict(runs: readonly CheckRun[], required: readonly string[]): {
|
|
321
|
+
state: "passed";
|
|
322
|
+
} | {
|
|
323
|
+
state: "pending";
|
|
324
|
+
waiting: string[];
|
|
325
|
+
} | {
|
|
326
|
+
state: "failed";
|
|
327
|
+
failed: string[];
|
|
328
|
+
};
|
|
329
|
+
/** Run the release from wherever its journal stopped. */
|
|
330
|
+
export declare function runRelease(options: ReleaseOptions, adapters: ReleaseAdapters): Promise<ReleaseOutcome>;
|
|
331
|
+
export {};
|