toolroll 0.9.52 → 0.9.53
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 +8 -0
- package/README.md +55 -80
- package/dist/agentconfig.d.ts +11 -36
- package/dist/agentconfig.js +3 -62
- package/dist/approval-policy.d.ts +1 -1
- package/dist/approval-policy.js +1 -1
- package/dist/board.d.ts +3 -19
- package/dist/board.js +4 -42
- package/dist/browser/workspace.js +18 -18
- package/dist/browser-workspace.d.ts +2 -1
- package/dist/builder.d.ts +9 -40
- package/dist/builder.js +50 -257
- package/dist/chat-actions.js +3 -14
- package/dist/chat-controls.d.ts +0 -4
- package/dist/chat-controls.js +0 -1
- package/dist/chat-decide.js +1 -3
- package/dist/chat-delivery.d.ts +0 -2
- package/dist/chat-delivery.js +0 -1
- package/dist/chat-quiet.js +2 -2
- package/dist/chat-task-actions.d.ts +1 -1
- package/dist/chat-task-actions.js +0 -2
- package/dist/claim.d.ts +79 -244
- package/dist/claim.js +688 -1023
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +10 -2
- package/dist/contracts/cli.d.ts +0 -13
- package/dist/contracts/cli.js +0 -2
- package/dist/contracts/console-api.d.ts +5 -10
- package/dist/contracts/console-api.js +4 -10
- package/dist/contracts/flow.d.ts +50 -0
- package/dist/contracts/flow.js +26 -1
- package/dist/contracts/lead-tools.d.ts +0 -13
- package/dist/contracts/lead-tools.js +3 -3
- package/dist/contracts/store-json.d.ts +1 -25
- package/dist/contracts/store-json.js +3 -13
- package/dist/converse.d.ts +1 -11
- package/dist/converse.js +6 -38
- package/dist/coordinator.d.ts +0 -1
- package/dist/coordinator.js +3 -5
- package/dist/demo.js +16 -26
- package/dist/desktop-update-gate.js +0 -1
- package/dist/desktop-update.js +1 -3
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +1 -1
- package/dist/dispose.d.ts +2 -3
- package/dist/dispose.js +17 -92
- package/dist/envelope.js +0 -3
- package/dist/exec.d.ts +0 -64
- package/dist/exec.js +3 -356
- package/dist/exhaustion.d.ts +22 -76
- package/dist/exhaustion.js +14 -140
- package/dist/export.js +4 -4
- package/dist/flow-engine.js +1 -1
- package/dist/flow-schedule.d.ts +154 -0
- package/dist/flow-schedule.js +321 -0
- package/dist/flow-share.js +1 -1
- package/dist/flow-triggers.d.ts +6 -1
- package/dist/flow-triggers.js +65 -10
- package/dist/flows-cli.js +8 -4
- package/dist/flows-ui.js +2 -0
- package/dist/flows.js +1 -1
- package/dist/guides.js +9 -29
- package/dist/invoke.d.ts +1 -24
- package/dist/invoke.js +17 -259
- package/dist/lead-status.js +2 -4
- package/dist/lead-voice.js +1 -1
- package/dist/mate-doors.d.ts +1 -2
- package/dist/mate-doors.js +12 -25
- package/dist/mate-tools.d.ts +2 -2
- package/dist/mate-tools.js +10 -22
- package/dist/modes.d.ts +6 -7
- package/dist/modes.js +7 -13
- package/dist/operate-remote-arguments.js +2 -6
- package/dist/operate-remote.js +6 -7
- package/dist/operate.d.ts +0 -6
- package/dist/operate.js +222 -2247
- package/dist/phase-routing.d.ts +13 -23
- package/dist/phase-routing.js +13 -35
- package/dist/plan-auto.js +2 -2
- package/dist/planner-source.js +2 -1
- package/dist/policy.d.ts +1 -4
- package/dist/policy.js +0 -8
- package/dist/process-recovery-eligibility.js +2 -3
- package/dist/project-delete.js +3 -15
- package/dist/proposal.d.ts +4 -24
- package/dist/proposal.js +3 -88
- package/dist/provider-auth.d.ts +3 -3
- package/dist/provider-auth.js +4 -6
- package/dist/provider.d.ts +11 -25
- package/dist/provider.js +4 -36
- package/dist/push.js +1 -1
- package/dist/recipe-ui.js +6 -6
- package/dist/recipes.d.ts +3 -3
- package/dist/recipes.js +27 -23
- package/dist/run-closeout.d.ts +1 -1
- package/dist/run-closeout.js +1 -4
- package/dist/scope.d.ts +11 -65
- package/dist/scope.js +17 -82
- package/dist/serve.js +15 -24
- package/dist/server/chat.js +7 -30
- package/dist/server/flows.js +11 -10
- package/dist/server/guards.js +0 -1
- package/dist/server/pages-assets.js +1 -1
- package/dist/server/pages.js +0 -2
- package/dist/server/people-tokens.js +0 -4
- package/dist/server/route-table.d.ts +1 -1
- package/dist/server/route-table.js +2 -17
- package/dist/server/settings.js +1 -8
- package/dist/server/shared.d.ts +28 -212
- package/dist/server/shared.js +71 -780
- package/dist/server/task-views.js +9 -76
- package/dist/server/tasks.d.ts +1 -50
- package/dist/server/tasks.js +36 -946
- package/dist/setup-guide.d.ts +2 -2
- package/dist/slack-chat.d.ts +0 -2
- package/dist/slack-chat.js +0 -1
- package/dist/store.d.ts +105 -1340
- package/dist/store.js +706 -4010
- package/dist/surface.js +10 -24
- package/dist/task-composer.d.ts +1 -1
- package/dist/task-composer.js +1 -1
- package/dist/task-control.d.ts +3 -10
- package/dist/task-control.js +2 -7
- package/dist/teammate-desk.js +1 -1
- package/dist/teammates-ui.js +1 -1
- package/dist/telegram-mate.d.ts +0 -3
- package/dist/telegram-mate.js +0 -1
- package/dist/templates.d.ts +11 -7
- package/dist/templates.js +12 -9
- package/dist/toolroll-update.d.ts +10 -0
- package/dist/toolroll-update.js +56 -4
- package/dist/work-index.js +2 -6
- package/dist/workspace-ui.js +1 -1
- package/package.json +1 -1
- package/scripts/recovery-canary.mjs +3 -3
- package/dist/contest.d.ts +0 -318
- package/dist/contest.js +0 -753
- package/dist/held.d.ts +0 -150
- package/dist/held.js +0 -799
- package/dist/liveness.d.ts +0 -30
- package/dist/liveness.js +0 -42
- package/dist/pricing.d.ts +0 -45
- package/dist/pricing.js +0 -77
- package/dist/routine.d.ts +0 -228
- package/dist/routine.js +0 -764
- package/dist/supervisor.mjs +0 -297
package/dist/held.d.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The HeldSessionCoordinator (Parity II Phase 2, spec v2 S0 as amended
|
|
3
|
-
* through v6): the ONE owner of held attended sessions in an `up` process.
|
|
4
|
-
*
|
|
5
|
-
* Ownership transfer is the whole design: build() reaches its spawn point,
|
|
6
|
-
* hands this coordinator the captured settlement record and returns `held`
|
|
7
|
-
* WITHOUT settling anything — the watch loop keeps dispatching, and the
|
|
8
|
-
* session's lease heartbeats, exact timers, turn ledger, and eventual
|
|
9
|
-
* settlement all live here. A held run completes through the SAME
|
|
10
|
-
* settleProviderOutcome → disposeBuildOutcome pair every other road uses,
|
|
11
|
-
* or it is fenced to `interrupted` — never a third way.
|
|
12
|
-
*
|
|
13
|
-
* Phase 2D scope note, stated: this coordinator runs the attended
|
|
14
|
-
* authorization road end-to-end — final proof, custody, the brief as turn
|
|
15
|
-
* one, per-turn acceptance and marginal-delta settlement, expiry/lapse/
|
|
16
|
-
* turn-timeout/lease fences, crash custody — and ends the hold at the
|
|
17
|
-
* agent's first settled turn (terminal handoff, park, or silence, each
|
|
18
|
-
* classified by the shared settlement). The multi-turn conversation loop
|
|
19
|
-
* (operator turn box, answer injection, held repair) arrives with its
|
|
20
|
-
* console surfaces in the next slice; nothing here forecloses it.
|
|
21
|
-
*/
|
|
22
|
-
import { type CapturedBuild } from "./builder.js";
|
|
23
|
-
import { type DisposeContext, type Disposition } from "./dispose.js";
|
|
24
|
-
import { startClaudeHeldSession } from "./exec.js";
|
|
25
|
-
import type { AttendedAuthorization, Store } from "./store.js";
|
|
26
|
-
export type HeldLaunchArgs = {
|
|
27
|
-
store: Store;
|
|
28
|
-
captured: CapturedBuild;
|
|
29
|
-
authorization: AttendedAuthorization;
|
|
30
|
-
runId: number;
|
|
31
|
-
leaseId: string;
|
|
32
|
-
runner: string;
|
|
33
|
-
runnerToken?: string;
|
|
34
|
-
upIncarnation: string;
|
|
35
|
-
/** The composed brief — injected as turn one, source 'brief'. */
|
|
36
|
-
brief: string;
|
|
37
|
-
cwd: string;
|
|
38
|
-
/** A SHORT directory for control sockets (sun_path is unforgiving). */
|
|
39
|
-
socketDir: string;
|
|
40
|
-
releaseWorktree: (path: string) => Promise<unknown>;
|
|
41
|
-
liveLog: {
|
|
42
|
-
observe(event: Record<string, unknown>): void;
|
|
43
|
-
close(): void;
|
|
44
|
-
} | null;
|
|
45
|
-
omitEnv: readonly string[];
|
|
46
|
-
/** Fields the disposition service needs that the capture does not carry.
|
|
47
|
-
* `policy` distinguishes the continuation road (taskless dispositions,
|
|
48
|
-
* v4 Q7); absent = the ordinary tick policy. */
|
|
49
|
-
dispose: Pick<DisposeContext, "repo" | "origin" | "provider" | "model"> & {
|
|
50
|
-
policy?: DisposeContext["policy"];
|
|
51
|
-
};
|
|
52
|
-
clock: () => Date;
|
|
53
|
-
/** Test seams. */
|
|
54
|
-
starter?: typeof startClaudeHeldSession;
|
|
55
|
-
graceMs?: number;
|
|
56
|
-
onDisposed?: (disposition: Disposition | {
|
|
57
|
-
kind: "interrupted";
|
|
58
|
-
reason: string;
|
|
59
|
-
}) => void;
|
|
60
|
-
/** v28: enforced INSIDE the final custody transaction — two watch
|
|
61
|
-
* loops racing a cap of one cannot both insert. */
|
|
62
|
-
maxHeldSessions?: number;
|
|
63
|
-
};
|
|
64
|
-
export declare class HeldSessionCoordinator {
|
|
65
|
-
private readonly sessions;
|
|
66
|
-
count(): number;
|
|
67
|
-
/**
|
|
68
|
-
* The final proof, custody intent, brief recording, spawn, and timer
|
|
69
|
-
* arming — one road, refusals typed. Returns once the session is HELD
|
|
70
|
-
* (or refused); never awaits the hold itself.
|
|
71
|
-
*/
|
|
72
|
-
launch(args: HeldLaunchArgs): Promise<{
|
|
73
|
-
ok: true;
|
|
74
|
-
} | {
|
|
75
|
-
ok: false;
|
|
76
|
-
reason: string;
|
|
77
|
-
message: string;
|
|
78
|
-
}>;
|
|
79
|
-
/** Shutdown: fence every controller under ONE absolute deadline (v2 S0f
|
|
80
|
-
* + parallel-sessions round 1, finding 7): the deadline timer is cleared
|
|
81
|
-
* when the fences win so it cannot hold the process open, and the runs
|
|
82
|
-
* that did NOT settle in time are RETURNED for the caller to page —
|
|
83
|
-
* silence here contradicted up's "settled or paged" promise. */
|
|
84
|
-
close(): Promise<number[]>;
|
|
85
|
-
/**
|
|
86
|
-
* The exact-run stop (v52): fence ONE held session now, through the
|
|
87
|
-
* supervisor's own handle — EOF → grace → kill, conservative settlement,
|
|
88
|
-
* the worktree preserved, the stop settled as `held` by the run's ending.
|
|
89
|
-
* The console calls this after the durable request; the lapse interval
|
|
90
|
-
* takes the same road for a stop filed by another process. Idempotent:
|
|
91
|
-
* a session already fencing or gone settles nothing twice.
|
|
92
|
-
*/
|
|
93
|
-
stop(runId: number): Promise<void>;
|
|
94
|
-
/** The beat endpoint, answers, and revocation poke this directly (v2 S1d). */
|
|
95
|
-
poke(runId: number): void;
|
|
96
|
-
/**
|
|
97
|
-
* The operator's own turn (v2 S1g, ruling 12-as-accepted): session-grade
|
|
98
|
-
* speech, recorded through the SAME gated transaction every injection
|
|
99
|
-
* takes — cap, single-flight, budget, open-decision, lease — so every
|
|
100
|
-
* refusal is typed and atomic.
|
|
101
|
-
*/
|
|
102
|
-
injectOperatorTurn(runId: number, author: string, text: string): {
|
|
103
|
-
ok: true;
|
|
104
|
-
} | {
|
|
105
|
-
ok: false;
|
|
106
|
-
reason: string;
|
|
107
|
-
};
|
|
108
|
-
private injectTurn;
|
|
109
|
-
private injectPendingAnswers;
|
|
110
|
-
private launches;
|
|
111
|
-
private makeController;
|
|
112
|
-
private armTurnTimer;
|
|
113
|
-
private onTurnInit;
|
|
114
|
-
private onTurnResult;
|
|
115
|
-
/**
|
|
116
|
-
* A park inside a held session (v2 S1f + round-6 finding 3): payload
|
|
117
|
-
* preserved as evidence and unlinked exactly like the ordinary road,
|
|
118
|
-
* the decision recorded WITHOUT ending anything, causally linked to the
|
|
119
|
-
* turn that produced it. A malformed payload takes the held repair road
|
|
120
|
-
* — a machine-authored ledger turn in the SAME session, correlated to
|
|
121
|
-
* the producing turn (a malformed mailbox has no decision id), bounded;
|
|
122
|
-
* exhaustion disposes through the shared malformed machinery.
|
|
123
|
-
*/
|
|
124
|
-
private heldPark;
|
|
125
|
-
private onExit;
|
|
126
|
-
private conclude;
|
|
127
|
-
private fenceByRun;
|
|
128
|
-
/**
|
|
129
|
-
* The interruption road (v2 S2e): stop admission, EOF → grace → kill via
|
|
130
|
-
* the supervisor, conservative settlement, `interrupted`, worktree
|
|
131
|
-
* preserved, authorization closed with the reason. Idempotent.
|
|
132
|
-
*/
|
|
133
|
-
private fence;
|
|
134
|
-
private clearClocks;
|
|
135
|
-
private drop;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* The DB-side orphan fence (v4 Q5 + v5 P3/P4 + v6 W6): sweep every open
|
|
139
|
-
* custody row whose recorded lease is NO LONGER the task's current live
|
|
140
|
-
* lease, seize it (CAS open→fencing + lease fence in one transaction),
|
|
141
|
-
* order the kill through the supervisor's socket — the kernel-stable
|
|
142
|
-
* road — and settle. A supervisor that cannot be reached keeps custody
|
|
143
|
-
* and PAGES (never a guessed PID kill); a later sweep resumes from
|
|
144
|
-
* wherever the CASes stand. Runs BEFORE generic recovery at every entry
|
|
145
|
-
* point; recovery excludes fenced-open held rows.
|
|
146
|
-
*/
|
|
147
|
-
export declare function sweepHeldOrphans(store: Store, fencer: string, now: () => Date): Promise<{
|
|
148
|
-
fenced: number;
|
|
149
|
-
paged: number;
|
|
150
|
-
}>;
|