@mu-crew/mu 2.0.0 → 3.1.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/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. v10 drops the REJECTED
102
- * and DEFERRED task statuses (three-state lifecycle: OPEN,
103
- * IN_PROGRESS, CLOSED). See CHANGELOG.md. */
104
- declare const CURRENT_SCHEMA_VERSION = 10;
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 10 entries in v10. */
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 schema
2109
- * CHECK clause). Exported so CLI surfaces (`--status` validators,
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,51 @@ 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. Closed: `rejected` = the proposal was declined;
2124
+ * `wontfix` = valid, but not worth doing. */
2125
+ declare const TASK_SUBSTATES: {
2126
+ readonly OPEN: readonly ["todo", "parked"];
2127
+ readonly IN_PROGRESS: readonly ["active"];
2128
+ readonly CLOSED: readonly ["done", "rejected", "wontfix", "duplicate", "superseded"];
2129
+ };
2130
+ type TaskSubstate = (typeof TASK_SUBSTATES)[TaskStatus][number];
2131
+ /** The substate a status takes when none is given. Never null: an
2132
+ * absent value must not carry meaning. */
2133
+ declare const DEFAULT_SUBSTATE: {
2134
+ readonly [S in TaskStatus]: (typeof TASK_SUBSTATES)[S][number];
2135
+ };
2136
+ interface TaskPair {
2137
+ status: TaskStatus;
2138
+ substate: TaskSubstate;
2139
+ }
2140
+ /** Rows for seeding task_substates: [status, substate, isDefault]. */
2141
+ declare const TASK_SUBSTATE_ROWS: ReadonlyArray<readonly [TaskStatus, TaskSubstate, 0 | 1]>;
2142
+ declare function isValidPair(status: string, substate: string): boolean;
2143
+ /** REJECTED -> {CLOSED, rejected}; DEFERRED -> {OPEN, parked}; else null. */
2144
+ declare function mapLegacyStatus(value: string): TaskPair | null;
2145
+ /** Map a stored/remote pair onto a legal one. Legacy status -> mapped pair
2146
+ * (ignores substate arg). Unknown status -> null. Known status with
2147
+ * unknown/missing/mismatched substate -> {status, DEFAULT_SUBSTATE[status]}. */
2148
+ declare function resolvePair(status: string, substate: unknown): TaskPair | null;
2149
+ /** "OPEN" for default pairs, "OPEN/parked" otherwise. Shared by CLI + TUI. */
2150
+ declare function formatPair(pair: TaskPair): string;
2119
2151
 
2120
2152
  interface SetStatusResult {
2121
2153
  /** Status before the call. */
2122
2154
  previousStatus: TaskStatus;
2123
2155
  /** Status after the call (== requested status). */
2124
2156
  status: TaskStatus;
2125
- /** True iff the row actually changed. False on idempotent no-op. */
2157
+ /** Substate before the call. */
2158
+ previousSubstate: TaskSubstate;
2159
+ /** Substate after the call (== requested substate, or the status default). */
2160
+ substate: TaskSubstate;
2161
+ /** True iff status OR substate changed. False on idempotent no-op. */
2126
2162
  changed: boolean;
2127
2163
  }
2164
+ /** The substates a task can be closed as (`mu task close --as`). */
2165
+ type CloseSubstate = (typeof TASK_SUBSTATES)["CLOSED"][number];
2128
2166
  /**
2129
2167
  * Optional evidence string carried on lifecycle verbs (close / open /
2130
2168
  * claim / release). Lands in the auto-emitted `kind='event'` payload
@@ -2136,14 +2174,19 @@ interface SetStatusResult {
2136
2174
  interface EvidenceOption {
2137
2175
  evidence?: string;
2138
2176
  }
2177
+ interface SetStatusOptions extends EvidenceOption {
2178
+ workstream: string;
2179
+ /** Substate to land on; defaults to DEFAULT_SUBSTATE[status]. A pair
2180
+ * outside TASK_SUBSTATES throws InvalidSubstateError before any write. */
2181
+ substate?: TaskSubstate;
2182
+ }
2139
2183
  /**
2140
- * Flip a task's status to any of OPEN / IN_PROGRESS / CLOSED.
2141
- * Idempotent: setting a task to its current status is a no-op (returns
2184
+ * Flip a task's status to any of OPEN / IN_PROGRESS / CLOSED, writing
2185
+ * status and substate in ONE UPDATE (one op, one HLC — spec D7).
2186
+ * Idempotent: setting a task to its current pair is a no-op (returns
2142
2187
  * `changed: false`) rather than throwing. Owner is unchanged.
2143
2188
  */
