stitchkit 0.127.0 → 0.128.0

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 (233) hide show
  1. package/CHANGELOG.md +137 -6
  2. package/dist/agent-executor/acp/v1-connect.d.ts +9 -1
  3. package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
  4. package/dist/agent-executor/acp/v1-driver.d.ts +8 -2
  5. package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
  6. package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
  7. package/dist/agent-executor/acp/v1-session.d.ts +8 -0
  8. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  9. package/dist/agent-executor/claude/cli-driver.d.ts +4 -0
  10. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  11. package/dist/agent-executor/claude/protocol.d.ts +20 -2
  12. package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
  13. package/dist/agent-executor/claude/session.d.ts +2 -1
  14. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  15. package/dist/agent-executor/claude/transcript.d.ts +7 -4
  16. package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
  17. package/dist/agent-executor/claude-sdk/driver.d.ts +4 -0
  18. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  19. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  20. package/dist/agent-executor/codex/driver.d.ts +4 -0
  21. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  22. package/dist/agent-executor/codex/protocol.d.ts +26 -2
  23. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  24. package/dist/agent-executor/codex/session.d.ts +3 -1
  25. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  26. package/dist/agent-executor/image-input.d.ts +71 -0
  27. package/dist/agent-executor/image-input.d.ts.map +1 -0
  28. package/dist/agent-executor/session-primitives.d.ts +0 -3
  29. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  30. package/dist/agent-runtime/agent-tool.d.ts +21 -7
  31. package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
  32. package/dist/agent-runtime/branch-contract.d.ts +1 -0
  33. package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
  34. package/dist/agent-runtime/branch-identities.d.ts +5 -2
  35. package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
  36. package/dist/agent-runtime/branch-messages.d.ts +9 -9
  37. package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
  38. package/dist/agent-runtime/branch-observations.d.ts +45 -32
  39. package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
  40. package/dist/agent-runtime/branch-provider.d.ts +12 -6
  41. package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
  42. package/dist/agent-runtime/branch-source.d.ts +13 -1
  43. package/dist/agent-runtime/branch-source.d.ts.map +1 -1
  44. package/dist/agent-runtime/child-tools.d.ts +64 -0
  45. package/dist/agent-runtime/child-tools.d.ts.map +1 -1
  46. package/dist/agent-runtime/event-search-tools.d.ts +82 -5
  47. package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
  48. package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
  49. package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
  50. package/dist/agent-runtime/invocation-payload.d.ts +12 -0
  51. package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
  52. package/dist/agent-runtime/invocation-read.d.ts +6 -3
  53. package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
  54. package/dist/agent-runtime/invocation-schema.d.ts +50 -8
  55. package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
  56. package/dist/agent-runtime/invocations.d.ts +20 -9
  57. package/dist/agent-runtime/invocations.d.ts.map +1 -1
  58. package/dist/agent-runtime/postgres.d.ts.map +1 -1
  59. package/dist/agent-runtime/schedule-tools.d.ts +30 -0
  60. package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
  61. package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
  62. package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
  63. package/dist/agent-runtime/sql-events.d.ts.map +1 -1
  64. package/dist/agent-runtime/sql-session.d.ts +11 -0
  65. package/dist/agent-runtime/sql-session.d.ts.map +1 -1
  66. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
  67. package/dist/agent-runtime/state-tools.d.ts +55 -0
  68. package/dist/agent-runtime/state-tools.d.ts.map +1 -1
  69. package/dist/agent-runtime/store-branch.d.ts.map +1 -1
  70. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  71. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  72. package/dist/agent-runtime/store-create.d.ts.map +1 -1
  73. package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
  74. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
  75. package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
  76. package/dist/agent-runtime/store.d.ts +7 -0
  77. package/dist/agent-runtime/store.d.ts.map +1 -1
  78. package/dist/declaration/declaration.d.ts +6 -3
  79. package/dist/declaration/declaration.d.ts.map +1 -1
  80. package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
  81. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  82. package/dist/entrypoints/agent-executor/acp.js +23 -12
  83. package/dist/entrypoints/agent-executor/claude-sdk.js +26 -10
  84. package/dist/entrypoints/agent-executor/claude.js +35 -16
  85. package/dist/entrypoints/agent-executor/codex.js +81 -21
  86. package/dist/entrypoints/agent-executor.js +1 -1
  87. package/dist/entrypoints/agent-runtime/harness.js +5 -6
  88. package/dist/entrypoints/agent-runtime/openrouter.js +2 -2
  89. package/dist/entrypoints/agent-runtime/postgres.js +8 -3
  90. package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
  91. package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -4
  92. package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -4
  93. package/dist/entrypoints/agent-runtime/testing.js +6 -6
  94. package/dist/entrypoints/agent-runtime.d.ts +9 -7
  95. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  96. package/dist/entrypoints/agent-runtime.js +246 -199
  97. package/dist/entrypoints/application/diagnostic-journal.js +4 -4
  98. package/dist/entrypoints/application/directory-inbox.js +8 -8
  99. package/dist/entrypoints/cli/publish.js +8 -8
  100. package/dist/entrypoints/cli.js +10 -9
  101. package/dist/entrypoints/declaration.js +0 -1
  102. package/dist/entrypoints/files.js +40 -17
  103. package/dist/entrypoints/node.js +4 -4
  104. package/dist/entrypoints/observability.js +1 -1
  105. package/dist/entrypoints/process.js +1 -1
  106. package/dist/entrypoints/server.js +7 -7
  107. package/dist/entrypoints/service-host/macos.js +4 -4
  108. package/dist/entrypoints/service-host.d.ts +4 -1
  109. package/dist/entrypoints/service-host.d.ts.map +1 -1
  110. package/dist/entrypoints/service-host.js +831 -220
  111. package/dist/entrypoints/spend.js +1 -1
  112. package/dist/entrypoints/telegram.js +4 -4
  113. package/dist/entrypoints/tools/agent.js +4 -3
  114. package/dist/entrypoints/tools/invoker.js +3 -2
  115. package/dist/entrypoints/tools/mcp.js +4 -3
  116. package/dist/entrypoints/tools/toolkit.js +6 -5
  117. package/dist/entrypoints/tools.d.ts +1 -1
  118. package/dist/entrypoints/tools.d.ts.map +1 -1
  119. package/dist/entrypoints/tools.js +10 -8
  120. package/dist/files/directory-appearance.d.ts +20 -9
  121. package/dist/files/directory-appearance.d.ts.map +1 -1
  122. package/dist/files/polled-json.d.ts.map +1 -1
  123. package/dist/files/regular-file.d.ts +15 -5
  124. package/dist/files/regular-file.d.ts.map +1 -1
  125. package/dist/{index-z4k0hqp9.js → index-0gqs8ght.js} +106 -24
  126. package/dist/{index-caywx1c0.js → index-13dnv6d0.js} +107 -10
  127. package/dist/{index-a725ayvz.js → index-1qwrczr1.js} +1 -1
  128. package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
  129. package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
  130. package/dist/{index-4s2w4g37.js → index-3tnwtz38.js} +80 -2
  131. package/dist/{index-5e0zsbf7.js → index-4j8efqr3.js} +1 -1
  132. package/dist/{index-p1m9djt6.js → index-5v5vg85s.js} +1 -1
  133. package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
  134. package/dist/{index-7xp05h20.js → index-6wp4dn9d.js} +6 -6
  135. package/dist/{index-0hdm5sx6.js → index-8x22nprv.js} +6 -2
  136. package/dist/{index-j13gzgdv.js → index-bz3gn6cs.js} +8 -4
  137. package/dist/{index-d96c1n1q.js → index-c5gp2gh6.js} +20 -19
  138. package/dist/{index-wbnpa8z6.js → index-d54npte7.js} +4 -4
  139. package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
  140. package/dist/{index-bbzvrq66.js → index-g3e57qj6.js} +455 -202
  141. package/dist/index-gf92hc87.js +100 -0
  142. package/dist/{index-3djgv3ch.js → index-gzny6zsw.js} +25 -10
  143. package/dist/{index-3b31z0pc.js → index-hj1zq7mh.js} +12 -6
  144. package/dist/{index-8xr2eq99.js → index-jfecdk1e.js} +3 -3
  145. package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
  146. package/dist/{index-83n766x4.js → index-m18xm96h.js} +15 -9
  147. package/dist/{index-qnzhmk2s.js → index-n7f89hjw.js} +90 -47
  148. package/dist/{index-3agqmmrg.js → index-pn5b11ce.js} +7 -9
  149. package/dist/{index-3gwp8ez6.js → index-pwskmywy.js} +12 -17
  150. package/dist/{index-9wh98cpa.js → index-rxnyygke.js} +130 -90
  151. package/dist/{index-0djnptn8.js → index-rzeezh79.js} +10 -3
  152. package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
  153. package/dist/{index-5zwac8ft.js → index-t7wa7k12.js} +2 -2
  154. package/dist/{index-xypxnzhp.js → index-v1mxss62.js} +2 -2
  155. package/dist/index-vgzhw2zk.js +304 -0
  156. package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
  157. package/dist/{index-j516jaaz.js → index-waa6t4zx.js} +49 -2
  158. package/dist/{index-fcw255hd.js → index-xv9jb84s.js} +2 -2
  159. package/dist/{index-dwa6pskj.js → index-y065r8g5.js} +82 -43
  160. package/dist/internal/bounded-file-confirm.d.ts +32 -0
  161. package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
  162. package/dist/internal/bounded-file-read.d.ts +10 -7
  163. package/dist/internal/bounded-file-read.d.ts.map +1 -1
  164. package/dist/internal/file-observation.d.ts +5 -1
  165. package/dist/internal/file-observation.d.ts.map +1 -1
  166. package/dist/internal/process-instance.d.ts +8 -0
  167. package/dist/internal/process-instance.d.ts.map +1 -1
  168. package/dist/internal/unix-socket.d.ts +3 -1
  169. package/dist/internal/unix-socket.d.ts.map +1 -1
  170. package/dist/server/unix-client.d.ts +7 -0
  171. package/dist/server/unix-client.d.ts.map +1 -1
  172. package/dist/service-host/systemd-inspect.d.ts +3 -1
  173. package/dist/service-host/systemd-inspect.d.ts.map +1 -1
  174. package/dist/service-host/systemd-render-shared.d.ts +64 -0
  175. package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
  176. package/dist/service-host/systemd-render.d.ts +31 -26
  177. package/dist/service-host/systemd-render.d.ts.map +1 -1
  178. package/dist/service-host/systemd-timer-render.d.ts +31 -0
  179. package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
  180. package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
  181. package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
  182. package/dist/service-host/systemd-timer.d.ts +82 -0
  183. package/dist/service-host/systemd-timer.d.ts.map +1 -0
  184. package/dist/service-host/systemd-unit-ops.d.ts +26 -0
  185. package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
  186. package/dist/service-host/systemd.d.ts +1 -1
  187. package/dist/service-host/systemd.d.ts.map +1 -1
  188. package/dist/tools/access.d.ts +30 -1
  189. package/dist/tools/access.d.ts.map +1 -1
  190. package/dist/tools/agent.d.ts +2 -2
  191. package/dist/tools/agent.d.ts.map +1 -1
  192. package/dist/tools/cli/args-scan.d.ts +5 -0
  193. package/dist/tools/cli/args-scan.d.ts.map +1 -1
  194. package/dist/tools/cli/args.d.ts +11 -5
  195. package/dist/tools/cli/args.d.ts.map +1 -1
  196. package/dist/tools/cli/invoke.d.ts +2 -1
  197. package/dist/tools/cli/invoke.d.ts.map +1 -1
  198. package/dist/tools/cli/notices.d.ts.map +1 -1
  199. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  200. package/dist/tools/cli/session.d.ts.map +1 -1
  201. package/dist/tools/execute.d.ts.map +1 -1
  202. package/dist/tools/invoker.d.ts +2 -1
  203. package/dist/tools/invoker.d.ts.map +1 -1
  204. package/dist/tools/list-names.d.ts +2 -3
  205. package/dist/tools/list-names.d.ts.map +1 -1
  206. package/dist/tools/manifest.d.ts +2 -3
  207. package/dist/tools/manifest.d.ts.map +1 -1
  208. package/dist/tools/mcp/mount.d.ts +5 -5
  209. package/dist/tools/mcp/mount.d.ts.map +1 -1
  210. package/dist/tools/mcp/register.d.ts +2 -1
  211. package/dist/tools/mcp/register.d.ts.map +1 -1
  212. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  213. package/llms/agent-executor-acp.txt +10 -6
  214. package/llms/agent-executor-claude-sdk.txt +1 -1
  215. package/llms/agent-executor-claude.txt +1 -1
  216. package/llms/agent-executor-codex.txt +1 -1
  217. package/llms/agent-runtime.4.txt +21 -9
  218. package/llms/cli.3.txt +4 -4
  219. package/llms/cli.txt +1 -0
  220. package/llms/declaration.txt +2 -2
  221. package/llms/files.txt +1 -1
  222. package/llms/node.txt +2 -2
  223. package/llms/server.5.txt +2 -2
  224. package/llms/service-host.txt +5 -5
  225. package/llms/stitchkit.txt +81 -77
  226. package/llms/tools.3.txt +3 -2
  227. package/llms/upgrading-0.128.0.txt +147 -0
  228. package/llms/upgrading.txt +1 -0
  229. package/llms-full.txt +272 -113
  230. package/llms.txt +14 -13
  231. package/package.json +1 -1
  232. package/dist/index-ajmtxsky.js +0 -193
  233. package/dist/index-ax3wns1a.js +0 -93
