clanka 0.7.7 → 0.8.1

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 (185) hide show
  1. package/dist/Acp.d.ts +4 -4
  2. package/dist/Acp.d.ts.map +1 -1
  3. package/dist/Acp.js +8 -6
  4. package/dist/Acp.js.map +1 -1
  5. package/dist/Acp.test.js +66 -4
  6. package/dist/Acp.test.js.map +1 -1
  7. package/dist/AcpImage.test.js +7 -7
  8. package/dist/AcpImage.test.js.map +1 -1
  9. package/dist/Agent.d.ts +8 -8
  10. package/dist/Agent.d.ts.map +1 -1
  11. package/dist/Agent.js +17 -7
  12. package/dist/Agent.js.map +1 -1
  13. package/dist/Agent.test.js +53 -8
  14. package/dist/Agent.test.js.map +1 -1
  15. package/dist/AgentExecutor.d.ts +9 -9
  16. package/dist/AgentExecutor.d.ts.map +1 -1
  17. package/dist/AgentExecutor.js +5 -5
  18. package/dist/AgentExecutor.js.map +1 -1
  19. package/dist/AgentExecutorImage.test.js +6 -6
  20. package/dist/AgentExecutorImage.test.js.map +1 -1
  21. package/dist/AgentImage.test.js +3 -3
  22. package/dist/AgentImage.test.js.map +1 -1
  23. package/dist/AgentOutput.d.ts +10 -2
  24. package/dist/AgentOutput.d.ts.map +1 -1
  25. package/dist/AgentOutput.js +10 -2
  26. package/dist/AgentOutput.js.map +1 -1
  27. package/dist/AgentSkills.d.ts.map +1 -1
  28. package/dist/AgentSkills.js +6 -1
  29. package/dist/AgentSkills.js.map +1 -1
  30. package/dist/AgentSkills.test.js +21 -4
  31. package/dist/AgentSkills.test.js.map +1 -1
  32. package/dist/AgentTools.d.ts +4 -4
  33. package/dist/AgentTools.d.ts.map +1 -1
  34. package/dist/AgentTools.js +4 -4
  35. package/dist/AgentTools.js.map +1 -1
  36. package/dist/AgentToolsImage.test.js +2 -2
  37. package/dist/AgentToolsImage.test.js.map +1 -1
  38. package/dist/ChunkRepo.d.ts +10 -10
  39. package/dist/ChunkRepo.d.ts.map +1 -1
  40. package/dist/ChunkRepo.js +7 -7
  41. package/dist/ChunkRepo.js.map +1 -1
  42. package/dist/ChunkRepo.test.js +2 -2
  43. package/dist/ChunkRepo.test.js.map +1 -1
  44. package/dist/CodeChunker.d.ts +1 -1
  45. package/dist/CodeChunker.d.ts.map +1 -1
  46. package/dist/CodeChunker.js +2 -2
  47. package/dist/CodeChunker.js.map +1 -1
  48. package/dist/Codex.d.ts +5 -5
  49. package/dist/Codex.d.ts.map +1 -1
  50. package/dist/Codex.js +1 -1
  51. package/dist/Codex.js.map +1 -1
  52. package/dist/CodexAuth.d.ts +2 -2
  53. package/dist/CodexAuth.d.ts.map +1 -1
  54. package/dist/CodexAuth.js +6 -6
  55. package/dist/CodexAuth.js.map +1 -1
  56. package/dist/CodexAuth.test.js +3 -3
  57. package/dist/CodexAuth.test.js.map +1 -1
  58. package/dist/Compaction.d.ts +3 -3
  59. package/dist/Compaction.d.ts.map +1 -1
  60. package/dist/Compaction.js +3 -3
  61. package/dist/Compaction.js.map +1 -1
  62. package/dist/Compaction.test.js +3 -3
  63. package/dist/Compaction.test.js.map +1 -1
  64. package/dist/CompactionImage.test.js +4 -4
  65. package/dist/CompactionImage.test.js.map +1 -1
  66. package/dist/CompactionTokens.test.js +3 -3
  67. package/dist/CompactionTokens.test.js.map +1 -1
  68. package/dist/CompactionTransport.test.js +5 -5
  69. package/dist/CompactionTransport.test.js.map +1 -1
  70. package/dist/Copilot.d.ts +3 -3
  71. package/dist/Copilot.d.ts.map +1 -1
  72. package/dist/Copilot.js +1 -1
  73. package/dist/Copilot.js.map +1 -1
  74. package/dist/CopilotAuth.d.ts +2 -2
  75. package/dist/CopilotAuth.d.ts.map +1 -1
  76. package/dist/CopilotAuth.js +4 -4
  77. package/dist/CopilotAuth.js.map +1 -1
  78. package/dist/CopilotAuth.test.js +2 -2
  79. package/dist/CopilotAuth.test.js.map +1 -1
  80. package/dist/GlobalWebSocket.d.ts +1 -1
  81. package/dist/GlobalWebSocket.d.ts.map +1 -1
  82. package/dist/GlobalWebSocket.js +1 -1
  83. package/dist/GlobalWebSocket.js.map +1 -1
  84. package/dist/Image.d.ts +2 -2
  85. package/dist/Image.d.ts.map +1 -1
  86. package/dist/Image.js +3 -3
  87. package/dist/Image.js.map +1 -1
  88. package/dist/Image.test.js +2 -2
  89. package/dist/Image.test.js.map +1 -1
  90. package/dist/SemanticSearch.d.ts +3 -3
  91. package/dist/SemanticSearch.d.ts.map +1 -1
  92. package/dist/SemanticSearch.js +1 -1
  93. package/dist/SemanticSearch.js.map +1 -1
  94. package/dist/Sqlite.d.ts +2 -2
  95. package/dist/Sqlite.d.ts.map +1 -1
  96. package/dist/Sqlite.js +1 -1
  97. package/dist/Sqlite.js.map +1 -1
  98. package/dist/ToolkitRenderer.d.ts +2 -2
  99. package/dist/ToolkitRenderer.d.ts.map +1 -1
  100. package/dist/WebToMarkdown.d.ts +2 -2
  101. package/dist/WebToMarkdown.d.ts.map +1 -1
  102. package/dist/WebToMarkdown.js +1 -1
  103. package/dist/WebToMarkdown.js.map +1 -1
  104. package/dist/WebToMarkdown.test.js +1 -1
  105. package/dist/WebToMarkdown.test.js.map +1 -1
  106. package/dist/Xai.d.ts +10 -3
  107. package/dist/Xai.d.ts.map +1 -1
  108. package/dist/Xai.js +26 -2
  109. package/dist/Xai.js.map +1 -1
  110. package/dist/Xai.test.js +38 -4
  111. package/dist/Xai.test.js.map +1 -1
  112. package/dist/XaiAuth.d.ts +2 -2
  113. package/dist/XaiAuth.d.ts.map +1 -1
  114. package/dist/XaiAuth.js +4 -4
  115. package/dist/XaiAuth.js.map +1 -1
  116. package/dist/XaiAuth.test.js +2 -2
  117. package/dist/XaiAuth.test.js.map +1 -1
  118. package/dist/bin/{Effect-CeAMoJlg.mjs → Effect-DvI8YVcR.mjs} +81 -387
  119. package/dist/bin/Effect-DvI8YVcR.mjs.map +1 -0
  120. package/dist/bin/{McpClient-zQibhsnA.mjs → McpClient-CM7u8ZVd.mjs} +3 -3
  121. package/dist/bin/{McpClient-zQibhsnA.mjs.map → McpClient-CM7u8ZVd.mjs.map} +1 -1
  122. package/dist/bin/{OutputFormatter-C7Awn0DS.mjs → OutputFormatter-BpggeGvI.mjs} +3 -3
  123. package/dist/bin/{OutputFormatter-C7Awn0DS.mjs.map → OutputFormatter-BpggeGvI.mjs.map} +1 -1
  124. package/dist/bin/{Schema-Bc06DxcV.mjs → Schema-DyJ738Wp.mjs} +1979 -1663
  125. package/dist/bin/Schema-DyJ738Wp.mjs.map +1 -0
  126. package/dist/bin/{SemanticSearch-BPxQoRSC.mjs → SemanticSearch-BHUGFT1y.mjs} +46 -42
  127. package/dist/bin/SemanticSearch-BHUGFT1y.mjs.map +1 -0
  128. package/dist/bin/{Stream-DlGXvw0L.mjs → Stream-Dg7AGCgJ.mjs} +60 -61
  129. package/dist/bin/Stream-Dg7AGCgJ.mjs.map +1 -0
  130. package/dist/bin/cli.mjs +614 -371
  131. package/dist/bin/cli.mjs.map +1 -1
  132. package/dist/cli.js +7 -5
  133. package/dist/cli.js.map +1 -1
  134. package/dist/fixtures/TestImages.js +2 -2
  135. package/dist/fixtures/TestImages.js.map +1 -1
  136. package/package.json +7 -7
  137. package/src/Acp.test.ts +107 -5
  138. package/src/Acp.ts +10 -8
  139. package/src/AcpImage.test.ts +9 -9
  140. package/src/Agent.test.ts +61 -9
  141. package/src/Agent.ts +20 -10
  142. package/src/AgentExecutor.ts +8 -8
  143. package/src/AgentExecutorImage.test.ts +6 -6
  144. package/src/AgentImage.test.ts +5 -5
  145. package/src/AgentOutput.ts +10 -2
  146. package/src/AgentSkills.test.ts +81 -37
  147. package/src/AgentSkills.ts +5 -1
  148. package/src/AgentTools.ts +5 -5
  149. package/src/AgentToolsImage.test.ts +4 -4
  150. package/src/ChunkRepo.test.ts +2 -2
  151. package/src/ChunkRepo.ts +7 -7
  152. package/src/CodeChunker.ts +2 -2
  153. package/src/Codex.ts +4 -4
  154. package/src/CodexAuth.test.ts +3 -3
  155. package/src/CodexAuth.ts +6 -6
  156. package/src/Compaction.test.ts +3 -3
  157. package/src/Compaction.ts +3 -3
  158. package/src/CompactionImage.test.ts +4 -4
  159. package/src/CompactionTokens.test.ts +3 -3
  160. package/src/CompactionTransport.test.ts +6 -6
  161. package/src/Copilot.ts +2 -2
  162. package/src/CopilotAuth.test.ts +2 -6
  163. package/src/CopilotAuth.ts +4 -4
  164. package/src/GlobalWebSocket.ts +1 -1
  165. package/src/Image.test.ts +2 -2
  166. package/src/Image.ts +4 -4
  167. package/src/OutputFormatter.ts +1 -1
  168. package/src/SemanticSearch.test.ts +1 -1
  169. package/src/SemanticSearch.ts +3 -3
  170. package/src/Sqlite.ts +1 -1
  171. package/src/ToolkitRenderer.ts +2 -2
  172. package/src/WebToMarkdown.test.ts +1 -1
  173. package/src/WebToMarkdown.ts +2 -2
  174. package/src/Xai.test.ts +67 -8
  175. package/src/Xai.ts +52 -3
  176. package/src/XaiAuth.test.ts +2 -2
  177. package/src/XaiAuth.ts +4 -4
  178. package/src/cli.ts +9 -7
  179. package/src/fixtures/TestImages.ts +2 -2
  180. package/src/fixtures/patch13-broken.txt +4 -4
  181. package/src/fixtures/patch13-fixed.txt +4 -4
  182. package/dist/bin/Effect-CeAMoJlg.mjs.map +0 -1
  183. package/dist/bin/Schema-Bc06DxcV.mjs.map +0 -1
  184. package/dist/bin/SemanticSearch-BPxQoRSC.mjs.map +0 -1
  185. package/dist/bin/Stream-DlGXvw0L.mjs.map +0 -1