2144
- declare function setTaskStatus(db: Db, localId: string, status: TaskStatus, opts: EvidenceOption & {
2145
- workstream: string;
2146
- }): SetStatusResult;
2189
+ declare function setTaskStatus(db: Db, localId: string, status: TaskStatus, opts: SetStatusOptions): SetStatusResult;
2147
2190
  /** Result of `closeTask` when called with `ifReady: true` and the
2148
2191
  * task is NOT yet ready to close (still has at least one OPEN /
2149
2192
  * IN_PROGRESS blocker). Distinguished from a regular `SetStatusResult`
@@ -2164,6 +2207,9 @@ interface CloseSkippedResult {
2164
2207
  previousStatus: TaskStatus;
2165
2208
  /** Status after the call (== previousStatus, since we no-op). */
2166
2209
  status: TaskStatus;
2210
+ /** Substate before (and after) the call. */
2211
+ previousSubstate: TaskSubstate;
2212
+ substate: TaskSubstate;
2167
2213
  /** Always false on a skip (no row mutated). */
2168
2214
  changed: false;
2169
2215
  /** Local ids of every blocker still in OPEN or IN_PROGRESS, sorted
@@ -2188,6 +2234,19 @@ interface CloseTaskOptions extends EvidenceOption {
2188
2234
  * as a bare `addNote` without `--author`). Surfaced in mufeedback
2189
2235
  * task_close_evidence_does_not_append_the. */
2190
2236
  author?: string;
2237
+ /** Closing substate; default "done". Any CLOSED/* satisfies edges. */
2238
+ as?: CloseSubstate;
2239
+ /** Required (non-empty) unless `as` is "done"; stored as a
2240
+ * `<AS>: <why>` note in the same op group. */
2241
+ why?: string;
2242
+ }
2243
+ /** Result of a close that ran (not skipped). */
2244
+ interface CloseTaskResult extends SetStatusResult {
2245
+ /** Direct same-workstream dependents that entered the `ready` view
2246
+ * because of this close, sorted. Computed only when `as` is not
2247
+ * "done" (spec D3: a non-done close must show what it released);
2248
+ * always [] for a done close. */
2249
+ unblocked: string[];
2191
2250
  }
2192
2251
  /** Convenience: setTaskStatus(db, id, "CLOSED"). Accepts evidence.
2193
2252
  * Skipped
@@ -2199,12 +2258,30 @@ interface CloseTaskOptions extends EvidenceOption {
2199
2258
  * `mu task close --if-ready` so an orchestrator can fire-and-forget
2200
2259
  * the umbrella close after every blocker resolves without first
2201
2260
  * re-querying the graph. */
2202
- declare function closeTask(db: Db, localId: string, opts: CloseTaskOptions): SetStatusResult | CloseSkippedResult;
2261
+ declare function closeTask(db: Db, localId: string, opts: CloseTaskOptions): CloseTaskResult | CloseSkippedResult;
2203
2262
  /** Convenience: setTaskStatus(db, id, "OPEN"). Owner intentionally NOT
2204
2263
  * cleared — use `releaseTask` for that. Accepts evidence. */
2205
2264
  declare function openTask(db: Db, localId: string, opts: EvidenceOption & {
2206
2265
  workstream: string;
2207
2266
  }): SetStatusResult;
2267
+ interface ParkTaskOptions extends EvidenceOption {
2268
+ workstream: string;
2269
+ /** Required, non-empty; stored as a `PARKED: <why>` note. */
2270
+ why: string;
2271
+ author?: string;
2272
+ }
2273
+ /**
2274
+ * OPEN/todo → OPEN/parked: keep the task out of `ready` / `next` and
2275
+ * make `claim` refuse it without `--force`. Its dependents stay blocked
2276
+ * (parked is still OPEN). Idempotent on OPEN/parked (no second note).
2277
+ * Refuses IN_PROGRESS (release first) and CLOSED (open first) — one
2278
+ * verb, one transition.
2279
+ */
2280
+ declare function parkTask(db: Db, localId: string, opts: ParkTaskOptions): SetStatusResult;
2281
+ /** OPEN/parked → OPEN/todo. A no-op (`changed: false`) on any other pair. */
2282
+ declare function unparkTask(db: Db, localId: string, opts: EvidenceOption & {
2283
+ workstream: string;
2284
+ }): SetStatusResult;
2208
2285
 