@@ -1,7 +1,7 @@
1
1
  import"../../index-xqhede6x.js";
2
2
  import"../../index-6kec3b14.js";
3
- import"../../index-x90w78yz.js";
4
- import"../../index-jrka9029.js";
3
+ import"../../index-673drwkn.js";
4
+ import"../../index-vmbxj75t.js";
5
5
  import {
6
6
  signCliManifest2,
7
7
  verifyCliManifest2,
@@ -15,23 +15,23 @@ import {
15
15
  gzipCliAsset,
16
16
  decodeCliAsset,
17
17
  compareCliVersions2
18
- } from "../../index-xypxnzhp.js";
18
+ } from "../../index-v1mxss62.js";
19
19
  import {
20
20
  withExclusiveLock2
21
- } from "../../index-g1q7fwn9.js";
22
- import"../../index-dvd1qdwa.js";
21
+ } from "../../index-2nwvn7m2.js";
22
+ import"../../index-ke02kxsr.js";
23
23
  import {
24
24
  ManagedFileError2,
25
25
  createManagedFileBoundary2
26
- } from "../../index-8xr2eq99.js";
26
+ } from "../../index-jfecdk1e.js";
27
27
  import {
28
28
  writeFileAtomic2
29
- } from "../../index-5zwac8ft.js";
29
+ } from "../../index-t7wa7k12.js";
30
30
  import {
31
31
  AtomicFilePublicationError2,
32
32
  assertDirectoryDurability,
33
33
  syncDirectory
34
- } from "../../index-xtkw9866.js";
34
+ } from "../../index-2c5w2d1d.js";
35
35
  import {
36
36
  errnoOf
37
37
  } from "../../index-jj9228tt.js";
