@adhdev/daemon-core 0.9.82-rc.423 → 0.9.82-rc.424
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 +42 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -6
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-ledger.d.ts +1 -1
- package/dist/providers/cli-provider-instance.d.ts +13 -0
- package/package.json +2 -2
- package/src/mesh/mesh-event-forwarding.ts +5 -0
- package/src/mesh/mesh-ledger.ts +44 -1
- package/src/providers/cli-provider-instance.ts +37 -2
package/dist/index.js
CHANGED
|
@@ -389,10 +389,10 @@ function readInjected(value) {
|
|
|
389
389
|
}
|
|
390
390
|
function getDaemonBuildInfo() {
|
|
391
391
|
if (cached) return cached;
|
|
392
|
-
const commit = readInjected(true ? "
|
|
393
|
-
const commitShort = readInjected(true ? "
|
|
394
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
395
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
392
|
+
const commit = readInjected(true ? "906d662b9cf13e7841eaebd28cb81403c236a7ad" : void 0) ?? "unknown";
|
|
393
|
+
const commitShort = readInjected(true ? "906d662b" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
394
|
+
const version = readInjected(true ? "0.9.82-rc.424" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
395
|
+
const builtAt = readInjected(true ? "2026-06-29T09:38:26.396Z" : void 0);
|
|
396
396
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
397
397
|
return cached;
|
|
398
398
|
}
|
|
@@ -4166,6 +4166,24 @@ function normalizeMeshWorkerResult(input, source = "explicit_metadata") {
|
|
|
4166
4166
|
source
|
|
4167
4167
|
};
|
|
4168
4168
|
}
|
|
4169
|
+
function summaryHasParseableJsonAnswer(summary) {
|
|
4170
|
+
const text = readNonEmptyString(summary);
|
|
4171
|
+
if (!text) return false;
|
|
4172
|
+
const fenced = text.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
4173
|
+
const candidates = [fenced?.[1], text].filter(Boolean);
|
|
4174
|
+
for (const candidate of candidates) {
|
|
4175
|
+
const trimmed = candidate.trim();
|
|
4176
|
+
if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) continue;
|
|
4177
|
+
try {
|
|
4178
|
+
const parsed = JSON.parse(trimmed);
|
|
4179
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed) && Object.keys(parsed).length > 0) {
|
|
4180
|
+
return true;
|
|
4181
|
+
}
|
|
4182
|
+
} catch {
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4185
|
+
return false;
|
|
4186
|
+
}
|
|
4169
4187
|
function resolveWorkerResult(opts) {
|
|
4170
4188
|
if (opts.workerResult && typeof opts.workerResult === "object") {
|
|
4171
4189
|
return normalizeMeshWorkerResult(opts.workerResult, "explicit_metadata");
|
|
@@ -4174,6 +4192,9 @@ function resolveWorkerResult(opts) {
|
|
|
4174
4192
|
if (parsed) {
|
|
4175
4193
|
return normalizeMeshWorkerResult(parsed, "final_summary_json");
|
|
4176
4194
|
}
|
|
4195
|
+
if (summaryHasParseableJsonAnswer(opts.finalSummary)) {
|
|
4196
|
+
return normalizeMeshWorkerResult(void 0, "parseable_answer");
|
|
4197
|
+
}
|
|
4177
4198
|
return normalizeMeshWorkerResult(void 0, "default");
|
|
4178
4199
|
}
|
|
4179
4200
|
function buildTaskCompletionEvidence(opts) {
|
|
@@ -16261,6 +16282,11 @@ function injectMeshSystemMessage(components, args) {
|
|
|
16261
16282
|
completionDiagnostic: args.metadataEvent.completionDiagnostic && typeof args.metadataEvent.completionDiagnostic === "object" ? args.metadataEvent.completionDiagnostic : void 0,
|
|
16262
16283
|
evidence: completionEvidence,
|
|
16263
16284
|
// B2: evidenceLevel lets coordinator know when completion evidence is insufficient.
|
|
16285
|
+
// NOTIF Defect-2b: ONLY source==='default' (no parseable answer at all) is
|
|
16286
|
+
// 'insufficient'. 'parseable_answer' (a real JSON answer that just isn't
|
|
16287
|
+
// worker-result-shaped, e.g. a MAGI envelope) is concrete evidence and must
|
|
16288
|
+
// resolve to 'sufficient' — resolveWorkerResult now upgrades that case so a
|
|
16289
|
+
// complete, valid answer is no longer mislabelled insufficient/reviewRecommended.
|
|
16264
16290
|
...completionEvidence ? completionEvidence.workerResult.source === "default" ? { evidenceLevel: "insufficient", reviewRecommended: true } : { evidenceLevel: "sufficient" } : {}
|
|
16265
16291
|
}
|
|
16266
16292
|
});
|
|
@@ -40434,6 +40460,12 @@ function hasNonEmptyCliModalButtons(activeModal) {
|
|
|
40434
40460
|
function isCliGeneratingLikeStatus(status) {
|
|
40435
40461
|
return status === "generating" || status === "streaming" || status === "no_progress" || status === "long_generating" || status === "starting";
|
|
40436
40462
|
}
|
|
40463
|
+
function computeTurnAnchoredDurationMs(engineTurnStartedAt, generatingStartedAt, now) {
|
|
40464
|
+
const engineStart = typeof engineTurnStartedAt === "number" && Number.isFinite(engineTurnStartedAt) ? engineTurnStartedAt : 0;
|
|
40465
|
+
if (engineStart > 0) return { durationMs: now - engineStart, anchor: "turn-start" };
|
|
40466
|
+
if (generatingStartedAt > 0) return { durationMs: now - generatingStartedAt, anchor: "generatingStartedAt" };
|
|
40467
|
+
return { durationMs: 0, anchor: "none" };
|
|
40468
|
+
}
|
|
40437
40469
|
function buildCliStructuredInputPrompt(input, options = {}) {
|
|
40438
40470
|
const promptParts = [];
|
|
40439
40471
|
const imageRefs = [];
|
|
@@ -41944,8 +41976,12 @@ var CliProviderInstance = class _CliProviderInstance {
|
|
|
41944
41976
|
if (!this.generatingStartedAt && !this.generatingDebouncePending) {
|
|
41945
41977
|
LOG.debug("CLI", `[${this.type}] suppressed startup-phase generating\u2192idle blip (generatingStartedAt=0, no debounce pending)`);
|
|
41946
41978
|
} else if (this.generatingDebouncePending) {
|
|
41947
|
-
const
|
|
41948
|
-
|
|
41979
|
+
const { durationMs: shortDurationMs, anchor: durationAnchor } = computeTurnAnchoredDurationMs(
|
|
41980
|
+
this.adapter?.currentTurnStartedAt,
|
|
41981
|
+
this.generatingStartedAt,
|
|
41982
|
+
now
|
|
41983
|
+
);
|
|
41984
|
+
LOG.info("CLI", `[${this.type}] suppressed short generating (${shortDurationMs}ms, anchor=${durationAnchor})`);
|
|
41949
41985
|
if (this.generatingDebounceTimer) {
|
|
41950
41986
|
clearTimeout(this.generatingDebounceTimer);
|
|
41951
41987
|
this.generatingDebounceTimer = null;
|