toolroll 0.9.61 → 0.9.63
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 +46 -0
- package/README.md +51 -3
- package/dist/agent-fence.d.ts +155 -10
- package/dist/agent-fence.js +473 -38
- package/dist/browser/workspace.css +1 -1
- package/dist/browser/workspace.js +21 -21
- package/dist/browser-workspace.d.ts +28 -0
- package/dist/chat-actions.js +2 -2
- package/dist/check-levels.js +3 -0
- package/dist/claim.js +1 -1
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +1 -0
- package/dist/cli.js +31 -11
- package/dist/contracts/cli.d.ts +8 -0
- package/dist/contracts/cli.js +3 -1
- package/dist/contracts/console-api.d.ts +19 -1
- package/dist/contracts/console-api.js +2 -1
- package/dist/contracts/integration-metadata.d.ts +2 -1
- package/dist/contracts/integration-metadata.js +2 -1
- package/dist/desktop-update.d.ts +1 -1
- package/dist/dispatch.js +7 -4
- package/dist/doctor.d.ts +53 -0
- package/dist/doctor.js +427 -0
- package/dist/evidence-pack.d.ts +1 -1
- package/dist/evidence-pack.js +2 -2
- package/dist/exec.d.ts +3 -0
- package/dist/exec.js +5 -4
- package/dist/flow-code.d.ts +2 -2
- package/dist/flow-code.js +4 -15
- package/dist/flow-engine.js +11 -6
- package/dist/flow-triggers.d.ts +8 -4
- package/dist/flow-triggers.js +45 -25
- package/dist/flow-unattended-words.d.ts +28 -0
- package/dist/flow-unattended-words.js +50 -0
- package/dist/flow-unattended.d.ts +227 -0
- package/dist/flow-unattended.js +776 -0
- package/dist/flows-cli.d.ts +28 -1
- package/dist/flows-cli.js +55 -10
- package/dist/flows-ui.d.ts +2 -1
- package/dist/flows-ui.js +4 -1
- package/dist/google-mail.d.ts +1 -0
- package/dist/google-mail.js +61 -18
- package/dist/integrations-ui.d.ts +2 -1
- package/dist/integrations-ui.js +6 -3
- package/dist/integrations.d.ts +17 -3
- package/dist/integrations.js +38 -18
- package/dist/invoke.js +300 -168
- package/dist/landed-cleanup.d.ts +26 -12
- package/dist/landed-cleanup.js +199 -85
- package/dist/lead-contract.d.ts +1 -1
- package/dist/lead-contract.js +3 -3
- package/dist/lead-tools.js +11 -3
- package/dist/mcp-connect.d.ts +8 -7
- package/dist/mcp-connect.js +49 -51
- package/dist/oauth-run-token.d.ts +51 -0
- package/dist/oauth-run-token.js +127 -0
- package/dist/operate.js +74 -17
- package/dist/plan-auto.d.ts +11 -0
- package/dist/plan-auto.js +62 -11
- package/dist/process-recovery-eligibility.d.ts +1 -1
- package/dist/project-access.d.ts +3 -0
- package/dist/project-access.js +3 -0
- package/dist/project-admission.d.ts +10 -6
- package/dist/project-admission.js +33 -11
- package/dist/project-delete-ui.d.ts +1 -0
- package/dist/project-delete-ui.js +4 -1
- package/dist/project-delete.d.ts +3 -1
- package/dist/project-delete.js +10 -4
- package/dist/project-file.d.ts +3 -0
- package/dist/project-file.js +16 -0
- package/dist/project-tools.d.ts +99 -25
- package/dist/project-tools.js +394 -98
- package/dist/provider-home.d.ts +22 -0
- package/dist/provider-home.js +99 -0
- package/dist/provider.d.ts +17 -3
- package/dist/provider.js +34 -10
- package/dist/remote-main.d.ts +61 -0
- package/dist/remote-main.js +179 -0
- package/dist/scope.d.ts +1 -1
- package/dist/serve.js +11 -3
- package/dist/server/flows.js +27 -5
- package/dist/server/render-tasks.d.ts +3 -0
- package/dist/server/render-tasks.js +3 -0
- package/dist/server/route-table.js +3 -0
- package/dist/server/runtime.d.ts +1 -1
- package/dist/server/settings.js +14 -5
- package/dist/server/task-views.js +2 -0
- package/dist/storage-sweep-child.js +3 -1
- package/dist/storage-sweep-process.d.ts +14 -0
- package/dist/storage-sweep-process.js +37 -3
- package/dist/storage-sweep-schedule.d.ts +30 -0
- package/dist/storage-sweep-schedule.js +164 -0
- package/dist/storage-sweep.d.ts +6 -5
- package/dist/storage-sweep.js +10 -70
- package/dist/storage-ui.d.ts +2 -0
- package/dist/storage-ui.js +7 -4
- package/dist/store.d.ts +75 -7
- package/dist/store.js +241 -17
- package/dist/subagent-tools.d.ts +1 -1
- package/dist/surface.js +10 -6
- package/dist/task-base.d.ts +35 -0
- package/dist/task-base.js +51 -0
- package/dist/teardown-git.d.ts +14 -0
- package/dist/teardown-git.js +119 -0
- package/dist/tool-broker.d.ts +37 -0
- package/dist/tool-broker.js +369 -0
- package/dist/tool-launcher.js +5 -4
- package/dist/tool-secret-store.d.ts +170 -0
- package/dist/tool-secret-store.js +834 -0
- package/dist/toolroll-update.js +4 -2
- package/dist/tools-ui.d.ts +7 -1
- package/dist/tools-ui.js +17 -8
- package/dist/work-index.js +5 -3
- package/dist/worktree.d.ts +64 -6
- package/dist/worktree.js +171 -35
- package/package.json +3 -1
- package/scripts/provider-canary.mjs +210 -31
package/dist/landed-cleanup.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RemoteMainRead, RemoteMains } from "./remote-main.js";
|
|
2
2
|
import type { Store } from "./store.js";
|
|
3
|
+
import { type Git } from "./teardown-git.js";
|
|
3
4
|
import { type Runner, type WorktreePool } from "./worktree.js";
|
|
4
5
|
/** `storage clean --landed` takes only what has waited at least this long. */
|
|
5
6
|
export declare const BACKLOG_DAYS = 7;
|
|
@@ -10,13 +11,16 @@ export declare const LANDED_CLEANED_ACTION = "landed work cleaned up";
|
|
|
10
11
|
/** Reconcile looks at most this many results and finishes at most this many items a pass; the pass by hand has no cap. */
|
|
11
12
|
export declare const AUTO_LOOKS = 20;
|
|
12
13
|
export declare const AUTO_ITEMS = 40;
|
|
13
|
-
export type Git
|
|
14
|
+
export type { Git };
|
|
15
|
+
/** Landed cleanup's git, reads and teardown alike: always the hardened teardown helper (teardown-git.ts). */
|
|
14
16
|
export declare function gitOf(runner?: Runner): Git;
|
|
15
17
|
export type LandedHow = "merged" | "in-main" | "content-in-main";
|
|
18
|
+
/** `trusted`: it may complete a task automatically (a recorded merge, or the recorded remote's main). */
|
|
16
19
|
export type LandedProof = {
|
|
17
20
|
landed: true;
|
|
18
21
|
how: LandedHow;
|
|
19
22
|
reason: string;
|
|
23
|
+
trusted: boolean;
|
|
20
24
|
} | {
|
|
21
25
|
landed: false;
|
|
22
26
|
why: string;
|
|
@@ -28,10 +32,17 @@ export type PullRequestFact = {
|
|
|
28
32
|
number: number | null;
|
|
29
33
|
};
|
|
30
34
|
/**
|
|
31
|
-
* Whether this commit's work landed, read from what Toolroll recorded and the local repository
|
|
32
|
-
*
|
|
35
|
+
* Whether this commit's work landed, read from what Toolroll recorded and the local repository. Fails closed: every
|
|
36
|
+
* doubt is "not proven", with the reason in a few words. Only a recorded merge is trusted to complete a task: a build
|
|
37
|
+
* can write the local main.
|
|
33
38
|
*/
|
|
34
39
|
export declare function landedProof(git: Git, repo: string, head: string | null, pullRequest?: PullRequestFact | null): Promise<LandedProof>;
|
|
40
|
+
/**
|
|
41
|
+
* The proof automatic completion trusts: a recorded merge of this exact commit, or its work in the main of the
|
|
42
|
+
* project's recorded remote, compared only in the private directory that main was fetched into. `remote` is read only
|
|
43
|
+
* when no recorded merge settles it.
|
|
44
|
+
*/
|
|
45
|
+
export declare function remoteLandedProof(remote: () => Promise<RemoteMainRead>, repo: string, head: string | null, pullRequest?: PullRequestFact | null): Promise<LandedProof>;
|
|
35
46
|
export type LandedTarget = {
|
|
36
47
|
kind: "checkout" | "branch";
|
|
37
48
|
target: string;
|
|
@@ -54,6 +65,8 @@ export type LandedCandidate = {
|
|
|
54
65
|
completes: boolean;
|
|
55
66
|
how: LandedHow;
|
|
56
67
|
reason: string;
|
|
68
|
+
/** Proven by a recorded merge or the recorded remote's main: only then may it complete. */
|
|
69
|
+
trusted: boolean;
|
|
57
70
|
targets: LandedTarget[];
|
|
58
71
|
keeps: LandedKeep[];
|
|
59
72
|
};
|
|
@@ -62,7 +75,7 @@ export type LandedCandidate = {
|
|
|
62
75
|
* `limit` caps how many results are read against git (reconcile's bound; results read before and unchanged since
|
|
63
76
|
* don't count); `before` takes only results finished before it (the one-time pass's seven days).
|
|
64
77
|
*/
|
|
65
|
-
export declare function landedResults(store: Store, git: Git, repo: string, root: string, now: Date, options?: {
|
|
78
|
+
export declare function landedResults(store: Store, git: Git, remotes: RemoteMains, repo: string, root: string, now: Date, options?: {
|
|
66
79
|
limit?: number;
|
|
67
80
|
before?: string;
|
|
68
81
|
memo?: boolean;
|
|
@@ -104,9 +117,10 @@ export type LandedStep = {
|
|
|
104
117
|
/**
|
|
105
118
|
* Finish what teardowns intended: pending items, oldest first (checkouts before branches). Each is checked again
|
|
106
119
|
* right before it goes, and recorded right after. Doubt leaves it pending for the next pass; a branch that moved, or
|
|
107
|
-
* a result that has newer work, is kept for good. `
|
|
120
|
+
* a result that has newer work, is kept for good. `limit` caps the items settled (removed, already gone or kept), so
|
|
121
|
+
* items left waiting never crowd out later ones. `only` limits it to these teardowns.
|
|
108
122
|
*/
|
|
109
|
-
export declare function finishLanded(store: Store, pool: WorktreePool, git: Git, now: () => Date, options?: {
|
|
123
|
+
export declare function finishLanded(store: Store, pool: WorktreePool, git: Git, remotes: RemoteMains, now: () => Date, options?: {
|
|
110
124
|
repo?: string;
|
|
111
125
|
limit?: number;
|
|
112
126
|
only?: ReadonlySet<number>;
|
|
@@ -115,7 +129,7 @@ export declare function finishLanded(store: Store, pool: WorktreePool, git: Git,
|
|
|
115
129
|
* Reconcile's part: finish teardowns a crash cut short, then find newly landed results (a bounded few), mark them
|
|
116
130
|
* complete and tear them down.
|
|
117
131
|
*/
|
|
118
|
-
export declare function reconcileLanded(store: Store, pool: WorktreePool, git: Git, repo: string, root: string, now: () => Date): Promise<{
|
|
132
|
+
export declare function reconcileLanded(store: Store, pool: WorktreePool, git: Git, remotes: RemoteMains, repo: string, root: string, now: () => Date): Promise<{
|
|
119
133
|
completed: string[];
|
|
120
134
|
steps: LandedStep[];
|
|
121
135
|
}>;
|
|
@@ -142,15 +156,15 @@ export type LandedPlan = {
|
|
|
142
156
|
};
|
|
143
157
|
/**
|
|
144
158
|
* What `storage clean --landed` would do now, across every project: landed results finished at least a week ago,
|
|
145
|
-
* and Toolroll
|
|
146
|
-
*
|
|
159
|
+
* and branches Toolroll created (toolroll/, toolroll-plan/, standing-orders/) at least a week ago that no task uses
|
|
160
|
+
* and that landed in main. Reads only.
|
|
147
161
|
*/
|
|
148
|
-
export declare function landedBacklog(store: Store, git: Git, root: string, now: Date, options?: {
|
|
162
|
+
export declare function landedBacklog(store: Store, git: Git, remotes: RemoteMains, root: string, now: Date, options?: {
|
|
149
163
|
repos?: readonly string[];
|
|
150
164
|
}): Promise<LandedPlan>;
|
|
151
165
|
/** Act on a preview: record every teardown first, then carry them out. Refuses nothing it previewed silently: what
|
|
152
166
|
* changed since is reported as kept. */
|
|
153
|
-
export declare function cleanLandedBacklog(store: Store, pool: WorktreePool, git: Git, root: string, now: () => Date, plan: LandedPlan, actor: string): Promise<{
|
|
167
|
+
export declare function cleanLandedBacklog(store: Store, pool: WorktreePool, git: Git, remotes: RemoteMains, root: string, now: () => Date, plan: LandedPlan, actor: string): Promise<{
|
|
154
168
|
completed: string[];
|
|
155
169
|
steps: LandedStep[];
|
|
156
170
|
refused: LandedKeep[];
|