@adhdev/daemon-core 1.0.18-rc.20 → 1.0.18-rc.4
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/cli-adapters/provider-cli-shared.d.ts +0 -33
- package/dist/commands/cli-manager.d.ts +0 -9
- package/dist/commands/upgrade-helper.d.ts +0 -1
- package/dist/commands/windows-atomic-upgrade.d.ts +0 -5
- package/dist/config/mesh-json-config.d.ts +0 -62
- package/dist/index.d.ts +2 -4
- package/dist/index.js +3998 -6112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3855 -5966
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/coordinator-prompt.d.ts +0 -76
- package/dist/mesh/mesh-active-work.d.ts +1 -1
- package/dist/mesh/mesh-ledger.d.ts +1 -28
- package/dist/mesh/mesh-node-identity.d.ts +0 -23
- package/dist/mesh/mesh-refine-gates.d.ts +0 -89
- package/dist/mesh/mesh-remote-event-pull.d.ts +0 -3
- package/dist/mesh/mesh-runtime-store.d.ts +0 -11
- package/dist/mesh/mesh-work-queue.d.ts +1 -24
- package/dist/providers/chat-message-normalization.d.ts +0 -22
- package/dist/providers/cli-provider-instance-types.d.ts +0 -4
- package/dist/providers/cli-provider-instance.d.ts +0 -78
- package/dist/providers/contracts.d.ts +0 -17
- package/dist/providers/provider-schema.d.ts +0 -1
- package/dist/providers/sdk/v1/builders/cli/detect-status.d.ts +0 -14
- package/dist/providers/types/interactive-prompt.d.ts +0 -18
- package/dist/repo-mesh-types.d.ts +6 -38
- package/dist/shared-types.d.ts +2 -4
- package/package.json +3 -3
- package/src/boot/daemon-lifecycle.ts +0 -10
- package/src/cli-adapters/cli-state-engine.ts +1 -17
- package/src/cli-adapters/provider-cli-adapter.ts +6 -2
- package/src/cli-adapters/provider-cli-shared.ts +0 -48
- package/src/commands/cli-manager.ts +8 -72
- package/src/commands/high-family/mesh-coordinator-launch.ts +2 -17
- package/src/commands/high-family/mesh-events.ts +2 -13
- package/src/commands/med-family/mesh-crud.ts +0 -155
- package/src/commands/med-family/mesh-queue.ts +1 -74
- package/src/commands/router-refine.ts +4 -71
- package/src/commands/router.ts +0 -8
- package/src/commands/upgrade-helper.ts +15 -78
- package/src/commands/windows-atomic-upgrade.ts +40 -194
- package/src/config/mesh-json-config.ts +0 -111
- package/src/index.ts +1 -21
- package/src/mesh/coordinator-prompt.ts +11 -258
- package/src/mesh/mesh-active-work.ts +1 -11
- package/src/mesh/mesh-completion-synthesis.ts +1 -12
- package/src/mesh/mesh-event-classify.ts +0 -19
- package/src/mesh/mesh-event-forwarding.ts +6 -64
- package/src/mesh/mesh-events-utils.ts +0 -42
- package/src/mesh/mesh-ledger.ts +0 -77
- package/src/mesh/mesh-node-identity.ts +0 -49
- package/src/mesh/mesh-queue-assignment.ts +11 -210
- package/src/mesh/mesh-reconcile-loop.ts +3 -306
- package/src/mesh/mesh-refine-gates.ts +0 -300
- package/src/mesh/mesh-remote-event-pull.ts +47 -68
- package/src/mesh/mesh-runtime-store.ts +0 -21
- package/src/mesh/mesh-work-queue.ts +2 -85
- package/src/providers/chat-message-normalization.ts +0 -53
- package/src/providers/cli-provider-instance-types.ts +0 -53
- package/src/providers/cli-provider-instance.ts +15 -497
- package/src/providers/contracts.ts +1 -25
- package/src/providers/provider-schema.ts +0 -83
- package/src/providers/sdk/v1/builders/cli/detect-status.ts +0 -23
- package/src/providers/sdk/v1/builders/cli/parse-approval.ts +0 -20
- package/src/providers/sdk/v1/schemas/cli/provider.schema.json +0 -44
- package/src/providers/types/interactive-prompt.ts +0 -77
- package/src/repo-mesh-types.ts +12 -112
- package/src/shared-types.ts +1 -9
- package/src/status/reporter.ts +0 -1
- package/src/status/snapshot.ts +0 -2
- package/dist/mesh/mesh-disk-retention.d.ts +0 -105
- package/dist/providers/auto-approve-modes.d.ts +0 -14
- package/src/mesh/mesh-disk-retention.ts +0 -370
- package/src/providers/auto-approve-modes.ts +0 -103
|
@@ -66,15 +66,6 @@ export type CompletedFinalizationBlock = {
|
|
|
66
66
|
// preamble summary (evidenceLevel=insufficient) into the append-only ledger before the
|
|
67
67
|
// worker's next approval turn resumes. Independent of valley length.
|
|
68
68
|
holdForTranscript?: boolean;
|
|
69
|
-
// (CANON-C EARLY-EMIT FLOOR) Set on a missing_final_assistant block whose provider has NO
|
|
70
|
-
// external transcript source to trail — a PTY-parsed provider (codex-cli) or one that merely
|
|
71
|
-
// requires a final assistant before idle. For those the CANON-C decoupled-immediate emit is a
|
|
72
|
-
// pure timing guess (no separate transcript will land to upgrade it), so it must observe the
|
|
73
|
-
// CANON_C_MISSING_ASSISTANT_MIN_ELAPSED_MS floor rather than fire at the ~13s first-poll
|
|
74
|
-
// waitedMs. A native-source block (claude-cli external-native, where the transcript legitimately
|
|
75
|
-
// trails the idle transition by a write) deliberately does NOT set this — its immediate emit is
|
|
76
|
-
// correct and is upgraded by the transcript reconcile.
|
|
77
|
-
noExternalTranscriptSource?: boolean;
|
|
78
69
|
};
|
|
79
70
|
|
|
80
71
|
export type CompletionFinalAssistantEvidence = {
|
|
@@ -96,25 +87,6 @@ export type ExternalTranscriptProbe = {
|
|
|
96
87
|
|
|
97
88
|
export const COMPLETED_FINALIZATION_RETRY_MS = 1000;
|
|
98
89
|
export const COMPLETED_FINALIZATION_MAX_WAIT_MS = 30_000;
|
|
99
|
-
// (CANON-C EARLY-EMIT FLOOR) Minimum elapsed time before the CANON-C transcript-evidence
|
|
100
|
-
// gate (allowTimeout blocks) may fire its decoupled-immediate completion for a block that
|
|
101
|
-
// has NO final-assistant evidence (missing_final_assistant, finalAssistantPresent=false).
|
|
102
|
-
//
|
|
103
|
-
// CANON-C deliberately decouples the idle NOTIFICATION from the transcript's final-assistant
|
|
104
|
-
// turn: for a native-source worker whose transcript write merely trails the idle transition,
|
|
105
|
-
// emitting immediately (weak, later upgraded) is correct. But the SAME allowTimeout path also
|
|
106
|
-
// carries codex/antigravity PLAIN terminal blocks whose on-screen "final" assistant never
|
|
107
|
-
// landed — there the immediate emit fires at whatever tiny waitedMs the first completion-gate
|
|
108
|
-
// poll observed (~13s live), stamping evidenceLevel=insufficient and racing the transcript
|
|
109
|
-
// before it can catch up or the 180s mesh-worker stall watchdog can arm. Requiring a minimum
|
|
110
|
-
// dwell gives the transcript a window to land (clearing the block for a GENUINE emit) and lets
|
|
111
|
-
// the stall watchdog own long turns, while still emitting a weak completion promptly once the
|
|
112
|
-
// floor is met so a genuinely-answerless turn is never wedged. A block WITH final-assistant
|
|
113
|
-
// evidence present is unaffected (it takes the normal emit path, not this floor). Scoped (at
|
|
114
|
-
// the call site) to the missing_final_assistant transcript-evidence gate on mesh workers.
|
|
115
|
-
// Sized so a short transcript-write lag resolves under it while staying well below the 30s
|
|
116
|
-
// COMPLETED_FINALIZATION_MAX_WAIT_MS cap that force-releases the weak completion regardless.
|
|
117
|
-
export const CANON_C_MISSING_ASSISTANT_MIN_ELAPSED_MS = 20_000;
|
|
118
90
|
// (FALSEIDLE-BGCHILD-a) Minimum generating→idle settle window for native-history mesh worker
|
|
119
91
|
// sessions. Native-history providers (e.g. claude-cli) normally flush the completion with
|
|
120
92
|
// flushDelay=0 — the transcript is authoritative, so there is no reason to wait. But a worker
|
|
@@ -148,31 +120,6 @@ export const NATIVE_HISTORY_MESH_IDLE_SETTLE_MS = 4000;
|
|
|
148
120
|
// met. Scoped (at the call site) to autonomous mesh sessions, so interactive sessions are
|
|
149
121
|
// untouched.
|
|
150
122
|
export const PTY_PARSED_FINAL_ASSISTANT_QUIET_DWELL_MS = 1200;
|
|
151
|
-
// (ANTIGRAVITY-30S-CAP-PREMATURE) Minimum PTY quiet dwell required before the
|
|
152
|
-
// COMPLETED_FINALIZATION_MAX_WAIT_MS (30s) cap may RELEASE an antigravity `holdForTranscript`
|
|
153
|
-
// block into the forced weak completion. Antigravity is a native-source provider: its
|
|
154
|
-
// idle/generating verdict is PTY-screen-derived, but its assistant answer lands in
|
|
155
|
-
// native-history and can legitimately lag past 30s on a long turn (tool phase + slow reply).
|
|
156
|
-
// The 30s cap releases on ELAPSED TIME, not proof-of-idle — so on a long turn it fired a
|
|
157
|
-
// premature completed/idle to the coordinator while the PTY was still generating (live-repro:
|
|
158
|
-
// a routed RCA task emitted "completed" in 10s with no result). Require instead that the PTY
|
|
159
|
-
// has been quiet (no raw output) for at least this long AND the adapter reports no pending
|
|
160
|
-
// response before the cap may force-emit. A genuinely quiescent tool-only turn (no assistant
|
|
161
|
-
// bubble) has a stable screen well past this bound and still finalizes; a turn whose PTY is
|
|
162
|
-
// still producing output keeps holding past 30s (up to ANTIGRAVITY_HOLD_HARD_CAP_MS). Scoped
|
|
163
|
-
// (at the call site) to antigravity-cli holdForTranscript blocks, so claude-cli/codex-cli
|
|
164
|
-
// completion timing is untouched.
|
|
165
|
-
export const ANTIGRAVITY_HOLD_QUIET_DWELL_MS = 3000;
|
|
166
|
-
// (ANTIGRAVITY-30S-CAP-PREMATURE) Absolute upper bound on how long an antigravity
|
|
167
|
-
// `holdForTranscript` block may be held once the 30s cap is reached but the PTY is still
|
|
168
|
-
// active. The quiet-dwell gate above keeps holding while the PTY keeps emitting output, so a
|
|
169
|
-
// truly runaway turn (PTY never falls quiet) must still eventually release rather than wedge
|
|
170
|
-
// the session in generating forever — strictly worse than the original premature-emit bug.
|
|
171
|
-
// Once a pending completion has been held this long we force-emit regardless of PTY activity.
|
|
172
|
-
// Sized generously (5 min) so realistic long antigravity turns (multi-tool + slow reply)
|
|
173
|
-
// finish and let the transcript land / the PTY fall quiet naturally, while still guaranteeing
|
|
174
|
-
// eventual release. Mirrors BACKGROUND_TASK_HOLD_MAX_MS's escape-hatch rationale.
|
|
175
|
-
export const ANTIGRAVITY_HOLD_HARD_CAP_MS = 5 * 60_000;
|
|
176
123
|
// (FALSE-IDLE-BACKGROUND-CMD) Hard cap on how long a pending completion may be HELD
|
|
177
124
|
// solely because the claude-cli transcript still shows an unresolved run_in_background
|
|
178
125
|
// bash job (backgroundTaskActive). The hold is the correct behaviour while the job is
|