@adhdev/daemon-core 1.0.2 → 1.0.3-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +25 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -6
- package/dist/index.mjs.map +1 -1
- package/dist/providers/spec/cli-adapter.d.ts +13 -0
- package/package.json +3 -3
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +1 -0
- package/src/cli-adapters/terminal-screen.ts +1 -0
- package/src/providers/spec/cli-adapter.ts +29 -2
package/dist/index.js
CHANGED
|
@@ -428,10 +428,10 @@ function readInjected(value) {
|
|
|
428
428
|
}
|
|
429
429
|
function getDaemonBuildInfo() {
|
|
430
430
|
if (cached) return cached;
|
|
431
|
-
const commit = readInjected(true ? "
|
|
432
|
-
const commitShort = readInjected(true ? "
|
|
433
|
-
const version = readInjected(true ? "1.0.2" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
434
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
431
|
+
const commit = readInjected(true ? "b6f79695b64040479237666cb46e156af5ec014b" : void 0) ?? "unknown";
|
|
432
|
+
const commitShort = readInjected(true ? "b6f79695" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
433
|
+
const version = readInjected(true ? "1.0.3-rc.2" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
434
|
+
const builtAt = readInjected(true ? "2026-07-19T12:05:55.781Z" : void 0);
|
|
435
435
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
436
436
|
return cached;
|
|
437
437
|
}
|
|
@@ -18130,6 +18130,7 @@ var init_ghostty_vt_backend = __esm({
|
|
|
18130
18130
|
}
|
|
18131
18131
|
getCursorPosition() {
|
|
18132
18132
|
if (this.disposed) return { col: 0, row: 0 };
|
|
18133
|
+
if (typeof this.terminal.getCursorPosition !== "function") return { col: 0, row: 0 };
|
|
18133
18134
|
return this.terminal.getCursorPosition();
|
|
18134
18135
|
}
|
|
18135
18136
|
dispose() {
|
|
@@ -18184,6 +18185,7 @@ var init_terminal_screen = __esm({
|
|
|
18184
18185
|
return this.terminal.getTextWithScrollback();
|
|
18185
18186
|
}
|
|
18186
18187
|
getCursorPosition() {
|
|
18188
|
+
if (typeof this.terminal.getCursorPosition !== "function") return { col: 0, row: 0 };
|
|
18187
18189
|
return this.terminal.getCursorPosition();
|
|
18188
18190
|
}
|
|
18189
18191
|
/** Current viewport dimensions (cols × rows). */
|
|
@@ -46231,6 +46233,14 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
46231
46233
|
* MCP config), so this routing keeps the dashboard honest until
|
|
46232
46234
|
* hermes ships a runtime MCP override. */
|
|
46233
46235
|
spawnedEnv = {};
|
|
46236
|
+
/** Wall clock at the moment an approval modal was last resolved (auto-approve,
|
|
46237
|
+
* dashboard, or mesh_approve) via a successful button press. Powers
|
|
46238
|
+
* isApprovalRecentlyResolved() — the second suppression signal the mesh event
|
|
46239
|
+
* forwarder uses to drop a duplicate agent:waiting_approval re-emitted across
|
|
46240
|
+
* the approval↔busy TUI flap window (AUTOAPPROVE-FLAP). Mirrors the
|
|
46241
|
+
* cli-state-engine's lastApprovalResolvedAt for the spec-driven adapter path
|
|
46242
|
+
* (claude-cli specs/4.0.json), which previously stubbed the method to false. */
|
|
46243
|
+
lastApprovalResolvedAt = 0;
|
|
46234
46244
|
constructor(specPath, workingDir, cliArgs, extraEnv, transportFactory) {
|
|
46235
46245
|
const raw = JSON.parse(fs20.readFileSync(specPath, "utf8"));
|
|
46236
46246
|
this.spec = {
|
|
@@ -46368,6 +46378,11 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
46368
46378
|
// the char count still looks safe.
|
|
46369
46379
|
static TERMINAL_SNAPSHOT_DEFAULT_MAX_BYTES = 32 * 1024;
|
|
46370
46380
|
static TERMINAL_SNAPSHOT_ABSOLUTE_MAX_BYTES = 64 * 1024;
|
|
46381
|
+
/** Window during which isApprovalRecentlyResolved() reports a just-resolved
|
|
46382
|
+
* approval. Matches CliProviderInstance.APPROVAL_LOCAL_RESOLUTION_COOLDOWN_MS
|
|
46383
|
+
* (8000) — the same auto-approve suppression window signal1 uses — so a modal
|
|
46384
|
+
* re-emitted within the approval↔busy flap is suppressed by signal2 too. */
|
|
46385
|
+
static APPROVAL_RESOLVED_COOLDOWN_MS = 8e3;
|
|
46371
46386
|
/**
|
|
46372
46387
|
* MESH-READ-TERMINAL (feature 2: RAW terminal read). Least-privilege read
|
|
46373
46388
|
* of the CURRENT rendered viewport for mesh_read_terminal on the spec path
|
|
@@ -46471,7 +46486,11 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
46471
46486
|
resolveModalMatched(buttonIndex) {
|
|
46472
46487
|
const buttons = this.latestModal?.buttons ?? [];
|
|
46473
46488
|
const target = buttonIndex >= 0 && buttonIndex < buttons.length ? buttons[buttonIndex].index : buttonIndex + 1;
|
|
46474
|
-
|
|
46489
|
+
const pressed = this.driver.clickModalButton(target);
|
|
46490
|
+
if (pressed && this.latestState?.status === "approval") {
|
|
46491
|
+
this.lastApprovalResolvedAt = Date.now();
|
|
46492
|
+
}
|
|
46493
|
+
return pressed;
|
|
46475
46494
|
}
|
|
46476
46495
|
async resolveAction(data) {
|
|
46477
46496
|
const args = data && typeof data === "object" ? data : {};
|
|
@@ -46512,7 +46531,7 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
46512
46531
|
this.statusCallback?.();
|
|
46513
46532
|
}
|
|
46514
46533
|
isApprovalRecentlyResolved() {
|
|
46515
|
-
return
|
|
46534
|
+
return !!(this.lastApprovalResolvedAt && Date.now() - this.lastApprovalResolvedAt < _SpecCliAdapter.APPROVAL_RESOLVED_COOLDOWN_MS);
|
|
46516
46535
|
}
|
|
46517
46536
|
clearHistory() {
|
|
46518
46537
|
}
|