2209
2286
  interface ReleaseResult {
2210
2287
  /** The previous owner (null if the task was already unowned). */
@@ -2306,6 +2383,12 @@ interface ClaimTaskOptions extends EvidenceOption {
2306
2383
  * title (e.g. "deploy-bot" rather than "pi-mu").
2307
2384
  */
2308
2385
  actor?: string;
2386
+ /**
2387
+ * Claim an OPEN/parked task anyway. Without it, a parked task throws
2388
+ * TaskParkedError before any write: parking means "keep out of the
2389
+ * scheduler", so overriding it must be explicit.
2390
+ */
2391
+ force?: boolean;
2309
2392
  }
2310
2393
  interface ClaimResult {
2311
2394
  /** The agent now owning the task, or null when the claim was anonymous (--self). */
@@ -2374,6 +2457,8 @@ interface TaskRow {
2374
2457
  workstreamName: string;
2375
2458
  title: string;
2376
2459
  status: TaskStatus;
2460
+ /** Qualifies status (e.g. OPEN/parked, CLOSED/wontfix). Never null. */
2461
+ substate: TaskSubstate;
2377
2462
  impact: number;
2378
2463
  effortDays: number;
2379
2464
  /** Foreign-name reference to the owning agent (NULL when unowned). */
@@ -2400,6 +2485,7 @@ interface TaskEdges {
2400
2485
  interface TaskEdgeWithStatus {
2401
2486
  name: string;
2402
2487
  status: TaskStatus;
2488
+ substate: TaskSubstate;
2403
2489
  }
2404
2490
  interface TaskEdgesWithStatus {
2405
2491
  /** Tasks that must close before this one can start (blockers),
@@ -2865,6 +2951,56 @@ declare class CrossWorkstreamEdgeError extends Error implements HasNextSteps {
2865
2951
  constructor(blocker: string, blockerWorkstream: string, dependent: string, dependentWorkstream: string);
2866
2952
  errorNextSteps(): NextStep[];
2867
2953
  }
2954
+ /**
2955
+ * Thrown by `closeTask` (non-`done` `--as`) and `parkTask` when no
2956
+ * non-empty `--why` was given. The reason is stored as a note, so a
2957
+ * classification with no rationale is refused before any write.
2958
+ */
2959
+ declare class SubstateReasonRequiredError extends Error implements HasNextSteps {
2960
+ readonly verb: "close" | "park";
2961
+ readonly substate: TaskSubstate;
2962
+ readonly taskId: string;
2963
+ readonly name = "SubstateReasonRequiredError";
2964
+ constructor(verb: "close" | "park", substate: TaskSubstate, taskId: string);
2965
+ errorNextSteps(): NextStep[];
2966
+ }
2967
+ /**
2968
+ * Thrown by `parkTask` on an IN_PROGRESS or CLOSED task. Park is one
2969
+ * transition (OPEN/todo → OPEN/parked); the owner releases, or the task
2970
+ * is reopened, first.
2971
+ */
2972
+ declare class TaskParkStateError extends Error implements HasNextSteps {
2973
+ readonly taskId: string;
2974
+ readonly status: "IN_PROGRESS" | "CLOSED";
2975
+ readonly workstream: string;
2976
+ readonly name = "TaskParkStateError";
2977
+ constructor(taskId: string, status: "IN_PROGRESS" | "CLOSED", workstream: string);
2978
+ errorNextSteps(): NextStep[];
2979
+ }
2980
+ /**
2981
+ * Thrown by `claimTask` on an OPEN/parked task without `force`. Parked
2982
+ * means "keep out of the scheduler"; claiming it anyway is explicit.
2983
+ */
2984
+ declare class TaskParkedError extends Error implements HasNextSteps {
2985
+ readonly taskId: string;
2986
+ readonly workstream: string;
2987
+ readonly name = "TaskParkedError";
2988
+ constructor(taskId: string, workstream: string);
2989
+ errorNextSteps(): NextStep[];
2990
+ }
2991
+ /**
2992
+ * Thrown when a verb is asked for a (status, substate) pair that the
2993
+ * task_substates table does not allow, e.g. `close --as parked`.
2994
+ * Caught here rather than by the deferred FK, which would fail only at
2995
+ * commit with an opaque constraint message.
2996
+ */
2997
+ declare class InvalidSubstateError extends Error implements HasNextSteps {
2998
+ readonly status: TaskStatus;
2999
+ readonly substate: string;
3000
+ readonly name = "InvalidSubstateError";
3001
+ constructor(status: TaskStatus, substate: string);
3002
+ errorNextSteps(): NextStep[];
3003
+ }
2868
3004
 
2869
3005
  declare function isValidTaskId(id: string): boolean;
2870
3006
  /**
@@ -2969,6 +3105,8 @@ declare function getTask(db: Db, localId: string, workstream: string): TaskRow |
2969
3105
  interface ListTasksOptions {
2970
3106
  /** Filter to one or more lifecycle statuses. Omitted = all statuses. */
2971
3107
  status?: TaskStatus | readonly TaskStatus[];
3108
+ /** Filter to one or more substates (ANDed with `status`). */
3109
+ substate?: TaskSubstate | readonly TaskSubstate[];
2972
3110
  }
2973
3111
  declare function listTasks(db: Db, workstream?: string, opts?: ListTasksOptions): TaskRow[];
2974
3112
  /** Options for listReady. The optional `statuses` filter composes
@@ -2979,6 +3117,8 @@ declare function listTasks(db: Db, workstream?: string, opts?: ListTasksOptions)
2979
3117
  * shipped on `mu task list` (task_list_multi_status_union). */
2980
3118
  interface ListReadyOptions {
2981
3119
  status?: TaskStatus | readonly TaskStatus[];
3120
+ /** Substate filter; the `ready` view already excludes OPEN/parked. */
3121
+ substate?: TaskSubstate | readonly TaskSubstate[];
2982
3122
  }
2983
3123
  declare function listReady(db: Db, workstream: string, opts?: ListReadyOptions): TaskRow[];
2984
3124
  declare function listBlocked(db: Db, workstream: string): TaskRow[];
@@ -3139,6 +3279,8 @@ interface TaskWaitTaskState {
3139
3279
  name: string;
3140
3280
  /** Current status (at the moment we exit). */
3141
3281
  status: TaskStatus;
3282
+ /** Current substate. A CLOSED ref that is not `done` has no deliverable. */
3283
+ substate: TaskSubstate;
3142
3284
  /** Owner at exit time (NULL when unowned, after release, or after
3143
3285
  * the reaper flipped IN_PROGRESS → OPEN due to a dead pane). */
3144
3286
  owner: string | null;
@@ -3192,6 +3334,9 @@ interface RenderTreeOptions {
3192
3334
  interface LoadFullDagOptions {
3193
3335
  /** Optional visible-status filter. Omitted = every task status. */
3194
3336
  statuses?: ReadonlySet<TaskStatus>;
3337
+ /** Optional row predicate, applied after `statuses` (e.g. the TUI's
3338
+ * substate toggles). Omitted = keep every row. */
3339
+ include?: (task: TaskRow) => boolean;
3195
3340
  }
3196
3341
  declare function loadFullDag(db: Db, workstream: string, opts?: LoadFullDagOptions): FullDag;
3197
3342
  /**
@@ -3330,6 +3475,9 @@ interface Track {
3330
3475
  taskIds: ReadonlySet<string>;
3331
3476
  /** Number of READY tasks (per the SQL view) within this track's subgraph. */
3332
3477
  readyCount: number;
3478
+ /** True when every non-CLOSED task in the track is OPEN/parked: the
3479
+ * track holds work, but none of it is schedulable. */
3480
+ parked: boolean;
3333
3481
  }
3334
3482
  /**
3335
3483
  * Identify independent task subtrees suitable for parallel assignment
@@ -3350,6 +3498,9 @@ interface WorkstreamSnapshot {
3350
3498
  inProgress: TaskRow[];
3351
3499
  blocked: TaskRow[];
3352
3500
  recentClosed: TaskRow[];
3501
+ /** OPEN/parked tasks in the workstream. The ready card names them
3502
+ * when nothing is ready, since parked work is otherwise invisible there. */
3503
+ parkedCount: number;
3353
3504
  /** Populated only when callers explicitly pass `withAllTasks: true`.
3354
3505
  * The TUI dashboard fast tick leaves this empty and the all-tasks
3355
3506
  * popup reads its exhaustive list directly from SQLite while open. */
@@ -3786,6 +3937,8 @@ declare const GLYPH: {
3786
3937
  readonly stale: "";
3787
3938
  /** Task is blocked by an incoming edge. */
3788
3939
  readonly blocked: "";
3940
+ /** Task is parked (OPEN/parked): open, but set aside on purpose. */
3941
+ readonly parked: "";
3789
3942
  /** Track whose roots merged (diamond dependency). */
3790
3943
  readonly merge: "";
3791
3944
  /** Agent owns more than one task (pane-title multi-count slot). */
@@ -3887,7 +4040,7 @@ declare function receiveHlc(db: Db, remoteHlc: string, now?: number): string;
3887
4040
  /** Every intent mu writes: the local ones (`emitEvent`, for changes no
3888
4041
  * trigger can see) plus the capture-trigger ones (set via
3889
4042
  * `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";
4043
+ 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
4044
  type KnownIntent = CaptureIntent | LocalIntent;
3892
4045
  /** A log row, reduced to what rendering needs. Structural so both
3893
4046
  * `LogRow` (the SDK shape) and raw op rows satisfy it. */
@@ -4826,4 +4979,4 @@ declare function summarizeWorkstream(db: Db, opts: WorkstreamOptions): Promise<W
4826
4979
  */
4827
4980
  declare function teardownWorkstream(db: Db, opts: TeardownWorkstreamOptions): Promise<TeardownResult>;
4828
4981
 
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 };
4982
+ 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 };