@@ -23,11 +23,12 @@ import {
23
23
  extractCliGlobalOptions2,
24
24
  pollUntilDone2,
25
25
  createCli2
26
- } from "../index-dwa6pskj.js";
26
+ } from "../index-y065r8g5.js";
27
27
  import"../index-akf0xkrm.js";
28
28
  import"../index-3ypvpkwr.js";
29
- import"../index-9wh98cpa.js";
29
+ import"../index-rxnyygke.js";
30
30
  import"../index-yt1gg11x.js";
31
+ import"../index-gf92hc87.js";
31
32
  import"../index-werjqesf.js";
32
33
  import"../index-0x4mnwg5.js";
33
34
  import"../index-6kec3b14.js";
@@ -51,25 +52,25 @@ import {
51
52
  checkCliUpdate2,
52
53
  applyCliUpdate2,
53
54
  rollbackCliUpdate2
54
- } from "../index-xypxnzhp.js";
55
- import"../index-x90w78yz.js";
56
- import"../index-jrka9029.js";
55
+ } from "../index-v1mxss62.js";
56
+ import"../index-673drwkn.js";
57
+ import"../index-vmbxj75t.js";
57
58
  import"../index-bmaz3jzy.js";
58
59
  import"../index-xrgn784x.js";
59
60
  import {
60
61
  stringifyJsonSafe
61
62
  } from "../index-5awtbyns.js";
