@mu-crew/mu 1.6.0 → 2.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/README.md +11 -15
- package/dist/cli.js +2603 -2283
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +97 -121
- package/dist/index.js +2677 -2425
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +36 -40
- package/docs/ROADMAP.md +20 -105
- package/docs/USAGE_GUIDE.md +23 -24
- package/docs/VISION.md +11 -21
- package/docs/VOCABULARY.md +22 -35
- package/docs/specs/2026-09-28-agent-state-from-murmur.md +333 -0
- package/package.json +1 -1
- package/skills/mu/REMOTE_WORKERS.md +31 -38
- package/skills/mu/SKILL.md +16 -21
- package/docs/.m-reflow-5f7exa_b.md +0 -509
- package/docs/.m-reflow-5v_034rw.md +0 -545
- package/docs/.m-reflow-7yaw8ubc.md +0 -513
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import { Database } from 'better-sqlite3';
|
|
2
2
|
|
|
3
|
+
type RuntimeState = "busy" | "needs_input" | "needs_permission" | "unknown";
|
|
4
|
+
type StateSource = "murmur" | "herdr" | "none";
|
|
5
|
+
interface StateReading {
|
|
6
|
+
state: RuntimeState;
|
|
7
|
+
source: StateSource;
|
|
8
|
+
since: number | null;
|
|
9
|
+
alive: boolean;
|
|
10
|
+
reason?: string;
|
|
11
|
+
}
|
|
12
|
+
interface StateAgentRef {
|
|
13
|
+
name: string;
|
|
14
|
+
workstreamName: string;
|
|
15
|
+
paneId: string;
|
|
16
|
+
}
|
|
17
|
+
declare const UNKNOWN_REASON: {
|
|
18
|
+
readonly murmurMissing: "murmur not installed";
|
|
19
|
+
readonly extensionMissing: "murmur pi extension not linked";
|
|
20
|
+
readonly noRow: "murmur has no row";
|
|
21
|
+
readonly stale: "remote snapshot stale";
|
|
22
|
+
readonly herdrNone: "herdr reports no state";
|
|
23
|
+
readonly paneGone: "pane gone";
|
|
24
|
+
};
|
|
25
|
+
declare function agentKey(a: {
|
|
26
|
+
name: string;
|
|
27
|
+
workstreamName: string;
|
|
28
|
+
}): string;
|
|
29
|
+
declare function murmurAvailable(): boolean;
|
|
30
|
+
declare function readAgentStates(agents: readonly StateAgentRef[], opts?: {
|
|
31
|
+
now?: number;
|
|
32
|
+
}): Promise<Map<string, StateReading>>;
|
|
33
|
+
|
|
3
34
|
/**
|
|
4
35
|
* One actionable next step. The `intent` is human-prose ("Drop notes
|
|
5
36
|
* as you work"); the `command` is a literal shell command the user (or
|
|
@@ -135,70 +166,10 @@ type PortableTable = (typeof PORTABLE_TABLES)[number];
|
|
|
135
166
|
declare const MACHINE_LOCAL_TABLES: readonly ["agents", "machine_identity", "ops", "schema_version", "sync_peers", "vcs_workspaces"];
|
|
136
167
|
type MachineLocalTable = (typeof MACHINE_LOCAL_TABLES)[number];
|
|
137
168
|
|
|
138
|
-
/**
|
|
139
|
-
* The full agent lifecycle status. Most values are scrollback-derived
|
|
140
|
-
* (`DetectedStatus`); the rest are set by the lifecycle layer.
|
|
141
|
-
*/
|
|
142
|
-
type AgentStatus = "spawning" | "busy" | "needs_input" | "needs_permission" | "free" | "unreachable" | "terminated";
|
|
143
|
-
/** Status that can be inferred from pane scrollback. */
|
|
144
|
-
type DetectedStatus = "busy" | "needs_input" | "needs_permission";
|
|
145
|
-
/**
|
|
146
|
-
* Run the detector against pane scrollback and return the inferred
|
|
147
|
-
* status. Permission overrides busy.
|
|
148
|
-
*/
|
|
149
|
-
declare function detectPiStatus(scrollback: string): DetectedStatus;
|
|
150
|
-
/**
|
|
151
|
-
* Public for tests — extract the tail window the detector actually
|
|
152
|
-
* inspects. Take last TAIL_WINDOW_LINES, strip trailing blanks, take
|
|
153
|
-
* last TAIL_LINES.
|
|
154
|
-
*/
|
|
155
|
-
declare function extractTail(scrollback: string): string;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Agent status → glyph, used by CLI and TUI status surfaces.
|
|
159
|
-
*/
|
|
160
|
-
declare const AGENT_STATUS_GLYPH: Record<AgentStatus, string>;
|
|
161
|
-
/**
|
|
162
|
-
* Single rendering helper for agent status glyphs. Keep callers off
|
|
163
|
-
* AGENT_STATUS_GLYPH indexing so the fallback policy stays in one place.
|
|
164
|
-
*/
|
|
165
|
-
declare function agentStatusGlyph(status: AgentStatus): string;
|
|
166
|
-
/**
|
|
167
|
-
* Non-agent state glyphs, keyed by what they MEAN rather than what
|
|
168
|
-
* they look like. A call site asks for `GLYPH.stale`, never for a
|
|
169
|
-
* clock — so re-pointing the clock is a one-line edit here.
|
|
170
|
-
*
|
|
171
|
-
* `ok` / `fail` / `warn` deliberately reuse the same codepoints as the
|
|
172
|
-
* agent statuses they rhyme with (`free`, `terminated`): a check-circle
|
|
173
|
-
* means "fine" whether the row is an agent, a workspace or a doctor
|
|
174
|
-
* check.
|
|
175
|
-
*/
|
|
176
|
-
declare const GLYPH: {
|
|
177
|
-
/** Healthy, clean, passing, closed-successfully. */
|
|
178
|
-
readonly ok: "";
|
|
179
|
-
/** Failed check. */
|
|
180
|
-
readonly fail: "";
|
|
181
|
-
/** Needs attention but not broken (idle-but-assigned, stale warning). */
|
|
182
|
-
readonly warn: "";
|
|
183
|
-
/** Workspace has uncommitted edits. */
|
|
184
|
-
readonly dirty: "";
|
|
185
|
-
/** Workspace is ≥ WORKSPACE_STALE_THRESHOLD commits behind main. */
|
|
186
|
-
readonly stale: "";
|
|
187
|
-
/** Task is blocked by an incoming edge. */
|
|
188
|
-
readonly blocked: "";
|
|
189
|
-
/** Track whose roots merged (diamond dependency). */
|
|
190
|
-
readonly merge: "";
|
|
191
|
-
/** Agent owns more than one task (pane-title multi-count slot). */
|
|
192
|
-
readonly multi: "";
|
|
193
|
-
/** Filter toggle: enabled / disabled. */
|
|
194
|
-
readonly on: "";
|
|
195
|
-
readonly off: "";
|
|
196
|
-
/** Status outside the known enum. */
|
|
197
|
-
readonly unknown: "";
|
|
198
|
-
};
|
|
199
|
-
|
|
200
169
|
/** The multiplexers mu can drive. */
|
|
201
170
|
type MuxBackendName = "herdr" | "tmux";
|
|
171
|
+
/** Runtime states a mux backend can report directly for one pane. */
|
|
172
|
+
type MuxPaneStatus = "busy" | "needs_input" | "needs_permission";
|
|
202
173
|
interface MuxSession {
|
|
203
174
|
name: string;
|
|
204
175
|
}
|
|
@@ -458,22 +429,11 @@ interface MuxBackend {
|
|
|
458
429
|
sendToPane(paneId: string, text: string, opts?: SendOptions): Promise<void>;
|
|
459
430
|
capturePane(paneId: string, opts?: CaptureOptions): Promise<string>;
|
|
460
431
|
/**
|
|
461
|
-
* The pane's
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* OPTIONAL by design, and the one place the two backends genuinely
|
|
465
|
-
* differ in kind rather than in syntax. tmux knows nothing about what
|
|
466
|
-
* runs inside a pane, so it omits this and mu falls back to scraping
|
|
467
|
-
* scrollback with the per-CLI detector in `src/detect.ts`. herdr
|
|
468
|
-
* watches the terminal continuously across every agent kind it
|
|
469
|
-
* recognises, so it implements this and the detector is BYPASSED
|
|
470
|
-
* entirely — guessing from a 100-line tail would be strictly worse
|
|
471
|
-
* information than the substrate's own answer.
|
|
472
|
-
*
|
|
473
|
-
* Absent method ⇒ "ask the detector". Present-but-undefined result ⇒
|
|
474
|
-
* "this pane has no status", NOT "free": no detector may mint `free`.
|
|
432
|
+
* The pane's runtime state as the mux itself reports it, or undefined
|
|
433
|
+
* when the pane is gone or unclassified. tmux omits this capability;
|
|
434
|
+
* herdr reports it directly.
|
|
475
435
|
*/
|
|
476
|
-
paneStatus?(paneId: string): Promise<
|
|
436
|
+
paneStatus?(paneId: string): Promise<MuxPaneStatus | undefined>;
|
|
477
437
|
enableMuPaneBordersForSession(session: string): Promise<number>;
|
|
478
438
|
enableMuPaneBordersForPane(paneId: string): Promise<void>;
|
|
479
439
|
/** Copy-pasteable shell line that lands the user on `target`. */
|
|
@@ -570,9 +530,8 @@ declare class HerdrSyntaxError extends Error {
|
|
|
570
530
|
*
|
|
571
531
|
* A REFUSAL, not a fallback. herdr's `pane run <command>` would happily
|
|
572
532
|
* start the binary, but herdr would then never classify that pane, and
|
|
573
|
-
* on this backend herdr's
|
|
574
|
-
*
|
|
575
|
-
* but never observe is the same family of failure as a pane mu records
|
|
533
|
+
* on this backend herdr's report is mu's runtime state source. A pane
|
|
534
|
+
* mu can start but never observe is the same family of failure as a pane mu records
|
|
576
535
|
* with nothing running in it: it looks fine and lies forever.
|
|
577
536
|
*
|
|
578
537
|
* Not a `MuxError`: the substrate is healthy and answered precisely.
|
|
@@ -955,9 +914,8 @@ declare function hasWorkMarker(scrollback: string): boolean;
|
|
|
955
914
|
*
|
|
956
915
|
* Because the blocker is a model call, no fixed sleep can be correct —
|
|
957
916
|
* `sleep 2` is a coin flip, not a fix. The signal already existed: pi's
|
|
958
|
-
* spinner is a Braille glyph
|
|
959
|
-
*
|
|
960
|
-
* mechanism, matching `awaitSpawnReadiness` in src/agents/spawn.ts.
|
|
917
|
+
* spinner is a Braille glyph, so the private input-timing helper can wait
|
|
918
|
+
* for it to clear before sending.
|
|
961
919
|
*
|
|
962
920
|
* `needs_permission` counts as ready: a pane sitting on a confirm
|
|
963
921
|
* dialog is waiting for a keystroke, and refusing to send would break
|
|
@@ -1054,6 +1012,7 @@ type mux_MuxError = MuxError;
|
|
|
1054
1012
|
declare const mux_MuxError: typeof MuxError;
|
|
1055
1013
|
type mux_MuxHealth = MuxHealth;
|
|
1056
1014
|
type mux_MuxPane = MuxPane;
|
|
1015
|
+
type mux_MuxPaneStatus = MuxPaneStatus;
|
|
1057
1016
|
type mux_MuxSession = MuxSession;
|
|
1058
1017
|
type mux_MuxWindow = MuxWindow;
|
|
1059
1018
|
type mux_NewSessionOptions = NewSessionOptions;
|
|
@@ -1079,7 +1038,7 @@ declare const mux_setHerdrExecutor: typeof setHerdrExecutor;
|
|
|
1079
1038
|
declare const mux_setMuxForTests: typeof setMuxForTests;
|
|
1080
1039
|
declare const mux_tmuxBackend: typeof tmuxBackend;
|
|
1081
1040
|
declare namespace mux {
|
|
1082
|
-
export { type mux_AttachTarget as AttachTarget, type mux_CaptureOptions as CaptureOptions, mux_HerdrCommandOverrideError as HerdrCommandOverrideError, mux_HerdrError as HerdrError, mux_HerdrNotImplementedError as HerdrNotImplementedError, mux_HerdrSyntaxError as HerdrSyntaxError, mux_HerdrUnsupportedCliError as HerdrUnsupportedCliError, mux_HerdrWorkspaceGroupCloseError as HerdrWorkspaceGroupCloseError, type mux_MuxBackend as MuxBackend, type mux_MuxBackendName as MuxBackendName, type mux_MuxCommand as MuxCommand, type mux_MuxDiagnostics as MuxDiagnostics, mux_MuxError as MuxError, type mux_MuxHealth as MuxHealth, type mux_MuxPane as MuxPane, type mux_MuxSession as MuxSession, type mux_MuxWindow as MuxWindow, type mux_NewSessionOptions as NewSessionOptions, type mux_NewSessionWithPaneOptions as NewSessionWithPaneOptions, type mux_NewWindowOptions as NewWindowOptions, mux_NoMultiplexerError as NoMultiplexerError, mux_PaneNotFoundError as PaneNotFoundError, type mux_SendOptions as SendOptions, type mux_SendWarning as SendWarning, type mux_SplitWindowOptions as SplitWindowOptions, type mux_StartAgentInPaneOptions as StartAgentInPaneOptions, mux_activeMux as activeMux, mux_detectMux as detectMux, mux_herdrBackend as herdrBackend, mux_isHerdrStatusUsable as isHerdrStatusUsable, mux_muxByName as muxByName, mux_parseAgentNameFromTitle as parseAgentNameFromTitle, mux_resetHerdrExecutor as resetHerdrExecutor, mux_resetMux as resetMux, mux_setHerdrExecutor as setHerdrExecutor, mux_setMuxForTests as setMuxForTests, mux_tmuxBackend as tmuxBackend };
|
|
1041
|
+
export { type mux_AttachTarget as AttachTarget, type mux_CaptureOptions as CaptureOptions, mux_HerdrCommandOverrideError as HerdrCommandOverrideError, mux_HerdrError as HerdrError, mux_HerdrNotImplementedError as HerdrNotImplementedError, mux_HerdrSyntaxError as HerdrSyntaxError, mux_HerdrUnsupportedCliError as HerdrUnsupportedCliError, mux_HerdrWorkspaceGroupCloseError as HerdrWorkspaceGroupCloseError, type mux_MuxBackend as MuxBackend, type mux_MuxBackendName as MuxBackendName, type mux_MuxCommand as MuxCommand, type mux_MuxDiagnostics as MuxDiagnostics, mux_MuxError as MuxError, type mux_MuxHealth as MuxHealth, type mux_MuxPane as MuxPane, type mux_MuxPaneStatus as MuxPaneStatus, type mux_MuxSession as MuxSession, type mux_MuxWindow as MuxWindow, type mux_NewSessionOptions as NewSessionOptions, type mux_NewSessionWithPaneOptions as NewSessionWithPaneOptions, type mux_NewWindowOptions as NewWindowOptions, mux_NoMultiplexerError as NoMultiplexerError, mux_PaneNotFoundError as PaneNotFoundError, type mux_SendOptions as SendOptions, type mux_SendWarning as SendWarning, type mux_SplitWindowOptions as SplitWindowOptions, type mux_StartAgentInPaneOptions as StartAgentInPaneOptions, mux_activeMux as activeMux, mux_detectMux as detectMux, mux_herdrBackend as herdrBackend, mux_isHerdrStatusUsable as isHerdrStatusUsable, mux_muxByName as muxByName, mux_parseAgentNameFromTitle as parseAgentNameFromTitle, mux_resetHerdrExecutor as resetHerdrExecutor, mux_resetMux as resetMux, mux_setHerdrExecutor as setHerdrExecutor, mux_setMuxForTests as setMuxForTests, mux_tmuxBackend as tmuxBackend };
|
|
1083
1042
|
}
|
|
1084
1043
|
|
|
1085
1044
|
/**
|
|
@@ -1130,9 +1089,6 @@ interface ReconcileReport {
|
|
|
1130
1089
|
* this is the count of rows that WOULD have been pruned; in `full`
|
|
1131
1090
|
* mode it's the count actually deleted. */
|
|
1132
1091
|
prunedGhosts: number;
|
|
1133
|
-
/** Number of agents whose status was changed by scrollback detection.
|
|
1134
|
-
* Always 0 in `report-only` mode (status detection is skipped). */
|
|
1135
|
-
statusChanges: number;
|
|
1136
1092
|
/** Panes in the workstream's tmux session that look like agents but
|
|
1137
1093
|
* aren't in the registry. NOT auto-adopted. */
|
|
1138
1094
|
orphans: MuxPane[];
|
|
@@ -1823,7 +1779,6 @@ interface AgentRow {
|
|
|
1823
1779
|
workstreamName: string;
|
|
1824
1780
|
cli: string;
|
|
1825
1781
|
paneId: string;
|
|
1826
|
-
status: AgentStatus;
|
|
1827
1782
|
role: string;
|
|
1828
1783
|
/** Window name; null when the agent has its own window named after itself. */
|
|
1829
1784
|
tab: string | null;
|
|
@@ -1831,27 +1786,19 @@ interface AgentRow {
|
|
|
1831
1786
|
createdAt: string;
|
|
1832
1787
|
/** ISO 8601 timestamp. */
|
|
1833
1788
|
updatedAt: string;
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
*
|
|
1842
|
-
* Surfaces the third lifecycle state (alive but assigned, no recent
|
|
1843
|
-
* progress) to `mu state` renders + `mu state --json`. Omitted (i.e.
|
|
1844
|
-
* absent — NOT `false`) when the predicate doesn't fire, so JSON
|
|
1845
|
-
* consumers can do a simple `if (agent.idle)` check and the field
|
|
1846
|
-
* stays out of the way for callers that don't care.
|
|
1847
|
-
*/
|
|
1789
|
+
}
|
|
1790
|
+
interface LiveAgent extends AgentRow {
|
|
1791
|
+
state: RuntimeState;
|
|
1792
|
+
source: StateSource;
|
|
1793
|
+
/** ISO 8601 time when the source entered this state. */
|
|
1794
|
+
since: string | null;
|
|
1795
|
+
reason?: string;
|
|
1848
1796
|
idle?: boolean;
|
|
1849
1797
|
}
|
|
1850
1798
|
interface InsertAgentInput {
|
|
1851
1799
|
name: string;
|
|
1852
1800
|
workstream: string;
|
|
1853
1801
|
paneId: string;
|
|
1854
|
-
status: AgentStatus;
|
|
1855
1802
|
/** Defaults to "pi" via schema DEFAULT. */
|
|
1856
1803
|
cli?: string;
|
|
1857
1804
|
/** Defaults to "full-access" via schema DEFAULT. */
|
|
@@ -1875,19 +1822,6 @@ declare function getAgent(db: Db, name: string, workstream: string): AgentRow |
|
|
|
1875
1822
|
declare function listAgents(db: Db, opts?: {
|
|
1876
1823
|
workstream?: string;
|
|
1877
1824
|
}): AgentRow[];
|
|
1878
|
-
/**
|
|
1879
|
-
* Update an agent's status. Returns true if a row was matched.
|
|
1880
|
-
* Also bumps updated_at. Workstream is required (v5: agents.name is
|
|
1881
|
-
* per-workstream unique).
|
|
1882
|
-
*/
|
|
1883
|
-
declare function updateAgentStatus(db: Db, name: string, status: AgentStatus, workstream: string): boolean;
|
|
1884
|
-
/** Back-compat alias for the agent status glyph map, which now lives
|
|
1885
|
-
* with every other state glyph in src/glyphs.ts. New code should
|
|
1886
|
-
* import AGENT_STATUS_GLYPH (or the agentStatusGlyph helper) from
|
|
1887
|
-
* there; this name is kept because it is part of the SDK surface via
|
|
1888
|
-
* src/index.ts. */
|
|
1889
|
-
declare const STATUS_EMOJI: Record<AgentStatus, string>;
|
|
1890
|
-
|
|
1891
1825
|
/** Build the pane title for `agent` based on current DB state.
|
|
1892
1826
|
* Pure (no tmux side effect; no DB write). Read-only on the DB. */
|
|
1893
1827
|
declare function composeAgentTitle(db: Db, agent: AgentRow): string;
|
|
@@ -2013,7 +1947,7 @@ interface ListLiveAgentsOptions {
|
|
|
2013
1947
|
}
|
|
2014
1948
|
interface LiveAgentsView {
|
|
2015
1949
|
/** All registered agents in the workstream, post-reconcile. */
|
|
2016
|
-
agents:
|
|
1950
|
+
agents: LiveAgent[];
|
|
2017
1951
|
/** Panes in the tmux session that look like agents but aren't registered. */
|
|
2018
1952
|
orphans: MuxPane[];
|
|
2019
1953
|
/** Diagnostic numbers from the reconcile pass; useful for `mu doctor`. */
|
|
@@ -3177,6 +3111,12 @@ interface TaskWaitOptions {
|
|
|
3177
3111
|
* needs_input might BE the success path. See
|
|
3178
3112
|
* task_wait_stall_action_flag. */
|
|
3179
3113
|
onStall?: "warn" | "exit";
|
|
3114
|
+
/** Read an owner's current runtime state for attention detection.
|
|
3115
|
+
* Without this hook, SDK waits never infer a stall from stored data. */
|
|
3116
|
+
readOwnerState?: (owner: {
|
|
3117
|
+
name: string;
|
|
3118
|
+
workstreamName: string;
|
|
3119
|
+
}) => Promise<StateReading | null>;
|
|
3180
3120
|
/** Optional async hook run BEFORE every snapshot (initial + each
|
|
3181
3121
|
* poll iteration). The CLI uses this to reconcile the workstream
|
|
3182
3122
|
* each tick (reaper flips IN_PROGRESS → OPEN for dead-pane
|
|
@@ -3489,8 +3429,8 @@ declare function loadWorkstreamSnapshot(db: Db, workstream: string, opts?: LoadW
|
|
|
3489
3429
|
*/
|
|
3490
3430
|
type RoiBucket = "high" | "mid" | "low" | "infinite";
|
|
3491
3431
|
declare function roiBucket(impact: number, effortDays: number): RoiBucket;
|
|
3492
|
-
/** Histogram of agents by
|
|
3493
|
-
declare function
|
|
3432
|
+
/** Histogram of agents by runtime state. Pure derivation (no colour render). */
|
|
3433
|
+
declare function agentStateHistogram(agents: readonly LiveAgent[]): ReadonlyMap<RuntimeState, number>;
|
|
3494
3434
|
interface OwnedTasksSummary {
|
|
3495
3435
|
/** Display token: "—" (none), task id (one), or GLYPH.multi + count (many). */
|
|
3496
3436
|
bit: string;
|
|
@@ -3535,7 +3475,7 @@ interface DoctorSummary {
|
|
|
3535
3475
|
* snapshot-derived checks (ghosts / orphans / workspace-orphans) are
|
|
3536
3476
|
* skipped in that case.
|
|
3537
3477
|
*/
|
|
3538
|
-
declare function loadDoctorSummary(db: Db, snapshot: WorkstreamSnapshot | null): DoctorSummary;
|
|
3478
|
+
declare function loadDoctorSummary(db: Db, snapshot: WorkstreamSnapshot | null, agentStateSource?: "murmur" | "herdr"): DoctorSummary;
|
|
3539
3479
|
/** Count of warn + fail rows. Pure; exported for unit tests. */
|
|
3540
3480
|
declare function countProblems(checks: readonly DoctorCheck[]): number;
|
|
3541
3481
|
/**
|
|
@@ -3821,6 +3761,42 @@ declare function checkFleetHazards(db: Db, opts?: {
|
|
|
3821
3761
|
syncDir?: string | undefined;
|
|
3822
3762
|
}): FleetHazard[];
|
|
3823
3763
|
|
|
3764
|
+
declare const AGENT_STATE_GLYPH: Record<RuntimeState, string>;
|
|
3765
|
+
declare function agentStateGlyph(state: RuntimeState): string;
|
|
3766
|
+
/**
|
|
3767
|
+
* Non-agent state glyphs, keyed by what they MEAN rather than what
|
|
3768
|
+
* they look like. A call site asks for `GLYPH.stale`, never for a
|
|
3769
|
+
* clock — so re-pointing the clock is a one-line edit here.
|
|
3770
|
+
*
|
|
3771
|
+
* `ok` / `fail` / `warn` deliberately reuse the same codepoints as the
|
|
3772
|
+
* agent statuses they rhyme with (`free`, `terminated`): a check-circle
|
|
3773
|
+
* means "fine" whether the row is an agent, a workspace or a doctor
|
|
3774
|
+
* check.
|
|
3775
|
+
*/
|
|
3776
|
+
declare const GLYPH: {
|
|
3777
|
+
/** Healthy, clean, passing, closed-successfully. */
|
|
3778
|
+
readonly ok: "";
|
|
3779
|
+
/** Failed check. */
|
|
3780
|
+
readonly fail: "";
|
|
3781
|
+
/** Needs attention but not broken (idle-but-assigned, stale warning). */
|
|
3782
|
+
readonly warn: "";
|
|
3783
|
+
/** Workspace has uncommitted edits. */
|
|
3784
|
+
readonly dirty: "";
|
|
3785
|
+
/** Workspace is ≥ WORKSPACE_STALE_THRESHOLD commits behind main. */
|
|
3786
|
+
readonly stale: "";
|
|
3787
|
+
/** Task is blocked by an incoming edge. */
|
|
3788
|
+
readonly blocked: "";
|
|
3789
|
+
/** Track whose roots merged (diamond dependency). */
|
|
3790
|
+
readonly merge: "";
|
|
3791
|
+
/** Agent owns more than one task (pane-title multi-count slot). */
|
|
3792
|
+
readonly multi: "";
|
|
3793
|
+
/** Filter toggle: enabled / disabled. */
|
|
3794
|
+
readonly on: "";
|
|
3795
|
+
readonly off: "";
|
|
3796
|
+
/** Status outside the known enum. */
|
|
3797
|
+
readonly unknown: "";
|
|
3798
|
+
};
|
|
3799
|
+
|
|
3824
3800
|
/** A parsed HLC. Never construct by hand — use `parseHlc` or `formatHlc`. */
|
|
3825
3801
|
interface Hlc {
|
|
3826
3802
|
/** Wall-clock hint, milliseconds since the epoch. */
|
|
@@ -4850,4 +4826,4 @@ declare function summarizeWorkstream(db: Db, opts: WorkstreamOptions): Promise<W
|
|
|
4850
4826
|
*/
|
|
4851
4827
|
declare function teardownWorkstream(db: Db, opts: TeardownWorkstreamOptions): Promise<TeardownResult>;
|
|
4852
4828
|
|
|
4853
|
-
export {
|
|
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 };
|