@adhdev/daemon-core 1.0.18 → 1.0.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
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",
@@ -286,7 +286,14 @@ export function isPurePtyTranscriptProvider(provider: {
286
286
  transcriptAuthority?: 'provider' | 'daemon';
287
287
  nativeHistory?: unknown;
288
288
  tui?: Record<string, unknown>;
289
- }): boolean {
289
+ } | null | undefined): boolean {
290
+ // No provider (e.g. an instance whose module isn't set when the stall watchdog
291
+ // ticks) ⇒ not the pure-PTY class. Guarding here protects every caller — the
292
+ // stall-reconcile and turn-start paths pass this.provider unguarded, and
293
+ // this.provider is genuinely nullable at runtime (see this.provider?.nativeHistory
294
+ // in cli-provider-instance.ts). Matches resolveLocalSessionPurePty's own
295
+ // no-provider ⇒ not-pure-PTY contract.
296
+ if (!provider) return false;
290
297
  if (provider.transcriptAuthority === 'provider') return false;
291
298
  // nativeHistory is a top-level provider field not surfaced on
292
299
  // CliProviderModule; read it via the same structural shape the adapter uses.