62
- import"../index-g1q7fwn9.js";
63
- import"../index-dvd1qdwa.js";
63
+ import"../index-2nwvn7m2.js";
64
+ import"../index-ke02kxsr.js";
64
65
  import {
65
66
  argumentsDigest
66
67
  } from "../index-3dq8466w.js";
67
- import"../index-5e0zsbf7.js";
68
+ import"../index-4j8efqr3.js";
68
69
  import"../index-7csn6pva.js";
69
70
  import"../index-hy4653g4.js";
70
71
  import {
71
72
  writeFileAtomicSync2
72
- } from "../index-5zwac8ft.js";
73
+ } from "../index-t7wa7k12.js";
73
74
  import {
74
75
  safeJsonParse
75
76
  } from "../index-zsarb5xp.js";
@@ -59,7 +59,6 @@ var SemanticVersionSchema = z2.string().regex(/^\d+\.\d+\.\d+$/, "Use a semantic
59
59
  var ProjectIdentitySchema = z2.object({
60
60
  slug: ProjectSlugSchema,
61
61
  name: refuseMachineNames("A project name")(z2.string().trim().min(1).max(80)),
62
- version: SemanticVersionSchema,
63
62
  description: ProjectDescriptionSchema
64
63
  }).strict();
65
64
  var ProjectStarterSchema = z2.strictObject({
@@ -10,36 +10,36 @@ import {
10
10
  readRegularFile2,
11
11
  parseJsonBytes2,
12
12
  readJsonFileSync2
13
- } from "../index-3gwp8ez6.js";
13
+ } from "../index-pwskmywy.js";
14
14
  import"../index-6kec3b14.js";
15
- import"../index-x90w78yz.js";
16
- import"../index-jrka9029.js";
15
+ import"../index-673drwkn.js";
16
+ import"../index-vmbxj75t.js";
17
17
  import {
18
18
  readJsonOnce2,
19
19
  MAX_POLLED_JSON_CACHE_BYTES2,
20
20
  MAX_POLLED_JSON_PATHS2,
21
21
  PolledJsonFiles2,
22
22
  PolledJsonFile2
23
- } from "../index-j13gzgdv.js";
23
+ } from "../index-bz3gn6cs.js";
24
24
  import {
25
25
  bindUnixSocket2
26
- } from "../index-3djgv3ch.js";
26
+ } from "../index-gzny6zsw.js";
27
27
  import {
28
28
  ExclusiveLockError2,
29
29
  withExclusiveLock2
30
- } from "../index-g1q7fwn9.js";
31
- import"../index-dvd1qdwa.js";
30
+ } from "../index-2nwvn7m2.js";
31
+ import"../index-ke02kxsr.js";
32
32
  import {
33
33
  ManagedFileError2,
34
34
  createManagedFileBoundary2
35
- } from "../index-8xr2eq99.js";
35
+ } from "../index-jfecdk1e.js";
36
36
  import {
37
37
  writeFileAtomic2,
38
38
  writeFileAtomicSync2
39
- } from "../index-5zwac8ft.js";
39
+ } from "../index-t7wa7k12.js";
40
40
  import {
41
41
  AtomicFilePublicationError2
42
- } from "../index-xtkw9866.js";
42
+ } from "../index-2c5w2d1d.js";
43
43
  import {
44
44
  isAtomicStagingName2,
45
45
  sweepAtomicStaging2
@@ -305,7 +305,7 @@ function createChunkSpoolWith(config, io = {}) {
305
305
  };
306
306
  }
