clanka 0.8.1 → 0.8.3

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.
@@ -1,6 +1,6 @@
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";
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-BCeySOy1.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-CgH3SuLu.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-C9JQ5hI0.mjs";
4
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";
@@ -8,7 +8,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@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/reactivity/Reactivity.js
11
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/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@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/Statement.js
125
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/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@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlClient.js
615
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/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;
@@ -702,7 +702,7 @@ const makeWithTransaction = (options) => {
702
702
  const TransactionConnection = (clientId) => Service(`effect/sql/SqlClient/TransactionConnection/${clientId}`);
703
703
  const SafeIntegers = Reference("effect/sql/SqlClient/SafeIntegers", { defaultValue: () => false });
704
704
  //#endregion
705
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/Cache.js
705
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Cache.js
706
706
  const TypeId$4 = "~effect/Cache";
707
707
  const makeWith = (lookup, options) => contextWith$1((context) => {
708
708
  const self = Object.create(Proto$1);
@@ -785,7 +785,7 @@ const checkCapacity = (self) => {
785
785
  }
786
786
  };
787
787
  //#endregion
788
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/schema/VariantSchema.js
788
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/schema/VariantSchema.js
789
789
  const TypeId$3 = "~effect/schema/VariantSchema";
790
790
  const cacheSymbol = Symbol.for(`${TypeId$3}/cache`);
791
791
  const defaultCacheSymbol = Symbol.for(`${TypeId$3}/defaultCache`);
@@ -890,7 +890,7 @@ const Union$1 = (members, defaultVariant, variants) => {
890
890
  return VariantUnion;
891
891
  };
892
892
  //#endregion
893
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/schema/Model.js
893
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/schema/Model.js
894
894
  const { Class, Field, FieldExcept, FieldOnly, Struct, Union, extract, fieldEvolve } = make$3({
895
895
  variants: [
896
896
  "select",
@@ -964,7 +964,7 @@ const DateTimeUpdateFromNumber = Field({
964
964
  json: DateTimeUtcFromMillis
965
965
  });
966
966
  //#endregion
967
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlError.js
967
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/sql/SqlError.js
968
968
  const TypeId$2 = "~effect/sql/SqlError";
969
969
  const ReasonTypeId = "~effect/sql/SqlError/Reason";
970
970
  const ReasonFields = {
@@ -1138,7 +1138,7 @@ var ResultLengthMismatch = class extends TaggedError("effect/sql/ResultLengthMis
1138
1138
  }
1139
1139
  };
1140
1140
  //#endregion
1141
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlResolver.js
1141
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/sql/SqlResolver.js
1142
1142
  const SqlRequestProto = {
1143
1143
  ...Class$1.prototype,
1144
1144
  [symbol](that) {
@@ -1269,14 +1269,14 @@ function transactionKey(entry) {
1269
1269
  return byReferenceUnsafe(conn);
1270
1270
  }
1271
1271
  //#endregion
1272
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlSchema.js
1272
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/sql/SqlSchema.js
1273
1273
  const findAll = (options) => {
1274
1274
  const encodeRequest = encodeEffect(options.Request);
1275
1275
  const decode = decodeUnknownEffect(mutable(ArraySchema(options.Result)));
1276
1276
  return (request) => flatMap(flatMap(encodeRequest(request), options.execute), decode);
1277
1277
  };
1278
1278
  //#endregion
1279
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/SqlModel.js
1279
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/sql/SqlModel.js
1280
1280
  const makeResolvers = (Model, options) => gen(function* () {
1281
1281
  const sql = yield* SqlClient;
1282
1282
  const idSchema = Model.fields[options.idColumn];
@@ -1890,7 +1890,7 @@ const layer$3 = effect(CodeChunker, gen(function* () {
1890
1890
  });
1891
1891
  }));
1892
1892
  //#endregion
1893
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/FiberHandle.js
1893
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/FiberHandle.js
1894
1894
  const TypeId$1 = "~effect/FiberHandle";
1895
1895
  const isFiberHandle = (u) => hasProperty(u, TypeId$1);
1896
1896
  const Proto = {
@@ -1960,7 +1960,7 @@ const runImpl = (self, effect, options) => withFiber((parent) => {
1960
1960
  return succeed(fiber);
1961
1961
  });
1962
1962
  //#endregion
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
1963
+ //#region node_modules/.pnpm/@effect+sql-sqlite-node@https+++pkg.pr.new+Effect-TS+effect+@effect+sql-sqlite-node@b30_35f9412091f754d7278f29eda52a67a4/node_modules/@effect/sql-sqlite-node/dist/SqliteClient.js
1964
1964
  const ATTR_DB_SYSTEM_NAME = "db.system.name";
1965
1965
  const MAX_BUSY_TIMEOUT = 2147483647;
1966
1966
  const TypeId = "~@effect/sql-sqlite-node/SqliteClient";
@@ -2111,7 +2111,7 @@ const sqliteCauseWithErrno = (cause) => {
2111
2111
  return Object.assign(cause, { errno: errcode });
2112
2112
  };
2113
2113
  //#endregion
2114
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@24fa0ab_8fb3e3e1ff7f03df0873bfda51410aa1/node_modules/effect/dist/sql/Migrator.js
2114
+ //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/sql/Migrator.js
2115
2115
  var __rewriteRelativeImportExtension = void 0 && (void 0).__rewriteRelativeImportExtension || function(path, preserveJsx) {
2116
2116
  if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
2117
2117
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
@@ -2216,7 +2216,7 @@ const fromRecord = (migrations) => pipe(Object.keys(migrations), flatMapNullishO
2216
2216
  succeed(migrations[key])
2217
2217
  ]), sort(migrationOrder), succeed);
2218
2218
  //#endregion
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
2219
+ //#region node_modules/.pnpm/@effect+sql-sqlite-node@https+++pkg.pr.new+Effect-TS+effect+@effect+sql-sqlite-node@b30_35f9412091f754d7278f29eda52a67a4/node_modules/@effect/sql-sqlite-node/dist/SqliteMigrator.js
2220
2220
  const run = make({});
2221
2221
  const layer$1 = (options) => effectDiscard(run(options));
2222
2222
  //#endregion
@@ -2248,7 +2248,7 @@ const resolveChunkConfig = (options) => ({
2248
2248
  chunkOverlap: 0,
2249
2249
  chunkMaxCharacters: options.chunkMaxCharacters ?? 15e3
2250
2250
  });
2251
- const makeEmbeddingResolver = (resolver, options) => resolver.pipe(setDelay(options.embeddingRequestDelay ?? millis(50)), batchN(options.embeddingBatchSize ?? 32));
2251
+ const makeEmbeddingResolver = (resolver, options) => resolver.pipe(setDelay(options.embeddingRequestDelay ?? millis(50)), batchN(options.embeddingBatchSize ?? 100));
2252
2252
  const chunkEmbeddingInput = (chunk) => {
2253
2253
  const headerLines = ["---", "file: " + chunk.path];
2254
2254
  if (chunk.name !== void 0) headerLines.push("name: " + chunk.name);
@@ -2360,4 +2360,4 @@ const layer = (options) => effect(SemanticSearch, gen(function* () {
2360
2360
  //#endregion
2361
2361
  export { SemanticSearch, chunkEmbeddingInput, layer, makeEmbeddingResolver, maybeRemoveFile, maybeUpdateFile };
2362
2362
 
2363
- //# sourceMappingURL=SemanticSearch-BHUGFT1y.mjs.map
2363
+ //# sourceMappingURL=SemanticSearch-BJGnYhFt.mjs.map