@qvac/harness 1.0.0-rc.13 → 1.0.0-rc.15

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +36 -6
  3. package/dist-lib/index.d.ts +1 -0
  4. package/dist-lib/index.js +2 -1
  5. package/dist-lib/lib/capabilities/completion-engine/actors/executing.js +20 -1
  6. package/dist-lib/lib/capabilities/completion-engine/actors/loading-skill.js +1 -1
  7. package/dist-lib/lib/capabilities/completion-engine/actors/preparing.js +10 -6
  8. package/dist-lib/lib/capabilities/completion-engine/actors/skill-step.js +2 -2
  9. package/dist-lib/lib/capabilities/completion-engine/actors/stream.d.ts +1 -1
  10. package/dist-lib/lib/capabilities/completion-engine/actors/stream.js +8 -0
  11. package/dist-lib/lib/capabilities/completion-engine/actors/streaming.js +6 -2
  12. package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.js +10 -4
  13. package/dist-lib/lib/capabilities/completion-engine/driver.js +15 -0
  14. package/dist-lib/lib/capabilities/completion-engine/loop.js +2 -1
  15. package/dist-lib/lib/capabilities/completion-engine/operations.js +1 -0
  16. package/dist-lib/lib/capabilities/completion-engine/ports.js +1 -1
  17. package/dist-lib/lib/capabilities/completion-engine/round.js +16 -7
  18. package/dist-lib/lib/capabilities/completion-engine/session.d.ts +3 -3
  19. package/dist-lib/lib/capabilities/prompt-prefix.d.ts +2 -0
  20. package/dist-lib/lib/capabilities/prompt-prefix.js +8 -0
  21. package/dist-lib/lib/capabilities/sdk-tool.d.ts +1 -1
  22. package/dist-lib/lib/capabilities/sdk-tool.js +17 -2
  23. package/dist-lib/lib/capabilities/usage-breakdown.d.ts +1 -0
  24. package/dist-lib/lib/capabilities/usage-breakdown.js +4 -1
  25. package/dist-lib/lib/contract/completion.d.ts +3 -0
  26. package/dist-lib/lib/contract/run.d.ts +2 -0
  27. package/dist-lib/lib/helpers/goal-check.d.ts +26 -0
  28. package/dist-lib/lib/helpers/goal-check.js +248 -22
  29. package/dist-lib/lib/helpers/spawn-path.d.ts +1 -0
  30. package/dist-lib/lib/helpers/spawn-path.js +2 -1
  31. package/dist-lib/lib/machine/completion/actions/completion.d.ts +3 -2
  32. package/dist-lib/lib/machine/completion/actions/completion.js +65 -15
  33. package/dist-lib/lib/machine/completion/actions/tools.js +47 -6
  34. package/dist-lib/lib/machine/completion/context.js +5 -1
  35. package/dist-lib/lib/machine/completion/implementations.d.ts +1 -0
  36. package/dist-lib/lib/machine/completion/implementations.js +7 -0
  37. package/dist-lib/lib/machine/completion/machine.d.ts +4 -1
  38. package/dist-lib/lib/machine/completion/machine.js +10 -1
  39. package/dist-lib/lib/machine/completion/rules.d.ts +3 -1
  40. package/dist-lib/lib/machine/completion/rules.js +25 -4
  41. package/dist-lib/lib/machine/completion/types.d.ts +16 -0
  42. package/dist-lib/lib/machine/index.d.ts +6 -1
  43. package/dist-lib/lib/machine/index.js +2 -0
  44. package/dist-lib/lib/models/model-pool.js +1 -2
  45. package/dist-lib/lib/office/engine/pptx/presentation.js +10 -5
  46. package/dist-lib/lib/sidecar/index.js +1 -1
  47. package/dist-lib/lib/skills-host/index.d.ts +1 -1
  48. package/dist-lib/lib/skills-host/index.js +3 -2
  49. package/dist-lib/lib/tools/exec/runner.d.ts +4 -0
  50. package/dist-lib/lib/tools/exec/runner.js +20 -3
  51. package/dist-lib/lib/tools/office.js +1 -0
  52. package/dist-lib/lib/tools/skills/overlay-watch.d.ts +2 -2
  53. package/dist-lib/lib/tools/skills/overlay-watch.js +4 -3
  54. package/dist-lib/lib/wire.js +9 -3
  55. package/dist-lib/plugins/image/index.js +5 -5
  56. package/dist-lib/plugins/knowledge/index.d.ts +3 -0
  57. package/dist-lib/plugins/knowledge/index.js +4 -0
  58. package/dist-lib/plugins/knowledge/manifest.d.ts +28 -4
  59. package/dist-lib/plugins/knowledge/manifest.js +49 -4
  60. package/dist-lib/plugins/knowledge/store.d.ts +10 -1
  61. package/dist-lib/plugins/knowledge/store.js +127 -57
  62. package/dist-lib/plugins/music/index.js +4 -4
  63. package/dist-lib/plugins/obsidian/index.js +14 -4
  64. package/dist-lib/plugins/python/index.d.ts +3 -1
  65. package/dist-lib/plugins/python/index.js +4 -1
  66. package/dist-lib/plugins/python/python-adapter.d.ts +2 -1
  67. package/dist-lib/plugins/python/python-adapter.js +8 -1
  68. package/dist-lib/plugins/sandbox-linux/index.js +2 -2
  69. package/dist-lib/plugins/sandbox-macos/index.js +2 -2
  70. package/dist-lib/plugins/sandbox-vm/index.d.ts +2 -1
  71. package/dist-lib/plugins/sandbox-vm/index.js +2 -2
  72. package/dist-lib/plugins/sandbox-vm/vm-shell.d.ts +3 -1
  73. package/dist-lib/plugins/sandbox-vm/vm-shell.js +45 -16
  74. package/dist-lib/plugins/sandbox-windows/index.js +2 -2
  75. package/dist-lib/plugins/sandbox-windows/prebuilds/win32-arm64/qvac-sandbox.exe +0 -0
  76. package/dist-lib/plugins/sandbox-windows/prebuilds/win32-x64/qvac-sandbox.exe +0 -0
  77. package/package.json +27 -22
  78. package/scripts/addon-externals.cjs +4 -1
  79. package/patches/localwatch@1.4.3.patch +0 -13
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
4
  import process from 'process';