307
307
  // src/files/directory-appearance.ts
308
- import { statSync, watch } from "node:fs";
308
+ import { lstatSync, statSync, watch } from "node:fs";
309
309
  import { dirname, resolve } from "node:path";
310
310
  var DEFAULT_DIRECTORY_SETTLE_MS = 250;
311
311
  var ABSENT = new Set(["ENOENT", "ENOTDIR"]);
@@ -319,6 +319,16 @@ var nodeIo2 = {
319
319
  throw error;
320
320
  }
321
321
  },
322
+ hasEntry(path) {
323
+ try {
324
+ lstatSync(path);
325
+ return true;
326
+ } catch (error) {
327
+ if (ABSENT.has(errnoOf(error) ?? ""))
328
+ return false;
329
+ throw error;
330
+ }
331
+ },
322
332
  watch(path, onEvent, { persistent }) {
323
333
  return watch(path, { persistent }, () => onEvent());
324
334
  }
@@ -338,8 +348,21 @@ function waitForDirectory(path, options = {}) {
338
348
  }
339
349
  function waitForDirectoryWith(io, path, options = {}) {
340
350
  const target = resolve(path);
341
- const { signal, settleMs = DEFAULT_DIRECTORY_SETTLE_MS, keepAlive = true } = options;
351
+ const {
352
+ signal,
353
+ match = "directory",
354
+ settleMs = DEFAULT_DIRECTORY_SETTLE_MS,
355
+ keepAlive = true
356
+ } = options;
357
+ if (match !== "directory" && match !== "entry") {
358
+ throw new TypeError(`match must be 'directory' or 'entry', got ${String(match)}`);
359
+ }
360
+ const hasEntry = io.hasEntry;
361
+ if (match === "entry" && typeof hasEntry !== "function") {
362
+ throw new TypeError("DirectoryAppearanceIo.hasEntry is required when match is 'entry'");
363
+ }
342
364
  assertTimerMs("settleMs", settleMs);
365
+ const isSatisfied = match === "entry" && hasEntry !== undefined ? (candidate) => hasEntry(candidate) : (candidate) => io.isDirectory(candidate);
343
366
  return new Promise((resolveWait, rejectWait) => {
344
367
  if (signal?.aborted) {
345
368
  rejectWait(abortReason(signal));
@@ -374,15 +397,15 @@ function waitForDirectoryWith(io, path, options = {}) {
374
397
  return;
375
398
  let present;
376
399
  try {
377
- present = nearestDirectory(target, io);
400
+ if (isSatisfied(target)) {
401
+ finish();
402
+ return;
403
+ }
404
+ present = nearestDirectory(dirname(target), io);
378
405
  } catch (error) {
379
406
  finish(error, true);
380
407
  return;
381
408
  }
382
- if (present === target) {
383
- finish();
384
- return;
385
- }
386
409
  if (present === watched)
387
410
  return;
388
411
  stopWatching();
@@ -12,7 +12,7 @@ import {
12
12
  defineRequestIngress2,
13
13
  createSocketIOServer2,
14
14
  createUnixClientTransport2
15
- } from "../index-0hdm5sx6.js";
15
+ } from "../index-8x22nprv.js";
16
16
  import {
17
17
  ShutdownStateSchema2,
18
18
  ShutdownOptionsSchema2,
@@ -23,8 +23,8 @@ import {
23
23
  import"../index-0r15pkjq.js";
24
24
  import"../index-4s0fep5q.js";
25
25
  import"../index-6kec3b14.js";
26
- import"../index-x90w78yz.js";
27
- import"../index-jrka9029.js";
26
+ import"../index-673drwkn.js";
27
+ import"../index-vmbxj75t.js";
28
28
  import"../index-werjqesf.js";
29
29
  import"../index-d4svrknj.js";
30
30
  import"../index-kt6dh1n6.js";
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  createHandler2
37
37
  } from "../index-v37b2cd6.js";
38
- import"../index-3djgv3ch.js";
38
+ import"../index-gzny6zsw.js";
39
39
  import {
40
40
  UnixClientTransportError2
41
41
  } from "../index-cv9b7fz2.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  SpoolUnspooledError,
15
15
  createSpoolCore
16
- } from "../index-a725ayvz.js";
16
+ } from "../index-1qwrczr1.js";
17
17
  import {
18
18
  redact2,
19
19
  truncatePreview2,
@@ -3,7 +3,7 @@ import {
3
3
  ProcessInstanceSchema2,
4
4
  observeProcessInstance2,
5
5
  probeProcessOwner2
6
- } from "../index-x90w78yz.js";
6
+ } from "../index-673drwkn.js";
7
7
  import {
8
8
  NativeCommandError2
9
9
  } from "../index-v59pxmf1.js";
@@ -1,6 +1,6 @@
1
1
  import"../index-6kec3b14.js";
2
- import"../index-x90w78yz.js";
3
- import"../index-jrka9029.js";
2
+ import"../index-673drwkn.js";
3
+ import"../index-vmbxj75t.js";
4
4
  import {
5
5
  errorCode2,
6
6
  normalizeError2
@@ -47,7 +47,7 @@ import {
47
47
  createSocketIOServer2,
48
48
  socketIoLane2,
49
49
  createUnixClientTransport2
50
- } from "../index-0hdm5sx6.js";
50
+ } from "../index-8x22nprv.js";
51
51
  import"../index-27hck3z2.js";
52
52
  import {
53
53
  toJsonSchema,
@@ -58,7 +58,7 @@ import"../index-4s0fep5q.js";
58
58
  import"../index-xqhede6x.js";
59
59
  import {
60
60
  createFileStateStore2
61
- } from "../index-wbnpa8z6.js";
61
+ } from "../index-d54npte7.js";
62
62
  import {
63
63
  bindRealtimeServer2
64
64
  } from "../index-sv5svtq7.js";
@@ -88,12 +88,12 @@ import {
88
88
  assertPrivateUnixSocketDirectory,
89
89
  publishStagedUnixSocket,
90
90
  bindUnixSocket2
91
- } from "../index-3djgv3ch.js";
91
+ } from "../index-gzny6zsw.js";
92
92
  import {
93
93
  jsonResponse
94
94
  } from "../index-kyejf658.js";
95
- import"../index-g1q7fwn9.js";
96
- import"../index-dvd1qdwa.js";
95
+ import"../index-2nwvn7m2.js";
96
+ import"../index-ke02kxsr.js";
97
97
  import {
98
98
  inputIsQuery
99
99
  } from "../index-xhzq2qvj.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readRegularFile2
3
- } from "../../index-3gwp8ez6.js";
3
+ } from "../../index-pwskmywy.js";
4
4
  import {
5
5
  requireDarwinServiceHostMethod,
6
6
  loadDarwinBinding
@@ -15,7 +15,7 @@ import {
15
15
  createDefaultLaunchdHostAdapter2,
16
16
  lintLaunchdPlist2,
17
17
  readLaunchdPlist2
18
- } from "../../index-fcw255hd.js";
18
+ } from "../../index-xv9jb84s.js";
19
19
  import {
20
20
  NativeCommandError2
21
21
  } from "../../index-v59pxmf1.js";
