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.
- package/dist/Acp.d.ts +4 -4
- package/dist/Acp.d.ts.map +1 -1
- package/dist/Acp.js +8 -6
- package/dist/Acp.js.map +1 -1
- package/dist/Acp.test.js +66 -4
- package/dist/Acp.test.js.map +1 -1
- package/dist/AcpImage.test.js +7 -7
- package/dist/AcpImage.test.js.map +1 -1
- package/dist/Agent.d.ts +8 -8
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +17 -7
- package/dist/Agent.js.map +1 -1
- package/dist/Agent.test.js +53 -8
- package/dist/Agent.test.js.map +1 -1
- package/dist/AgentExecutor.d.ts +9 -9
- package/dist/AgentExecutor.d.ts.map +1 -1
- package/dist/AgentExecutor.js +5 -5
- package/dist/AgentExecutor.js.map +1 -1
- package/dist/AgentExecutorImage.test.js +6 -6
- package/dist/AgentExecutorImage.test.js.map +1 -1
- package/dist/AgentImage.test.js +3 -3
- package/dist/AgentImage.test.js.map +1 -1
- package/dist/AgentOutput.d.ts +10 -2
- package/dist/AgentOutput.d.ts.map +1 -1
- package/dist/AgentOutput.js +10 -2
- package/dist/AgentOutput.js.map +1 -1
- package/dist/AgentSkills.d.ts.map +1 -1
- package/dist/AgentSkills.js +6 -1
- package/dist/AgentSkills.js.map +1 -1
- package/dist/AgentSkills.test.js +21 -4
- package/dist/AgentSkills.test.js.map +1 -1
- package/dist/AgentTools.d.ts +4 -4
- package/dist/AgentTools.d.ts.map +1 -1
- package/dist/AgentTools.js +4 -4
- package/dist/AgentTools.js.map +1 -1
- package/dist/AgentToolsImage.test.js +2 -2
- package/dist/AgentToolsImage.test.js.map +1 -1
- package/dist/ChunkRepo.d.ts +10 -10
- package/dist/ChunkRepo.d.ts.map +1 -1
- package/dist/ChunkRepo.js +7 -7
- package/dist/ChunkRepo.js.map +1 -1
- package/dist/ChunkRepo.test.js +2 -2
- package/dist/ChunkRepo.test.js.map +1 -1
- package/dist/CodeChunker.d.ts +1 -1
- package/dist/CodeChunker.d.ts.map +1 -1
- package/dist/CodeChunker.js +2 -2
- package/dist/CodeChunker.js.map +1 -1
- package/dist/Codex.d.ts +5 -5
- package/dist/Codex.d.ts.map +1 -1
- package/dist/Codex.js +1 -1
- package/dist/Codex.js.map +1 -1
- package/dist/CodexAuth.d.ts +2 -2
- package/dist/CodexAuth.d.ts.map +1 -1
- package/dist/CodexAuth.js +6 -6
- package/dist/CodexAuth.js.map +1 -1
- package/dist/CodexAuth.test.js +3 -3
- package/dist/CodexAuth.test.js.map +1 -1
- package/dist/Compaction.d.ts +3 -3
- package/dist/Compaction.d.ts.map +1 -1
- package/dist/Compaction.js +3 -3
- package/dist/Compaction.js.map +1 -1
- package/dist/Compaction.test.js +3 -3
- package/dist/Compaction.test.js.map +1 -1
- package/dist/CompactionImage.test.js +4 -4
- package/dist/CompactionImage.test.js.map +1 -1
- package/dist/CompactionTokens.test.js +3 -3
- package/dist/CompactionTokens.test.js.map +1 -1
- package/dist/CompactionTransport.test.js +5 -5
- package/dist/CompactionTransport.test.js.map +1 -1
- package/dist/Copilot.d.ts +3 -3
- package/dist/Copilot.d.ts.map +1 -1
- package/dist/Copilot.js +1 -1
- package/dist/Copilot.js.map +1 -1
- package/dist/CopilotAuth.d.ts +2 -2
- package/dist/CopilotAuth.d.ts.map +1 -1
- package/dist/CopilotAuth.js +4 -4
- package/dist/CopilotAuth.js.map +1 -1
- package/dist/CopilotAuth.test.js +2 -2
- package/dist/CopilotAuth.test.js.map +1 -1
- package/dist/GlobalWebSocket.d.ts +1 -1
- package/dist/GlobalWebSocket.d.ts.map +1 -1
- package/dist/GlobalWebSocket.js +1 -1
- package/dist/GlobalWebSocket.js.map +1 -1
- package/dist/Image.d.ts +2 -2
- package/dist/Image.d.ts.map +1 -1
- package/dist/Image.js +3 -3
- package/dist/Image.js.map +1 -1
- package/dist/Image.test.js +2 -2
- package/dist/Image.test.js.map +1 -1
- package/dist/SemanticSearch.d.ts +3 -3
- package/dist/SemanticSearch.d.ts.map +1 -1
- package/dist/SemanticSearch.js +1 -1
- package/dist/SemanticSearch.js.map +1 -1
- package/dist/Sqlite.d.ts +2 -2
- package/dist/Sqlite.d.ts.map +1 -1
- package/dist/Sqlite.js +1 -1
- package/dist/Sqlite.js.map +1 -1
- package/dist/ToolkitRenderer.d.ts +2 -2
- package/dist/ToolkitRenderer.d.ts.map +1 -1
- package/dist/WebToMarkdown.d.ts +2 -2
- package/dist/WebToMarkdown.d.ts.map +1 -1
- package/dist/WebToMarkdown.js +1 -1
- package/dist/WebToMarkdown.js.map +1 -1
- package/dist/WebToMarkdown.test.js +1 -1
- package/dist/WebToMarkdown.test.js.map +1 -1
- package/dist/Xai.d.ts +10 -3
- package/dist/Xai.d.ts.map +1 -1
- package/dist/Xai.js +26 -2
- package/dist/Xai.js.map +1 -1
- package/dist/Xai.test.js +38 -4
- package/dist/Xai.test.js.map +1 -1
- package/dist/XaiAuth.d.ts +2 -2
- package/dist/XaiAuth.d.ts.map +1 -1
- package/dist/XaiAuth.js +4 -4
- package/dist/XaiAuth.js.map +1 -1
- package/dist/XaiAuth.test.js +2 -2
- package/dist/XaiAuth.test.js.map +1 -1
- package/dist/bin/{Effect-CeAMoJlg.mjs → Effect-DvI8YVcR.mjs} +81 -387
- package/dist/bin/Effect-DvI8YVcR.mjs.map +1 -0
- package/dist/bin/{McpClient-zQibhsnA.mjs → McpClient-CM7u8ZVd.mjs} +3 -3
- package/dist/bin/{McpClient-zQibhsnA.mjs.map → McpClient-CM7u8ZVd.mjs.map} +1 -1
- package/dist/bin/{OutputFormatter-C7Awn0DS.mjs → OutputFormatter-BpggeGvI.mjs} +3 -3
- package/dist/bin/{OutputFormatter-C7Awn0DS.mjs.map → OutputFormatter-BpggeGvI.mjs.map} +1 -1
- package/dist/bin/{Schema-Bc06DxcV.mjs → Schema-DyJ738Wp.mjs} +1979 -1663
- package/dist/bin/Schema-DyJ738Wp.mjs.map +1 -0
- package/dist/bin/{SemanticSearch-BPxQoRSC.mjs → SemanticSearch-BHUGFT1y.mjs} +46 -42
- package/dist/bin/SemanticSearch-BHUGFT1y.mjs.map +1 -0
- package/dist/bin/{Stream-DlGXvw0L.mjs → Stream-Dg7AGCgJ.mjs} +60 -61
- package/dist/bin/Stream-Dg7AGCgJ.mjs.map +1 -0
- package/dist/bin/cli.mjs +614 -371
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/cli.js +7 -5
- package/dist/cli.js.map +1 -1
- package/dist/fixtures/TestImages.js +2 -2
- package/dist/fixtures/TestImages.js.map +1 -1
- package/package.json +7 -7
- package/src/Acp.test.ts +107 -5
- package/src/Acp.ts +10 -8
- package/src/AcpImage.test.ts +9 -9
- package/src/Agent.test.ts +61 -9
- package/src/Agent.ts +20 -10
- package/src/AgentExecutor.ts +8 -8
- package/src/AgentExecutorImage.test.ts +6 -6
- package/src/AgentImage.test.ts +5 -5
- package/src/AgentOutput.ts +10 -2
- package/src/AgentSkills.test.ts +81 -37
- package/src/AgentSkills.ts +5 -1
- package/src/AgentTools.ts +5 -5
- package/src/AgentToolsImage.test.ts +4 -4
- package/src/ChunkRepo.test.ts +2 -2
- package/src/ChunkRepo.ts +7 -7
- package/src/CodeChunker.ts +2 -2
- package/src/Codex.ts +4 -4
- package/src/CodexAuth.test.ts +3 -3
- package/src/CodexAuth.ts +6 -6
- package/src/Compaction.test.ts +3 -3
- package/src/Compaction.ts +3 -3
- package/src/CompactionImage.test.ts +4 -4
- package/src/CompactionTokens.test.ts +3 -3
- package/src/CompactionTransport.test.ts +6 -6
- package/src/Copilot.ts +2 -2
- package/src/CopilotAuth.test.ts +2 -6
- package/src/CopilotAuth.ts +4 -4
- package/src/GlobalWebSocket.ts +1 -1
- package/src/Image.test.ts +2 -2
- package/src/Image.ts +4 -4
- package/src/OutputFormatter.ts +1 -1
- package/src/SemanticSearch.test.ts +1 -1
- package/src/SemanticSearch.ts +3 -3
- package/src/Sqlite.ts +1 -1
- package/src/ToolkitRenderer.ts +2 -2
- package/src/WebToMarkdown.test.ts +1 -1
- package/src/WebToMarkdown.ts +2 -2
- package/src/Xai.test.ts +67 -8
- package/src/Xai.ts +52 -3
- package/src/XaiAuth.test.ts +2 -2
- package/src/XaiAuth.ts +4 -4
- package/src/cli.ts +9 -7
- package/src/fixtures/TestImages.ts +2 -2
- package/src/fixtures/patch13-broken.txt +4 -4
- package/src/fixtures/patch13-fixed.txt +4 -4
- package/dist/bin/Effect-CeAMoJlg.mjs.map +0 -1
- package/dist/bin/Schema-Bc06DxcV.mjs.map +0 -1
- package/dist/bin/SemanticSearch-BPxQoRSC.mjs.map +0 -1
- package/dist/bin/Stream-DlGXvw0L.mjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { $ as isEffect, $
|
|
2
|
-
import {
|
|
3
|
-
import { A as OptionFromNullOr, Cn as transform
|
|
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$
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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$
|
|
908
|
-
insert: map$
|
|
909
|
-
update: map$
|
|
910
|
-
json: map$
|
|
911
|
-
jsonCreate: map$
|
|
912
|
-
jsonUpdate: map$
|
|
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()
|
|
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@
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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@
|
|
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@
|
|
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@
|
|
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
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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-
|
|
2363
|
+
//# sourceMappingURL=SemanticSearch-BHUGFT1y.mjs.map
|