5
- import { execEnv } from '../../lib/helpers/spawn-path.js';
5
+ import { EXEC_ENV_DEFAULTS, execEnv } from '../../lib/helpers/spawn-path.js';
6
6
  import { PluginRegistry } from '../../lib/plugins/index.js';
7
7
  import { Policy } from '../../lib/policy/index.js';
8
8
  import { createShellAdapter } from '../../lib/tools/exec/adapters/shell/shell-adapter.js';
@@ -182,7 +182,7 @@ export class LinuxSandbox {
182
182
  ...(Array.isArray(opts.stdio) ? opts.stdio : STDIO),
183
183
  ...(program ? ['pipe'] : [])
184
184
  ],
185
- env: { ...inherited, ...opts.env, TMPDIR: `${tmp}/` }
185
+ env: { ...EXEC_ENV_DEFAULTS, ...inherited, ...opts.env, TMPDIR: `${tmp}/` }
186
186
  });
187
187
  }
188
188
  catch (error) {
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
4
  import process from 'process';
5
- import { execEnv, HOMEBREW_BIN_DIRS } from '../../lib/helpers/spawn-path.js';
5
+ import { EXEC_ENV_DEFAULTS, execEnv, HOMEBREW_BIN_DIRS } from '../../lib/helpers/spawn-path.js';
6
6
  import { PluginRegistry } from '../../lib/plugins/index.js';
7
7
  import { Policy } from '../../lib/policy/index.js';
8
8
  import { createShellAdapter } from '../../lib/tools/exec/adapters/shell/shell-adapter.js';
@@ -276,7 +276,7 @@ export class SeatbeltSandbox {
276
276
  const spawnFn = (line, opts = {}) => spawnArgv(this._sandboxExec, ['-p', profile, ...params, '-D', `TMP=${tmp}`, '/bin/sh', '-c', line], {
277
277
  ...opts,
278
278
  shell: false,
279
- env: SeatbeltSandbox._proxied({ ...inherited, ...opts.env, TMPDIR: `${tmp}/` }, proxy)
279
+ env: SeatbeltSandbox._proxied({ ...EXEC_ENV_DEFAULTS, ...inherited, ...opts.env, TMPDIR: `${tmp}/` }, proxy)
280
280
  });
281
281
  return { spawn: spawnFn, killProcess: process.kill.bind(process) };
282
282
  }
@@ -8,6 +8,7 @@ export interface VmShellOptions {
8
8
  readonly cpus?: number;
9
9
  readonly memory?: string | number;
10
10
  readonly createSandbox?: CreateSandbox;
11
+ readonly stopGraceMs?: number;
11
12
  }
12
13
  export declare class VmShell implements HarnessPlugin {
13
14
  readonly name = "sandbox-vm";
@@ -18,7 +19,7 @@ export declare class VmShell implements HarnessPlugin {
18
19
  readonly shell: ExecShell;
19
20
  private readonly _image;
20
21
  private readonly _shell;
21
- constructor({ createSandbox, image, ...vm }: VmShellOptions);
22
+ constructor({ createSandbox, stopGraceMs, image, ...vm }: VmShellOptions);
22
23
  validate(): string | null;
23
24
  setup(): PluginSetup;
24
25
  }
@@ -16,9 +16,9 @@ export class VmShell {
16
16
  shell;
17
17
  _image;
18
18
  _shell;
19
- constructor({ createSandbox = barevisorSandbox, image, ...vm }) {
19
+ constructor({ createSandbox = barevisorSandbox, stopGraceMs, image, ...vm }) {
20
20
  this._image = image;
21
- this._shell = new GuestShell({ ...vm, image, network: false, disk: false, mounts: {} }, createSandbox);
21
+ this._shell = new GuestShell({ ...vm, image, network: false, disk: false, mounts: {} }, createSandbox, stopGraceMs);
22
22
  this.shell = this._shell;
23
23
  }
24
24
  validate() {
@@ -16,6 +16,7 @@ export interface VmSandboxOptions {
16
16
  }
17
17
  export interface VmRunResult {
18
18
  readonly exitCode: number | null;
19
+ readonly signal?: string | null;
19
20
  readonly stdout: string;
20
21
  readonly stderr: string;
21
22
  }
@@ -34,10 +35,11 @@ export declare class GuestShell implements ExecShell {
34
35
  readonly enforces: PolicyEnforcement;
35
36
  private readonly _options;
36
37
  private readonly _create;
38
+ private readonly _graceMs;
37
39
  private _sandbox;
38
40
  private _closing;
39
41
  private _queue;
40
- constructor(options: VmSandboxOptions, create: CreateSandbox);
42
+ constructor(options: VmSandboxOptions, create: CreateSandbox, graceMs?: number);
41
43
  resolve(args: Record<string, unknown>, ctx?: ExecutionContext): ExecutionPlan;
42
44
  close(): Promise<void>;
43
45
  private _serial;
@@ -1,6 +1,7 @@
1
1
  import { AbortedError, raceAbort } from '../../lib/helpers/race-abort.js';
2
+ import { EXEC_ENV_DEFAULTS } from '../../lib/helpers/spawn-path.js';
2
3
  import { Policy } from '../../lib/policy/index.js';
3
- import { capOutput, DEFAULT_TIMEOUT_MS, MAX_OUTPUT_CHARS } from '../../lib/tools/exec/runner.js';
4
+ import { capOutput, DEFAULT_TIMEOUT_MS, MAX_OUTPUT_CHARS, STOP_GRACE_MS, TIMED_OUT_EXIT_CODE, timeoutNote, withNote } from '../../lib/tools/exec/runner.js';
4
5
  export const WORKDIR_REFUSED = 'workdir is not available: commands run inside a VM that has no host paths. ' +
5
6
  'Omit workdir and use paths inside the VM.';
6
7
  export async function barevisorSandbox(options) {
@@ -11,34 +12,58 @@ export async function barevisorSandbox(options) {
11
12
  const image = Object.assign(new Image(null, { name: 'qvac-sandbox-vm', ...options.image, network: false, agent: true }), { user: 'sandbox', uid: 1000, workspace: '/sandbox' });
12
13
  return new Sandbox({ ...options, image });
13
14
  }
14
- function bounded(promise, { timeoutMs, signal, stop }) {
15
+ function bounded(promise, { timeoutMs, signal, stop, timedOut }) {
15
16
  return new Promise((resolve, reject) => {
16
17
  const settle = (fn) => {
17
18
  clearTimeout(timer);
18
19
  signal?.removeEventListener('abort', onAbort);
19
20
  fn();
20
21
  };
21
- const halt = (error) => {
22
- settle(() => reject(error));
22
+ const halt = (fn) => {
23
+ settle(fn);
23
24
  stop();
24
25
  };
25
- const onAbort = () => halt(new AbortedError());
26
- const timer = setTimeout(() => halt(new Error(`Command timed out after ${timeoutMs}ms`)), timeoutMs);
26
+ const onAbort = () => halt(() => reject(new AbortedError()));
27
+ const timer = setTimeout(() => halt(() => resolve(timedOut())), timeoutMs);
27
28
  signal?.addEventListener('abort', onAbort, { once: true });
28
29
  promise.then((value) => settle(() => resolve(value)), (error) => settle(() => reject(error)));
29
30
  });
30
31
  }
32
+ function shellLine(command) {
33
+ return `sh -c '${command.replaceAll("'", "'\\''")}'`;
34
+ }
35
+ function terminated(result) {
36
+ return result.exitCode === 143 || (result.exitCode === null && result.signal === 'SIGTERM');
37
+ }
38
+ function guestResult(result, { pastDeadline, timeoutMs, maxOutputChars }) {
39
+ if (!result) {
40
+ return {
41
+ stdout: '',
42
+ stderr: `command timed out after ${timeoutMs}ms; the VM running it was stopped and no output came back`,
43
+ exitCode: TIMED_OUT_EXIT_CODE
44
+ };
45
+ }
46
+ const stdout = capOutput(result.stdout, maxOutputChars);
47
+ const stderr = capOutput(result.stderr, maxOutputChars);
48
+ if (pastDeadline && (result.exitCode === TIMED_OUT_EXIT_CODE || terminated(result))) {
49
+ const note = timeoutNote(timeoutMs, `${stdout}${stderr}` !== '');
50
+ return { stdout, stderr: withNote(stderr, note), exitCode: TIMED_OUT_EXIT_CODE };
51
+ }
52
+ return { stdout, stderr, exitCode: result.exitCode ?? 1 };
53
+ }
31
54
  export class GuestShell {
32
55
  name = 'sandbox-vm';
33
56
  enforces = { files: 'none', network: 'none', env: true };
34
57
  _options;
35
58
  _create;
59
+ _graceMs;
36
60
  _sandbox = null;
37
61
  _closing = Promise.resolve();
38
62
  _queue = Promise.resolve();
39
- constructor(options, create) {
63
+ constructor(options, create, graceMs = STOP_GRACE_MS) {
40
64
  this._options = options;
41
65
  this._create = create;
66
+ this._graceMs = graceMs;
42
67
  }
43
68
  resolve(args, ctx) {
44
69
  const command = String(args.command ?? '').trim();
@@ -62,16 +87,20 @@ export class GuestShell {
62
87
  }
63
88
  async _run(command, { env, timeoutMs = DEFAULT_TIMEOUT_MS, maxOutputChars = MAX_OUTPUT_CHARS, signal }) {
64
89
  const sandbox = await raceAbort(this._boot(), signal);
65
- const running = sandbox.run(command, {
66
- env: env ? { ...env } : undefined,
67
- timeout: Math.ceil(timeoutMs / 1000)
90
+ const seconds = Math.ceil(timeoutMs / 1000);
91
+ const started = Date.now();
92
+ const running = sandbox.run(shellLine(command), {
93
+ env: { ...EXEC_ENV_DEFAULTS, ...env },
94
+ timeout: seconds
68
95
  });
69
- const result = await bounded(running, { timeoutMs, signal, stop: () => void this._stop() });
70
- return {
71
- stdout: capOutput(result.stdout, maxOutputChars),
72
- stderr: capOutput(result.stderr, maxOutputChars),
73
- exitCode: result.exitCode ?? 1
74
- };
96
+ const result = await bounded(running, {
97
+ timeoutMs: seconds * 1000 + this._graceMs,
98
+ signal,
99
+ stop: () => void this._stop(),
100
+ timedOut: () => null
101
+ });
102
+ const pastDeadline = Date.now() - started >= seconds * 1000;
103
+ return guestResult(result, { pastDeadline, timeoutMs, maxOutputChars });
75
104
  }
76
105
  _boot() {
77
106
  if (!this._sandbox) {
@@ -4,7 +4,7 @@ import path from 'path';
4
4
  import process from 'process';
5
5
  import { fileURLToPath } from 'url';
6
6
  import { raceAbort } from '../../lib/helpers/race-abort.js';
7
- import { execEnv } from '../../lib/helpers/spawn-path.js';
7
+ import { EXEC_ENV_DEFAULTS, execEnv } from '../../lib/helpers/spawn-path.js';
8
8
  import { PluginRegistry } from '../../lib/plugins/index.js';
9
9
  import { Policy } from '../../lib/policy/index.js';
10
10
  import { runCommand } from '../../lib/tools/exec/runner.js';
@@ -112,7 +112,7 @@ export class AppContainerSandbox {
112
112
  return (line, opts = {}) => spawn(AppContainerSandbox.argv(run, line), {
113
113
  ...opts,
114
114
  cwd: undefined,
115
- env: { ...inherited, ...opts.env }
115
+ env: { ...EXEC_ENV_DEFAULTS, ...inherited, ...opts.env }
116
116
  });
117
117
  }
118
118
  async _spawnHelper() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/harness",
3
- "version": "1.0.0-rc.13",
3
+ "version": "1.0.0-rc.15",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "bare": ">=1.34.0",
@@ -575,9 +575,9 @@
575
575
  },
576
576
  "dependencies": {
577
577
  "@qvac/error": "^0.1.1",
578
- "@qvac/inference": "^0.22.0",
578
+ "@qvac/inference": "^0.23.0",
579
579
  "@qvac/logging": "0.1.1",
580
- "@qvac/skills": "^0.1.17",
580
+ "@qvac/skills": "^0.1.20",
581
581
  "@xmldom/xmldom": "^0.9.12",
582
582
  "asenion": "^0.1.0",
583
583
  "b4a": "^1.9.0",
@@ -628,16 +628,17 @@
628
628
  },
629
629
  "peerDependencies": {
630
630
  "@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
631
- "@qvac/asr-ggml": "^0.10.0",
632
- "@qvac/audiogen-ggml": "^0.8.0",
631
+ "@qvac/asr-ggml": "^0.11.1",
632
+ "@qvac/audiogen-ggml": "^0.9.0",
633
633
  "@qvac/decoder-audio": "^0.8.1",
634
- "@qvac/diffusion-cpp": "^0.30.0",
635
- "@qvac/embed-llamacpp": "0.48.2",
634
+ "@qvac/diffusion-cpp": "^0.31.0",
635
+ "@qvac/embed-llamacpp": "^0.53.0",
636
636
  "@qvac/langdetect-text": "^0.1.2",
637
- "@qvac/llm-llamacpp": "^0.61.1",
638
- "@qvac/sdk": "^0.22.0",
639
- "@qvac/translation-nmtcpp": "^0.21.1",
640
- "@qvac/tts-ggml": "^0.13.0",
637
+ "@qvac/llm-llamacpp": "^0.65.0",
638
+ "@qvac/sdk": "^0.23.0",
639
+ "@qvac/translation-nmtcpp": "^0.23.0",
640
+ "@qvac/tts-ggml": "^0.14.0",
641
+ "@qvac/turbovec-ggml": "^0.3.0",
641
642
  "bare-ffmpeg": "^1.2.3",
642
643
  "bare-image-resample": "^1.0.2",
643
644
  "bare-media": "^2.10.0",
@@ -683,6 +684,9 @@
683
684
  "@qvac/tts-ggml": {
684
685
  "optional": true
685
686
  },
687
+ "@qvac/turbovec-ggml": {
688
+ "optional": true
689
+ },
686
690
  "bare-ffmpeg": {
687
691
  "optional": true
688
692
  },
@@ -716,16 +720,17 @@
716
720
  },
717
721
  "devDependencies": {
718
722
  "@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
719
- "@qvac/asr-ggml": "^0.10.0",
720
- "@qvac/audiogen-ggml": "^0.8.0",
723
+ "@qvac/asr-ggml": "^0.11.1",
724
+ "@qvac/audiogen-ggml": "^0.9.0",
721
725
  "@qvac/decoder-audio": "^0.8.1",
722
- "@qvac/diffusion-cpp": "^0.30.0",
723
- "@qvac/embed-llamacpp": "0.48.2",
726
+ "@qvac/diffusion-cpp": "^0.31.0",
727
+ "@qvac/embed-llamacpp": "^0.53.0",
724
728
  "@qvac/langdetect-text": "^0.1.2",
725
- "@qvac/llm-llamacpp": "^0.61.1",
726
- "@qvac/sdk": "^0.22.0",
727
- "@qvac/translation-nmtcpp": "^0.21.1",
728
- "@qvac/tts-ggml": "^0.13.0",
729
+ "@qvac/llm-llamacpp": "^0.65.0",
730
+ "@qvac/sdk": "^0.23.0",
731
+ "@qvac/translation-nmtcpp": "^0.23.0",
732
+ "@qvac/tts-ggml": "^0.14.0",
733
+ "@qvac/turbovec-ggml": "^0.3.0",
729
734
  "bare-bundle": "^1.10.0",
730
735
  "bare-ffmpeg": "^1.2.3",
731
736
  "bare-image-resample": "^1.0.2",
@@ -755,8 +760,7 @@
755
760
  "typescript": "^7.0.2"
756
761
  },
757
762
  "patchedDependencies": {
758
- "pyodide@314.0.2": "patches/pyodide@314.0.2.patch",
759
- "localwatch@1.4.3": "patches/localwatch@1.4.3.patch"
763
+ "pyodide@314.0.2": "patches/pyodide@314.0.2.patch"
760
764
  },
761
765
  "repository": {
762
766
  "type": "git",
@@ -783,7 +787,8 @@
783
787
  "hypercore": "^11.36.1",
784
788
  "tar": "^7.5.22",
785
789
  "autobee": "^2.6.0",
786
- "bare-http1": "4.5.9"
790
+ "bare-http1": "4.5.9",
791
+ "localwatch": "^1.4.4"
787
792
  },
788
793
  "publishConfig": {
789
794
  "access": "public"
@@ -14,6 +14,7 @@ const QVAC_ADDON_PACKAGES = [
14
14
  '@qvac/asr-ggml',
15
15
  '@qvac/audiogen-ggml',
16
16
  '@qvac/translation-nmtcpp',
17
+ '@qvac/turbovec-ggml',
17
18
  // fabric is the shared ggml module
18
19
  '@qvac/fabric'
19
20
  ]
@@ -28,6 +29,7 @@ const NATIVE_ADDON_PACKAGES = [
28
29
  '@qvac/llm-llamacpp',
29
30
  '@qvac/translation-nmtcpp',
30
31
  '@qvac/tts-ggml',
32
+ '@qvac/turbovec-ggml',
31
33
  'bare-abort',
32
34
  'bare-bmp',
33
35
  'bare-broadcast-channel',
@@ -85,7 +87,8 @@ const NATIVE_ADDON_PACKAGES = [
85
87
  // defer matches specifiers exactly, so list every subpath the SDK or a plugin imports, as written
86
88
  const EXTRA_ADDON_SUBPATHS = {
87
89
  '@qvac/audiogen-ggml': ['binding.js'],
88
- '@qvac/diffusion-cpp': ['world', 'world.js']
90
+ '@qvac/diffusion-cpp': ['world', 'world.js'],
91
+ '@qvac/turbovec-ggml': ['binding.js']
89
92
  }
90
93
 
91
94
  function deferSpecifiers() {
@@ -1,13 +0,0 @@
1
- diff --git a/index.js b/index.js
2
- index 385cd0ec3ebc88c0394d25056e4872f43a3b78ca..4fecd4b6bbb7b2d9568b2355dea8c5e3bbe9af03 100644
3
- --- a/index.js
4
- +++ b/index.js
5
- @@ -58,7 +58,7 @@ class TreeEntry {
6
- for (const [entryFilename, node] of this.list(filename)) {
7
- if (node.watcher) node.watcher.close()
8
- node.watcher = null
9
- - if (node.entries || node.stat.isDirectory()) continue
10
- + if (node.entries || node.stat?.isDirectory()) continue
11
- if (!node.ignore) diff.push({ type: 'delete', filename: entryFilename })
12
- }
13
- this.entries = null