@@ -23,7 +23,7 @@ import"../../index-7kfcb576.js";
23
23
  import {
24
24
  sameProcessInstance,
25
25
  observeProcessInstance2
26
- } from "../../index-x90w78yz.js";
26
+ } from "../../index-673drwkn.js";
27
27
  import {
28
28
  runNativeCommand2
29
29
  } from "../../index-5ptwb6ka.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "../../index-r9kq5ark.js";
33
33
  import {
34
34
  writeFileAtomic2
35
- } from "../../index-5zwac8ft.js";
35
+ } from "../../index-t7wa7k12.js";
36
36
  import {
37
37
  errnoOf
38
38
  } from "../../index-jj9228tt.js";
@@ -19,5 +19,8 @@ export { createDefaultLaunchdHostAdapter, type LaunchdCommandResult, type Launch
19
19
  export { LaunchdJobError, type LaunchdJobErrorCode, type LaunchdJobInspection, LaunchdKeepAliveSchema, type LaunchdPlistConfig, LaunchdPlistConfigSchema, type LaunchdSessionType, LaunchdSessionTypeSchema, parseLaunchctlPrint, renderLaunchdPlist, } from '../service-host/launchd-render.js';
20
20
  export { type ApplySystemdUnitOptions, installAndStartSystemdUnit, reloadSystemdUnit, type SystemdApplyResult, } from '../service-host/systemd.js';
21
21
  export { type CheckSystemdUnitOptions, checkSystemdUnit, createDefaultSystemdHostAdapter, type SystemdCommandResult, type SystemdHostAdapter, type SystemdUnitCheckResult, type SystemdUnitCheckStatus, type SystemdUnitQueryOptions, systemdMainPid, systemdUnitActive, } from '../service-host/systemd-inspect.js';
22
- export { renderSystemdServiceUnit, type SystemdScope, SystemdScopeSchema, type SystemdServiceUnitConfig, SystemdServiceUnitConfigSchema, SystemdUnitError, type SystemdUnitErrorCode, } from '../service-host/systemd-render.js';
22
+ export { renderSystemdServiceUnit, type SystemdServiceUnitConfig, SystemdServiceUnitConfigSchema, } from '../service-host/systemd-render.js';
23
+ export { type SystemdBindReadOnlyPath, type SystemdScope, SystemdScopeSchema, SystemdUnitError, type SystemdUnitErrorCode, } from '../service-host/systemd-render-shared.js';
24
+ export { type CheckSystemdTimerPairOptions, checkSystemdTimerPair, type InstallSystemdTimerPairOptions, installSystemdTimerPair, type SystemdTimerPairCheckResult, type SystemdTimerPairInstallResult, } from '../service-host/systemd-timer.js';
25
+ export { renderSystemdTimerUnit, type SystemdTimerUnitConfig, SystemdTimerUnitConfigSchema, } from '../service-host/systemd-timer-render.js';
23
26
  //# sourceMappingURL=service-host.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../src/entrypoints/service-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,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sBAAsB,EACtB,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,uBAAuB,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,uBAAuB,EAC5B,gBAAgB,EAChB,+BAA+B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,cAAc,EACd,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../src/entrypoints/service-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,KAAK,cAAc,EACnB,KA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