@mu-crew/mu 3.9.0 → 3.10.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
@@ -84,6 +84,12 @@ interface HasNextSteps {
84
84
  errorNextSteps(): NextStep[];
85
85
  }
86
86
 
87
+ /**
88
+ * Resolve the canonical mu state directory:
89
+ * MU_STATE_DIR > $XDG_STATE_HOME/mu (absolute only) > ~/.local/state/mu
90
+ */
91
+ declare function defaultStateDir(): string;
92
+
87
93
  type Db = Database;
88
94
  interface OpenDbOptions {
89
95
  /**
@@ -98,11 +104,6 @@ interface OpenDbOptions {
98
104
  */
99
105
  readonly?: boolean;
100
106
  }
101
- /**
102
- * Resolve the canonical mu state directory:
103
- * MU_STATE_DIR > $XDG_STATE_HOME/mu (absolute only) > ~/.local/state/mu
104
- */
105
- declare function defaultStateDir(): string;
106
107
  /**
107
108
  * Resolve the canonical DB path:
108
109
  * MU_DB_PATH > <state-dir>/mu.db
@@ -110,7 +111,8 @@ declare function defaultStateDir(): string;
110
111
  declare function defaultDbPath(): string;
111
112
  /**
112
113
  * Open the mu database. Creates the parent directory and applies the schema
113
- * idempotently on every open. Safe to call from many short-lived processes
114
+ * idempotently when it is missing or differs from this build (an
115
+ * up-to-date DB opens without a write). Safe to call from many short-lived processes
114
116
  * concurrently — WAL mode handles cross-process writes.
115
117
  */
116
118
  declare function openDb(options?: OpenDbOptions): Db;
@@ -150,7 +152,8 @@ declare const CURRENT_SCHEMA_VERSION = 11;
150
152
  /** Tables a healthy DB must contain. Single source of truth so
151
153
  * `mu doctor` and any other consumer don't drift. Adding a new table
152
154
  * = one new entry here AND a CREATE TABLE in CURRENT_SCHEMA, plus a
153
- * CURRENT_SCHEMA_VERSION bump. Sorted; exactly 11 entries in v11. */
155
+ * CURRENT_SCHEMA_VERSION bump (sync_fingerprints went in without one:
156
+ * additive, and an older mu ignores it). Sorted; exactly 12 entries. */
154
157
  declare const EXPECTED_TABLES: readonly string[];
155
158
  /** Op entities that cross machines. Everything else is machine-local.
156
159
  * Readonly tuple (not `string[]`) so `SyncedEntity` is a real union
@@ -194,6 +197,7 @@ type PortableTable = (typeof PORTABLE_TABLES)[number];
194
197
  * machine_identity IS the per-machine identity.
195
198
  * schema_version local bookkeeping.
196
199
  * sync_peers local bookkeeping (per-peer watermarks).
200
+ * sync_fingerprints local cache of what the last clean ingest saw.
197
201
  * task_substates seeded identically on every machine from
198
202
  * TASK_SUBSTATE_ROWS; code, not data.
199
203
  * ops see below — the carrier, not cargo.
@@ -210,7 +214,7 @@ type PortableTable = (typeof PORTABLE_TABLES)[number];
210
214
  * is an FK into `agents`, and `agents` is machine-local. Therefore
211
215
  * OWNERSHIP DOES NOT SYNC. The deleted db-sync.ts reached the same
212
216
  * conclusion via an `includeOwners` flag; here it is structural. */
213
- declare const MACHINE_LOCAL_TABLES: readonly ["agents", "machine_identity", "ops", "schema_version", "sync_peers", "task_substates", "vcs_workspaces"];
217
+ declare const MACHINE_LOCAL_TABLES: readonly ["agents", "machine_identity", "ops", "schema_version", "sync_fingerprints", "sync_peers", "task_substates", "vcs_workspaces"];
214
218
  type MachineLocalTable = (typeof MACHINE_LOCAL_TABLES)[number];
