@adhdev/daemon-core 1.0.21-rc.2 → 1.0.21-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/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/providers/cli-provider-instance.ts +37 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-core",
|
|
3
|
-
"version": "1.0.21-rc.
|
|
3
|
+
"version": "1.0.21-rc.4",
|
|
4
4
|
"description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"author": "vilmire",
|
|
48
48
|
"license": "AGPL-3.0-or-later",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@adhdev/mesh-shared": "1.0.21-rc.
|
|
51
|
-
"@adhdev/session-host-core": "1.0.21-rc.
|
|
50
|
+
"@adhdev/mesh-shared": "1.0.21-rc.4",
|
|
51
|
+
"@adhdev/session-host-core": "1.0.21-rc.4",
|
|
52
52
|
"@agentclientprotocol/sdk": "^0.16.1",
|
|
53
53
|
"ajv": "^8.20.0",
|
|
54
54
|
"ajv-formats": "^3.0.1",
|
|
@@ -2108,10 +2108,45 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
2108
2108
|
if (allowMissingAssistantTimeout && pending.previousStatus === 'waiting_approval') {
|
|
2109
2109
|
return { reason: 'missing_final_assistant', terminal: false, holdForTranscript: true };
|
|
2110
2110
|
}
|
|
2111
|
-
|
|
2111
|
+
// (EARLY-EMIT FLOOR, external-native — mission f2f6da1b defect A) We reached
|
|
2112
|
+
// here because the external-native transcript probe found NO in-turn final
|
|
2113
|
+
// assistant reply (the assistant-tail branch at the top of this block already
|
|
2114
|
+
// returned null when it did). Two provider classes land here with very
|
|
2115
|
+
// different meanings:
|
|
2116
|
+
//
|
|
2117
|
+
// • claude-cli — the transcript write merely TRAILS the (genuinely finished)
|
|
2118
|
+
// idle transition by a fraction of a second (a background-child turn's
|
|
2119
|
+
// answer lands moments later). CANON-C's decoupled-IMMEDIATE emit is the
|
|
2120
|
+
// designed, correct behavior here (weak now, upgraded by the reconcile once
|
|
2121
|
+
// the write lands) so the coordinator learns idle without delay. It stays
|
|
2122
|
+
// UN-floored (owner decision, mission f2f6da1b).
|
|
2123
|
+
//
|
|
2124
|
+
// • codex-cli / kimi — the SAME idle read is routinely a MID-TOOL-CALL quiet
|
|
2125
|
+
// valley: the spec `busy→idle` fires on a ~1.5s cursor-stable window between
|
|
2126
|
+
// tool calls with `Working (` / `esc to interrupt` momentarily off-screen.
|
|
2127
|
+
// The turn is NOT over and no final assistant will ever land at this instant.
|
|
2128
|
+
// Without the floor the CANON-C decoupled path fired a weak completed at the
|
|
2129
|
+
// first ~13s poll (evidenceLevel=weak, finalAssistantPresent=false) while the
|
|
2130
|
+
// worker was still `Working (2m+)` — the early-completion false-positive.
|
|
2131
|
+
// Mark the block noExternalTranscriptSource so the CANON-C min-elapsed floor
|
|
2132
|
+
// holds the weak emit until either the transcript's final assistant lands
|
|
2133
|
+
// (block clears → genuine emit) OR the worker stays CONTINUOUSLY quiet-idle
|
|
2134
|
+
// past the floor (a real answerless turn-end). A mid-tool-call quiet never
|
|
2135
|
+
// reaches the floor because the next tool call's idle→busy transition cancels
|
|
2136
|
+
// the pending.
|
|
2137
|
+
//
|
|
2138
|
+
// No provider manifest flag distinguishes write-lag from mid-tool-call, so the
|
|
2139
|
+
// scope is the concrete write-lag provider (claude-cli) vs the rest.
|
|
2140
|
+
const isWriteLagNativeSource = this.type === 'claude-cli';
|
|
2141
|
+
return {
|
|
2142
|
+
reason: 'missing_final_assistant',
|
|
2143
|
+
terminal: true,
|
|
2144
|
+
allowTimeout: allowMissingAssistantTimeout,
|
|
2145
|
+
...(isWriteLagNativeSource ? {} : { noExternalTranscriptSource: true }),
|
|
2146
|
+
};
|
|
2112
2147
|
}
|
|
2113
2148
|
if ((this.provider as any).requiresFinalAssistantBeforeIdle === true) {
|
|
2114
|
-
return { reason: 'missing_final_assistant', terminal: true, allowTimeout: allowMissingAssistantTimeout };
|
|
2149
|
+
return { reason: 'missing_final_assistant', terminal: true, allowTimeout: allowMissingAssistantTimeout, noExternalTranscriptSource: true };
|
|
2115
2150
|
}
|
|
2116
2151
|
} else {
|
|
2117
2152
|
LOG.debug('CLI', `[${this.type}] missing_final_assistant (not ownsExternal) requiresFinalAssistant=${!!(this.provider as any).requiresFinalAssistantBeforeIdle}`);
|