@mu-crew/mu 2.0.0 → 3.0.0
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/AGENTS.md +6 -5
- package/README.md +25 -7
- package/dist/cli.js +790 -161
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +169 -17
- package/dist/index.js +449 -59
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +36 -6
- package/docs/USAGE_GUIDE.md +39 -17
- package/docs/VOCABULARY.md +11 -5
- package/docs/img/tui-dashboard.png +0 -0
- package/docs/specs/2026-09-29-task-substates.md +247 -0
- package/package.json +1 -1
- package/skills/mu/SKILL.md +10 -4
package/dist/index.d.ts
CHANGED
|
@@ -98,14 +98,14 @@ declare class SchemaTooOldError extends Error implements HasNextSteps {
|
|
|
98
98
|
constructor(detectedVersion: number, requiredVersion: number);
|
|
99
99
|
errorNextSteps(): NextStep[];
|
|
100
100
|
}
|
|
101
|
-
/** The schema version a fresh DB starts at.
|
|
102
|
-
* and
|
|
103
|
-
* IN_PROGRESS, CLOSED). See CHANGELOG.md. */
|
|
104
|
-
declare const CURRENT_SCHEMA_VERSION =
|
|
101
|
+
/** The schema version a fresh DB starts at. v11 adds tasks.substate
|
|
102
|
+
* and the task_substates lookup table on top of v10's three-state
|
|
103
|
+
* lifecycle (OPEN, IN_PROGRESS, CLOSED). See CHANGELOG.md. */
|
|
104
|
+
declare const CURRENT_SCHEMA_VERSION = 11;
|
|
105
105
|
/** Tables a healthy DB must contain. Single source of truth so
|
|
106
106
|
* `mu doctor` and any other consumer don't drift. Adding a new table
|
|
107
107
|
* = one new entry here AND a CREATE TABLE in CURRENT_SCHEMA, plus a
|
|
108
|
-
* CURRENT_SCHEMA_VERSION bump. Sorted; exactly
|
|
108
|
+
* CURRENT_SCHEMA_VERSION bump. Sorted; exactly 11 entries in v11. */
|
|
109
109
|
declare const EXPECTED_TABLES: readonly string[];
|
|
110
110
|
/** Op entities that cross machines. Everything else is machine-local.
|
|
111
111
|
* Readonly tuple (not `string[]`) so `SyncedEntity` is a real union
|
|
@@ -149,6 +149,8 @@ type PortableTable = (typeof PORTABLE_TABLES)[number];
|
|
|
149
149
|
* machine_identity IS the per-machine identity.
|
|
150
150
|
* schema_version local bookkeeping.
|
|
151
151
|
* sync_peers local bookkeeping (per-peer watermarks).
|
|
152
|
+
* task_substates seeded identically on every machine from
|
|
153
|
+
* TASK_SUBSTATE_ROWS; code, not data.
|
|
152
154
|
* ops see below — the carrier, not cargo.
|
|
153
155
|
*
|
|
154
156
|
* `ops` is listed here deliberately rather than omitted. It is not
|
|
@@ -163,7 +165,7 @@ type PortableTable = (typeof PORTABLE_TABLES)[number];
|
|
|
163
165
|
* is an FK into `agents`, and `agents` is machine-local. Therefore
|
|
164
166
|
* OWNERSHIP DOES NOT SYNC. The deleted db-sync.ts reached the same
|
|
165
167
|
* conclusion via an `includeOwners` flag; here it is structural. */
|
|
166
|
-
declare const MACHINE_LOCAL_TABLES: readonly ["agents", "machine_identity", "ops", "schema_version", "sync_peers", "vcs_workspaces"];
|
|
168
|
+
declare const MACHINE_LOCAL_TABLES: readonly ["agents", "machine_identity", "ops", "schema_version", "sync_peers", "task_substates", "vcs_workspaces"];
|
|
167
169
|
type MachineLocalTable = (typeof MACHINE_LOCAL_TABLES)[number];
|
|
168
170
|
|
|
169
171
|
/** The multiplexers mu can drive. */
|
|
@@ -2105,8 +2107,8 @@ interface CaptureDb {
|
|
|
2105
2107
|
}
|
|
2106
2108
|
|
|
2107
2109
|
type TaskStatus = "OPEN" | "IN_PROGRESS" | "CLOSED";
|
|
2108
|
-
/** Every legal task status, in canonical order (matches the
|
|
2109
|
-
*
|
|
2110
|
+
/** Every legal task status, in canonical order (matches the seeded
|
|
2111
|
+
* task_substates rows). Exported so CLI surfaces (`--status` validators,
|
|
2110
2112
|
* --help text, error messages) name them all in one place; missing
|
|
2111
2113
|
* one used to silently lie about the supported set. */
|
|
2112
2114
|
declare const TASK_STATUSES: readonly TaskStatus[];
|
|
@@ -2116,15 +2118,50 @@ declare function isTaskStatus(s: string): s is TaskStatus;
|
|
|
2116
2118
|
* --help text and error messages so adding a new status doesn't
|
|
2117
2119
|
* leave stale lists rotting in the CLI surface. */
|
|
2118
2120
|
declare const TASK_STATUS_LIST: string;
|
|
2121
|
+
/** Legal substates per status. `substate` qualifies `status` and never
|
|
2122
|
+
* touches edge semantics: only `status === "CLOSED"` satisfies a
|
|
2123
|
+
* `blocks` edge. */
|
|
2124
|
+
declare const TASK_SUBSTATES: {
|
|
2125
|
+
readonly OPEN: readonly ["todo", "parked"];
|
|
2126
|
+
readonly IN_PROGRESS: readonly ["active"];
|
|
2127
|
+
readonly CLOSED: readonly ["done", "wontfix", "duplicate", "superseded"];
|
|
2128
|
+
};
|
|
2129
|
+
type TaskSubstate = (typeof TASK_SUBSTATES)[TaskStatus][number];
|
|
2130
|
+
/** The substate a status takes when none is given. Never null: an
|
|
2131
|
+
* absent value must not carry meaning. */
|
|
2132
|
+
declare const DEFAULT_SUBSTATE: {
|
|
2133
|
+
readonly [S in TaskStatus]: (typeof TASK_SUBSTATES)[S][number];
|
|
2134
|
+
};
|
|
2135
|
+
interface TaskPair {
|
|
2136
|
+
status: TaskStatus;
|
|
2137
|
+
substate: TaskSubstate;
|
|
2138
|
+
}
|
|
2139
|
+
/** Rows for seeding task_substates: [status, substate, isDefault]. */
|
|
2140
|
+
declare const TASK_SUBSTATE_ROWS: ReadonlyArray<readonly [TaskStatus, TaskSubstate, 0 | 1]>;
|
|
2141
|
+
declare function isValidPair(status: string, substate: string): boolean;
|
|
2142
|
+
/** REJECTED -> {CLOSED, wontfix}; DEFERRED -> {OPEN, parked}; else null. */
|
|
2143
|
+
declare function mapLegacyStatus(value: string): TaskPair | null;
|
|
2144
|
+
/** Map a stored/remote pair onto a legal one. Legacy status -> mapped pair
|
|
2145
|
+
* (ignores substate arg). Unknown status -> null. Known status with
|
|
2146
|
+
* unknown/missing/mismatched substate -> {status, DEFAULT_SUBSTATE[status]}. */
|
|
2147
|
+
declare function resolvePair(status: string, substate: unknown): TaskPair | null;
|
|
2148
|
+
/** "OPEN" for default pairs, "OPEN/parked" otherwise. Shared by CLI + TUI. */
|
|
2149
|
+
declare function formatPair(pair: TaskPair): string;
|
|
2119
2150
|
|
|
2120
2151
|
interface SetStatusResult {
|
|
2121
2152
|
/** Status before the call. */
|
|
2122
2153
|
previousStatus: TaskStatus;
|
|
2123
2154
|
/** Status after the call (== requested status). */
|
|
2124
2155
|
status: TaskStatus;
|
|
2125
|
-
/**
|
|
2156
|
+
/** Substate before the call. */
|
|
2157
|
+
previousSubstate: TaskSubstate;
|
|
2158
|
+
/** Substate after the call (== requested substate, or the status default). */
|
|
2159
|
+
substate: TaskSubstate;
|
|
2160
|
+
/** True iff status OR substate changed. False on idempotent no-op. */
|
|
2126
2161
|
changed: boolean;
|
|
2127
2162
|
}
|
|
2163
|
+
/** The substates a task can be closed as (`mu task close --as`). */
|
|
2164
|
+
type CloseSubstate = Extract<TaskSubstate, "done" | "wontfix" | "duplicate" | "superseded">;
|
|
2128
2165
|
/**
|
|
2129
2166
|
* Optional evidence string carried on lifecycle verbs (close / open /
|
|
2130
2167
|
* claim / release). Lands in the auto-emitted `kind='event'` payload
|
|
@@ -2136,14 +2173,19 @@ interface SetStatusResult {
|
|
|
2136
2173
|
interface EvidenceOption {
|
|
2137
2174
|
evidence?: string;
|
|
2138
2175
|
}
|
|
2176
|
+
interface SetStatusOptions extends EvidenceOption {
|
|
2177
|
+
workstream: string;
|
|
2178
|
+
/** Substate to land on; defaults to DEFAULT_SUBSTATE[status]. A pair
|
|
2179
|
+
* outside TASK_SUBSTATES throws InvalidSubstateError before any write. */
|
|
2180
|
+
substate?: TaskSubstate;
|
|
2181
|
+
}
|
|
2139
2182
|
/**
|
|
2140
|
-
* Flip a task's status to any of OPEN / IN_PROGRESS / CLOSED
|
|
2141
|
-
*
|
|
2183
|
+
* Flip a task's status to any of OPEN / IN_PROGRESS / CLOSED, writing
|
|
2184
|
+
* status and substate in ONE UPDATE (one op, one HLC — spec D7).
|
|
2185
|
+
* Idempotent: setting a task to its current pair is a no-op (returns
|
|
2142
2186
|
* `changed: false`) rather than throwing. Owner is unchanged.
|
|
2143
2187
|
*/
|
|
2144
|
-
declare function setTaskStatus(db: Db, localId: string, status: TaskStatus, opts:
|
|
2145
|
-
workstream: string;
|
|
2146
|
-
}): SetStatusResult;
|
|
2188
|
+
declare function setTaskStatus(db: Db, localId: string, status: TaskStatus, opts: SetStatusOptions): SetStatusResult;
|
|
2147
2189
|
/** Result of `closeTask` when called with `ifReady: true` and the
|
|
2148
2190
|
* task is NOT yet ready to close (still has at least one OPEN /
|
|
2149
2191
|
* IN_PROGRESS blocker). Distinguished from a regular `SetStatusResult`
|
|
@@ -2164,6 +2206,9 @@ interface CloseSkippedResult {
|
|
|
2164
2206
|
previousStatus: TaskStatus;
|
|
2165
2207
|
/** Status after the call (== previousStatus, since we no-op). */
|
|
2166
2208
|
status: TaskStatus;
|
|
2209
|
+
/** Substate before (and after) the call. */
|
|
2210
|
+
previousSubstate: TaskSubstate;
|
|
2211
|
+
substate: TaskSubstate;
|
|
2167
2212
|
/** Always false on a skip (no row mutated). */
|
|
2168
2213
|
changed: false;
|
|
2169
2214
|
/** Local ids of every blocker still in OPEN or IN_PROGRESS, sorted
|
|
@@ -2188,6 +2233,19 @@ interface CloseTaskOptions extends EvidenceOption {
|
|
|
2188
2233
|
* as a bare `addNote` without `--author`). Surfaced in mufeedback
|
|
2189
2234
|
* task_close_evidence_does_not_append_the. */
|
|
2190
2235
|
author?: string;
|
|
2236
|
+
/** Closing substate; default "done". Any CLOSED/* satisfies edges. */
|
|
2237
|
+
as?: CloseSubstate;
|
|
2238
|
+
/** Required (non-empty) unless `as` is "done"; stored as a
|
|
2239
|
+
* `<AS>: <why>` note in the same op group. */
|
|
2240
|
+
why?: string;
|
|
2241
|
+
}
|
|
2242
|
+
/** Result of a close that ran (not skipped). */
|
|
2243
|
+
interface CloseTaskResult extends SetStatusResult {
|
|
2244
|
+
/** Direct same-workstream dependents that entered the `ready` view
|
|
2245
|
+
* because of this close, sorted. Computed only when `as` is not
|
|
2246
|
+
* "done" (spec D3: a non-done close must show what it released);
|
|
2247
|
+
* always [] for a done close. */
|
|
2248
|
+
unblocked: string[];
|
|
2191
2249
|
}
|
|
2192
2250
|
/** Convenience: setTaskStatus(db, id, "CLOSED"). Accepts evidence.
|
|
2193
2251
|
* Skipped
|
|
@@ -2199,12 +2257,30 @@ interface CloseTaskOptions extends EvidenceOption {
|
|
|
2199
2257
|
* `mu task close --if-ready` so an orchestrator can fire-and-forget
|
|
2200
2258
|
* the umbrella close after every blocker resolves without first
|
|
2201
2259
|
* re-querying the graph. */
|
|
2202
|
-
declare function closeTask(db: Db, localId: string, opts: CloseTaskOptions):
|
|
2260
|
+
declare function closeTask(db: Db, localId: string, opts: CloseTaskOptions): CloseTaskResult | CloseSkippedResult;
|
|
2203
2261
|
/** Convenience: setTaskStatus(db, id, "OPEN"). Owner intentionally NOT
|
|
2204
2262
|
* cleared — use `releaseTask` for that. Accepts evidence. */
|
|
2205
2263
|
declare function openTask(db: Db, localId: string, opts: EvidenceOption & {
|
|
2206
2264
|
workstream: string;
|
|
2207
2265
|
}): SetStatusResult;
|
|
2266
|
+
interface ParkTaskOptions extends EvidenceOption {
|
|
2267
|
+
workstream: string;
|
|
2268
|
+
/** Required, non-empty; stored as a `PARKED: <why>` note. */
|
|
2269
|
+
why: string;
|
|
2270
|
+
author?: string;
|
|
2271
|
+
}
|
|
2272
|
+
/**
|
|
2273
|
+
* OPEN/todo → OPEN/parked: keep the task out of `ready` / `next` and
|
|
2274
|
+
* make `claim` refuse it without `--force`. Its dependents stay blocked
|
|
2275
|
+
* (parked is still OPEN). Idempotent on OPEN/parked (no second note).
|
|
2276
|
+
* Refuses IN_PROGRESS (release first) and CLOSED (open first) — one
|
|
2277
|
+
* verb, one transition.
|
|
2278
|
+
*/
|
|
2279
|
+
declare function parkTask(db: Db, localId: string, opts: ParkTaskOptions): SetStatusResult;
|
|
2280
|
+
/** OPEN/parked → OPEN/todo. A no-op (`changed: false`) on any other pair. */
|
|
2281
|
+
declare function unparkTask(db: Db, localId: string, opts: EvidenceOption & {
|
|
2282
|
+
workstream: string;
|
|
2283
|
+
}): SetStatusResult;
|
|
2208
2284
|
|
|
2209
2285
|
interface ReleaseResult {
|
|
2210
2286
|
/** The previous owner (null if the task was already unowned). */
|
|
@@ -2306,6 +2382,12 @@ interface ClaimTaskOptions extends EvidenceOption {
|
|
|
2306
2382
|
* title (e.g. "deploy-bot" rather than "pi-mu").
|
|
2307
2383
|
*/
|
|
2308
2384
|
actor?: string;
|
|
2385
|
+
/**
|
|
2386
|
+
* Claim an OPEN/parked task anyway. Without it, a parked task throws
|
|
2387
|
+
* TaskParkedError before any write: parking means "keep out of the
|
|
2388
|
+
* scheduler", so overriding it must be explicit.
|
|
2389
|
+
*/
|
|
2390
|
+
force?: boolean;
|
|
2309
2391
|
}
|
|
2310
2392
|
interface ClaimResult {
|
|
2311
2393
|
/** The agent now owning the task, or null when the claim was anonymous (--self). */
|
|
@@ -2374,6 +2456,8 @@ interface TaskRow {
|
|
|
2374
2456
|
workstreamName: string;
|
|
2375
2457
|
title: string;
|
|
2376
2458
|
status: TaskStatus;
|
|
2459
|
+
/** Qualifies status (e.g. OPEN/parked, CLOSED/wontfix). Never null. */
|
|
2460
|
+
substate: TaskSubstate;
|
|
2377
2461
|
impact: number;
|
|
2378
2462
|
effortDays: number;
|
|
2379
2463
|
/** Foreign-name reference to the owning agent (NULL when unowned). */
|
|
@@ -2400,6 +2484,7 @@ interface TaskEdges {
|
|
|
2400
2484
|
interface TaskEdgeWithStatus {
|
|
2401
2485
|
name: string;
|
|
2402
2486
|
status: TaskStatus;
|
|
2487
|
+
substate: TaskSubstate;
|
|
2403
2488
|
}
|
|
2404
2489
|
interface TaskEdgesWithStatus {
|
|
2405
2490
|
/** Tasks that must close before this one can start (blockers),
|
|
@@ -2865,6 +2950,56 @@ declare class CrossWorkstreamEdgeError extends Error implements HasNextSteps {
|
|
|
2865
2950
|
constructor(blocker: string, blockerWorkstream: string, dependent: string, dependentWorkstream: string);
|
|
2866
2951
|
errorNextSteps(): NextStep[];
|
|
2867
2952
|
}
|
|
2953
|
+
/**
|
|
2954
|
+
* Thrown by `closeTask` (non-`done` `--as`) and `parkTask` when no
|
|
2955
|
+
* non-empty `--why` was given. The reason is stored as a note, so a
|
|
2956
|
+
* classification with no rationale is refused before any write.
|
|
2957
|
+
*/
|
|
2958
|
+
declare class SubstateReasonRequiredError extends Error implements HasNextSteps {
|
|
2959
|
+
readonly verb: "close" | "park";
|
|
2960
|
+
readonly substate: TaskSubstate;
|
|
2961
|
+
readonly taskId: string;
|
|
2962
|
+
readonly name = "SubstateReasonRequiredError";
|
|
2963
|
+
constructor(verb: "close" | "park", substate: TaskSubstate, taskId: string);
|
|
2964
|
+
errorNextSteps(): NextStep[];
|
|
2965
|
+
}
|
|
2966
|
+
/**
|
|
2967
|
+
* Thrown by `parkTask` on an IN_PROGRESS or CLOSED task. Park is one
|
|
2968
|
+
* transition (OPEN/todo → OPEN/parked); the owner releases, or the task
|
|
2969
|
+
* is reopened, first.
|
|
2970
|
+
*/
|
|
2971
|
+
declare class TaskParkStateError extends Error implements HasNextSteps {
|
|
2972
|
+
readonly taskId: string;
|
|
2973
|
+
readonly status: "IN_PROGRESS" | "CLOSED";
|
|
2974
|
+
readonly workstream: string;
|
|
2975
|
+
readonly name = "TaskParkStateError";
|
|
2976
|
+
constructor(taskId: string, status: "IN_PROGRESS" | "CLOSED", workstream: string);
|
|
2977
|
+
errorNextSteps(): NextStep[];
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Thrown by `claimTask` on an OPEN/parked task without `force`. Parked
|
|
2981
|
+
* means "keep out of the scheduler"; claiming it anyway is explicit.
|
|
2982
|
+
*/
|
|
2983
|
+
declare class TaskParkedError extends Error implements HasNextSteps {
|
|
2984
|
+
readonly taskId: string;
|
|
2985
|
+
readonly workstream: string;
|
|
2986
|
+
readonly name = "TaskParkedError";
|
|
2987
|
+
constructor(taskId: string, workstream: string);
|
|
2988
|
+
errorNextSteps(): NextStep[];
|
|
2989
|
+
}
|
|
2990
|
+
/**
|
|
2991
|
+
* Thrown when a verb is asked for a (status, substate) pair that the
|
|
2992
|
+
* task_substates table does not allow, e.g. `close --as parked`.
|
|
2993
|
+
* Caught here rather than by the deferred FK, which would fail only at
|
|
2994
|
+
* commit with an opaque constraint message.
|
|
2995
|
+
*/
|
|
2996
|
+
declare class InvalidSubstateError extends Error implements HasNextSteps {
|
|
2997
|
+
readonly status: TaskStatus;
|
|
2998
|
+
readonly substate: string;
|
|
2999
|
+
readonly name = "InvalidSubstateError";
|
|
3000
|
+
constructor(status: TaskStatus, substate: string);
|
|
3001
|
+
errorNextSteps(): NextStep[];
|
|
3002
|
+
}
|
|
2868
3003
|
|
|
2869
3004
|
declare function isValidTaskId(id: string): boolean;
|
|
2870
3005
|
/**
|
|
@@ -2969,6 +3104,8 @@ declare function getTask(db: Db, localId: string, workstream: string): TaskRow |
|
|
|
2969
3104
|
interface ListTasksOptions {
|
|
2970
3105
|
/** Filter to one or more lifecycle statuses. Omitted = all statuses. */
|
|
2971
3106
|
status?: TaskStatus | readonly TaskStatus[];
|
|
3107
|
+
/** Filter to one or more substates (ANDed with `status`). */
|
|
3108
|
+
substate?: TaskSubstate | readonly TaskSubstate[];
|
|
2972
3109
|
}
|
|
2973
3110
|
declare function listTasks(db: Db, workstream?: string, opts?: ListTasksOptions): TaskRow[];
|
|
2974
3111
|
/** Options for listReady. The optional `statuses` filter composes
|
|
@@ -2979,6 +3116,8 @@ declare function listTasks(db: Db, workstream?: string, opts?: ListTasksOptions)
|
|
|
2979
3116
|
* shipped on `mu task list` (task_list_multi_status_union). */
|
|
2980
3117
|
interface ListReadyOptions {
|
|
2981
3118
|
status?: TaskStatus | readonly TaskStatus[];
|
|
3119
|
+
/** Substate filter; the `ready` view already excludes OPEN/parked. */
|
|
3120
|
+
substate?: TaskSubstate | readonly TaskSubstate[];
|
|
2982
3121
|
}
|
|
2983
3122
|
declare function listReady(db: Db, workstream: string, opts?: ListReadyOptions): TaskRow[];
|
|
2984
3123
|
declare function listBlocked(db: Db, workstream: string): TaskRow[];
|
|
@@ -3139,6 +3278,8 @@ interface TaskWaitTaskState {
|
|
|
3139
3278
|
name: string;
|
|
3140
3279
|
/** Current status (at the moment we exit). */
|
|
3141
3280
|
status: TaskStatus;
|
|
3281
|
+
/** Current substate. A CLOSED ref that is not `done` has no deliverable. */
|
|
3282
|
+
substate: TaskSubstate;
|
|
3142
3283
|
/** Owner at exit time (NULL when unowned, after release, or after
|
|
3143
3284
|
* the reaper flipped IN_PROGRESS → OPEN due to a dead pane). */
|
|
3144
3285
|
owner: string | null;
|
|
@@ -3192,6 +3333,9 @@ interface RenderTreeOptions {
|
|
|
3192
3333
|
interface LoadFullDagOptions {
|
|
3193
3334
|
/** Optional visible-status filter. Omitted = every task status. */
|
|
3194
3335
|
statuses?: ReadonlySet<TaskStatus>;
|
|
3336
|
+
/** Optional row predicate, applied after `statuses` (e.g. the TUI's
|
|
3337
|
+
* substate toggles). Omitted = keep every row. */
|
|
3338
|
+
include?: (task: TaskRow) => boolean;
|
|
3195
3339
|
}
|
|
3196
3340
|
declare function loadFullDag(db: Db, workstream: string, opts?: LoadFullDagOptions): FullDag;
|
|
3197
3341
|
/**
|
|
@@ -3330,6 +3474,9 @@ interface Track {
|
|
|
3330
3474
|
taskIds: ReadonlySet<string>;
|
|
3331
3475
|
/** Number of READY tasks (per the SQL view) within this track's subgraph. */
|
|
3332
3476
|
readyCount: number;
|
|
3477
|
+
/** True when every non-CLOSED task in the track is OPEN/parked: the
|
|
3478
|
+
* track holds work, but none of it is schedulable. */
|
|
3479
|
+
parked: boolean;
|
|
3333
3480
|
}
|
|
3334
3481
|
/**
|
|
3335
3482
|
* Identify independent task subtrees suitable for parallel assignment
|
|
@@ -3350,6 +3497,9 @@ interface WorkstreamSnapshot {
|
|
|
3350
3497
|
inProgress: TaskRow[];
|
|
3351
3498
|
blocked: TaskRow[];
|
|
3352
3499
|
recentClosed: TaskRow[];
|
|
3500
|
+
/** OPEN/parked tasks in the workstream. The ready card names them
|
|
3501
|
+
* when nothing is ready, since parked work is otherwise invisible there. */
|
|
3502
|
+
parkedCount: number;
|
|
3353
3503
|
/** Populated only when callers explicitly pass `withAllTasks: true`.
|
|
3354
3504
|
* The TUI dashboard fast tick leaves this empty and the all-tasks
|
|
3355
3505
|
* popup reads its exhaustive list directly from SQLite while open. */
|
|
@@ -3786,6 +3936,8 @@ declare const GLYPH: {
|
|
|
3786
3936
|
readonly stale: "";
|
|
3787
3937
|
/** Task is blocked by an incoming edge. */
|
|
3788
3938
|
readonly blocked: "";
|
|
3939
|
+
/** Task is parked (OPEN/parked): open, but set aside on purpose. */
|
|
3940
|
+
readonly parked: "";
|
|
3789
3941
|
/** Track whose roots merged (diamond dependency). */
|
|
3790
3942
|
readonly merge: "";
|
|
3791
3943
|
/** Agent owns more than one task (pane-title multi-count slot). */
|
|
@@ -3887,7 +4039,7 @@ declare function receiveHlc(db: Db, remoteHlc: string, now?: number): string;
|
|
|
3887
4039
|
/** Every intent mu writes: the local ones (`emitEvent`, for changes no
|
|
3888
4040
|
* trigger can see) plus the capture-trigger ones (set via
|
|
3889
4041
|
* `withOpContext` around a portable-table mutation). */
|
|
3890
|
-
type CaptureIntent = "task.add" | "task.update" | "task.note" | "task.delete" | "task.close" | "task.open" | "task.reject" | "task.defer" | "task.claim" | "task.release" | "task.reap" | "task.block" | "task.unblock" | "task.reparent" | "workstream.init" | "workstream.teardown" | "workstream.destroy";
|
|
4042
|
+
type CaptureIntent = "task.add" | "task.update" | "task.note" | "task.delete" | "task.close" | "task.open" | "task.park" | "task.unpark" | "task.reject" | "task.defer" | "task.claim" | "task.release" | "task.reap" | "task.block" | "task.unblock" | "task.reparent" | "workstream.init" | "workstream.teardown" | "workstream.destroy";
|
|
3891
4043
|
type KnownIntent = CaptureIntent | LocalIntent;
|
|
3892
4044
|
/** A log row, reduced to what rendering needs. Structural so both
|
|
3893
4045
|
* `LogRow` (the SDK shape) and raw op rows satisfy it. */
|
|
@@ -4826,4 +4978,4 @@ declare function summarizeWorkstream(db: Db, opts: WorkstreamOptions): Promise<W
|
|
|
4826
4978
|
*/
|
|
4827
4979
|
declare function teardownWorkstream(db: Db, opts: TeardownWorkstreamOptions): Promise<TeardownResult>;
|
|
4828
4980
|
|
|
4829
|
-
export { AGENT_STATE_GLYPH, type AddNoteOptions, type AddTaskOptions, type AdoptAgentOptions, type AdoptAgentResult, AgentDiedOnSpawnError, AgentExistsError, AgentNotFoundError, AgentNotInWorkstreamError, type AgentRow, AgentSpawnCliNotFoundError, AgentSpawnStartupError, type AmbientOptions, type AmbientResult, type AppendLogOptions, type ApplyResult, type BlockEdgeResult, CAPTURE_TRIGGER_DDL, CURRENT_SCHEMA_VERSION, type CaptureDb, type CaptureIntent, type CaptureOptions, type CaseCollision, type CheapDriftReport, type ClaimResult, type ClaimTaskOptions, ClaimerNotRegisteredError, type CloseAgentOptions, type CloseAgentResult, type CommandResolutionResult, type CommandResolver, CrossWorkstreamEdgeError, CycleError, DRIFT_REPORT_CAP, type Db, type DeleteTaskResult, type DoctorCheck, type DoctorStatus, type DoctorSummary, DriftDetectedError, type DriftRecord, type DriftReport, EXPECTED_TABLES, type EvidenceOption, type FileLockOptions, type FleetHazard, type FlushResult, type FsProbe, type FullDag, GLYPH, type GroupSummary, type HazardSeverity, type Hlc, HlcOverflowError, HlcParseError, HomeDirAsProjectRootError, type IdFromTitleResult, type IngestFromDbResult, type IngestResult, type InsertAgentInput, type InverseOp, KNOWN_INTENTS, KNOWN_VERBS, type KickAgentOptions, type KickAgentResult, type KickProcessExecutor, type KickSignal, type KnownIntent, type ListLiveAgentsOptions, type ListLogsOptions, type ListNotesOptions, type ListReadyOptions, type ListTasksOptions, type LiveAgent, type LiveAgentsView, type LoadFullDagOptions, type LoadWorkstreamSnapshotOptions, type LocalIntent, type LogKind, type LogRow, MACHINE_LOCAL_ENTITIES, MACHINE_LOCAL_TABLES, MachineIdentityMissingError, type MachineLocalEntity, type MachineLocalLoss, type MachineLocalTable, type MuxBackend, type MuxBackendName, MuxError, type MuxPane, type MuxPaneStatus, type MuxSession, type MuxWindow, type NewSessionOptions, type NewWindowOptions, NoForegroundProcessError, NoMultiplexerError, NothingToUndoError, OP_CTX_DDL, type Op, type OpContext, OpEntityNotSyncedError, OpKeyMalformedError, type OpenDbOptions, type OwnedTasksSummary, PANE_ID_RE, PEER_SHORT_LEN, PEER_STALE_MS, PORTABLE_TABLES, PaneNotFoundError, type PeerSegment, type PeerStatus, type PortableTable, type RebuildOptions, type RebuildReport, RebuildTargetExistsError, RebuildTargetIsSourceError, type ReconcileMode, type ReconcileOptions, type ReconcileReport, type ReleaseResult, type ReleaseTaskOptions, type RemoveBlockEdgeResult, type RenderableOp, type RenderedOp, type ReparentTaskResult, type RoiBucket, type RuntimeState, SEGMENT_FORMAT_VERSION, SYNCED_ENTITIES, SchemaTooOldError, type SegmentDefect, type SegmentDefectKind, type SegmentLine, type SegmentManifest, type SendOptions, type SendWarning, type SetStatusResult, type SlugifyResult, type SpawnAgentOptions, type SplitWindowOptions, type StateReading, type StateSource, type StrandedWorkspaceOrphan, type SyncPassResult, SyncPeerNotFoundError, SyncPeerRefAmbiguousError, SyncSourceNotFoundError, type SyncedEntity, TASK_STATUSES, TASK_STATUS_LIST, TaskAlreadyOwnedError, type TaskEdgeWithStatus, type TaskEdges, type TaskEdgesWithStatus, TaskExistsError, TaskNotFoundError, TaskNotInWorkstreamError, type TaskNoteRow, type TaskRow, type TaskStatus, type TaskWaitOptions, type TaskWaitRef, type TaskWaitResult, type TaskWaitTaskState, type TeardownResult, TmuxError, type TmuxExecResult, type TmuxExecutor, type TmuxPane, type TmuxSession, type TmuxWindow, type Track, UNKNOWN_REASON, UndoGroupNotFoundError, type UndoOptions, type UndoPlan, type UndoResult, UndoSupersededError, type UpdateTaskOptions, type UpdateTaskResult, type VcsBackend, type VcsBackendName, WORKSPACE_STALE_THRESHOLD, WorkspaceExistsError, type WorkspaceFailure, WorkspaceNotFoundError, type WorkspaceOrphan, WorkspacePathNotEmptyError, WorkspacePreservedError, type WorkspaceRow, type WorkspaceStaleness, WorkstreamExistsError, WorkstreamNameInvalidError, type WorkstreamOptions, type WorkstreamSnapshot, type WorkstreamSnapshotSlowFields, type WorkstreamSummary, activeMux, addBlockEdge, addNote, addTask, adoptAgent, agentKey, agentStateGlyph, agentStateHistogram, ambientFlush, ambientIngest, ambientSyncPass, appendLog, applyIncomingOp, applyOp, applyOps, assertValidPaneId, awaitPaneQuiescence, backendByName, capturePane, checkCaseCollisions, checkCheapDriftInvariant, checkCommandResolvable, checkDbInsideSyncDir, checkDrift, checkFleetHazards, checkNetworkMount, claimTask, classifyFsType, closeAgent, closeTask, compareHlc, composeAgentTitle, countProblems, createWorkspace, currentAgentName, currentOpContext, currentPaneTitle, decorateWithDirty, decorateWithStaleness, defaultDbPath, defaultSendDelayMs, defaultSendReadinessMs, defaultSpawnLivenessMs, defaultStateDir, deleteAgent, deleteTask, detectBackend, detectMux, discoverPeers, driftRemediation, emitEvent, ensureWorkstream, envVarNameForCli, findCaseCollisions, flushSegment, foregroundPgid, formatDriftRecord, formatHlc, freeWorkspace, getAgent, getAgentByPane, getParallelTracks, getPrerequisites, getTask, getTaskEdges, getTaskEdgesWithStatus, getWaitPollCount, getWatermark, getWorkspaceForAgent, getWorkspaceStaleness, gitBackend, hasWorkMarker, idFromTitle, idFromTitleVerbose, ingestFromDb, ingestSegment, insertAgent, installCapture, isKickSignal, isPathInside, isTaskStatus, isValidAgentName, isValidPaneId, isValidTaskId, isValidWorkstreamName, isWorkspaceStale, jjBackend, kickAgent, killPane, killSession, latestSeq, listAgents, listAllOrphanWorkspaces, listBlocked, listGoals, listInProgress, listLiveAgents, listLogs, listNotes, listPanes, listPanesInSession, listReady, listRecentClosed, listRecentGroups, listSessions, listTasks, listTasksByOwner, listWindows, listWorkspaceOrphans, listWorkspaces, listWorkstreams, loadDoctorChecks, loadDoctorSummary, loadFullDag, loadWorkstreamSnapshot, loadWorkstreamSnapshotFast, loadWorkstreamSnapshotSlow, localMachineId, locksDir, mergeSnapshotFastSlow, mostRecentGroup, murmurAvailable, mux, muxByName, newSession, newSessionWithPane, newWindow, nextHlc, noneBackend, opSubject, openDb, openTask, paneExists, paneTTY, parseAgentNameFromTitle, parseHlc, parseOpKey, parsePsTtyOutput, peerStatuses, planUndo, priorFieldValue, probeFilesystem, readAgent, readAgentStates, readFileLockMeta, readManifest, rebuildInto, receiveHlc, reconcile, refreshAgentTitle, releaseTask, remediationParagraph, removeBlockEdge, renderForest, renderOp, renderOpLine, renderTaskTree, repairPeer, reparentTask, resetCommandResolverForTests, resetKickProcessExecutor, resetMux, resetSleep, resetTmuxExecutor, resetWaitPollCount, resetWatermark, resolveActorIdentity, resolveCliCommand, resolveCliCommandWithSource, resolveGroupId, resolvePeerRef, roiBucket, segmentLineCount, segmentPath, selectLayout, sendToAgent, sendToPane, sessionExists, setCommandResolverForTests, setKickProcessExecutor, setMuxForTests, setPaneTitle, setSleepForTests, setTaskStatus, setTmuxExecutor, setWaitSleepForTests, setWaitStuckWarnForTests, setWatermark, slBackend, sleep, slugifyTitle, slugifyTitleVerbose, spawnAgent, splitWindow, summarizeOwnedTasks, summarizeWorkstream, syncDir, syncEnabled, syncPass, teardownWorkstream, tmux, tmuxBackend, transportNextSteps, undoGroup, updateTask, verifyAgainstManifest, waitForTasks, withCaptureSuppressed, withFileLock, withOpContext, workspacePath, workspacesRoot, yankCommandForCheck };
|
|
4981
|
+
export { AGENT_STATE_GLYPH, type AddNoteOptions, type AddTaskOptions, type AdoptAgentOptions, type AdoptAgentResult, AgentDiedOnSpawnError, AgentExistsError, AgentNotFoundError, AgentNotInWorkstreamError, type AgentRow, AgentSpawnCliNotFoundError, AgentSpawnStartupError, type AmbientOptions, type AmbientResult, type AppendLogOptions, type ApplyResult, type BlockEdgeResult, CAPTURE_TRIGGER_DDL, CURRENT_SCHEMA_VERSION, type CaptureDb, type CaptureIntent, type CaptureOptions, type CaseCollision, type CheapDriftReport, type ClaimResult, type ClaimTaskOptions, ClaimerNotRegisteredError, type CloseAgentOptions, type CloseAgentResult, type CloseSubstate, type CloseTaskResult, type CommandResolutionResult, type CommandResolver, CrossWorkstreamEdgeError, CycleError, DEFAULT_SUBSTATE, DRIFT_REPORT_CAP, type Db, type DeleteTaskResult, type DoctorCheck, type DoctorStatus, type DoctorSummary, DriftDetectedError, type DriftRecord, type DriftReport, EXPECTED_TABLES, type EvidenceOption, type FileLockOptions, type FleetHazard, type FlushResult, type FsProbe, type FullDag, GLYPH, type GroupSummary, type HazardSeverity, type Hlc, HlcOverflowError, HlcParseError, HomeDirAsProjectRootError, type IdFromTitleResult, type IngestFromDbResult, type IngestResult, type InsertAgentInput, InvalidSubstateError, type InverseOp, KNOWN_INTENTS, KNOWN_VERBS, type KickAgentOptions, type KickAgentResult, type KickProcessExecutor, type KickSignal, type KnownIntent, type ListLiveAgentsOptions, type ListLogsOptions, type ListNotesOptions, type ListReadyOptions, type ListTasksOptions, type LiveAgent, type LiveAgentsView, type LoadFullDagOptions, type LoadWorkstreamSnapshotOptions, type LocalIntent, type LogKind, type LogRow, MACHINE_LOCAL_ENTITIES, MACHINE_LOCAL_TABLES, MachineIdentityMissingError, type MachineLocalEntity, type MachineLocalLoss, type MachineLocalTable, type MuxBackend, type MuxBackendName, MuxError, type MuxPane, type MuxPaneStatus, type MuxSession, type MuxWindow, type NewSessionOptions, type NewWindowOptions, NoForegroundProcessError, NoMultiplexerError, NothingToUndoError, OP_CTX_DDL, type Op, type OpContext, OpEntityNotSyncedError, OpKeyMalformedError, type OpenDbOptions, type OwnedTasksSummary, PANE_ID_RE, PEER_SHORT_LEN, PEER_STALE_MS, PORTABLE_TABLES, PaneNotFoundError, type ParkTaskOptions, type PeerSegment, type PeerStatus, type PortableTable, type RebuildOptions, type RebuildReport, RebuildTargetExistsError, RebuildTargetIsSourceError, type ReconcileMode, type ReconcileOptions, type ReconcileReport, type ReleaseResult, type ReleaseTaskOptions, type RemoveBlockEdgeResult, type RenderableOp, type RenderedOp, type ReparentTaskResult, type RoiBucket, type RuntimeState, SEGMENT_FORMAT_VERSION, SYNCED_ENTITIES, SchemaTooOldError, type SegmentDefect, type SegmentDefectKind, type SegmentLine, type SegmentManifest, type SendOptions, type SendWarning, type SetStatusOptions, type SetStatusResult, type SlugifyResult, type SpawnAgentOptions, type SplitWindowOptions, type StateReading, type StateSource, type StrandedWorkspaceOrphan, SubstateReasonRequiredError, type SyncPassResult, SyncPeerNotFoundError, SyncPeerRefAmbiguousError, SyncSourceNotFoundError, type SyncedEntity, TASK_STATUSES, TASK_STATUS_LIST, TASK_SUBSTATES, TASK_SUBSTATE_ROWS, TaskAlreadyOwnedError, type TaskEdgeWithStatus, type TaskEdges, type TaskEdgesWithStatus, TaskExistsError, TaskNotFoundError, TaskNotInWorkstreamError, type TaskNoteRow, type TaskPair, TaskParkStateError, TaskParkedError, type TaskRow, type TaskStatus, type TaskSubstate, type TaskWaitOptions, type TaskWaitRef, type TaskWaitResult, type TaskWaitTaskState, type TeardownResult, TmuxError, type TmuxExecResult, type TmuxExecutor, type TmuxPane, type TmuxSession, type TmuxWindow, type Track, UNKNOWN_REASON, UndoGroupNotFoundError, type UndoOptions, type UndoPlan, type UndoResult, UndoSupersededError, type UpdateTaskOptions, type UpdateTaskResult, type VcsBackend, type VcsBackendName, WORKSPACE_STALE_THRESHOLD, WorkspaceExistsError, type WorkspaceFailure, WorkspaceNotFoundError, type WorkspaceOrphan, WorkspacePathNotEmptyError, WorkspacePreservedError, type WorkspaceRow, type WorkspaceStaleness, WorkstreamExistsError, WorkstreamNameInvalidError, type WorkstreamOptions, type WorkstreamSnapshot, type WorkstreamSnapshotSlowFields, type WorkstreamSummary, activeMux, addBlockEdge, addNote, addTask, adoptAgent, agentKey, agentStateGlyph, agentStateHistogram, ambientFlush, ambientIngest, ambientSyncPass, appendLog, applyIncomingOp, applyOp, applyOps, assertValidPaneId, awaitPaneQuiescence, backendByName, capturePane, checkCaseCollisions, checkCheapDriftInvariant, checkCommandResolvable, checkDbInsideSyncDir, checkDrift, checkFleetHazards, checkNetworkMount, claimTask, classifyFsType, closeAgent, closeTask, compareHlc, composeAgentTitle, countProblems, createWorkspace, currentAgentName, currentOpContext, currentPaneTitle, decorateWithDirty, decorateWithStaleness, defaultDbPath, defaultSendDelayMs, defaultSendReadinessMs, defaultSpawnLivenessMs, defaultStateDir, deleteAgent, deleteTask, detectBackend, detectMux, discoverPeers, driftRemediation, emitEvent, ensureWorkstream, envVarNameForCli, findCaseCollisions, flushSegment, foregroundPgid, formatDriftRecord, formatHlc, formatPair, freeWorkspace, getAgent, getAgentByPane, getParallelTracks, getPrerequisites, getTask, getTaskEdges, getTaskEdgesWithStatus, getWaitPollCount, getWatermark, getWorkspaceForAgent, getWorkspaceStaleness, gitBackend, hasWorkMarker, idFromTitle, idFromTitleVerbose, ingestFromDb, ingestSegment, insertAgent, installCapture, isKickSignal, isPathInside, isTaskStatus, isValidAgentName, isValidPair, isValidPaneId, isValidTaskId, isValidWorkstreamName, isWorkspaceStale, jjBackend, kickAgent, killPane, killSession, latestSeq, listAgents, listAllOrphanWorkspaces, listBlocked, listGoals, listInProgress, listLiveAgents, listLogs, listNotes, listPanes, listPanesInSession, listReady, listRecentClosed, listRecentGroups, listSessions, listTasks, listTasksByOwner, listWindows, listWorkspaceOrphans, listWorkspaces, listWorkstreams, loadDoctorChecks, loadDoctorSummary, loadFullDag, loadWorkstreamSnapshot, loadWorkstreamSnapshotFast, loadWorkstreamSnapshotSlow, localMachineId, locksDir, mapLegacyStatus, mergeSnapshotFastSlow, mostRecentGroup, murmurAvailable, mux, muxByName, newSession, newSessionWithPane, newWindow, nextHlc, noneBackend, opSubject, openDb, openTask, paneExists, paneTTY, parkTask, parseAgentNameFromTitle, parseHlc, parseOpKey, parsePsTtyOutput, peerStatuses, planUndo, priorFieldValue, probeFilesystem, readAgent, readAgentStates, readFileLockMeta, readManifest, rebuildInto, receiveHlc, reconcile, refreshAgentTitle, releaseTask, remediationParagraph, removeBlockEdge, renderForest, renderOp, renderOpLine, renderTaskTree, repairPeer, reparentTask, resetCommandResolverForTests, resetKickProcessExecutor, resetMux, resetSleep, resetTmuxExecutor, resetWaitPollCount, resetWatermark, resolveActorIdentity, resolveCliCommand, resolveCliCommandWithSource, resolveGroupId, resolvePair, resolvePeerRef, roiBucket, segmentLineCount, segmentPath, selectLayout, sendToAgent, sendToPane, sessionExists, setCommandResolverForTests, setKickProcessExecutor, setMuxForTests, setPaneTitle, setSleepForTests, setTaskStatus, setTmuxExecutor, setWaitSleepForTests, setWaitStuckWarnForTests, setWatermark, slBackend, sleep, slugifyTitle, slugifyTitleVerbose, spawnAgent, splitWindow, summarizeOwnedTasks, summarizeWorkstream, syncDir, syncEnabled, syncPass, teardownWorkstream, tmux, tmuxBackend, transportNextSteps, undoGroup, unparkTask, updateTask, verifyAgainstManifest, waitForTasks, withCaptureSuppressed, withFileLock, withOpContext, workspacePath, workspacesRoot, yankCommandForCheck };
|