215
219
 
216
220
  /** The multiplexers mu can drive. */
@@ -1357,8 +1361,13 @@ interface VcsBackend {
1357
1361
  * missing refs, the `none` backend which has no notion of "main")
1358
1362
  *
1359
1363
  * Callers treat null as "unknown — render — — and don't warn".
1364
+ *
1365
+ * `mainRefCache`, when given, is shared across the rows of one
1366
+ * decorate call so a backend that must resolve "main" per repo (git's
1367
+ * origin/HEAD probe) does it once per repo, not once per workspace.
1368
+ * Backends that resolve main inside the count command ignore it.
1360
1369
  */
1361
- commitsBehind(workspacePath: string, ref: string): Promise<number | null>;
1370
+ commitsBehind(workspacePath: string, ref: string, mainRefCache?: Map<string, Promise<string | undefined>>): Promise<number | null>;
1362
1371
  /**
1363
1372
  * Rebase the workspace onto `fromRef` (or the backend's tracked
1364
1373
  * base when undefined: `origin/HEAD` for git, `trunk()` for jj/sl).
@@ -1565,6 +1574,9 @@ interface SpawnAgentOptions {
1565
1574
  /** Run the control-socket handshake for pi agents (default true).
1566
1575
  * `false` skips it and reports `ctl: "skipped"`. */
1567
1576
  ctl?: boolean;
1577
+ /** When `name` is taken in the workstream, take the next free one
1578
+ * (see `nextFreeAgentName`) instead of failing with AgentExistsError. */
1579
+ nextFree?: boolean;
1568
1580
  }
1569
1581
  /** Outcome of the spawn-time control-socket handshake. */
1570
1582
  type SpawnCtl = "ok" | "missing" | "refused" | "skipped";
@@ -1717,6 +1729,13 @@ declare class AgentExistsError extends Error implements HasNextSteps {
1717
1729
  constructor(agentName: string);
1718
1730
  errorNextSteps(): NextStep[];
1719
1731
  }