@@ -1,14 +1,14 @@
1
- import { $ as isEffect, $n as effect, $t as uninterruptibleMask, Aa as Reference, As as flow, B as fnUntraced, Bn as hasInterruptsOnly, Br as void_$3, C as catch_, Ca as minutes, Co as Prototype, Cr as TracerTimingEnabled, D as delay, Da as toMillis, Di as void_$2, E as contextWith, Ea as seconds, Ei as updateContext, Eo as PipeInspectableProto, Er as doneUnsafe, Es as constUndefined, Et as provideService, F as filterOrFail, Fa as getOption, Gi as flatMapNullishOr, Gt as tap, H as forEach, I as flatMap, Ia as getOrUndefined, Ii as TaggedError, In as filterInterruptors, Is as pipeArguments, It as scope, Ji as isArrayNonEmpty, Jo as equals, K as forkScoped, Ki as fromIterable, Lr as isFailure, Lt as scoped, M as fail$1, Ma as add, Mo as withFiber$1, Mt as runFork, No as assignProperty, Nr as fail, Nt as runForkWith, O as die, Or as into, Pa as get$1, Pr as failCause, Ps as pipe, Qo as hash, Ra as getUnsafe, Rr as isSuccess, S as catchTags, Sa as millis, St as orElseSucceed, T as context, Tr as done, Tt as provideContext, U as forever, Ut as suspend, Va as merge, Vi as empty, Vr as ClockRef, Vt as succeed, Wa as filter, Wt as sync, X as ignore, Xr as endSpan, Xt as try_, Y as gen, Ya as fromNullishOr, Yo as symbol, Yt as tryPromise, Z as interrupt, Zr as exitHasInterrupts, _a as fromInputUnsafe, _i as onExit$1, _t as onExit, ao as map$1, at as makeSpanScoped, ba as isFinite, br as provide, c as as, cr as provide$1, ea as map$2, er as effectContext, et as logDebug, fn as Class$1, ft as matchCauseEager, gr as close, h as catchDefect, hi as makeSpanUnsafe, i as all, ia as sort, ja as Service, jr as makeUnsafe$2, js as identity, ki as ParentSpan, kn as NoSuchElementError, ks as dual, kt as request$1, li as forkUnsafe, ln as withSpan, lr as provideMerge, lt as mapError, m as catchCause, mo as Number$1, mr as addFinalizer, n as acquireUseRelease, ni as fiberInterrupt, nn as useSpan, ns as symbol$1, o as annotateCurrentSpan, oi as fiberJoin, on as withFiber, oo as match, ot as map, pr as Scope, qa as flatten, qo as byReferenceUnsafe, qr as contextWith$1, rn as void_$1, ro as isSome, rs as hasProperty, rt as logInfo, s as annotateLogs, sn as withLogSpan, so as none, t as acquireRelease, to as isNone, tr as effectDiscard, u as asVoid, uo as some, us as isNotNull, va as infinity, vr as make$8, vt as onExitPrimitive, x as catchTag, xa as isZero, xi as succeed$1, xt as orDie, y as catchNoSuchElement, yo as make$10, z as fn, za as make$9, zr as succeed$2, zt as serviceOption } from "./Effect-CeAMoJlg.mjs";
2
- import { Ft as runIn, H as runDrain, Nt as interruptAs, Pt as join$1, Q as tap$1, V as runCollect, _ as fromArray, c as die$1, ct as makeUnsafe$3, et as unwrap, h as flatMap$1, ht as make$11, kt as getCurrent, mt as failCauseUnsafe, st as make$12, v as fromArrayEffect, w as fromQueue, yt as offerUnsafe, z as provideService$1 } from "./Stream-DlGXvw0L.mjs";
3
- import { A as OptionFromNullOr, Cn as transform$1, D as NullOr, Dt as mutable, En as dateTimeUtcFromInput, F as String$1, Fn as now, Ft as toType, Gt as evolve, I as Struct$2, In as removeTime, It as withConstructorDefault, J as Union$2, Nn as formatIsoDate, O as Number$2, On as transform, Ot as optional, S as Natural, St as isSchema, Tn as transformOptional, Vn as Clock, Z as brand, c as DateTimeUtcFromDate, d as Defect, i as BooleanFromBit, k as Option, kt as optionalKey, l as DateTimeUtcFromMillis, n as ArraySchema, nt as decodeTo, o as Class$2, ot as encodeEffect, r as Boolean, rt as decodeUnknownEffect, s as DateTimeUtc, u as DateTimeUtcFromString, ut as instanceOf, z as TaggedError$1 } from "./Schema-Bc06DxcV.mjs";
4
- import { C as set, D as toPredicate, E as has, S as remove, T as compose, _ as empty$1, a as makeGrouped, b as isEmpty, c as SemanticSearch, d as map$3, f as make$14, g as FileSystem, h as Path, i as batchN, l as maybeRemoveFile, m as Console, n as EmbeddingModel, o as setDelay, p as ChildProcessSpawner, r as EmbeddingRequest, s as withSpan$1, t as Dimensions, u as maybeUpdateFile, v as forEach$1, w as size, x as make$13, y as get$2 } from "./cli.mjs";
1
+ import { $ as isEffect, $a as map$1, $o as symbol$1, $t as uninterruptibleMask, Aa as getOrUndefined, Ai as ParentSpan, Ao as assignProperty, B as fnUntraced, Br as succeed$2, C as catch_, Cs as constUndefined, D as delay, Di as updateContext, Dr as doneUnsafe, Ds as flow, E as contextWith, Ea as add, Er as done, Es as dual, Et as provideService, F as filterOrFail, Fa as merge, Fr as failCause, Go as equals, Gt as tap, H as forEach, Hr as ClockRef, I as flatMap, It as scope, Jr as contextWith$1, K as forkScoped, Ko as symbol, Ln as filterInterruptors, Lt as scoped, M as fail$1, Ma as getUnsafe, Mr as makeUnsafe$2, Mt as runFork, Na as make$9, Nt as runForkWith, O as die, Oa as get$1, Oi as void_$2, Oo as withFiber$1, Os as identity, Pi as empty, Pr as fail, Ps as pipeArguments, Qr as exitHasInterrupts, Ra as filter, Ri as flatMapNullishOr, Rr as isFailure, S as catchTags, Si as succeed$1, St as orElseSucceed, T as context, Ta as Service, Tt as provideContext, U as forever, Ua as fromNullishOr, Ut as suspend, Va as flatten, Vi as isArrayNonEmpty, Vn as hasInterruptsOnly, Vr as void_$3, Vt as succeed, Wo as byReferenceUnsafe, Wt as sync, X as ignore, Xt as try_, Y as gen, Ya as isNone, Yo as hash, Yt as tryPromise, Z as interrupt, Za as isSome, Zi as sort, Zr as endSpan, _a as minutes, _r as close, _t as onExit, a as andThen, at as makeSpanScoped, ba as seconds, c as as, co as Number$1, da as fromInputUnsafe, eo as match, er as effect, es as hasProperty, et as logDebug, fa as infinity, fn as Class$1, ft as matchCauseEager, ga as millis, gi as makeSpanUnsafe, h as catchDefect, ha as isZero, hr as addFinalizer, i as all, io as some, js as pipe, ka as getOption, kn as NoSuchElementError, kr as into, kt as request$1, ln as withSpan, lr as provide$1, lt as mapError, m as catchCause, ma as isFinite, mo as make$10, mr as Scope, n as acquireUseRelease, nn as useSpan, nr as effectDiscard, o as annotateCurrentSpan, on as withFiber, ot as map, qi as map$2, ri as fiberInterrupt, rn as void_$1, rt as logInfo, s as annotateLogs, si as fiberJoin, sn as withLogSpan, ss as isNotNull, t as acquireRelease, to as none, tr as effectContext, u as asVoid, ui as forkUnsafe, ur as provideMerge, vi as onExit$1, vo as Prototype, vt as onExitPrimitive, wa as Reference, wr as TracerTimingEnabled, x as catchTag, xa as toMillis, xo as PipeInspectableProto, xr as provide, xt as orDie, y as catchNoSuchElement, yr as make$8, z as fn, zi as fromIterable, zr as isSuccess, zt as serviceOption } from "./Effect-DvI8YVcR.mjs";
2
+ import { $ as tap$1, At as getCurrent, B as provideService$1, Ft as join$1, H as runCollect, It as runIn, Pt as interruptAs, T as fromQueue, U as runDrain, bt as offerUnsafe, c as die$1, ct as make$12, g as flatMap$1, gt as make$11, ht as failCauseUnsafe, lt as makeUnsafe$3, tt as unwrap, v as fromArray, y as fromArrayEffect } from "./Stream-Dg7AGCgJ.mjs";
3
+ import { A as OptionFromNullOr, Cn as transform, D as NullOr, Dt as mutable, F as String$1, Ft as toType, I as Struct$2, In as formatIsoDate, It as withConstructorDefault, J as Union$2, Jn as TaggedError$1, O as Number$2, Ot as optional, Rn as now, S as Natural, St as isSchema, Wn as Clock, Z as brand, _n as transform$1, bn as dateTimeUtcFromInput, c as DateTimeUtcFromDate, d as Defect, i as BooleanFromBit, k as Option, kt as optionalKey, l as DateTimeUtcFromMillis, n as ArraySchema, nt as decodeTo, o as Class$2, ot as encodeEffect, r as Boolean, rt as decodeUnknownEffect, s as DateTimeUtc, u as DateTimeUtcFromString, ut as instanceOf, xn as map$3, yn as transformOptional, z as TaggedError, zn as removeTime, zt as evolve } from "./Schema-DyJ738Wp.mjs";
4
+ import { C as set, D as toPredicate, E as has, S as remove, T as compose, _ as empty$1, a as makeGrouped, b as isEmpty, c as SemanticSearch, d as map$4, f as make$14, g as FileSystem, h as Path, i as batchN, l as maybeRemoveFile, m as Console, n as EmbeddingModel, o as setDelay, p as ChildProcessSpawner, r as EmbeddingRequest, s as withSpan$1, t as Dimensions, u as maybeUpdateFile, v as forEach$1, w as size, x as make$13, y as get$2 } from "./cli.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { DatabaseSync, backup } from "node:sqlite";
7
7
  import TreeSitter from "tree-sitter";
