@mu-crew/mu 4.0.0 → 4.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/README.md +1 -1
- package/dist/{chunk-5HECDBK3.js → chunk-4ULY3ZKO.js} +16 -16
- package/dist/{chunk-AW2NONYU.js → chunk-7M634JMD.js} +81 -7
- package/dist/chunk-7M634JMD.js.map +1 -0
- package/dist/{chunk-GQNHIPJN.js → chunk-SS7NQSSZ.js} +21 -421
- package/dist/chunk-SS7NQSSZ.js.map +1 -0
- package/dist/{chunk-S424D5EP.js → chunk-UCZPJX7K.js} +628 -141
- package/dist/chunk-UCZPJX7K.js.map +1 -0
- package/dist/{cli-GB2CAVVW.js → cli-TV3N47AZ.js} +340 -42
- package/dist/cli-TV3N47AZ.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/{errors-KHOYKD7D.js → errors-GRONKWFS.js} +2 -2
- package/dist/extension/mu-pi.js +28 -14
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.d.ts +63 -11
- package/dist/index.js +15 -15
- package/dist/{tui-ALPHYTA2.js → tui-FUBQ326D.js} +102 -27
- package/dist/tui-FUBQ326D.js.map +1 -0
- package/docs/ARCHITECTURE.md +5 -4
- package/docs/VOCABULARY.md +6 -5
- package/docs/guide/cleanup.md +8 -0
- package/docs/guide/delegate.md +11 -3
- package/docs/guide/remote.md +19 -12
- package/docs/reference/env.md +1 -0
- package/docs/reference/naming.md +2 -0
- package/package.json +1 -1
- package/skills/mu/recipes/remote-workers.md +7 -6
- package/dist/chunk-AW2NONYU.js.map +0 -1
- package/dist/chunk-GQNHIPJN.js.map +0 -1
- package/dist/chunk-S424D5EP.js.map +0 -1
- package/dist/cli-GB2CAVVW.js.map +0 -1
- package/dist/tui-ALPHYTA2.js.map +0 -1
- /package/dist/{chunk-5HECDBK3.js.map → chunk-4ULY3ZKO.js.map} +0 -0
- /package/dist/{errors-KHOYKD7D.js.map → errors-GRONKWFS.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1555,6 +1555,10 @@ declare function getDelegateCall(db: Db, callId: string): DelegateRow | undefine
|
|
|
1555
1555
|
declare function listDelegates(db: Db, caller?: string, workstream?: string, opts?: {
|
|
1556
1556
|
wave?: string;
|
|
1557
1557
|
states?: readonly DelegateState[];
|
|
1558
|
+
/** Only calls whose task has one of these statuses. */
|
|
1559
|
+
taskStatuses?: readonly string[];
|
|
1560
|
+
/** Only calls updated after this ISO time. */
|
|
1561
|
+
updatedAfter?: string;
|
|
1558
1562
|
}): DelegateRow[];
|
|
1559
1563
|
/** Calls of any of `callers` (the union, each call once, oldest first), optionally in one workstream and wave. `[]` is no calls. */
|
|
1560
1564
|
declare function listDelegatesOf(db: Db, callers: readonly string[], workstream?: string, opts?: {
|
|
@@ -2678,12 +2682,13 @@ interface HostProfile {
|
|
|
2678
2682
|
shell: string;
|
|
2679
2683
|
exec: string;
|
|
2680
2684
|
fetch: string;
|
|
2681
|
-
repo:
|
|
2685
|
+
/** Default remote repo for a spawn without `--root`; null: none. */
|
|
2686
|
+
repo: string | null;
|
|
2682
2687
|
max_sessions: number | null;
|
|
2683
2688
|
}
|
|
2684
2689
|
declare function getHost(db: Db, name: string): HostProfile;
|
|
2685
2690
|
declare function listHosts(db: Db): HostProfile[];
|
|
2686
|
-
/** Store a profile. Validates the name, cap, repo and every template first; stores nothing on refusal. */
|
|
2691
|
+
/** Store a profile. Validates the name, cap, default repo and every template first; stores nothing on refusal. */
|
|
2687
2692
|
declare function addHost(db: Db, p: HostProfile): HostProfile;
|
|
2688
2693
|
/**
|
|
2689
2694
|
* Remove a profile; false when there was none. Refuses while a channel is
|
|
@@ -2803,10 +2808,13 @@ interface HostCheckOptions extends ChannelOpts {
|
|
|
2803
2808
|
name: string;
|
|
2804
2809
|
workstream: string;
|
|
2805
2810
|
};
|
|
2811
|
+
/** The remote repo the `repo` step checks (default the profile's); with neither it is skipped. */
|
|
2812
|
+
root?: string;
|
|
2806
2813
|
}
|
|
2807
2814
|
/**
|
|
2808
2815
|
* Check a host through its own stored templates, under ONE channel: the
|
|
2809
|
-
* host answers `exec`, the repo
|
|
2816
|
+
* host answers `exec`, the repo (`root`, else the profile's default; skipped
|
|
2817
|
+
* with neither) is a git repo, pi runs under the login
|
|
2810
2818
|
* shell, `pi list` names mu, and with `agent` the forwarded socket answers
|
|
2811
2819
|
* hello. Each failure is reported; none is retried; an unreachable host
|
|
2812
2820
|
* skips the rest. The ctl probe only reads an existing forward.
|
|
@@ -2903,7 +2911,8 @@ interface SpawnAgentOptions {
|
|
|
2903
2911
|
* here; `cwd` and `worktree` name REMOTE paths (the worktree is made by the
|
|
2904
2912
|
* profile's `exec`). One channel is held from before the first remote
|
|
2905
2913
|
* command until the pane dies. Refused on a mux that cannot run a shell
|
|
2906
|
-
* command (herdr)
|
|
2914
|
+
* command (herdr). With `host`, `root` is a REMOTE repo (default the
|
|
2915
|
+
* profile's `repo`); a `worktree` needs one of them. */
|
|
2907
2916
|
host?: string;
|
|
2908
2917
|
/** Run the control-socket handshake for pi agents (default true).
|
|
2909
2918
|
* `false` skips it and reports `ctl: "skipped"`. */
|
|
@@ -2921,6 +2930,10 @@ interface SpawnAgentOptions {
|
|
|
2921
2930
|
* pane): a throw rolls the spawn back like a failed finalize.
|
|
2922
2931
|
*/
|
|
2923
2932
|
onIdentity?: (agent: AgentRow) => void;
|
|
2933
|
+
/** Where a local pi agent keeps its session (`PI_CODING_AGENT_SESSION_DIR`
|
|
2934
|
+
* in the pane env) instead of pi's per-cwd default. Set for delegates, so
|
|
2935
|
+
* their sessions stay out of the caller's `/resume` list. */
|
|
2936
|
+
piSessionDir?: string;
|
|
2924
2937
|
}
|
|
2925
2938
|
/** Outcome of the spawn-time control-socket handshake. */
|
|
2926
2939
|
type SpawnCtl = "ok" | "missing" | "refused" | "skipped";
|
|
@@ -3139,6 +3152,8 @@ interface AgentRow {
|
|
|
3139
3152
|
host: string | null;
|
|
3140
3153
|
/** HEAD last collected from its remote worktree; null until one is. */
|
|
3141
3154
|
collectedHead: string | null;
|
|
3155
|
+
/** A remote worktree's repo on its host (absolute, chosen at spawn); null otherwise. */
|
|
3156
|
+
repo: string | null;
|
|
3142
3157
|
/** Set for a remote command gate (`spawn --host` of a non-pi command): its spawn-unique token, the key of the remote result record. Null for every other agent. */
|
|
3143
3158
|
gateToken: string | null;
|
|
3144
3159
|
/** ISO 8601 timestamp. */
|
|
@@ -3177,6 +3192,7 @@ interface InsertAgentInput {
|
|
|
3177
3192
|
spawner?: string | null;
|
|
3178
3193
|
host?: string | null;
|
|
3179
3194
|
collectedHead?: string | null;
|
|
3195
|
+
repo?: string | null;
|
|
3180
3196
|
gateToken?: string | null;
|
|
3181
3197
|
}
|
|
3182
3198
|
declare function insertAgent(db: Db, input: InsertAgentInput): AgentRow;
|
|
@@ -4743,6 +4759,7 @@ interface AgentOutput {
|
|
|
4743
4759
|
spawner: string | null;
|
|
4744
4760
|
host: string | null;
|
|
4745
4761
|
collected_head: string | null;
|
|
4762
|
+
repo: string | null;
|
|
4746
4763
|
gate_token: string | null;
|
|
4747
4764
|
created_at: string;
|
|
4748
4765
|
updated_at: string;
|
|
@@ -4968,6 +4985,36 @@ interface DashboardTask {
|
|
|
4968
4985
|
updated_at: string;
|
|
4969
4986
|
/** `MAX(ops.seq)` over the task's own ops, its notes' and its edges' (raw log, db/sql writes included); 0 when none. */
|
|
4970
4987
|
activity_seq: number;
|
|
4988
|
+
/** The call behind a `kind=delegate` task, whoever made it; absent for any other task. */
|
|
4989
|
+
call?: DashboardCall;
|
|
4990
|
+
}
|
|
4991
|
+
/** A delegate call as a task row shows it: machine-wide, never narrowed to a caller. */
|
|
4992
|
+
interface DashboardCall {
|
|
4993
|
+
call_id: string;
|
|
4994
|
+
state: string;
|
|
4995
|
+
/** The parsed label of a done answer; null otherwise. */
|
|
4996
|
+
verdict: string | null;
|
|
4997
|
+
/** `<workstream>/<task>` the call judges; null with no record target. */
|
|
4998
|
+
judges: string | null;
|
|
4999
|
+
wave: string | null;
|
|
5000
|
+
}
|
|
5001
|
+
/**
|
|
5002
|
+
* One wave of delegate calls in a workstream, tallied as `verdictTally` counts it
|
|
5003
|
+
* (one result per call), over every caller. `pending` includes `refused`.
|
|
5004
|
+
*/
|
|
5005
|
+
interface DashboardWave {
|
|
5006
|
+
/** `<workstream>/<wave>`. */
|
|
5007
|
+
key: string;
|
|
5008
|
+
workstream: string;
|
|
5009
|
+
wave: string;
|
|
5010
|
+
calls: number;
|
|
5011
|
+
confirmed: number;
|
|
5012
|
+
refuted: number;
|
|
5013
|
+
unverified: number;
|
|
5014
|
+
pending: number;
|
|
5015
|
+
refused: number;
|
|
5016
|
+
/** The newest `updated_at` of its calls. */
|
|
5017
|
+
updated_at: string;
|
|
4971
5018
|
}
|
|
4972
5019
|
/** One line of the open DAG (`loadOpenTaskFrontier`, preorder, per workstream). */
|
|
4973
5020
|
interface DashboardEdge {
|
|
@@ -5043,12 +5090,14 @@ interface DashboardDelegate {
|
|
|
5043
5090
|
* - `stalled`: one tool has run over `STALLED_TOOL_MS`.
|
|
5044
5091
|
* - `input`: `needs_input` past the idle threshold on an agent that owns work
|
|
5045
5092
|
* (the registry's `idle` flag; `MU_IDLE_THRESHOLD_MS`, 0 disables).
|
|
5093
|
+
* - `delegate`: a delegate call that is `refused` (parked until its pi session
|
|
5094
|
+
* reissues it) or `failed` within `FAILED_CALL_MS`, whoever made it.
|
|
5046
5095
|
* - `human`: an OPEN `kind=human` task, whoever recorded it (`human_needs`
|
|
5047
5096
|
* is caller-scoped and empty for a human shell).
|
|
5048
5097
|
* - `next_unavailable`: `computeNext` failed.
|
|
5049
5098
|
* - `sync`: a warning the caller passed as `syncWarnings`.
|
|
5050
5099
|
*/
|
|
5051
|
-
type AttentionKind = "dead" | "permission" | "input" | "stalled" | "human" | "next_unavailable" | "sync";
|
|
5100
|
+
type AttentionKind = "dead" | "permission" | "input" | "stalled" | "delegate" | "human" | "next_unavailable" | "sync";
|
|
5052
5101
|
interface DashboardAttention {
|
|
5053
5102
|
/** Unique within a snapshot (`<kind>:<target>`). */
|
|
5054
5103
|
key: string;
|
|
@@ -5057,13 +5106,13 @@ interface DashboardAttention {
|
|
|
5057
5106
|
kind: AttentionKind;
|
|
5058
5107
|
/** One short line, age at read ("worker-3 permission 20m"; a human task: its title); bare names, the UI qualifies. */
|
|
5059
5108
|
text: string;
|
|
5060
|
-
/** Qualified key to drill into: the agent (dead/permission/input/stalled) or the task (human); null otherwise. */
|
|
5109
|
+
/** Qualified key to drill into: the agent (dead/permission/input/stalled) or the task (delegate, human); null otherwise. */
|
|
5061
5110
|
target: string | null;
|
|
5062
5111
|
}
|
|
5063
5112
|
interface DashboardSnapshot {
|
|
5064
5113
|
/** The identity the caller-scoped panels were read for; null = a human shell. */
|
|
5065
5114
|
caller: string | null;
|
|
5066
|
-
/** `none`: no identity, so `human_needs` and `delegates` are empty BY DESIGN (never another caller's). */
|
|
5115
|
+
/** `none`: no identity, so `human_needs` and `delegates` are empty BY DESIGN (never another caller's); `call`, `waves` and attention are every caller's. */
|
|
5067
5116
|
caller_scope: "caller" | "none";
|
|
5068
5117
|
/** Every live workstream, scratch included; never narrowed by a filter (it is the switcher). */
|
|
5069
5118
|
workstreams: DashboardWorkstream[];
|
|
@@ -5080,6 +5129,8 @@ interface DashboardSnapshot {
|
|
|
5080
5129
|
next_source: "unavailable" | "computed";
|
|
5081
5130
|
human_needs: DashboardHumanNeed[];
|
|
5082
5131
|
delegates: DashboardDelegate[];
|
|
5132
|
+
/** Per read workstream (tasks scope), its `WAVE_MAX` most recently updated waves, newest first, any caller. */
|
|
5133
|
+
waves: DashboardWave[];
|
|
5083
5134
|
/** Trouble across every workstream, filters ignored, most urgent first (see `AttentionKind`). */
|
|
5084
5135
|
attention: DashboardAttention[];
|
|
5085
5136
|
}
|
|
@@ -6061,7 +6112,7 @@ declare class RemoteCloseRefusedError extends Error {
|
|
|
6061
6112
|
* The close rule for a remote worktree `spawn --host --worktree` made, run
|
|
6062
6113
|
* AFTER the agent's pane is dead (the caller frees the channel first; at cap 1
|
|
6063
6114
|
* the pane held it): under one lease, one exec observes the state (clean or
|
|
6064
|
-
* dirty, HEAD, and that the path is still a worktree of the
|
|
6115
|
+
* dirty, HEAD, and that the path is still a worktree of the repo the row recorded),
|
|
6065
6116
|
* the rule is applied here, and a second exec removes WITHOUT --force.
|
|
6066
6117
|
*
|
|
6067
6118
|
* No git lock fences every ref backend (reftable ignores HEAD.lock), so the
|
|
@@ -6078,7 +6129,7 @@ declare class RemoteCloseRefusedError extends Error {
|
|
|
6078
6129
|
* base nor the last collected one refuses unless `keepBranch`, which makes (or
|
|
6079
6130
|
* verifies) `mu/<ws>/<agent>-<sha12>` at the observed HEAD first.
|
|
6080
6131
|
*/
|
|
6081
|
-
declare function closeRemoteWorktree(db: Db, agent: Pick<AgentRow, "name" | "workstreamName" | "host" | "cwd" | "base" | "collectedHead" | "incarnation">, opts?: {
|
|
6132
|
+
declare function closeRemoteWorktree(db: Db, agent: Pick<AgentRow, "name" | "workstreamName" | "host" | "cwd" | "base" | "collectedHead" | "incarnation" | "repo">, opts?: {
|
|
6082
6133
|
keepBranch?: boolean;
|
|
6083
6134
|
paneAlive?: (paneId: string) => Promise<boolean>;
|
|
6084
6135
|
/** Runs between the observation and the removal; throws to stop (an identity re-check). */
|
|
@@ -6150,8 +6201,9 @@ interface RemoteRecovery {
|
|
|
6150
6201
|
collectedHead: string | null;
|
|
6151
6202
|
/** The exact path a crashed close left (or would leave) the tree at. */
|
|
6152
6203
|
aside: string;
|
|
6153
|
-
/** The profile's exec template
|
|
6204
|
+
/** The profile's exec template when it existed, else null: identity, not authority. */
|
|
6154
6205
|
hostExec: string | null;
|
|
6206
|
+
/** The worktree's repo on the host (agents.repo), null when the row had none. */
|
|
6155
6207
|
hostRepo: string | null;
|
|
6156
6208
|
reason: RemoteRecoveryReason;
|
|
6157
6209
|
preservedAt: string;
|
|
@@ -7247,4 +7299,4 @@ declare function summarizeWorkstream(db: Db, opts: WorkstreamOptions): Promise<W
|
|
|
7247
7299
|
*/
|
|
7248
7300
|
declare function teardownWorkstream(db: Db, opts: TeardownWorkstreamOptions): Promise<TeardownResult>;
|
|
7249
7301
|
|
|
7250
|
-
export { AGENT_STATE_GLYPH, type AbortAgentOptions, type AbortResult, type ActionInfo, type ActionKey, type ActionReceipt, type AddNoteOptions, type AddNoteResult, type AddTaskOptions, type AddTasksOptions, type AddTasksResult, AgentAbortNeedsCtlError, AgentAbortTimeoutError, type AgentBaseline, AgentBusyError, AgentCtlUnreachableError, AgentDiedOnSpawnError, AgentEmptySendError, AgentExistsError, AgentExtensionOutdatedError, AgentFreshNeedsCtlError, type AgentIdentity, AgentLockBusyError, AgentNameExhaustedError, AgentNotFoundError, AgentNotInWorkstreamError, type AgentObservation, AgentPaneDeadError, AgentPaneStillAliveError, type AgentReading, AgentReplacedError, AgentRestartedError, type AgentRow, AgentSendIndeterminateError, AgentSendUnsupportedError, AgentSlashCommandUnsupportedError, AgentSpawnCliNotFoundError, AgentSpawnStartupError, type AgentTool, type AgentWatchHandle, type AmbientOptions, type AmbientResult, type AppendLogOptions, type ApplyResult, type AttemptPlan, type AttemptRecord, type AttentionKind, type AuthorisedTask, type AuthorizeTasksOptions, type AuthorizeTasksResult, type AutoConfig, type BlockEdgeResult, CAPTURE_TRIGGER_DDL, CAPTURE_VERSION, COURSE_CHECK_AGE_MS, COURSE_CHECK_CLOSED, CURRENT_SCHEMA_VERSION, type CaptureDb, type CaptureIntent, type CaptureOptions, type CaseCollision, type ChannelOpts, type CheapDriftReport, type ClaimResult, type ClaimTaskOptions, ClaimerNotRegisteredError, type CloseAgentOptions, type CloseAgentResult, CloseNeedsEvidenceError, type CloseOutcome, type ClosePreview, type CloseSubstate, type CloseTaskResult, type CollectResult, type CommandResolutionResult, type CommandResolver, CrossWorkstreamEdgeError, type CtlLink, type CursorKind, type CursorToken, CycleError, DEFAULT_NEXT_CAP, DEFAULT_SUBSTATE, DELEGATE_TOKEN, DRIFT_REPORT_CAP, type DashboardAgent, type DashboardAttention, type DashboardDelegate, type DashboardEdge, type DashboardHumanNeed, type DashboardLogItem, type DashboardOptions, type DashboardSnapshot, type DashboardTask, type DashboardWorkstream, type Db, DbInsideSyncDirError, DelegateCallConflictError, DelegateNotFoundError, type DelegateRequest, type DelegateRow, type DelegateState, DelegateStateError, type DeleteTaskResult, type DoctorCheck, type DoctorStatus, DriftDetectedError, type DriftRecord, type DriftReport, EXPECTED_TABLES, type EvidenceOption, type ExecuteNextOptions, FRONTIER_CLOSED_PER_NODE, FRONTIER_MAX_DEPTH, FRONTIER_MAX_NODES, type FileLockOptions, type FinishDelegateOptions, type FinishDelegateResult, type FleetHazard, type FlushResult, type FrontierDirection, type FrontierEntry, type FsProbe, GLYPH, GroupIdAmbiguousError, GroupNotFoundError, HOST_ENV_KEYS, HOST_PLACEHOLDERS, HazardFailError, type HazardSeverity, type HintMove, type Hlc, HlcOverflowError, HlcParseError, type HostChannel, HostChannelBusyError, HostCheckFailedError, type HostCheckReport, type HostCheckStep, HostExistsError, HostInUseError, type HostLease, HostNotFoundError, type HostProfile, HostProfileError, HostSpawnUnsupportedError, HostTemplateError, type HostTemplateValues, type HumanNeeded, HumanNeededInvalidError, type HumanNeededOptions, HumanTaskError, type IdFromTitleResult, type IngestFromDbResult, type IngestResult, type InsertAgentInput, InvalidSubstateError, KNOWN_INTENTS, KNOWN_VERBS, type KnownIntent, type ListLiveAgentsOptions, type ListLogsOptions, type ListNotesOptions, type ListTasksOptions, type LiveAgent, type LiveAgentsView, type LocalIntent, type LogKind, LogKindReservedError, type LogRow, MACHINE_LOCAL_ENTITIES, MACHINE_LOCAL_TABLES, MAX_NEXT_CAP, MU_SHIM_MARKER, MachineIdentityMissingError, type MachineLocalEntity, type MachineLocalLoss, type MachineLocalTable, type MigrateEntry, type MigrateResult, type MigrateState, type MuxBackend, type MuxBackendName, MuxError, type MuxPane, type MuxPaneStatus, NextArgError, type NextContext, type NextMove, type NextOutcome, type NextPlan, type NextResult, NoMultiplexerError, type ObservedAgent, type ObservedWatch, type Op, type OpContext, OpEntityNotSyncedError, OpKeyMalformedError, type OpenDbOptions, type OpenTaskFrontier, type OpenTaskFrontierOptions, 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 RecordRef, type RefBaseline, type RegisterDelegateOptions, type RegisterRef, type RegisteredRef, type ReleaseResult, type ReleaseTaskOptions, type ReleasedWorktree, RemoteCloseRefusedError, RemoteCollectError, RemoteCollectUnsupportedError, RemotePrepareError, type RemoteRecovery, type RemoteRecoveryReason, RemoteRecoveryRefusedError, type RemoveBlockEdgeResult, type RenderableOp, type RenderedOp, type ReparentTaskResult, RevisionMismatchError, type RuntimeState, SEGMENT_FORMAT_VERSION, SEGMENT_READ_VERSIONS, STALLED_TOOL_MS, SYNCED_ENTITIES, SchemaTooNewError, SchemaTooOldError, type SegmentDefect, type SegmentDefectKind, type SegmentLine, type SegmentManifest, type SelectedNotes, type SendResult, type SetStatusOptions, type SetStatusResult, type SlugifyResult, type SpawnAgentOptions, SpawnAttemptBusyError, SpawnAttemptFailedError, SpawnAttemptGuardError, type SpawnReceipt, SpawnReceiptConflictError, SpawnTaskStateError, SpawnTrustDialogError, SqliteTooOldError, type StallActionOptions, type StallActionResult, type StateCounts, type StateDelegate, type StateHumanNeed, type StateMe, type StateReading, type StateSnapshot, type StateSnapshotOptions, type StateSource, type StateTask, type StateWave, SubstateReasonRequiredError, SyncDirForeignError, type SyncPassResult, SyncPeerNotFoundError, SyncPeerRefAmbiguousError, SyncSourceNotFoundError, SyncSourceTooNewError, type SyncedEntity, TASK_KINDS, TASK_STATUSES, TASK_STATUS_LIST, TASK_SUBSTATES, TASK_SUBSTATE_ROWS, TaskAlreadyOwnedError, TaskAutoArgError, TaskAutoRefusedError, type TaskBrief, TaskBriefMissingError, type TaskBriefOptions, type TaskEdgeWithStatus, type TaskEdges, type TaskEdgesWithStatus, TaskExistsError, TaskHasOpenBlockersError, TaskIdInvalidError, TaskInTriageError, type TaskKind, TaskNotFoundError, TaskNotInWorkstreamError, TaskNoteRangeError, type TaskNoteRow, type TaskPair, TaskParkStateError, TaskParkedError, type TaskRow, type TaskSpawnOutcome, type TaskSpawnRequest, type TaskStatus, type TaskSubstate, TaskTitleSlugEmptyError, type TeardownResult, type TextMatcher, TmuxError, type TmuxExecResult, type TmuxExecutor, type TmuxPane, type Track, type Transport, UNKNOWN_REASON, UnguardedMoveError, type UpdateTaskOptions, type UpdateTaskResult, type VerdictLabel, type VerdictTally, DEFAULT_CTL_STUCK_AFTER_MS as WAIT_DEFAULT_CTL_STUCK_AFTER_MS, DEFAULT_STUCK_AFTER_MS as WAIT_DEFAULT_STUCK_AFTER_MS, WAIT_HEARTBEAT_CAP_MS, WAIT_REF_KINDS, WAIT_REGEX_MAX_LEN, WAIT_REGISTRATION_MAX_REFS, WAIT_REGISTRATION_STATES, WAIT_TEXT_MAX, type WaitEvent, type WaitEventKind, WaitNothingError, type WaitOptions, type WaitRef, WaitRefError, type WaitRefKind, WaitRegexError, type WaitRegistration, WaitRegistrationError, type WaitRegistrationState, type WaitResult, WaitResumeNotFoundError, type WaitSnapshot, type WaitStallContext, WaveNotFoundError, WorkstreamExistsError, WorkstreamHasAgentsError, WorkstreamNameInvalidError, WorkstreamNameReservedError, WorkstreamNotFoundError, type WorkstreamOptions, WorkstreamPanesLiveError, WorkstreamRevisionMismatchError, WorkstreamSessionLiveError, type WorkstreamState, type WorkstreamSummary, WorkstreamTornDownError, WorktreeBranchExistsError, WorktreeDirtyError, WorktreeHeldError, type WorktreeHolder, WorktreePathNotEmptyError, type WorktreeRow, type WorktreeState, WorktreeVcsRequiredError, abortAgent, acceptTask, activeMux, addBlockEdge, addHost, addNote, addTask, addTasks, admitHostChannel, agentKey, agentRevision, agentStateGlyph, ambientFlush, ambientIngest, ambientSyncPass, appendLog, applyIncomingOp, applyOp, applyOps, assertRevision, assertSyncDirV2, assertValidPaneId, attemptName, authorisedReady, authorizeTasks, autoPermitted, beginWait, bindHostChannel, buildTaskBrief, callerWorkstreams, capPlan, capture, captureTriggersCurrent, checkCaseCollisions, checkCheapDriftInvariant, checkCommandResolvable, checkDbInsideSyncDir, checkDrift, checkFleetHazards, checkHost, checkNetworkMount, checkRegexGrammar, claimTask, classifyFsType, closeAgent, closeRemoteWorktree, closeTask, closedToken, collectRef, collectRemoteAgent, compareHlc, compileTextMatcher, computeNext, computeNotices, courseCheckHint, createWorktree, ctlAgentHooks, ctlRuntimeState, currentCallers, currentOpContext, cursorKey, defaultDbPath, defaultSpawnLivenessMs, defaultStateDir, deleteAgent, deleteTask, detectMux, discoverPeers, driftRemediation, emitEvent, endWait, ensureWorkstream, envVarNameForCli, executeNext, expandHostTemplate, expectsCtl, findCaseCollisions, finishDelegate, flushSegment, forgetWorktree, formatDriftRecord, formatHlc, formatPair, getActionReceipt, getAgent, getAgentByPane, getAutoConfig, getDelegateCall, getHost, getParallelTracks, getPrerequisites, getRemoteRecovery, getTask, getTaskEdges, getTaskEdgesWithStatus, getWatermark, getWorktreeAt, getWorktreeFor, hostEnvWords, hostStarter, idFromTitle, idFromTitleVerbose, ingestFromDb, ingestSegment, insertAgent, installCapture, interruptAgent, isConsumed, isPathInside, isTaskStatus, isValidAgentName, isValidPair, isValidPaneId, isValidTaskId, isValidWorkstreamName, killPane, killSession, latestSeq, listAgents, listBlocked, listDelegates, listDelegatesOf, listGoals, listHostChannels, listHosts, listInProgress, listLiveAgents, listLogs, listNotes, listPanes, listReady, listRecentClosed, listRemoteRecoveries, listTasks, listTasksByOwner, listWorkstreams, listWorktrees, loadDashboard, loadOpenTaskFrontier, loadResume, localMachineId, locksDir, mapLegacyStatus, markDelegate, migratePi, murmurAvailable, mux, muxByName, nextHlc, observationFromReading, observeAgentStates, opSubject, openBlockersClosure, openDb, openHumanNeeds, openTask, paneAlive, parkTask, parseHlc, parseOpKey, parseVerdict, peerStatuses, pendingAttempts, planAttempt, previewClose, probeFilesystem, readAgent, readAgentStates, readCursors, readFileLockMeta, readLiveAgents, readManifest, readWaitRegistration, rebuildInto, receiveHlc, reclaimWorktreePath, reconcile, recordCursors, recordHumanNeeded, recoveriesFor, registerDelegateCall, registerOwnedWait, registerWorktree, releaseHostChannel, releaseHostChannelsForAgent, releaseStall, releaseStallHandler, releaseTask, releaseWorktree, removeBlockEdge, removeHost, removeWorktree, renderArgv, renderFrontierLines, renderOp, renderOpLine, renderPlan, repairPeer, reparentTask, reserveActionReceipt, reserveAttempt, reserveHostChannel, resetCommandResolverForTests, resetMux, resetSleep, resetTmuxExecutor, resetWatermark, resolveActorIdentity, resolveCliCommand, resolveCliCommandWithSource, resolvePair, resolvePeerRef, runHostTemplate, saveResume, segmentLineCount, segmentPath, selectRemoteRecovery, selectTaskNotes, sendToAgent, sendViaTransport, setCommandResolverForTests, setMuxForTests, setSleepForTests, setTaskStatus, setTmuxExecutor, setWatermark, settledCloseInput, skillDirDigest, sleep, slugifyTitle, slugifyTitleVerbose, spawnAgent, spawnAutoAttempt, spawnForTask, stateSnapshot, steerStall, steerStallHandler, steerText, summarizeWorkstream, syncDir, syncEnabled, syncPass, taskRevision, taskRevisions, teardownWorkstream, tmux, tmuxBackend, transitionActionReceipt, unparkTask, updateTask, upstreamRefs, validateHostTemplate, verdictTally, verifyAgainstManifest, waitForEvents, waitWithActions, watchAgentRun, withAgentLock, withCaptureSuppressed, withFileLock, withHostChannel, withOpContext, workstreamRevision, worktreePath, worktreeState, worktreesRoot };
|
|
7302
|
+
export { AGENT_STATE_GLYPH, type AbortAgentOptions, type AbortResult, type ActionInfo, type ActionKey, type ActionReceipt, type AddNoteOptions, type AddNoteResult, type AddTaskOptions, type AddTasksOptions, type AddTasksResult, AgentAbortNeedsCtlError, AgentAbortTimeoutError, type AgentBaseline, AgentBusyError, AgentCtlUnreachableError, AgentDiedOnSpawnError, AgentEmptySendError, AgentExistsError, AgentExtensionOutdatedError, AgentFreshNeedsCtlError, type AgentIdentity, AgentLockBusyError, AgentNameExhaustedError, AgentNotFoundError, AgentNotInWorkstreamError, type AgentObservation, AgentPaneDeadError, AgentPaneStillAliveError, type AgentReading, AgentReplacedError, AgentRestartedError, type AgentRow, AgentSendIndeterminateError, AgentSendUnsupportedError, AgentSlashCommandUnsupportedError, AgentSpawnCliNotFoundError, AgentSpawnStartupError, type AgentTool, type AgentWatchHandle, type AmbientOptions, type AmbientResult, type AppendLogOptions, type ApplyResult, type AttemptPlan, type AttemptRecord, type AttentionKind, type AuthorisedTask, type AuthorizeTasksOptions, type AuthorizeTasksResult, type AutoConfig, type BlockEdgeResult, CAPTURE_TRIGGER_DDL, CAPTURE_VERSION, COURSE_CHECK_AGE_MS, COURSE_CHECK_CLOSED, CURRENT_SCHEMA_VERSION, type CaptureDb, type CaptureIntent, type CaptureOptions, type CaseCollision, type ChannelOpts, type CheapDriftReport, type ClaimResult, type ClaimTaskOptions, ClaimerNotRegisteredError, type CloseAgentOptions, type CloseAgentResult, CloseNeedsEvidenceError, type CloseOutcome, type ClosePreview, type CloseSubstate, type CloseTaskResult, type CollectResult, type CommandResolutionResult, type CommandResolver, CrossWorkstreamEdgeError, type CtlLink, type CursorKind, type CursorToken, CycleError, DEFAULT_NEXT_CAP, DEFAULT_SUBSTATE, DELEGATE_TOKEN, DRIFT_REPORT_CAP, type DashboardAgent, type DashboardAttention, type DashboardCall, type DashboardDelegate, type DashboardEdge, type DashboardHumanNeed, type DashboardLogItem, type DashboardOptions, type DashboardSnapshot, type DashboardTask, type DashboardWave, type DashboardWorkstream, type Db, DbInsideSyncDirError, DelegateCallConflictError, DelegateNotFoundError, type DelegateRequest, type DelegateRow, type DelegateState, DelegateStateError, type DeleteTaskResult, type DoctorCheck, type DoctorStatus, DriftDetectedError, type DriftRecord, type DriftReport, EXPECTED_TABLES, type EvidenceOption, type ExecuteNextOptions, FRONTIER_CLOSED_PER_NODE, FRONTIER_MAX_DEPTH, FRONTIER_MAX_NODES, type FileLockOptions, type FinishDelegateOptions, type FinishDelegateResult, type FleetHazard, type FlushResult, type FrontierDirection, type FrontierEntry, type FsProbe, GLYPH, GroupIdAmbiguousError, GroupNotFoundError, HOST_ENV_KEYS, HOST_PLACEHOLDERS, HazardFailError, type HazardSeverity, type HintMove, type Hlc, HlcOverflowError, HlcParseError, type HostChannel, HostChannelBusyError, HostCheckFailedError, type HostCheckReport, type HostCheckStep, HostExistsError, HostInUseError, type HostLease, HostNotFoundError, type HostProfile, HostProfileError, HostSpawnUnsupportedError, HostTemplateError, type HostTemplateValues, type HumanNeeded, HumanNeededInvalidError, type HumanNeededOptions, HumanTaskError, type IdFromTitleResult, type IngestFromDbResult, type IngestResult, type InsertAgentInput, InvalidSubstateError, KNOWN_INTENTS, KNOWN_VERBS, type KnownIntent, type ListLiveAgentsOptions, type ListLogsOptions, type ListNotesOptions, type ListTasksOptions, type LiveAgent, type LiveAgentsView, type LocalIntent, type LogKind, LogKindReservedError, type LogRow, MACHINE_LOCAL_ENTITIES, MACHINE_LOCAL_TABLES, MAX_NEXT_CAP, MU_SHIM_MARKER, MachineIdentityMissingError, type MachineLocalEntity, type MachineLocalLoss, type MachineLocalTable, type MigrateEntry, type MigrateResult, type MigrateState, type MuxBackend, type MuxBackendName, MuxError, type MuxPane, type MuxPaneStatus, NextArgError, type NextContext, type NextMove, type NextOutcome, type NextPlan, type NextResult, NoMultiplexerError, type ObservedAgent, type ObservedWatch, type Op, type OpContext, OpEntityNotSyncedError, OpKeyMalformedError, type OpenDbOptions, type OpenTaskFrontier, type OpenTaskFrontierOptions, 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 RecordRef, type RefBaseline, type RegisterDelegateOptions, type RegisterRef, type RegisteredRef, type ReleaseResult, type ReleaseTaskOptions, type ReleasedWorktree, RemoteCloseRefusedError, RemoteCollectError, RemoteCollectUnsupportedError, RemotePrepareError, type RemoteRecovery, type RemoteRecoveryReason, RemoteRecoveryRefusedError, type RemoveBlockEdgeResult, type RenderableOp, type RenderedOp, type ReparentTaskResult, RevisionMismatchError, type RuntimeState, SEGMENT_FORMAT_VERSION, SEGMENT_READ_VERSIONS, STALLED_TOOL_MS, SYNCED_ENTITIES, SchemaTooNewError, SchemaTooOldError, type SegmentDefect, type SegmentDefectKind, type SegmentLine, type SegmentManifest, type SelectedNotes, type SendResult, type SetStatusOptions, type SetStatusResult, type SlugifyResult, type SpawnAgentOptions, SpawnAttemptBusyError, SpawnAttemptFailedError, SpawnAttemptGuardError, type SpawnReceipt, SpawnReceiptConflictError, SpawnTaskStateError, SpawnTrustDialogError, SqliteTooOldError, type StallActionOptions, type StallActionResult, type StateCounts, type StateDelegate, type StateHumanNeed, type StateMe, type StateReading, type StateSnapshot, type StateSnapshotOptions, type StateSource, type StateTask, type StateWave, SubstateReasonRequiredError, SyncDirForeignError, type SyncPassResult, SyncPeerNotFoundError, SyncPeerRefAmbiguousError, SyncSourceNotFoundError, SyncSourceTooNewError, type SyncedEntity, TASK_KINDS, TASK_STATUSES, TASK_STATUS_LIST, TASK_SUBSTATES, TASK_SUBSTATE_ROWS, TaskAlreadyOwnedError, TaskAutoArgError, TaskAutoRefusedError, type TaskBrief, TaskBriefMissingError, type TaskBriefOptions, type TaskEdgeWithStatus, type TaskEdges, type TaskEdgesWithStatus, TaskExistsError, TaskHasOpenBlockersError, TaskIdInvalidError, TaskInTriageError, type TaskKind, TaskNotFoundError, TaskNotInWorkstreamError, TaskNoteRangeError, type TaskNoteRow, type TaskPair, TaskParkStateError, TaskParkedError, type TaskRow, type TaskSpawnOutcome, type TaskSpawnRequest, type TaskStatus, type TaskSubstate, TaskTitleSlugEmptyError, type TeardownResult, type TextMatcher, TmuxError, type TmuxExecResult, type TmuxExecutor, type TmuxPane, type Track, type Transport, UNKNOWN_REASON, UnguardedMoveError, type UpdateTaskOptions, type UpdateTaskResult, type VerdictLabel, type VerdictTally, DEFAULT_CTL_STUCK_AFTER_MS as WAIT_DEFAULT_CTL_STUCK_AFTER_MS, DEFAULT_STUCK_AFTER_MS as WAIT_DEFAULT_STUCK_AFTER_MS, WAIT_HEARTBEAT_CAP_MS, WAIT_REF_KINDS, WAIT_REGEX_MAX_LEN, WAIT_REGISTRATION_MAX_REFS, WAIT_REGISTRATION_STATES, WAIT_TEXT_MAX, type WaitEvent, type WaitEventKind, WaitNothingError, type WaitOptions, type WaitRef, WaitRefError, type WaitRefKind, WaitRegexError, type WaitRegistration, WaitRegistrationError, type WaitRegistrationState, type WaitResult, WaitResumeNotFoundError, type WaitSnapshot, type WaitStallContext, WaveNotFoundError, WorkstreamExistsError, WorkstreamHasAgentsError, WorkstreamNameInvalidError, WorkstreamNameReservedError, WorkstreamNotFoundError, type WorkstreamOptions, WorkstreamPanesLiveError, WorkstreamRevisionMismatchError, WorkstreamSessionLiveError, type WorkstreamState, type WorkstreamSummary, WorkstreamTornDownError, WorktreeBranchExistsError, WorktreeDirtyError, WorktreeHeldError, type WorktreeHolder, WorktreePathNotEmptyError, type WorktreeRow, type WorktreeState, WorktreeVcsRequiredError, abortAgent, acceptTask, activeMux, addBlockEdge, addHost, addNote, addTask, addTasks, admitHostChannel, agentKey, agentRevision, agentStateGlyph, ambientFlush, ambientIngest, ambientSyncPass, appendLog, applyIncomingOp, applyOp, applyOps, assertRevision, assertSyncDirV2, assertValidPaneId, attemptName, authorisedReady, authorizeTasks, autoPermitted, beginWait, bindHostChannel, buildTaskBrief, callerWorkstreams, capPlan, capture, captureTriggersCurrent, checkCaseCollisions, checkCheapDriftInvariant, checkCommandResolvable, checkDbInsideSyncDir, checkDrift, checkFleetHazards, checkHost, checkNetworkMount, checkRegexGrammar, claimTask, classifyFsType, closeAgent, closeRemoteWorktree, closeTask, closedToken, collectRef, collectRemoteAgent, compareHlc, compileTextMatcher, computeNext, computeNotices, courseCheckHint, createWorktree, ctlAgentHooks, ctlRuntimeState, currentCallers, currentOpContext, cursorKey, defaultDbPath, defaultSpawnLivenessMs, defaultStateDir, deleteAgent, deleteTask, detectMux, discoverPeers, driftRemediation, emitEvent, endWait, ensureWorkstream, envVarNameForCli, executeNext, expandHostTemplate, expectsCtl, findCaseCollisions, finishDelegate, flushSegment, forgetWorktree, formatDriftRecord, formatHlc, formatPair, getActionReceipt, getAgent, getAgentByPane, getAutoConfig, getDelegateCall, getHost, getParallelTracks, getPrerequisites, getRemoteRecovery, getTask, getTaskEdges, getTaskEdgesWithStatus, getWatermark, getWorktreeAt, getWorktreeFor, hostEnvWords, hostStarter, idFromTitle, idFromTitleVerbose, ingestFromDb, ingestSegment, insertAgent, installCapture, interruptAgent, isConsumed, isPathInside, isTaskStatus, isValidAgentName, isValidPair, isValidPaneId, isValidTaskId, isValidWorkstreamName, killPane, killSession, latestSeq, listAgents, listBlocked, listDelegates, listDelegatesOf, listGoals, listHostChannels, listHosts, listInProgress, listLiveAgents, listLogs, listNotes, listPanes, listReady, listRecentClosed, listRemoteRecoveries, listTasks, listTasksByOwner, listWorkstreams, listWorktrees, loadDashboard, loadOpenTaskFrontier, loadResume, localMachineId, locksDir, mapLegacyStatus, markDelegate, migratePi, murmurAvailable, mux, muxByName, nextHlc, observationFromReading, observeAgentStates, opSubject, openBlockersClosure, openDb, openHumanNeeds, openTask, paneAlive, parkTask, parseHlc, parseOpKey, parseVerdict, peerStatuses, pendingAttempts, planAttempt, previewClose, probeFilesystem, readAgent, readAgentStates, readCursors, readFileLockMeta, readLiveAgents, readManifest, readWaitRegistration, rebuildInto, receiveHlc, reclaimWorktreePath, reconcile, recordCursors, recordHumanNeeded, recoveriesFor, registerDelegateCall, registerOwnedWait, registerWorktree, releaseHostChannel, releaseHostChannelsForAgent, releaseStall, releaseStallHandler, releaseTask, releaseWorktree, removeBlockEdge, removeHost, removeWorktree, renderArgv, renderFrontierLines, renderOp, renderOpLine, renderPlan, repairPeer, reparentTask, reserveActionReceipt, reserveAttempt, reserveHostChannel, resetCommandResolverForTests, resetMux, resetSleep, resetTmuxExecutor, resetWatermark, resolveActorIdentity, resolveCliCommand, resolveCliCommandWithSource, resolvePair, resolvePeerRef, runHostTemplate, saveResume, segmentLineCount, segmentPath, selectRemoteRecovery, selectTaskNotes, sendToAgent, sendViaTransport, setCommandResolverForTests, setMuxForTests, setSleepForTests, setTaskStatus, setTmuxExecutor, setWatermark, settledCloseInput, skillDirDigest, sleep, slugifyTitle, slugifyTitleVerbose, spawnAgent, spawnAutoAttempt, spawnForTask, stateSnapshot, steerStall, steerStallHandler, steerText, summarizeWorkstream, syncDir, syncEnabled, syncPass, taskRevision, taskRevisions, teardownWorkstream, tmux, tmuxBackend, transitionActionReceipt, unparkTask, updateTask, upstreamRefs, validateHostTemplate, verdictTally, verifyAgainstManifest, waitForEvents, waitWithActions, watchAgentRun, withAgentLock, withCaptureSuppressed, withFileLock, withHostChannel, withOpContext, workstreamRevision, worktreePath, worktreeState, worktreesRoot };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire as __muCreateRequire } from "node:module"; const require
|
|
|
2
2
|
import {
|
|
3
3
|
STALLED_TOOL_MS,
|
|
4
4
|
loadDashboard
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7M634JMD.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_STATE_GLYPH,
|
|
8
8
|
DEFAULT_CTL_STUCK_AFTER_MS,
|
|
@@ -64,13 +64,10 @@ import {
|
|
|
64
64
|
transitionActionReceipt,
|
|
65
65
|
waitForEvents,
|
|
66
66
|
waitWithActions
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-4ULY3ZKO.js";
|
|
68
68
|
import {
|
|
69
69
|
COURSE_CHECK_AGE_MS,
|
|
70
70
|
COURSE_CHECK_CLOSED,
|
|
71
|
-
DelegateCallConflictError,
|
|
72
|
-
DelegateNotFoundError,
|
|
73
|
-
DelegateStateError,
|
|
74
71
|
FRONTIER_CLOSED_PER_NODE,
|
|
75
72
|
FRONTIER_MAX_DEPTH,
|
|
76
73
|
FRONTIER_MAX_NODES,
|
|
@@ -108,29 +105,22 @@ import {
|
|
|
108
105
|
courseCheckHint,
|
|
109
106
|
currentCallers,
|
|
110
107
|
discoverPeers,
|
|
111
|
-
finishDelegate,
|
|
112
108
|
flushSegment,
|
|
113
109
|
getAutoConfig,
|
|
114
|
-
getDelegateCall,
|
|
115
110
|
getWatermark,
|
|
116
111
|
ingestFromDb,
|
|
117
112
|
ingestSegment,
|
|
118
|
-
listDelegates,
|
|
119
|
-
listDelegatesOf,
|
|
120
113
|
loadOpenTaskFrontier,
|
|
121
114
|
localMachineId,
|
|
122
|
-
markDelegate,
|
|
123
115
|
opSubject,
|
|
124
116
|
openBlockersClosure,
|
|
125
117
|
openHumanNeeds,
|
|
126
118
|
parseOpKey,
|
|
127
|
-
parseVerdict,
|
|
128
119
|
peerStatuses,
|
|
129
120
|
pendingAttempts,
|
|
130
121
|
planAttempt,
|
|
131
122
|
readManifest,
|
|
132
123
|
recordHumanNeeded,
|
|
133
|
-
registerDelegateCall,
|
|
134
124
|
renderArgv,
|
|
135
125
|
renderFrontierLines,
|
|
136
126
|
renderOp,
|
|
@@ -146,9 +136,8 @@ import {
|
|
|
146
136
|
syncDir,
|
|
147
137
|
syncEnabled,
|
|
148
138
|
syncPass,
|
|
149
|
-
verdictTally,
|
|
150
139
|
verifyAgainstManifest
|
|
151
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-SS7NQSSZ.js";
|
|
152
141
|
import {
|
|
153
142
|
AgentAbortNeedsCtlError,
|
|
154
143
|
AgentAbortTimeoutError,
|
|
@@ -181,6 +170,9 @@ import {
|
|
|
181
170
|
CycleError,
|
|
182
171
|
DEFAULT_SUBSTATE,
|
|
183
172
|
DELEGATE_TOKEN,
|
|
173
|
+
DelegateCallConflictError,
|
|
174
|
+
DelegateNotFoundError,
|
|
175
|
+
DelegateStateError,
|
|
184
176
|
EXPECTED_TABLES,
|
|
185
177
|
GroupIdAmbiguousError,
|
|
186
178
|
GroupNotFoundError,
|
|
@@ -302,11 +294,13 @@ import {
|
|
|
302
294
|
envVarNameForCli,
|
|
303
295
|
expandHostTemplate,
|
|
304
296
|
expectsCtl,
|
|
297
|
+
finishDelegate,
|
|
305
298
|
forgetWorktree,
|
|
306
299
|
formatHlc,
|
|
307
300
|
formatPair,
|
|
308
301
|
getAgent,
|
|
309
302
|
getAgentByPane,
|
|
303
|
+
getDelegateCall,
|
|
310
304
|
getHost,
|
|
311
305
|
getPrerequisites,
|
|
312
306
|
getRemoteRecovery,
|
|
@@ -334,6 +328,8 @@ import {
|
|
|
334
328
|
latestSeq,
|
|
335
329
|
listAgents,
|
|
336
330
|
listBlocked,
|
|
331
|
+
listDelegates,
|
|
332
|
+
listDelegatesOf,
|
|
337
333
|
listGoals,
|
|
338
334
|
listHostChannels,
|
|
339
335
|
listHosts,
|
|
@@ -351,6 +347,7 @@ import {
|
|
|
351
347
|
listWorktrees,
|
|
352
348
|
locksDir,
|
|
353
349
|
mapLegacyStatus,
|
|
350
|
+
markDelegate,
|
|
354
351
|
murmurAvailable,
|
|
355
352
|
muxByName,
|
|
356
353
|
mux_exports,
|
|
@@ -362,6 +359,7 @@ import {
|
|
|
362
359
|
paneAlive,
|
|
363
360
|
parkTask,
|
|
364
361
|
parseHlc,
|
|
362
|
+
parseVerdict,
|
|
365
363
|
previewClose,
|
|
366
364
|
readAgent,
|
|
367
365
|
readAgentStates,
|
|
@@ -374,6 +372,7 @@ import {
|
|
|
374
372
|
reconcile,
|
|
375
373
|
recordCursors,
|
|
376
374
|
recoveriesFor,
|
|
375
|
+
registerDelegateCall,
|
|
377
376
|
registerOwnedWait,
|
|
378
377
|
registerWorktree,
|
|
379
378
|
releaseHostChannel,
|
|
@@ -420,6 +419,7 @@ import {
|
|
|
420
419
|
updateTask,
|
|
421
420
|
upstreamRefs,
|
|
422
421
|
validateHostTemplate,
|
|
422
|
+
verdictTally,
|
|
423
423
|
watchAgentRun,
|
|
424
424
|
withAgentLock,
|
|
425
425
|
withCaptureSuppressed,
|
|
@@ -430,7 +430,7 @@ import {
|
|
|
430
430
|
worktreePath,
|
|
431
431
|
worktreeState,
|
|
432
432
|
worktreesRoot
|
|
433
|
-
} from "./chunk-
|
|
433
|
+
} from "./chunk-UCZPJX7K.js";
|
|
434
434
|
import {
|
|
435
435
|
defaultStateDir
|
|
436
436
|
} from "./chunk-PZ5GOCWH.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
formatElapsed,
|
|
4
4
|
loadDashboard,
|
|
5
5
|
matches
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7M634JMD.js";
|
|
7
7
|
import {
|
|
8
8
|
KNOWN_VERBS,
|
|
9
9
|
ambientIngest,
|
|
10
10
|
currentCallers,
|
|
11
11
|
parseOpKey,
|
|
12
12
|
syncEnabled
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SS7NQSSZ.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_SUBSTATE,
|
|
16
16
|
TASK_STATUSES,
|
|
@@ -25,8 +25,9 @@ import {
|
|
|
25
25
|
selectTaskNotes,
|
|
26
26
|
shellWord,
|
|
27
27
|
spawnerFromEnv,
|
|
28
|
-
tmuxAttachMode
|
|
29
|
-
|
|
28
|
+
tmuxAttachMode,
|
|
29
|
+
verdictLineLabel
|
|
30
|
+
} from "./chunk-UCZPJX7K.js";
|
|
30
31
|
import "./chunk-PZ5GOCWH.js";
|
|
31
32
|
|
|
32
33
|
// src/cli/tui/index.ts
|
|
@@ -474,6 +475,12 @@ function agentStateRole(state) {
|
|
|
474
475
|
if (state === "needs_permission") return "permission";
|
|
475
476
|
return "muted";
|
|
476
477
|
}
|
|
478
|
+
function noteKindRole(kind) {
|
|
479
|
+
if (kind === "brief") return "title";
|
|
480
|
+
if (kind === "report" || kind === "close") return "good";
|
|
481
|
+
if (kind === "verdict") return "warn";
|
|
482
|
+
return "id";
|
|
483
|
+
}
|
|
477
484
|
|
|
478
485
|
// src/cli/tui/frame.tsx
|
|
479
486
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -593,12 +600,38 @@ function wrap(text, width) {
|
|
|
593
600
|
return out;
|
|
594
601
|
}
|
|
595
602
|
var clampTop = (top, count, height) => Math.max(0, Math.min(top, count - Math.max(1, height)));
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
603
|
+
var NOTE_INDENT = 2;
|
|
604
|
+
var noteTime = (iso) => /^(\d{4}-\d\d-\d\d)T(\d\d:\d\d:\d\d)/.exec(iso)?.slice(1, 3).join(" ") ?? iso;
|
|
605
|
+
var verdictRole = (label) => label === "CONFIRMED" ? "good" : label === "REFUTED" ? "bad" : "warn";
|
|
606
|
+
function notesLines(sel, width) {
|
|
607
|
+
const out = [];
|
|
608
|
+
for (const n of sel.notes) {
|
|
609
|
+
const head = [
|
|
610
|
+
{ text: "\u2500\u2500 ", role: "border" },
|
|
611
|
+
{ text: `#${n.n} `, role: "muted" },
|
|
612
|
+
{ text: n.kind, role: noteKindRole(n.kind) },
|
|
613
|
+
...sel.pinned.includes(n.n) ? [{ text: " pinned", role: "muted" }] : [],
|
|
614
|
+
{ text: " \xB7 ", role: "border" },
|
|
615
|
+
{ text: n.author ?? "-", role: "id" },
|
|
616
|
+
{ text: " \xB7 ", role: "border" },
|
|
617
|
+
{ text: noteTime(n.createdAt), role: "muted" },
|
|
618
|
+
{ text: " ", role: "border" }
|
|
619
|
+
];
|
|
620
|
+
const used = stringWidth(head.map((x) => x.text).join(""));
|
|
621
|
+
out.push(
|
|
622
|
+
used > width ? fitLine(head, width) : [...head, { text: "\u2500".repeat(width - used), role: "border" }]
|
|
623
|
+
);
|
|
624
|
+
const pad = " ".repeat(NOTE_INDENT);
|
|
625
|
+
let verdictSeen = false;
|
|
626
|
+
for (const raw of n.content.replace(/\s+$/, "").split(/\r\n|\n|\r/)) {
|
|
627
|
+
const label = verdictSeen ? null : verdictLineLabel(raw);
|
|
628
|
+
if (label !== null) verdictSeen = true;
|
|
629
|
+
const role = label === null ? "text" : verdictRole(label);
|
|
630
|
+
for (const l of wrap(raw, width - NOTE_INDENT)) out.push([{ text: pad + l, role }]);
|
|
631
|
+
}
|
|
632
|
+
out.push([]);
|
|
633
|
+
}
|
|
634
|
+
return out;
|
|
602
635
|
}
|
|
603
636
|
function titleOf(t) {
|
|
604
637
|
switch (t.kind) {
|
|
@@ -681,7 +714,8 @@ function Drill({
|
|
|
681
714
|
const sel = runtime.notes(target.workstream, target.id, all);
|
|
682
715
|
done({
|
|
683
716
|
state: "ready",
|
|
684
|
-
text:
|
|
717
|
+
text: "(no notes)",
|
|
718
|
+
...sel.notes.length > 0 ? { notes: sel } : {},
|
|
685
719
|
notices: sel.more > 0 ? [`${sel.more} of ${sel.total} notes not shown: A shows them all (oldest first)`] : [],
|
|
686
720
|
header: taskLine(runtime.task(target.workstream, target.id))
|
|
687
721
|
});
|
|
@@ -717,7 +751,8 @@ task now: ${taskLine(runtime.task(workstream, local))}` : "";
|
|
|
717
751
|
...ready?.notices ?? [],
|
|
718
752
|
...above
|
|
719
753
|
].flatMap((l) => wrap(l, columns));
|
|
720
|
-
const
|
|
754
|
+
const plain = (t, role = "text") => wrap(t, columns).map((l) => [{ text: l, role }]);
|
|
755
|
+
const body = load.state === "loading" ? plain("loading\u2026") : load.state === "error" ? plain(`error: ${load.message}`, "bad") : load.notes !== void 0 ? notesLines(load.notes, columns) : plain(load.text);
|
|
721
756
|
return { head, body };
|
|
722
757
|
}, [load, notice2, flash, columns]);
|
|
723
758
|
const showStrip = strip !== null && rows >= 4;
|
|
@@ -756,7 +791,7 @@ task now: ${taskLine(runtime.task(workstream, local))}` : "";
|
|
|
756
791
|
)),
|
|
757
792
|
visible.map((l, i) => (
|
|
758
793
|
// biome-ignore lint/suspicious/noArrayIndexKey: lines have no identity; the index IS the position
|
|
759
|
-
/* @__PURE__ */ jsx2(Text2, { wrap: "truncate",
|
|
794
|
+
/* @__PURE__ */ jsx2(Text2, { wrap: "truncate", children: /* @__PURE__ */ jsx2(Segs, { line: fitLine(l, columns) }) }, first + i)
|
|
760
795
|
)),
|
|
761
796
|
/* @__PURE__ */ jsx2(Box2, { flexGrow: 1 }),
|
|
762
797
|
rows >= 3 ? /* @__PURE__ */ jsx2(Text2, { wrap: "truncate", ...style("muted"), children: cell(`${where}${hint}`, columns) }) : null
|
|
@@ -783,8 +818,8 @@ function gridWidths(total, n) {
|
|
|
783
818
|
}
|
|
784
819
|
var PLACEMENT = {
|
|
785
820
|
1: {},
|
|
786
|
-
2: { attention: 0, agents: 0, progress: 1, open: 1, log: 0 },
|
|
787
|
-
3: { attention: 0, agents: 0, progress: 1, open: 1, log: 2 }
|
|
821
|
+
2: { attention: 0, agents: 0, progress: 1, open: 1, waves: 1, log: 0 },
|
|
822
|
+
3: { attention: 0, agents: 0, progress: 1, open: 1, waves: 1, log: 2 }
|
|
788
823
|
};
|
|
789
824
|
function placeCards(ids, n) {
|
|
790
825
|
const table = PLACEMENT[n];
|
|
@@ -1027,27 +1062,38 @@ function sortTasks(tasks, sort) {
|
|
|
1027
1062
|
else if (sort === "id") out.sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
|
1028
1063
|
return out;
|
|
1029
1064
|
}
|
|
1030
|
-
function
|
|
1065
|
+
function callText(t) {
|
|
1066
|
+
const c = t.call;
|
|
1067
|
+
if (c === void 0) return "";
|
|
1068
|
+
const judged = c.judges === null ? "" : ` > ${c.judges}`;
|
|
1069
|
+
return `${c.state}${c.verdict === null ? "" : ` ${c.verdict}`}${judged}`;
|
|
1070
|
+
}
|
|
1071
|
+
var callRole = (t) => t.call?.state === "failed" ? "bad" : t.call?.state === "refused" ? "warn" : "muted";
|
|
1072
|
+
function taskRows(snap, ws, f, opts = {}) {
|
|
1073
|
+
const callOf = opts.call === false ? () => "" : callText;
|
|
1031
1074
|
const statuses = statusesOf(f.status);
|
|
1032
1075
|
const inWs = snap.tasks.filter((t) => t.workstream === ws);
|
|
1033
1076
|
const tasks = sortTasks(
|
|
1034
1077
|
inWs.filter(
|
|
1035
|
-
(t) => statuses.includes(t.status) && matches(f.text, t.key, t.title, t.owner, t.substate)
|
|
1078
|
+
(t) => statuses.includes(t.status) && matches(f.text, t.key, t.title, t.owner, t.substate, callOf(t))
|
|
1036
1079
|
),
|
|
1037
1080
|
f.sort
|
|
1038
1081
|
);
|
|
1039
|
-
const specs = [protect(0, 24), fixed(STATUS_WIDTH), protect(0, 24), CLIP];
|
|
1082
|
+
const specs = [protect(0, 24), fixed(STATUS_WIDTH), protect(0, 24), protect(0, 48), CLIP];
|
|
1040
1083
|
const agentNames = snap.agents.filter((a) => a.workstream === ws).map((a) => `@${a.name}`);
|
|
1041
1084
|
const line = layoutRows(
|
|
1042
|
-
[
|
|
1085
|
+
[
|
|
1086
|
+
...inWs.map((t) => [t.id, "", ownerLabel(t), callOf(t)]),
|
|
1087
|
+
...agentNames.map((n) => ["", "", n, ""])
|
|
1088
|
+
],
|
|
1043
1089
|
specs
|
|
1044
1090
|
);
|
|
1045
1091
|
return tasks.map(
|
|
1046
1092
|
(t) => rowOf(
|
|
1047
1093
|
t.key,
|
|
1048
1094
|
line(
|
|
1049
|
-
[t.id, statusText(t.status, t.substate), ownerLabel(t), t.title],
|
|
1050
|
-
["id", statusRole(t.status, t.substate), "muted", void 0]
|
|
1095
|
+
[t.id, statusText(t.status, t.substate), ownerLabel(t), callOf(t), t.title],
|
|
1096
|
+
["id", statusRole(t.status, t.substate), "muted", callRole(t), void 0]
|
|
1051
1097
|
),
|
|
1052
1098
|
{ drill: { kind: "notes", workstream: t.workstream, id: t.id, title: t.title } }
|
|
1053
1099
|
)
|
|
@@ -1194,11 +1240,11 @@ function attentionStrip(attention, ws) {
|
|
|
1194
1240
|
])
|
|
1195
1241
|
];
|
|
1196
1242
|
}
|
|
1197
|
-
var attentionRole = (a) => a.kind === "dead" ? "bad" : "warn";
|
|
1243
|
+
var attentionRole = (a) => a.kind === "dead" || a.kind === "delegate" && a.text.startsWith("delegate failed") ? "bad" : "warn";
|
|
1198
1244
|
function attentionRows(snap, ws) {
|
|
1199
1245
|
return snap.attention.map((a) => {
|
|
1200
1246
|
const agent = snap.agents.find((x) => x.key === a.target);
|
|
1201
|
-
const id = a.kind === "human" ? a.target?.slice((a.workstream?.length ?? 0) + 1) : void 0;
|
|
1247
|
+
const id = a.kind === "human" || a.kind === "delegate" ? a.target?.slice((a.workstream?.length ?? 0) + 1) : void 0;
|
|
1202
1248
|
const drill = agent ? scrollbackOf(agent) : a.workstream !== null && id ? { kind: "notes", workstream: a.workstream, id, title: a.text } : void 0;
|
|
1203
1249
|
return rowOf(
|
|
1204
1250
|
a.key,
|
|
@@ -1207,6 +1253,32 @@ function attentionRows(snap, ws) {
|
|
|
1207
1253
|
);
|
|
1208
1254
|
});
|
|
1209
1255
|
}
|
|
1256
|
+
function waveText(w) {
|
|
1257
|
+
const parts = [
|
|
1258
|
+
`${w.calls} call${w.calls === 1 ? "" : "s"}`,
|
|
1259
|
+
w.confirmed > 0 ? `${w.confirmed} CONFIRMED` : "",
|
|
1260
|
+
w.refuted > 0 ? `${w.refuted} REFUTED` : "",
|
|
1261
|
+
w.unverified > 0 ? `${w.unverified} UNVERIFIED` : "",
|
|
1262
|
+
w.pending > 0 ? `${w.pending} pending${w.refused > 0 ? ` (${w.refused} refused)` : ""}` : ""
|
|
1263
|
+
].filter((p) => p !== "");
|
|
1264
|
+
return parts.join(" ");
|
|
1265
|
+
}
|
|
1266
|
+
function waveRows(snap, ws) {
|
|
1267
|
+
const mine = snap.waves.filter((w) => w.workstream === ws);
|
|
1268
|
+
const line = layoutRows(
|
|
1269
|
+
mine.map((w) => [w.wave, ""]),
|
|
1270
|
+
[protect(0, 32), CLIP]
|
|
1271
|
+
);
|
|
1272
|
+
return mine.map(
|
|
1273
|
+
(w) => rowOf(
|
|
1274
|
+
w.key,
|
|
1275
|
+
line(
|
|
1276
|
+
[w.wave, waveText(w)],
|
|
1277
|
+
["id", w.refused > 0 ? "warn" : w.pending > 0 ? "progress" : "muted"]
|
|
1278
|
+
)
|
|
1279
|
+
)
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1210
1282
|
function tabRows(tab, snap, ws, f, now) {
|
|
1211
1283
|
switch (tab) {
|
|
1212
1284
|
case "overview":
|
|
@@ -1236,7 +1308,9 @@ function moveCursor(rows, key, tab, delta, was) {
|
|
|
1236
1308
|
// src/cli/tui/overview.tsx
|
|
1237
1309
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1238
1310
|
function overviewCards(snap, ws, now) {
|
|
1239
|
-
const lines = (tab
|
|
1311
|
+
const lines = (tab) => tabRows(tab, snap, ws, NO_FILTER, now).map((r) => r.line);
|
|
1312
|
+
const tasks = (f) => taskRows(snap, ws, f, { call: false }).map((r) => r.line);
|
|
1313
|
+
const waves = waveRows(snap, ws).map((r) => r.line);
|
|
1240
1314
|
return [
|
|
1241
1315
|
{
|
|
1242
1316
|
id: "attention",
|
|
@@ -1250,17 +1324,18 @@ function overviewCards(snap, ws, now) {
|
|
|
1250
1324
|
{
|
|
1251
1325
|
id: "progress",
|
|
1252
1326
|
title: "In progress",
|
|
1253
|
-
lines:
|
|
1327
|
+
lines: tasks({ ...NO_FILTER, status: "in_progress" }),
|
|
1254
1328
|
empty: "nothing in progress",
|
|
1255
1329
|
max: 8
|
|
1256
1330
|
},
|
|
1257
1331
|
{
|
|
1258
1332
|
id: "open",
|
|
1259
1333
|
title: "Open \xB7 by ROI",
|
|
1260
|
-
lines:
|
|
1334
|
+
lines: tasks({ ...NO_FILTER, status: "open", sort: "roi" }),
|
|
1261
1335
|
empty: "nothing open",
|
|
1262
1336
|
max: 12
|
|
1263
1337
|
},
|
|
1338
|
+
...waves.length > 0 ? [{ id: "waves", title: "Waves", lines: waves, empty: "no waves", max: 5 }] : [],
|
|
1264
1339
|
{ id: "log", title: "Log", lines: lines("log"), empty: "no activity", max: 10, tail: true }
|
|
1265
1340
|
];
|
|
1266
1341
|
}
|
|
@@ -1770,4 +1845,4 @@ async function runDashboard(opts) {
|
|
|
1770
1845
|
export {
|
|
1771
1846
|
runDashboard
|
|
1772
1847
|
};
|
|
1773
|
-
//# sourceMappingURL=tui-
|
|
1848
|
+
//# sourceMappingURL=tui-FUBQ326D.js.map
|