1732
+ /** `spawn --next-free` found no free valid name near the asked one. */
1733
+ declare class AgentNameExhaustedError extends Error implements HasNextSteps {
1734
+ readonly agentName: string;
1735
+ readonly name = "AgentNameExhaustedError";
1736
+ constructor(agentName: string, reason: string);
1737
+ errorNextSteps(): NextStep[];
1738
+ }
1720
1739
  declare class AgentNotFoundError extends Error implements HasNextSteps {
1721
1740
  readonly agentName: string;
1722
1741
  /** Optional workstream context. When set, the message is enriched
@@ -2179,8 +2198,11 @@ declare function listAgents(db: Db, opts?: {
2179
2198
  declare function composeAgentTitle(db: Db, agent: AgentRow): string;
2180
2199
  /** Push a fresh pane title for `agentName`. Best-effort — a missing
2181
2200
  * agent, a placeholder pane id, or a tmux failure are all swallowed
2182
- * silently (titles are decorative; never block the calling verb). */
2183
- declare function refreshAgentTitle(db: Db, agentName: string, workstream: string): Promise<void>;
2201
+ * silently (titles are decorative; never block the calling verb).
2202
+ * `currentTitle` is the pane's live title when the caller already read
2203
+ * it (reconcile); the write is skipped when it equals the new title,
2204
+ * since each retitle is a mux server write plus a status redraw. */
2205
+ declare function refreshAgentTitle(db: Db, agentName: string, workstream: string, currentTitle?: string): Promise<void>;
2184
2206
  /**
2185
2207
  * Delete an agent row. Returns true if a row was matched. Idempotent;
2186
2208
  * deleting an agent that doesn't exist returns false without throwing.
@@ -4279,8 +4301,9 @@ interface CheapDriftReport {
4279
4301
  /**
4280
4302
  * Every live row must have at least one op naming its natural key.
4281
4303
  *
4282
- * ~1ms on a 200-task DB: four indexed NOT EXISTS scans, no rebuild, no
4283
- * temp file. Cheap enough to run on every `mu doctor`.
4304
+ * Four indexed NOT EXISTS scans, no rebuild, no temp file: ~10 ms on a
4305
+ * 2.3k-task, 10.7k-note, 67k-op DB. Cheap enough to run on every `mu
4306
+ * doctor` and the TUI slow tick.
4284
4307
  *
4285
4308
  * WHAT IT CATCHES: a row that exists with no history — an uncaptured
4286
4309
  * INSERT, or a mutation path that bypassed the triggers entirely.
@@ -4338,11 +4361,15 @@ declare class DriftDetectedError extends Error implements HasNextSteps {
4338
4361
 
4339
4362
  /** Sub-directory of the state dir holding lock directories. */
4340
4363
  declare function locksDir(): string;
4341
- interface FileLockOptions {
4364
+ interface FileLockOptions<T = unknown> {
4342
4365
  acquireTimeoutMs?: number;
4343
4366
  staleLockMs?: number;
4344
4367
  /** Env var consulted for the acquire timeout, if any. */
4345
4368
  timeoutEnvVar?: string;
4369
+ /** Run instead of `fn` when the lock cannot be taken (contended past
4370
+ * the deadline, or the lock dir cannot be created). Absent, `fn` runs
4371
+ * unlocked. */
4372
+ onUnavailable?: () => T;
4346
4373
  }
4347
4374
  /**
4348
4375
  * Run `fn` while holding the lock directory at `lockPath`.
@@ -4351,7 +4378,7 @@ interface FileLockOptions {
4351
4378
  * Records pid + acquisition time in `meta.json` for stale-lock
4352
4379
  * diagnostics.
4353
4380
  */
4354
- declare function withFileLock<T>(lockPath: string, label: string, fn: () => Promise<T>, opts?: FileLockOptions): Promise<T>;
4381
+ declare function withFileLock<T>(lockPath: string, label: string, fn: () => Promise<T>, opts?: FileLockOptions<T>): Promise<T>;
4355
4382
  /** Read a held lock's metadata, or null. Exposed for tests. */
4356
4383
  declare function readFileLockMeta(lockPath: string): Promise<{
4357
4384
  pid: number;
@@ -4827,6 +4854,39 @@ interface RebuildOptions {
4827
4854
  */
4828
4855
  declare function rebuildInto(source: Db, opts: RebuildOptions): RebuildReport;
4829
4856
 
4857
+ /** Serialisable running state: eight hash words (hex), bytes hashed so
4858
+ * far, and the partial trailing block not yet compressed (base64). */
4859
+ interface Sha256State {
4860
+ h: string;
4861
+ n: number;
4862
+ tail: string;
4863
+ }
4864
+
4865
+ /** Whole-file verification sidecar. */
4866
+ interface SegmentManifest {
4867
+ v: number;
4868
+ machine: string;
4869
+ count: number;
4870
+ lastHlc: string | null;
4871
+ sha256: string;
4872
+ updatedAt: string;
4873
+ /** Bytes of the segment `sha256` covers. Written by the owner so its
4874
+ * next flush can trust this manifest instead of rescanning; absent in
4875
+ * manifests from older builds. */
4876
+ size?: number;
4877
+ /** The segment's mtime when this manifest was written (owner-local). */
4878
+ mtimeMs?: number;
4879
+ /** Running hash state after `size` bytes, so an append rehashes only
4880
+ * what it added. */
4881
+ shaState?: Sha256State;
4882
+ /** sha256 over the fields above (`manifestSeal`). The owner trusts
4883
+ * count/size/shaState only when it matches, so a torn or hand-edited
4884
+ * manifest falls back to the full scan instead of being persisted. */
4885
+ seal?: string;
4886
+ }
4887
+ /** Read a segment's manifest, or null when absent/unparsable. */
4888
+ declare function readManifest(segment: string): SegmentManifest | null;
4889
+
4830
4890
  /** Current segment line format. Bumped only on a breaking shape change;
4831
4891
  * a reader that sees a version it does not know REFUSES the line rather
4832
4892
  * than guessing at its meaning. */
@@ -4845,15 +4905,6 @@ interface SegmentLine {
4845
4905
  payload: unknown;
4846
4906
  crc: string;
4847
4907
  }
4848
- /** Whole-file verification sidecar. */
4849
- interface SegmentManifest {
4850
- v: number;
4851
- machine: string;
4852
- count: number;
4853
- lastHlc: string | null;
4854
- sha256: string;
4855
- updatedAt: string;
4856
- }
4857
4908
  /** Why a segment line was rejected. Reported, never silently swallowed. */
4858
4909
  type SegmentDefectKind = "torn-write" | "manifest-mismatch" | "crc-mismatch" | "non-monotonic-hlc" | "unknown-version" | "malformed-shape" | "entity-not-synced" | "duplicate-op";
4859
4910
  interface SegmentDefect {
@@ -4882,7 +4933,10 @@ interface FlushResult {
4882
4933
  appended: number;
4883
4934
  /** Total lines in the segment afterwards. */
4884
4935
  total: number;
4885
- /** Ops skipped because their entity is machine-local. */
4936
+ /** Ops skipped because their entity is machine-local. A full scan
4937
+ * (`verify`, or an untrusted manifest) counts every unflushed one; the
4938
+ * fast path counts only those up to the last op it appended, so a
4939
+ * no-op ambient flush reports 0 (see `pendingLines`). */
4886
4940
  skippedLocal: number;
4887
4941
  /**
4888
4942
  * Non-null when THIS MACHINE'S OWN segment was found defective past
@@ -4898,34 +4952,22 @@ interface FlushResult {
4898
4952
  * to be (`mu sync`, `ambientFlush`).
4899
4953
  */
4900
4954
  selfRepaired: SegmentDefect | null;
4955
+ /**
4956
+ * True when ops were pending but another process held the segment
4957
+ * lock past the wait, so this call wrote nothing. The ops stay
4958
+ * unflushed in `ops` (the segment's last hlc is the watermark), and
4959
+ * the next flush appends them. Never set on a successful flush.
4960
+ */
4961
+ lockBusy?: boolean;
4901
4962
  }
4902
- /**
4903
- * Append this machine's not-yet-flushed ops to its own segment.
4904
- *
4905
- * FILTERING IS LOAD-BEARING. Only ops whose entity is in
4906
- * `SYNCED_ENTITIES` are written. Machine-local ops (agent.*, workspace.*)
4907
- * are captured and DO appear in `mu log`, but they must never reach a
4908
- * segment: they carry pane ids and absolute paths that are meaningless,
4909
- * and frequently wrong, on another machine. "Not synced" is not "not
4910
- * logged".
4911
- *
4912
- * Also filters `machine_id = <me>`: a segment holds ONE machine's ops.
4913
- * Ops ingested from a peer live in our `ops` table too, and re-flushing
4914
- * them into our own segment would duplicate a peer's history under our
4915
- * name — and would grow without bound as two machines echoed each other.
4916
- *
4917
- * The high-water mark is the last hlc already in the file (read from the
4918
- * manifest when present, else derived by scanning), so flush is
4919
- * incremental and idempotent: calling it twice appends nothing the second
4920
- * time.
4921
- */
4922
- declare function flushSegment(db: Db, dir?: string | null): Promise<FlushResult>;
4963
+ declare function flushSegment(db: Db, dir?: string | null, opts?: {
4964
+ verify?: boolean;
4965
+ lockWaitMs?: number;
4966
+ }): Promise<FlushResult>;
4923
4967
  /** Number of GOOD lines in a segment (stopping at the first defect, as
4924
4968
  * ingest does). The denominator of "how far behind am I" — exported for
4925
4969
  * `mu sync`'s peer table. */
4926
4970
  declare function segmentLineCount(path: string): number;
4927
- /** Read a segment's manifest, or null when absent/unparsable. */
4928
- declare function readManifest(segment: string): SegmentManifest | null;
4929
4971
  /**
4930
4972
  * Verify a segment against its manifest (layer 4).
4931
4973
  *
@@ -4984,7 +5026,14 @@ declare function discoverPeers(dir: string, selfMachineId: string): PeerSegment[
4984
5026
  * nothing here).
4985
5027
  */
4986
5028
  declare function getWatermark(db: Db, watermarkKey: string): number;
4987
- declare function setWatermark(db: Db, watermarkKey: string, value: number): void;
5029
+ /**
5030
+ * Store a watermark and stamp `last_seen_at` with the ISO time. The
5031
+ * segment fingerprint goes to `sync_fingerprints` when the caller just
5032
+ * read the file cleanly to its end (`segmentCaughtUp`). Every other
5033
+ * write deletes it, so a reset or partial ingest never vouches for the
5034
+ * file.
5035
+ */
5036
+ declare function setWatermark(db: Db, watermarkKey: string, value: number, fingerprint?: string | null): void;
4988
5037
  /** Reset a peer's watermark so the next ingest re-reads from zero. The
4989
5038
  * universal repair, safe because ingest is idempotent. */
4990
5039
  declare function resetWatermark(db: Db, watermarkKey: string): void;
@@ -5042,7 +5091,9 @@ interface IngestResult {
5042
5091
  * which is what makes "laptop edits after seeing the devserver's op" order
5043
5092
  * correctly rather than losing to it.
5044
5093
  */
5045
- declare function ingestSegment(db: Db, peer: PeerSegment): IngestResult;
5094
+ declare function ingestSegment(db: Db, peer: PeerSegment, opts?: {
5095
+ verify?: boolean;
5096
+ }): IngestResult;
5046
5097
  /**
5047
5098
  * Apply ONE incoming op and record it in the local `ops` table.
5048
5099
  *
@@ -5197,8 +5248,12 @@ declare function ambientIngest(db: Db, opts?: AmbientOptions): Promise<AmbientRe
5197
5248
  * laptop followed by `mu sync` on the devserver would show nothing —
5198
5249
  * exactly the no-hands claim, broken.
5199
5250
  *
5200
- * Runs under the cross-process file lock inside `flushSegment`, so two
5201
- * concurrent mu processes cannot interleave partial lines.
5251
+ * Appends under the cross-process file lock inside `flushSegment`, so
5252
+ * two concurrent mu processes cannot interleave partial lines. A flush
5253
+ * with nothing to append skips the lock, so read-only verbs never queue.
5254
+ * A flush that cannot take the lock within AMBIENT_FLUSH_LOCK_WAIT_MS
5255
+ * writes nothing (`lockBusy`) and the verb carries on silently: its ops
5256
+ * stay pending in `ops` and the next invocation's flush appends them.
5202
5257
  */
5203
5258
  declare function ambientFlush(db: Db, opts?: AmbientOptions): Promise<FlushResult | null>;
5204
5259
  /**
@@ -5635,4 +5690,4 @@ declare function summarizeWorkstream(db: Db, opts: WorkstreamOptions): Promise<W
5635
5690
  */
5636
5691
  declare function teardownWorkstream(db: Db, opts: TeardownWorkstreamOptions): Promise<TeardownResult>;
5637
5692
 
5638
- export { AGENT_STATE_GLYPH, type AbortAgentOptions, type AbortResult, type AddNoteOptions, type AddTaskOptions, type AdoptAgentOptions, type AdoptAgentResult, AgentAbortNeedsCtlError, AgentAbortTimeoutError, AgentBusyError, AgentCtlUnreachableError, AgentDiedOnSpawnError, AgentExistsError, AgentExtensionOutdatedError, AgentFreshNeedsCtlError, AgentNotFoundError, AgentNotInWorkstreamError, type AgentRow, AgentSlashCommandUnsupportedError, 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, type CtlLink, 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, GroupIdAmbiguousError, type GroupSummary, HazardFailError, 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, LinkConflictError, type LinkState, type LinkStatus, type ListLiveAgentsOptions, type ListLogsOptions, type ListNotesOptions, type ListReadyOptions, type ListTasksOptions, type LiveAgent, type LiveAgentsView, type LoadFullDagOptions, type LoadWorkstreamSnapshotOptions, type LocalIntent, type LogKind, LogKindReservedError, type LogRow, MACHINE_LOCAL_ENTITIES, MACHINE_LOCAL_TABLES, MU_SHIM_MARKER, 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, PaneNotInSessionError, type ParkTaskOptions, type PeerSegment, type PeerStatus, type PortableTable, ReaperDetectedDuringWaitError, 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, SchemaTooNewError, SchemaTooOldError, type SegmentDefect, type SegmentDefectKind, type SegmentLine, type SegmentManifest, type SendOptions, type SendResult, type SendWarning, type SetStatusOptions, type SetStatusResult, type SlugifyResult, type SpawnAgentOptions, type SplitWindowOptions, StallDetectedDuringWaitError, 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, TaskClaimStaleWorkspaceError, type TaskEdgeWithStatus, type TaskEdges, type TaskEdgesWithStatus, TaskExistsError, TaskIdInvalidError, TaskInTriageError, TaskNotFoundError, TaskNotInWorkstreamError, type TaskNoteRow, type TaskPair, TaskParkStateError, TaskParkedError, type TaskRow, type TaskStatus, type TaskSubstate, TaskTitleSlugEmptyError, type TaskWaitOptions, type TaskWaitRef, type TaskWaitResult, type TaskWaitTaskState, type TeardownResult, TmuxError, type TmuxExecResult, type TmuxExecutor, type TmuxPane, type TmuxSession, type TmuxWindow, type Track, type Transport, UNKNOWN_REASON, UndoGroupNotFoundError, type UndoOptions, type UndoPlan, type UndoResult, UndoSupersededError, type UpdateTaskOptions, type UpdateTaskResult, type VcsBackend, type VcsBackendName, WORKSPACE_STALE_THRESHOLD, WorkspaceConflictError, WorkspaceDirtyError, WorkspaceExistsError, type WorkspaceFailure, WorkspaceNotFoundError, type WorkspaceOrphan, WorkspacePathNotEmptyError, WorkspacePreservedError, type WorkspaceRow, type WorkspaceStaleness, WorkspaceVcsRequiredError, WorkstreamExistsError, WorkstreamNameInvalidError, WorkstreamNameReservedError, WorkstreamNotFoundError, type WorkstreamOptions, type WorkstreamSnapshot, type WorkstreamSnapshotSlowFields, type WorkstreamSummary, abortAgent, acceptTask, 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, ctlRuntimeState, currentAgentName, currentOpContext, currentPaneTitle, decorateWithDirty, decorateWithStaleness, defaultDbPath, defaultSendDelayMs, defaultSendReadinessMs, defaultSpawnLivenessMs, defaultStateDir, deleteAgent, deleteTask, detectBackend, detectMux, discoverPeers, driftRemediation, emitEvent, ensureWorkstream, envVarNameForCli, expectsCtl, 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, inspectLinks, installCapture, interruptAgent, isKickSignal, isPathInside, isTaskStatus, isValidAgentName, isValidPair, isValidPaneId, isValidTaskId, isValidWorkstreamName, isWorkspaceStale, jjBackend, kickAgent, killPane, killSession, latestSeq, linkPi, linkSkill, 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, sendViaTransport, 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 };
5693
+ export { AGENT_STATE_GLYPH, type AbortAgentOptions, type AbortResult, type AddNoteOptions, type AddTaskOptions, type AdoptAgentOptions, type AdoptAgentResult, AgentAbortNeedsCtlError, AgentAbortTimeoutError, AgentBusyError, AgentCtlUnreachableError, AgentDiedOnSpawnError, AgentExistsError, AgentExtensionOutdatedError, AgentFreshNeedsCtlError, AgentNameExhaustedError, AgentNotFoundError, AgentNotInWorkstreamError, type AgentRow, AgentSlashCommandUnsupportedError, 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, type CtlLink, 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, GroupIdAmbiguousError, type GroupSummary, HazardFailError, 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, LinkConflictError, type LinkState, type LinkStatus, type ListLiveAgentsOptions, type ListLogsOptions, type ListNotesOptions, type ListReadyOptions, type ListTasksOptions, type LiveAgent, type LiveAgentsView, type LoadFullDagOptions, type LoadWorkstreamSnapshotOptions, type LocalIntent, type LogKind, LogKindReservedError, type LogRow, MACHINE_LOCAL_ENTITIES, MACHINE_LOCAL_TABLES, MU_SHIM_MARKER, 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, PaneNotInSessionError, type ParkTaskOptions, type PeerSegment, type PeerStatus, type PortableTable, ReaperDetectedDuringWaitError, 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, SchemaTooNewError, SchemaTooOldError, type SegmentDefect, type SegmentDefectKind, type SegmentLine, type SegmentManifest, type SendOptions, type SendResult, type SendWarning, type SetStatusOptions, type SetStatusResult, type SlugifyResult, type SpawnAgentOptions, type SplitWindowOptions, StallDetectedDuringWaitError, 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, TaskClaimStaleWorkspaceError, type TaskEdgeWithStatus, type TaskEdges, type TaskEdgesWithStatus, TaskExistsError, TaskIdInvalidError, TaskInTriageError, TaskNotFoundError, TaskNotInWorkstreamError, type TaskNoteRow, type TaskPair, TaskParkStateError, TaskParkedError, type TaskRow, type TaskStatus, type TaskSubstate, TaskTitleSlugEmptyError, type TaskWaitOptions, type TaskWaitRef, type TaskWaitResult, type TaskWaitTaskState, type TeardownResult, TmuxError, type TmuxExecResult, type TmuxExecutor, type TmuxPane, type TmuxSession, type TmuxWindow, type Track, type Transport, UNKNOWN_REASON, UndoGroupNotFoundError, type UndoOptions, type UndoPlan, type UndoResult, UndoSupersededError, type UpdateTaskOptions, type UpdateTaskResult, type VcsBackend, type VcsBackendName, WORKSPACE_STALE_THRESHOLD, WorkspaceConflictError, WorkspaceDirtyError, WorkspaceExistsError, type WorkspaceFailure, WorkspaceNotFoundError, type WorkspaceOrphan, WorkspacePathNotEmptyError, WorkspacePreservedError, type WorkspaceRow, type WorkspaceStaleness, WorkspaceVcsRequiredError, WorkstreamExistsError, WorkstreamNameInvalidError, WorkstreamNameReservedError, WorkstreamNotFoundError, type WorkstreamOptions, type WorkstreamSnapshot, type WorkstreamSnapshotSlowFields, type WorkstreamSummary, abortAgent, acceptTask, 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, ctlRuntimeState, currentAgentName, currentOpContext, currentPaneTitle, decorateWithDirty, decorateWithStaleness, defaultDbPath, defaultSendDelayMs, defaultSendReadinessMs, defaultSpawnLivenessMs, defaultStateDir, deleteAgent, deleteTask, detectBackend, detectMux, discoverPeers, driftRemediation, emitEvent, ensureWorkstream, envVarNameForCli, expectsCtl, 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, inspectLinks, installCapture, interruptAgent, isKickSignal, isPathInside, isTaskStatus, isValidAgentName, isValidPair, isValidPaneId, isValidTaskId, isValidWorkstreamName, isWorkspaceStale, jjBackend, kickAgent, killPane, killSession, latestSeq, linkPi, linkSkill, 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, sendViaTransport, 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 };