8
8
  import TreeSitterJavaScript from "tree-sitter-javascript";
9
9
  import TreeSitterTypeScript from "tree-sitter-typescript";
10
10
  import { getLoadablePath } from "sqlite-vec";
11
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/reactivity/Reactivity.js
11
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/reactivity/Reactivity.js
12
12
  const TypeId$6 = "~effect/reactivity/Reactivity";
13
13
  const Reactivity = Service("effect/reactivity/Reactivity");
14
14
  const make$7 = sync(() => {
@@ -122,7 +122,7 @@ const keysToHashes = (keys, f) => {
122
122
  }
123
123
  };
124
124
  //#endregion
125
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/Statement.js
125
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/Statement.js
126
126
  const FragmentTypeId = "~effect/sql/Statement/Fragment";
127
127
  const fragment = (segments) => ({
128
128
  [FragmentTypeId]: FragmentTypeId,
@@ -612,7 +612,7 @@ function in_() {
612
612
  }
613
613
  const neverFragment = fragment([literal("1=0")]);
614
614
  //#endregion
615
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/SqlClient.js
615
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlClient.js
616
616
  const TypeId$5 = "~effect/sql/SqlClient";
617
617
  const SqlClient = Service("effect/sql/SqlClient");
618
618
  let clientIdCounter = 0;
@@ -626,6 +626,7 @@ const make$5 = fnUntraced(function* (options) {
626
626
  const beginTransaction = options.beginTransaction ?? "BEGIN";
627
627
  const commit = options.commit ?? "COMMIT";
628
628
  const savepoint = options.savepoint ?? ((name) => `SAVEPOINT ${name}`);
629
+ const releaseSavepoint = options.releaseSavepoint;
629
630
  const rollback = options.rollback ?? "ROLLBACK";
630
631
  const rollbackSavepoint = options.rollbackSavepoint ?? ((name) => `ROLLBACK TO SAVEPOINT ${name}`);
631
632
  const transactionAcquirer = options.transactionAcquirer ?? options.acquirer;
@@ -636,6 +637,7 @@ const make$5 = fnUntraced(function* (options) {
636
637
  acquireConnection: flatMap(make$8(), (scope) => map(provide(transactionAcquirer, scope), (conn) => [scope, conn])),
637
638
  begin: (conn) => control(conn, beginTransaction),
638
639
  savepoint: (conn, id) => control(conn, savepoint(`effect_sql_${id}`)),
640
+ releaseSavepoint: releaseSavepoint ? (conn, id) => control(conn, releaseSavepoint(`effect_sql_${id}`)) : void 0,
639
641
  commit: (conn) => control(conn, commit),
640
642
  rollback: (conn) => control(conn, rollback),
641
643
  rollbackSavepoint: (conn, id) => control(conn, rollbackSavepoint(`effect_sql_${id}`))
@@ -691,6 +693,7 @@ const makeWithTransaction = (options) => {
691
693
  span.event("db.transaction.rollback", clock.currentTimeNanosUnsafe());
692
694
  effect = orDie(id > 0 ? options.rollbackSavepoint(conn, id) : options.rollback(conn));
693
695
  }
696
+ if (id > 0 && options.releaseSavepoint) effect = andThen(effect, orDie(options.releaseSavepoint(conn, id)));
694
697
  return flatMap(effect, () => exit);
695
698
  }, true)), scope ? (eff) => onExitPrimitive(eff, (exit) => close(scope, exit), true) : identity));
696
699
  return id === 0 ? transaction : getUnsafe(services, transactionSemaphore).withPermit(transaction);
@@ -699,7 +702,7 @@ const makeWithTransaction = (options) => {
699
702
  const TransactionConnection = (clientId) => Service(`effect/sql/SqlClient/TransactionConnection/${clientId}`);
700
703
  const SafeIntegers = Reference("effect/sql/SqlClient/SafeIntegers", { defaultValue: () => false });
701
704
  //#endregion
702
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/Cache.js
705
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/Cache.js
703
706
  const TypeId$4 = "~effect/Cache";
704
707
  const makeWith = (lookup, options) => contextWith$1((context) => {
705
708
  const self = Object.create(Proto$1);
@@ -782,7 +785,7 @@ const checkCapacity = (self) => {
782
785
  }
783
786
  };
784
787
  //#endregion
785
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/schema/VariantSchema.js
788
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/schema/VariantSchema.js
786
789
  const TypeId$3 = "~effect/schema/VariantSchema";
787
790
  const cacheSymbol = Symbol.for(`${TypeId$3}/cache`);
788
791
  const defaultCacheSymbol = Symbol.for(`${TypeId$3}/defaultCache`);
@@ -887,7 +890,7 @@ const Union$1 = (members, defaultVariant, variants) => {
887
890
  return VariantUnion;
888
891
  };
889
892
  //#endregion
890
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/schema/Model.js
893
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/schema/Model.js
891
894
  const { Class, Field, FieldExcept, FieldOnly, Struct, Union, extract, fieldEvolve } = make$3({
892
895
  variants: [
893
896
  "select",
@@ -904,12 +907,12 @@ const optionalOption = (schema) => optionalKey(NullOr(schema)).pipe(decodeTo(Opt
904
907
  encode: flatten
905
908
  })));
906
909
  const FieldOption = fieldEvolve({
907
- select: map$3(OptionFromNullOr),
908
- insert: map$3(OptionFromNullOr),
909
- update: map$3(OptionFromNullOr),
910
- json: map$3(optionalOption),
911
- jsonCreate: map$3(optionalOption),
912
- jsonUpdate: map$3(optionalOption)
910
+ select: map$4(OptionFromNullOr),
911
+ insert: map$4(OptionFromNullOr),
912
+ update: map$4(OptionFromNullOr),
913
+ json: map$4(optionalOption),
914
+ jsonCreate: map$4(optionalOption),
915
+ jsonUpdate: map$4(optionalOption)
913
916
  });
914
917
  const BooleanSqlite = Field({
915
918
  select: BooleanFromBit,
@@ -920,7 +923,7 @@ const BooleanSqlite = Field({
920
923
  jsonUpdate: Boolean
921
924
  });
922
925
  const Date$1 = String$1.pipe(decodeTo(DateTimeUtc, {
923
- decode: dateTimeUtcFromInput().map(removeTime),
926
+ decode: map$3(dateTimeUtcFromInput(), removeTime),
924
927
  encode: transform(formatIsoDate)
925
928
  }));
926
929
  const DateWithNow = Overrideable(Date$1, { defaultValue: map(now, removeTime) });
@@ -961,7 +964,7 @@ const DateTimeUpdateFromNumber = Field({
961
964
  json: DateTimeUtcFromMillis
962
965
  });
963
966
  //#endregion
964
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/SqlError.js
967
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlError.js
965
968
  const TypeId$2 = "~effect/sql/SqlError";
966
969
  const ReasonTypeId = "~effect/sql/SqlError/Reason";
967
970
  const ReasonFields = {
@@ -969,25 +972,25 @@ const ReasonFields = {
969
972
  message: optional(String$1),
970
973
  operation: optional(String$1)
971
974
  };
972
- var ConnectionError = class extends TaggedError$1("effect/sql/SqlError/ConnectionError")("ConnectionError", ReasonFields) {
975
+ var ConnectionError = class extends TaggedError("effect/sql/SqlError/ConnectionError")("ConnectionError", ReasonFields) {
973
976
  [ReasonTypeId] = ReasonTypeId;
974
977
  get isRetryable() {
975
978
  return true;
976
979
  }
977
980
  };
978
- var AuthenticationError = class extends TaggedError$1("effect/sql/SqlError/AuthenticationError")("AuthenticationError", ReasonFields) {
981
+ var AuthenticationError = class extends TaggedError("effect/sql/SqlError/AuthenticationError")("AuthenticationError", ReasonFields) {
979
982
  [ReasonTypeId] = ReasonTypeId;
980
983
  get isRetryable() {
981
984
  return false;
982
985
  }
983
986
  };
984
- var AuthorizationError = class extends TaggedError$1("effect/sql/SqlError/AuthorizationError")("AuthorizationError", ReasonFields) {
987
+ var AuthorizationError = class extends TaggedError("effect/sql/SqlError/AuthorizationError")("AuthorizationError", ReasonFields) {
985
988
  [ReasonTypeId] = ReasonTypeId;
986
989
  get isRetryable() {
987
990
  return false;
988
991
  }
989
992
  };
990
- var SqlSyntaxError = class extends TaggedError$1("effect/sql/SqlError/SqlSyntaxError")("SqlSyntaxError", ReasonFields) {
993
+ var SqlSyntaxError = class extends TaggedError("effect/sql/SqlError/SqlSyntaxError")("SqlSyntaxError", ReasonFields) {
991
994
  [ReasonTypeId] = ReasonTypeId;
992
995
  get isRetryable() {
993
996
  return false;
@@ -997,43 +1000,43 @@ const UniqueViolationFields = {
997
1000
  ...ReasonFields,
998
1001
  constraint: String$1
999
1002
  };
1000
- var UniqueViolation = class extends TaggedError$1("effect/sql/SqlError/UniqueViolation")("UniqueViolation", UniqueViolationFields) {
1003
+ var UniqueViolation = class extends TaggedError("effect/sql/SqlError/UniqueViolation")("UniqueViolation", UniqueViolationFields) {
1001
1004
  [ReasonTypeId] = ReasonTypeId;
1002
1005
  get isRetryable() {
1003
1006
  return false;
1004
1007
  }
1005
1008
  };
1006
- var ConstraintError = class extends TaggedError$1("effect/sql/SqlError/ConstraintError")("ConstraintError", ReasonFields) {
1009
+ var ConstraintError = class extends TaggedError("effect/sql/SqlError/ConstraintError")("ConstraintError", ReasonFields) {
1007
1010
  [ReasonTypeId] = ReasonTypeId;
1008
1011
  get isRetryable() {
1009
1012
  return false;
1010
1013
  }
1011
1014
  };
1012
- var DeadlockError = class extends TaggedError$1("effect/sql/SqlError/DeadlockError")("DeadlockError", ReasonFields) {
1015
+ var DeadlockError = class extends TaggedError("effect/sql/SqlError/DeadlockError")("DeadlockError", ReasonFields) {
1013
1016
  [ReasonTypeId] = ReasonTypeId;
1014
1017
  get isRetryable() {
1015
1018
  return true;
1016
1019
  }
1017
1020
  };
1018
- var SerializationError = class extends TaggedError$1("effect/sql/SqlError/SerializationError")("SerializationError", ReasonFields) {
1021
+ var SerializationError = class extends TaggedError("effect/sql/SqlError/SerializationError")("SerializationError", ReasonFields) {
1019
1022
  [ReasonTypeId] = ReasonTypeId;
1020
1023
  get isRetryable() {
1021
1024
  return true;
1022
1025
  }
1023
1026
  };
1024
- var LockTimeoutError = class extends TaggedError$1("effect/sql/SqlError/LockTimeoutError")("LockTimeoutError", ReasonFields) {
1027
+ var LockTimeoutError = class extends TaggedError("effect/sql/SqlError/LockTimeoutError")("LockTimeoutError", ReasonFields) {
1025
1028
  [ReasonTypeId] = ReasonTypeId;
1026
1029
  get isRetryable() {
1027
1030
  return true;
1028
1031
  }
1029
1032
  };
1030
- var StatementTimeoutError = class extends TaggedError$1("effect/sql/SqlError/StatementTimeoutError")("StatementTimeoutError", ReasonFields) {
1033
+ var StatementTimeoutError = class extends TaggedError("effect/sql/SqlError/StatementTimeoutError")("StatementTimeoutError", ReasonFields) {
1031
1034
  [ReasonTypeId] = ReasonTypeId;
1032
1035
  get isRetryable() {
1033
1036
  return true;
1034
1037
  }
1035
1038
  };
1036
- var UnknownError = class extends TaggedError$1("effect/sql/SqlError/UnknownError")("UnknownError", ReasonFields) {
1039
+ var UnknownError = class extends TaggedError("effect/sql/SqlError/UnknownError")("UnknownError", ReasonFields) {
1037
1040
  [ReasonTypeId] = ReasonTypeId;
1038
1041
  get isRetryable() {
1039
1042
  return false;
@@ -1052,7 +1055,7 @@ const SqlErrorReason = Union$2([
1052
1055
  StatementTimeoutError,
1053
1056
  UnknownError
1054
1057
  ]);
1055
- var SqlError = class extends TaggedError$1("effect/sql/SqlError")("SqlError", { reason: SqlErrorReason }) {
1058
+ var SqlError = class extends TaggedError("effect/sql/SqlError")("SqlError", { reason: SqlErrorReason }) {
1056
1059
  [TypeId$2] = TypeId$2;
1057
1060
  cause = this.reason;
1058
1061
  get message() {
@@ -1126,7 +1129,7 @@ const classifySqliteError = (cause, { message, operation } = {}) => {
1126
1129
  }
1127
1130
  return new UnknownError(props);
1128
1131
  };
1129
- var ResultLengthMismatch = class extends TaggedError$1("effect/sql/ResultLengthMismatch")("ResultLengthMismatch", {
1132
+ var ResultLengthMismatch = class extends TaggedError("effect/sql/ResultLengthMismatch")("ResultLengthMismatch", {
1130
1133
  expected: Natural,
1131
1134
  actual: Natural
1132
1135
  }) {
@@ -1135,7 +1138,7 @@ var ResultLengthMismatch = class extends TaggedError$1("effect/sql/ResultLengthM
1135
1138
  }
1136
1139
  };
1137
1140
  //#endregion
1138
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/SqlResolver.js
1141
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlResolver.js
1139
1142
  const SqlRequestProto = {
1140
1143
  ...Class$1.prototype,
1141
1144
  [symbol](that) {
@@ -1266,14 +1269,14 @@ function transactionKey(entry) {
1266
1269
  return byReferenceUnsafe(conn);
1267
1270
  }
1268
1271
  //#endregion
1269
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/SqlSchema.js
1272
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlSchema.js
1270
1273
  const findAll = (options) => {
1271
1274
  const encodeRequest = encodeEffect(options.Request);
1272
1275
  const decode = decodeUnknownEffect(mutable(ArraySchema(options.Result)));
1273
1276
  return (request) => flatMap(flatMap(encodeRequest(request), options.execute), decode);
1274
1277
  };
1275
1278
  //#endregion
1276
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/SqlModel.js
1279
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlModel.js
1277
1280
  const makeResolvers = (Model, options) => gen(function* () {
1278
1281
  const sql = yield* SqlClient;
1279
1282
  const idSchema = Model.fields[options.idColumn];
@@ -1333,7 +1336,7 @@ var Chunk = class extends Class("Chunk")({
1333
1336
  syncId: SyncId
1334
1337
  }) {};
1335
1338
  var ChunkRepo = class extends Service()("clanka/ChunkRepo") {};
1336
- var ChunkRepoError = class extends TaggedError$1()("ChunkRepoError", { reason: Union$2([SqlError]) }) {
1339
+ var ChunkRepoError = class extends TaggedError()("ChunkRepoError", { reason: Union$2([SqlError]) }) {
1337
1340
  cause = this.reason;
1338
1341
  message = this.reason.message;
1339
1342
  };
@@ -1887,7 +1890,7 @@ const layer$3 = effect(CodeChunker, gen(function* () {
1887
1890
  });
1888
1891
  }));
1889
1892
  //#endregion
1890
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/FiberHandle.js
1893
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/FiberHandle.js
1891
1894
  const TypeId$1 = "~effect/FiberHandle";
1892
1895
  const isFiberHandle = (u) => hasProperty(u, TypeId$1);
1893
1896
  const Proto = {
@@ -1957,7 +1960,7 @@ const runImpl = (self, effect, options) => withFiber((parent) => {
1957
1960
  return succeed(fiber);
1958
1961
  });
1959
1962
  //#endregion
1960
- //#region node_modules/.pnpm/@effect+sql-sqlite-node@4.0.0-rc.115_effect@4.0.0-rc.115/node_modules/@effect/sql-sqlite-node/dist/SqliteClient.js
1963
+ //#region node_modules/.pnpm/@effect+sql-sqlite-node@https+++pkg.pr.new+Effect-TS+effect+@effect+sql-sqlite-node@24f_5e2d35ee75878d81cfcd43ae9f85effa/node_modules/@effect/sql-sqlite-node/dist/SqliteClient.js
1961
1964
  const ATTR_DB_SYSTEM_NAME = "db.system.name";
1962
1965
  const MAX_BUSY_TIMEOUT = 2147483647;
1963
1966
  const TypeId = "~@effect/sql-sqlite-node/SqliteClient";
@@ -2085,6 +2088,7 @@ const make$1 = (options) => gen(function* () {
2085
2088
  acquirer,
2086
2089
  compiler,
2087
2090
  transactionAcquirer,
2091
+ releaseSavepoint: (name) => `RELEASE SAVEPOINT ${name}`,
2088
2092
  beginTransaction: options.readonly === true ? "BEGIN" : "BEGIN IMMEDIATE",
2089
2093
  spanAttributes: [...options.spanAttributes ? Object.entries(options.spanAttributes) : [], [ATTR_DB_SYSTEM_NAME, "sqlite"]],
2090
2094
  transformRows
@@ -2107,14 +2111,14 @@ const sqliteCauseWithErrno = (cause) => {
2107
2111
  return Object.assign(cause, { errno: errcode });
2108
2112
  };
2109
2113
  //#endregion
2110
- //#region node_modules/.pnpm/effect@4.0.0-rc.115/node_modules/effect/dist/unstable/sql/Migrator.js
2114
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/Migrator.js
2111
2115
  var __rewriteRelativeImportExtension = void 0 && (void 0).__rewriteRelativeImportExtension || function(path, preserveJsx) {
2112
2116
  if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
2113
2117
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
2114
2118
  });
2115
2119
  return path;
2116
2120
  };
2117
- var MigrationError = class extends TaggedError("MigrationError") {};
2121
+ var MigrationError = class extends TaggedError$1("MigrationError") {};
2118
2122
  const make = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory, table = "effect_sql_migrations" }) => gen(function* () {
2119
2123
  const sql = yield* SqlClient;
2120
2124
  const ensureMigrationsTable = sql.onDialectOrElse({
@@ -2156,7 +2160,7 @@ const make = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory, tab
2156
2160
  }))).pipe(flatMap((_) => isEffect(_) ? succeed(_) : _.default ? succeed(_.default?.default ?? _.default) : fail$1(new MigrationError({
2157
2161
  kind: "ImportError",
2158
2162
  message: `Default export not found for migration "${id}_${name}"`
2159
- }))), filterOrFail(isEffect, () => new MigrationError({
2163
+ }))), filterOrFail((_) => isEffect(_), () => new MigrationError({
2160
2164
  kind: "ImportError",
2161
2165
  message: `Default export was not an Effect for migration "${id}_${name}"`
2162
2166
  })));
@@ -2212,7 +2216,7 @@ const fromRecord = (migrations) => pipe(Object.keys(migrations), flatMapNullishO
2212
2216
  succeed(migrations[key])
2213
2217
  ]), sort(migrationOrder), succeed);
2214
2218
  //#endregion
2215
- //#region node_modules/.pnpm/@effect+sql-sqlite-node@4.0.0-rc.115_effect@4.0.0-rc.115/node_modules/@effect/sql-sqlite-node/dist/SqliteMigrator.js
2219
+ //#region node_modules/.pnpm/@effect+sql-sqlite-node@https+++pkg.pr.new+Effect-TS+effect+@effect+sql-sqlite-node@24f_5e2d35ee75878d81cfcd43ae9f85effa/node_modules/@effect/sql-sqlite-node/dist/SqliteMigrator.js
2216
2220
  const run = make({});
2217
2221
  const layer$1 = (options) => effectDiscard(run(options));
2218
2222
  //#endregion
@@ -2356,4 +2360,4 @@ const layer = (options) => effect(SemanticSearch, gen(function* () {
2356
2360
  //#endregion
2357
2361
  export { SemanticSearch, chunkEmbeddingInput, layer, makeEmbeddingResolver, maybeRemoveFile, maybeUpdateFile };
2358
2362
 
2359
- //# sourceMappingURL=SemanticSearch-BPxQoRSC.mjs.map
2363
+ //# sourceMappingURL=SemanticSearch-BHUGFT1y.mjs.map