clanka 0.25.3 → 0.26.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 +5 -37
- package/dist/Acp.d.ts.map +1 -1
- package/dist/Acp.js +33 -48
- package/dist/Acp.js.map +1 -1
- package/dist/Acp.test.js +64 -3
- package/dist/Acp.test.js.map +1 -1
- package/dist/AcpImage.test.js +3 -2
- package/dist/AcpImage.test.js.map +1 -1
- package/dist/AcpSessionStore.d.ts +114 -0
- package/dist/AcpSessionStore.d.ts.map +1 -0
- package/dist/AcpSessionStore.js +327 -0
- package/dist/AcpSessionStore.js.map +1 -0
- package/dist/AcpSessionStore.test.d.ts +2 -0
- package/dist/AcpSessionStore.test.d.ts.map +1 -0
- package/dist/AcpSessionStore.test.js +135 -0
- package/dist/AcpSessionStore.test.js.map +1 -0
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +6 -5
- package/dist/Agent.js.map +1 -1
- package/dist/Agent.test.js +7 -6
- package/dist/Agent.test.js.map +1 -1
- package/dist/AgentBashJobs.test.js +7 -7
- package/dist/AgentBashJobs.test.js.map +1 -1
- package/dist/AgentExecutor.test.js +20 -20
- package/dist/AgentExecutor.test.js.map +1 -1
- package/dist/AgentImage.test.js +1 -1
- package/dist/AgentImage.test.js.map +1 -1
- package/dist/AgentSubagents.test.js +57 -29
- package/dist/AgentSubagents.test.js.map +1 -1
- package/dist/AgentTools.d.ts +4 -3
- package/dist/AgentTools.d.ts.map +1 -1
- package/dist/AgentTools.js +9 -7
- package/dist/AgentTools.js.map +1 -1
- package/dist/bin/{AiError-CsvdOsKR.mjs → AiError-DBaKz35C.mjs} +2 -2
- package/dist/bin/{Latch-B3e9629m.mjs → Latch-DOdbsGMQ.mjs} +1 -1
- package/dist/bin/{McpClient-BCxZZgnA.mjs → McpClient-B-FFG6Pg.mjs} +1 -1
- package/dist/bin/{OutputFormatter-ByMjyBhe.mjs → OutputFormatter-DhhP2i-7.mjs} +2 -2
- package/dist/bin/{Schema-BfUmMefy.mjs → Schema-CFdSO6iH.mjs} +11 -1
- package/dist/bin/{SemanticSearch-Cw10ozz8.mjs → SemanticSearch-C3a7LAQr.mjs} +2 -2
- package/dist/bin/cli.mjs +360 -154
- package/dist/bin/{upgrade-t590zYhO.mjs → upgrade-C4aOEWJH.mjs} +2 -2
- package/dist/cli.js +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Acp.test.ts +122 -3
- package/src/Acp.ts +41 -55
- package/src/AcpImage.test.ts +7 -2
- package/src/AcpSessionStore.test.ts +220 -0
- package/src/AcpSessionStore.ts +455 -0
- package/src/Agent.test.ts +10 -6
- package/src/Agent.ts +8 -6
- package/src/AgentBashJobs.test.ts +9 -9
- package/src/AgentExecutor.test.ts +20 -20
- package/src/AgentImage.test.ts +1 -1
- package/src/AgentSubagents.test.ts +77 -34
- package/src/AgentTools.ts +15 -10
- package/src/cli.ts +20 -9
- package/src/index.ts +5 -0
package/dist/bin/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --optimize-for-size
|
|
2
2
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-CXhmmSW5.mjs";
|
|
3
|
-
import { $ as URLFromString, $
|
|
4
|
-
import { $t as offerUnsafe, A as catchTags$1, At as takeUntil, B as failCause$3, Bt as unwrap$5, C as make$47, D as catchCause$1, Dt as succeed$6, E as callback$1, Et as splitLines, F as drainFork, Ft as transduce, G as flattenArray, Gt as endUnsafe, H as filterMap, Ht as makeUnsafe$4, I as drop, It as unwrap$6, Jt as failCauseUnsafe, K as flattenIterable, Kt as fail$7, L as empty$11, Lt as fromTransform$1, M as concat$1, Mt as tap$1, N as decodeText, Nt as tapError, Ot as suspend$3, P as die$2, Pt as toAsyncIterable, Qt as offerAllUnsafe, R as ensuring$1, Rt as mapDone, S as isAiErrorReason, St as runForEachArray, T as broadcast, Tt as scoped$1, Ut as bounded, V as filter$2, Vt as make$48, W as flatten, Wt as end, X as fromChannel$1, Xt as offer, Y as fromAsyncIterable, Yt as make$46, Z as fromEffect, Zt as offerAll, _ as ToolkitRequiredError, _n as toLowerCase, _t as run$4, a as InvalidOutputError, at as mapArray, b as buildErrorDescription, bt as runFold, c as InvalidToolResultError, cn as update, ct as mapError$1, d as RateLimitError, dn as interrupt$2, dt as mkString, en as poll, et as fromPull, f as StructuredOutputError, fn as interruptAll, ft as onExit$1, g as ToolResultEncodingError, gn as camelToSnake, gt as provideService$1, h as ToolParameterValidationError, hn as runIn, ht as provideContext$1, i as InternalProviderError, in as unbounded, it as map$11, j as catch_$1, jt as takeWhile, k as catchReason$1, kt as take$1, l as NetworkError, ln as await_, lt as merge$4, m as ToolNotFoundError, mn as join$3, mt as pipeThroughChannel, n as AuthenticationError, nn as sliding, nt as fromReadableStream, o as InvalidRequestError$1, on as make$45, ot as mapArrayEffect, p as ToolConfigurationError, pn as interruptAllAs, pt as orDie$2, q as fromArray, qt as failCause$2, r as HttpResponseDetails$1, rn as take, rt as isStream, s as InvalidResponseError, sn as set$1, st as mapEffect$1, t as AiError, tn as shutdownUnsafe, tt as fromQueue, u as QuotaExhaustedError, un as getCurrent, ut as mergeAll$1, v as UnknownError$1, vt as runCollect, w as reasonFromHttpStatus, wt as runLast, x as isAiError, xt as runForEach, y as UnsupportedSchemaError, yt as runDrain, z as fail$6, zt as toTransform } from "./AiError-
|
|
5
|
-
import { n as makeUnsafe$5 } from "./Latch-
|
|
3
|
+
import { $ as URLFromString, $a as tapCause, $i as gen, $l as format$1, $n as null_, $o as IllegalArgumentError, $r as decodeNative, $s as MinimumLogLevel, $t as isMultipleOf, A as Null, Aa as provideService, Ad as isString, Ai as contextWith, Al as last$1, An as getReferenceKey, Ar as toString, At as isFinite$1, Au as fromNullishOr, B as String$7, Ba as runSync, Bd as flow, Bi as flatMap$1, Bl as empty$9, Bn as Literal$1, Bo as catchDone, Br as remove$1, Bs as succeedContext, Bt as isLessThanBigInt, Bu as none, C as Literal, Ca as onInterrupt, Cc as ConsoleRef, Cd as isNotNull, Ci as catchIf, Cl as fromIterable, Cn as withDecodingDefaultKey, Co as TaggedClass$2, Cr as annotationExcludedKeys, Cs as pretty, Ct as isBetweenBigInt, D as Never, Da as promise, Dd as isNullish, Di as catchTags, Dl as isCanonicalArrayIndex, Dn as errorWithPath, Dr as fromInput, Ds as buildWithScope, Dt as isBetweenProperties, Du as flatMap$2, E as Natural, Ea as orElseSucceed, Ed as isNull, Ei as catchTag, El as isArrayNonEmpty, En as pick, Er as empty$5, Es as build, Et as isBetweenLength, Eu as filter$1, F as OptionFromOptional, Fa as result, Fd as constTrue, Fi as exit, Fl as reduce, Fn as decodeUnknownEffect, Fo as isSchedule, Fr as fromInput$1, Fs as mock, Ft as isGreaterThanOrEqualToBigInt, Fu as getOrUndefined, G as TaggedClass$1, Ga as serviceOption, Gi as forEach$1, Gl as getOrUndefined$2, Gn as applyToSelfOrLastLinkEncoding, Go as Random$1, Gr as fromSetCookie, Gs as addFinalizerExit, Gt as isMaxCodePoints, H as Struct, Ha as scoped, Hc as forkUnsafe, Hd as memoize, Hl as fail$2, Hn as PropertySignature, Hr as set, Hs as unwrap$4, Ht as isLessThanOrEqualTo, Hu as orElseSome, I as Record, Ia as retry, Id as constUndefined, Ii as fail$1, Il as sort, In as encodeEffect, Io as jittered, Ir as fromRecordUnsafe, Is as orDie$1, It as isGreaterThanOrEqualToDate, Iu as isNone, J as TaggedUnion, Ja as succeedNone, Ji as forkDetach, Jl as map$6, Jn as getIndexSignatureKeys, Jo as round, Jr as fromDateUnsafe, Jt as isMaxSize, Ju as mapInput, K as TaggedError$1, Ka as sleep, Ki as forever, Kl as isFailure$1, Kn as decodeTo, Kr as formatIso, Ks as close, Kt as isMaxLength, Ku as String$6, L as Redacted$4, La as runFork, Ld as constVoid, Li as failCause, Ll as span, Ln as Arrays, Lo as min, Lr as isRedactedName, Ls as provide$3, Lt as isIncluding, Lu as isSome, M as Number$2, Ma as raceFirst, Md as isUndefined, Mi as die, Ml as map$7, Mn as parseUriFragment, Mo as exponential, Mr as unwrap$3, Ms as fresh, Mt as isGreaterThanBigInt, Mu as getOrElse, N as Option, Na as repeat, Nd as or, Ni as effectify, Nl as match$3, Nn as getSubschemaKind, No as forever$1, Nr as CurrentRedactedNames$1, Ns as merge$3, Nt as isGreaterThanDate, Nu as getOrNull, O as NonEmptyArray, Oa as provide$1, Od as isObject$1, Oi as catch_, Ol as isReadonlyArrayNonEmpty, On as fromSchemaDraft07, Or as redactUrl, Os as effect, Ot as isBetweenSize, Ou as flatMapNullishOr, Pa as request, Pd as constFalse, Pi as ensuring, Pl as of, Pn as decodeEffect$1, Po as fromStep, Pr as empty$6, Ps as mergeAll, Pt as isGreaterThanOrEqualTo, Pu as getOrThrow$1, Q as URL$1, Qa as tap, Qi as fromResult, Ql as normalizeNonEmpty, Qn as mapOrSame, Qo as Done, Qr as encode, Qs as CurrentLogAnnotations, Qt as isMinSize, R as RedactedFromValue, Ra as runForkWith, Ri as failSync, Rl as assignProperty$1, Rn as Filter, Ro as spaced, Rr as merge$2, Rs as provideMerge, Rt as isInt, Ru as map$8, S as JsonObject$1, Sd as isIterable, Si as catchFilter, Sn as withDecodingDefault, Sr as Pointer, Ss as map$9, St as isBetween, Su as merge$1, Ta as orDie, Td as isNotUndefined, Ti as catchReason, Tl as isArray, Tn as omit, Tr as CurrentRedactedNames, Ts as squash, Tt as isBetweenDate, Tu as exists, U as StructWithRest, Ud as pipe, Ui as fn, Ul as failVoid, Un as Suspend, Uo as isDoneCause, Ur as setAll, Us as Scope, Ut as isLessThanOrEqualToBigInt, Uu as some, V as StringForLiteralAutocomplete, Va as scope, Vd as identity, Vi as flatMapEager, Vl as headUnsafe, Vn as Objects, Vr as retryAfterDelay, Vs as suspend$2, Vt as isLessThanDate, Vu as orElse$1, W as Symbol$1, Wa as service, Wd as pipeArguments, Wi as fnUntraced, Wl as getOrThrow, Wn as Union$1, Wr as empty$7, Ws as addFinalizer, Wt as isLessThanOrEqualToDate, Wu as toArray, X as Tuple, Xa as suspend, Xi as forkScoped, Xl as try_$1, Xn as isNever, Xo as currentTimeMillis, Xs as makeUnsafe$2, Xt as isMinLength, Y as TrueLiterals, Yi as forkIn, Yl as succeed$2, Yn as isJson, Yo as Clock, Ys as make$44, Yt as isMinCodePoints, Yu as Prototype, Z as TupleWithRest, Za as sync, Zi as fromOption, Zn as isOptional, Zr as decode$3, Zs as provide$2, Zt as isMinProperties, Zu as PipeInspectableProto, _ as Exit, _a as matchCauseEffect, _i as callback, _l as empty$4, _n as toCodecStringTree, _o as withParentSpan, _r as passthroughSubtype, _t as encodeTo, _u as getOrUndefined$1, aa as logDebug, ac as into, ai as acquireRelease, al as DisablePropagation, an as isUUID, ao as try_, ar as string$1, at as Void, au as max, b as Int$5, ba as onError, bc as succeed$3, bl as findFirstIndex, bn as toType, bo as zipWith, br as transformOptional, bs as makeDieReason, bt as instanceOf, bu as make$42, c as Date$2, ca as logInfo, cc as make$43, cd as getStackTraceLimit, ci as all, cl as Error$1, cn as make$41, co as uninterruptibleMask, cr as unknown$1, cs as fail$5, ct as declare, cu as seconds, da as map$5, dd as Class, di as annotateLogs, dl as taggedEnum, dn as mutable, do as useSpan, dr as transform$2, ds as fromReasons, dt as decodeSync, du as Reference, ea as ignore, ec as TracerTimingEnabled, ei as stripCrlf, el as sync$1, en as isPattern, er as optionalKey$1, et as Uint8Array$2, eu as fromInputUnsafe$1, f as DateTimeUtcFromString, fa as mapBothEager, fc as die$1, fd as NodeInspectSymbol, fi as as, fl as compose, fn as optional$2, fo as void_, fr as transformEffect$1, fs as hasInterrupts, ft as decodeTo$1, fu as Service, g as Error$2, gc as interrupt$1, gi as cachedWithTTL, gl as appendAll, gn as toCodecJson, gr as passthrough, gs as isDieReason, gt as encodeEffect$1, gu as getOption, h as DurationFromMillis, ha as match$4, hc as findErrorOption$1, hd as redact, hi as cached, hl as Array$1, hn as tag, ho as withFiber, ht as decodeUnknownSync, hu as get$2, i as Boolean$4, ia as isEffect, ii as stringOrRedacted, in as isStartingWith, io as tryPromise, ir as resolveIdentifier, is as annotate$1, it as Unknown, j as NullOr, ja as provideServiceEffect, jd as isTagged, jn as escapeToken, jr as fromBody, js as empty$10, jt as isGreaterThan, ju as fromUndefinedOr, k as NonEmptyString$1, ka as provideContext, kd as isObjectKeyword, ki as context, kl as join$2, kn as fromSchemaDraft2020_12, kr as setAll$1, ks as effectContext, kt as isEndingWith, la as logWarning, lc as makeUnsafe$1, ld as setStackTraceLimit, li as andThen, ll as TaggedClass, ln as makeFilter$1, lo as updateContext, lr as Transformation, ls as filterInterruptors, lt as decodeEffect, lu as toMillis, m as Duration, ma as mapError, mc as failCause$1, md as format, mi as asVoid, ml as toPredicate, mn as suspend$1, mo as whileLoop, ms as interruptors, mt as decodeUnknownOption, mu as empty$8, n as ArraySchema, na as interrupt, nc as doneUnsafe, ni as make$40, nn as isSchema, no as timeoutOption, nr as resolveAt, ns as TimeoutError, nt as UndefinedOr, nu as infinity, o as BooleanLiterals, oa as logError, oc as isDone, od as withFiber$1, ol as ParentSpan, on as isUnique, oo as undefined_, or as toEncoded, ou as millis, p as Defect, pa as mapEager, pc as fail$3, pi as asSome, pl as has, pn as optionalKey, pr as transformOptional$1, ps as hasInterruptsOnly, pt as decodeUnknownEffect$1, pu as add, q as TaggedStruct, qa as succeed$1, qi as forkChild, ql as isSuccess$1, qn as defaultParseOptions, qo as parse$1, qs as fork, qt as isMaxProperties, r as BigInt$2, ra as interruptible, rc as fail$4, ri as value, rn as isSchemaError, ro as timeoutOrElse, rr as resolveDescription, rs as UnknownError, rt as Union, ru as isFinite, s as Class$1, sa as logFatal, sc as isDoneUnsafe, sd as assignProperty, si as addFinalizer$1, sl as EncodingError, sn as link$1, so as uninterruptible, sr as toType$1, ss as done, st as check, su as minutes, t as Any, ta as ignoreCause, tc as _await, ti as isRedacted, tn as isPropertyNames, to as timeout, tr as replaceChecks, ts as StackTrace, tt as Uint8ArrayFromBase64, tu as hours, ua as makeSpanScoped, uc as succeed$5, ud as BaseProto, ui as annotateCurrentSpan, ul as TaggedError, un as makeFilterGroup, uo as updateService, ur as passthrough$1, us as findErrorOption, ut as decodeExit, uu as zero, v as FalseLiterals, va as matchEffect, vc as isFailure, vi as catchCause, vn as toEncoded$1, vo as withSpan$1, vr as transform$3, vs as isFailReason, vt as encodeUnknownEffect, vu as getOrUndefinedUnsafe, w as Literals$2, wa as option$1, wc as LogToStderr$1, wd as isNotNullish, wl as headNonEmpty, wr as jsonSchemaAnnotationKeys, ws as reasonAnnotations, wt as isBetweenCodePoints, wu as all$1, x as Json, xa as onExit, xc as void_$1, xd as hasProperty, xi as catchEager, xl as findLast, xn as withConstructorDefault, xo as equalBatchKeys, xr as InvalidValue$1, xs as makeFailReason, xt as is, xu as makeUnsafe$3, y as Finite, ya as never$1, yc as isSuccess, yi as catchCauseIf, yl as findFirst, yn as toJsonSchemaDocument, yo as yieldNow, yr as transformEffect, ys as isTimeoutError, yt as fromJsonString, yu as getUnsafe, z as SchemaError, zd as dual, zi as filterOrFail, zl as map$10, zn as FilterGroup, zo as toStep, zr as parseRetryAfter$1, zs as succeed$4, zt as isLessThan, zu as match$2 } from "./Schema-CFdSO6iH.mjs";
|
|
4
|
+
import { $t as offerUnsafe, A as catchTags$1, At as takeUntil, B as failCause$3, Bt as unwrap$5, C as make$47, D as catchCause$1, Dt as succeed$6, E as callback$1, Et as splitLines, F as drainFork, Ft as transduce, G as flattenArray, Gt as endUnsafe, H as filterMap, Ht as makeUnsafe$4, I as drop, It as unwrap$6, Jt as failCauseUnsafe, K as flattenIterable, Kt as fail$7, L as empty$11, Lt as fromTransform$1, M as concat$1, Mt as tap$1, N as decodeText, Nt as tapError, Ot as suspend$3, P as die$2, Pt as toAsyncIterable, Qt as offerAllUnsafe, R as ensuring$1, Rt as mapDone, S as isAiErrorReason, St as runForEachArray, T as broadcast, Tt as scoped$1, Ut as bounded, V as filter$2, Vt as make$48, W as flatten, Wt as end, X as fromChannel$1, Xt as offer, Y as fromAsyncIterable, Yt as make$46, Z as fromEffect, Zt as offerAll, _ as ToolkitRequiredError, _n as toLowerCase, _t as run$4, a as InvalidOutputError, at as mapArray, b as buildErrorDescription, bt as runFold, c as InvalidToolResultError, cn as update, ct as mapError$1, d as RateLimitError, dn as interrupt$2, dt as mkString, en as poll, et as fromPull, f as StructuredOutputError, fn as interruptAll, ft as onExit$1, g as ToolResultEncodingError, gn as camelToSnake, gt as provideService$1, h as ToolParameterValidationError, hn as runIn, ht as provideContext$1, i as InternalProviderError, in as unbounded, it as map$11, j as catch_$1, jt as takeWhile, k as catchReason$1, kt as take$1, l as NetworkError, ln as await_, lt as merge$4, m as ToolNotFoundError, mn as join$3, mt as pipeThroughChannel, n as AuthenticationError, nn as sliding, nt as fromReadableStream, o as InvalidRequestError$1, on as make$45, ot as mapArrayEffect, p as ToolConfigurationError, pn as interruptAllAs, pt as orDie$2, q as fromArray, qt as failCause$2, r as HttpResponseDetails$1, rn as take, rt as isStream, s as InvalidResponseError, sn as set$1, st as mapEffect$1, t as AiError, tn as shutdownUnsafe, tt as fromQueue, u as QuotaExhaustedError, un as getCurrent, ut as mergeAll$1, v as UnknownError$1, vt as runCollect, w as reasonFromHttpStatus, wt as runLast, x as isAiError, xt as runForEach, y as UnsupportedSchemaError, yt as runDrain, z as fail$6, zt as toTransform } from "./AiError-DBaKz35C.mjs";
|
|
5
|
+
import { n as makeUnsafe$5 } from "./Latch-DOdbsGMQ.mjs";
|
|
6
6
|
import { a as mergeCapabilities, c as safeParse, i as Protocol$1, n as assertToolsCallTaskCapability, o as getLiteralValue, r as AjvJsonSchemaValidator, s as getObjectShape, t as assertClientRequestTaskCapability } from "./helpers-Bb68A2Sv.mjs";
|
|
7
7
|
import { $ as array, B as SUPPORTED_PROTOCOL_VERSIONS, C as LATEST_PROTOCOL_VERSION, D as ListResourcesResultSchema, E as ListResourceTemplatesResultSchema, I as PromptListChangedNotificationSchema, J as isJSONRPCResultResponse, N as McpError, Q as any, R as ReadResourceResultSchema, S as JSONRPCMessageSchema, T as ListPromptsResultSchema, U as ToolListChangedNotificationSchema, W as isInitializedNotification, Z as ZodNumber, at as string$2, b as InitializeResultSchema, c as CreateMessageResultSchema, d as ElicitRequestSchema, et as boolean, f as ElicitResultSchema, h as GetPromptResultSchema, it as object, j as ListToolsResultSchema, l as CreateMessageResultWithToolsSchema, lt as NEVER, m as ErrorCode, n as CallToolResultSchema, nt as looseObject, o as CompleteResultSchema, ot as url, p as EmptyResultSchema, q as isJSONRPCRequest, rt as number$1, s as CreateMessageRequestSchema, st as _coercedNumber, tt as literal, u as CreateTaskResultSchema, w as ListChangedOptionsBaseSchema, z as ResourceListChangedNotificationSchema } from "./types-N9Z-HYP0.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
@@ -1101,8 +1101,8 @@ const nativeDecodeOptions = { alphabet: "base64url" };
|
|
|
1101
1101
|
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
1102
1102
|
const codes = new Uint8Array(128);
|
|
1103
1103
|
for (let i = 0; i < 64; i++) codes[alphabet.charCodeAt(i)] = i;
|
|
1104
|
-
const decodeString = (str) => map$6(decode$2(str), (_) => decoder.decode(_));
|
|
1105
|
-
const decoder = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
1104
|
+
const decodeString = (str) => map$6(decode$2(str), (_) => decoder$1.decode(_));
|
|
1105
|
+
const decoder$1 = new TextDecoder("utf-8", { ignoreBOM: true });
|
|
1106
1106
|
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/Terminal.js
|
|
1107
1107
|
const TypeId$25 = "~effect/Terminal";
|
|
1108
1108
|
const QuitErrorTypeId = "~effect/Terminal/QuitError";
|
|
@@ -2674,13 +2674,13 @@ var Uint8Array$1 = class extends Proto$14 {
|
|
|
2674
2674
|
};
|
|
2675
2675
|
}
|
|
2676
2676
|
};
|
|
2677
|
-
const encoder$
|
|
2677
|
+
const encoder$2 = new TextEncoder();
|
|
2678
2678
|
const buffer = globalThis.Buffer;
|
|
2679
|
-
const encodeText = buffer !== void 0 ? (body) => buffer.from(body, "utf8") : (body) => encoder$
|
|
2679
|
+
const encodeText = buffer !== void 0 ? (body) => buffer.from(body, "utf8") : (body) => encoder$2.encode(body);
|
|
2680
2680
|
const text = (body, contentType) => {
|
|
2681
2681
|
if (typeof body !== "string") body = body === void 0 ? "" : String(body);
|
|
2682
2682
|
if (buffer !== void 0) return new Uint8Array$1(void 0, contentType ?? "text/plain", buffer.byteLength(body, "utf8"), body);
|
|
2683
|
-
const bytes = encoder$
|
|
2683
|
+
const bytes = encoder$2.encode(body);
|
|
2684
2684
|
return new Uint8Array$1(bytes, contentType ?? "text/plain", bytes.length, body);
|
|
2685
2685
|
};
|
|
2686
2686
|
const jsonUnsafe = (body, contentType) => text(JSON.stringify(body), contentType ?? "application/json");
|
|
@@ -3801,7 +3801,7 @@ var UndiciResponse = class extends Class {
|
|
|
3801
3801
|
return pipeArguments(this, arguments);
|
|
3802
3802
|
}
|
|
3803
3803
|
};
|
|
3804
|
-
const loadUpgrade = promise(() => import("./upgrade-
|
|
3804
|
+
const loadUpgrade = promise(() => import("./upgrade-C4aOEWJH.mjs"));
|
|
3805
3805
|
const takeOver = (conn, head, signal) => {
|
|
3806
3806
|
if (head !== void 0 && head.length > 0) conn.unshift(head);
|
|
3807
3807
|
conn.on("error", constVoid);
|
|
@@ -9357,7 +9357,7 @@ const make$21 = (options) => Socket.of({
|
|
|
9357
9357
|
reader: options.reader,
|
|
9358
9358
|
writer: options.writer
|
|
9359
9359
|
});
|
|
9360
|
-
const encoder = new TextEncoder();
|
|
9360
|
+
const encoder$1 = new TextEncoder();
|
|
9361
9361
|
const CloseEventTypeId = "~effect/socket/Socket/CloseEvent";
|
|
9362
9362
|
const isCloseEvent = (u) => hasProperty(u, CloseEventTypeId);
|
|
9363
9363
|
const SocketErrorTypeId = "~effect/socket/Socket/SocketError";
|
|
@@ -9478,7 +9478,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
|
|
|
9478
9478
|
}
|
|
9479
9479
|
function push(data) {
|
|
9480
9480
|
buffer.push(data);
|
|
9481
|
-
if (highWaterMark !== void 0) bufferSize += typeof data === "string" ? encoder.encode(data).byteLength : data.byteLength;
|
|
9481
|
+
if (highWaterMark !== void 0) bufferSize += typeof data === "string" ? encoder$1.encode(data).byteLength : data.byteLength;
|
|
9482
9482
|
if (waiter !== void 0) deliver();
|
|
9483
9483
|
if (pausable && bufferSize >= highWaterMark) pauseWebSocket();
|
|
9484
9484
|
else if (!pausable && !waiter && highWaterMark !== void 0 && bufferSize > highWaterMark) fail(new SocketError({ reason: new SocketReadError({ cause: new Error(`Socket highWaterMark of ${highWaterMark} bytes exceeded`) }) }));
|
|
@@ -9952,7 +9952,7 @@ const prefix = dual(2, (self, prefix) => {
|
|
|
9952
9952
|
modifyUint8Array: (key, f) => self.modifyUint8Array(`${prefix}${key}`, f)
|
|
9953
9953
|
};
|
|
9954
9954
|
});
|
|
9955
|
-
const layerFileSystem = (directory) => effect(KeyValueStore)(gen(function* () {
|
|
9955
|
+
const layerFileSystem$1 = (directory) => effect(KeyValueStore)(gen(function* () {
|
|
9956
9956
|
const fs = yield* FileSystem;
|
|
9957
9957
|
const path = yield* Path$3;
|
|
9958
9958
|
const withKeyPath = (method, key, f) => key.length === 0 || key === "." || key === ".." ? fail$1(new KeyValueStoreError({
|
|
@@ -10054,30 +10054,6 @@ const toSchemaStore = (self, schema) => {
|
|
|
10054
10054
|
isEmpty: self.isEmpty
|
|
10055
10055
|
};
|
|
10056
10056
|
};
|
|
10057
|
-
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/ai/Model.js
|
|
10058
|
-
const TypeId$8 = "~effect/ai/Model";
|
|
10059
|
-
var ProviderName = class extends Service()("effect/ai/Model/ProviderName") {};
|
|
10060
|
-
var ModelName = class extends Service()("effect/ai/Model/ModelName") {};
|
|
10061
|
-
const Proto$4 = {
|
|
10062
|
-
[TypeId$8]: TypeId$8,
|
|
10063
|
-
["~effect/Layer"]: {
|
|
10064
|
-
_ROut: identity,
|
|
10065
|
-
_E: identity,
|
|
10066
|
-
_RIn: identity
|
|
10067
|
-
},
|
|
10068
|
-
get captureRequirements() {
|
|
10069
|
-
const self = this;
|
|
10070
|
-
return contextWith((context) => succeed$1(provide$3(self, succeedContext(context))));
|
|
10071
|
-
},
|
|
10072
|
-
...PipeInspectableProto,
|
|
10073
|
-
toJSON() {
|
|
10074
|
-
return {
|
|
10075
|
-
_id: "effect/ai/Model",
|
|
10076
|
-
provider: this.provider
|
|
10077
|
-
};
|
|
10078
|
-
}
|
|
10079
|
-
};
|
|
10080
|
-
const make$18 = (provider, modelName, layer) => Object.assign(Object.create(Proto$4), { provider }, merge$2(layer, succeedContext(ProviderName.context(provider).pipe(add(ModelName, modelName)))));
|
|
10081
10057
|
// src/ApplyPatch.ts
|
|
10082
10058
|
const BEGIN = "*** Begin Patch";
|
|
10083
10059
|
const END = "*** End Patch";
|
|
@@ -10421,7 +10397,7 @@ var ExaError = class extends TaggedError$1()("ExaError", { cause: Defect() }) {}
|
|
|
10421
10397
|
const layer$8 = effect(ExaSearch, gen(function* () {
|
|
10422
10398
|
const scope$5 = yield* scope;
|
|
10423
10399
|
const getClient = yield* cachedWithTTL(gen(function* () {
|
|
10424
|
-
const McpClient = yield* tryPromise(() => import("./McpClient-
|
|
10400
|
+
const McpClient = yield* tryPromise(() => import("./McpClient-B-FFG6Pg.mjs"));
|
|
10425
10401
|
const context = yield* buildWithScope(McpClient.layer, scope$5);
|
|
10426
10402
|
return get$2(context, McpClient.McpClient);
|
|
10427
10403
|
}), (exit) => isSuccess(exit) ? infinity : zero);
|
|
@@ -10493,7 +10469,7 @@ const layer$7 = effect(WebToMarkdown, gen(function* () {
|
|
|
10493
10469
|
});
|
|
10494
10470
|
}));
|
|
10495
10471
|
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/ai/Tool.js
|
|
10496
|
-
const TypeId$
|
|
10472
|
+
const TypeId$8 = "~effect/ai/Tool";
|
|
10497
10473
|
const ProviderDefinedTypeId = "~effect/ai/Tool/ProviderDefined";
|
|
10498
10474
|
const DynamicTypeId = "~effect/ai/Tool/Dynamic";
|
|
10499
10475
|
const isUserDefined = (u) => hasProperty(u, "~effect/ai/Tool") && !isProviderDefined(u) && !isDynamic(u);
|
|
@@ -10501,8 +10477,8 @@ const isProviderDefined = (u) => hasProperty(u, ProviderDefinedTypeId);
|
|
|
10501
10477
|
const isDynamic = (u) => hasProperty(u, DynamicTypeId);
|
|
10502
10478
|
const isClientExecuted = (tool) => tool.execution === "client";
|
|
10503
10479
|
const clone = (self, overrides) => Object.assign(Object.create(Object.getPrototypeOf(self)), self, overrides);
|
|
10504
|
-
const Proto$
|
|
10505
|
-
[TypeId$
|
|
10480
|
+
const Proto$4 = {
|
|
10481
|
+
[TypeId$8]: {
|
|
10506
10482
|
_Config: identity,
|
|
10507
10483
|
_Requirements: identity
|
|
10508
10484
|
},
|
|
@@ -10538,19 +10514,19 @@ const Proto$3 = {
|
|
|
10538
10514
|
}
|
|
10539
10515
|
};
|
|
10540
10516
|
const ProviderDefinedProto = {
|
|
10541
|
-
...Proto$
|
|
10517
|
+
...Proto$4,
|
|
10542
10518
|
[ProviderDefinedTypeId]: ProviderDefinedTypeId
|
|
10543
10519
|
};
|
|
10544
10520
|
const DynamicProto = {
|
|
10545
|
-
...Proto$
|
|
10521
|
+
...Proto$4,
|
|
10546
10522
|
[DynamicTypeId]: DynamicTypeId
|
|
10547
10523
|
};
|
|
10548
10524
|
const userDefinedProto = (options) => {
|
|
10549
|
-
const self = Object.assign(Object.create(Proto$
|
|
10525
|
+
const self = Object.assign(Object.create(Proto$4), options);
|
|
10550
10526
|
self.id = `effect/ai/Tool/${options.name}`;
|
|
10551
10527
|
return self;
|
|
10552
10528
|
};
|
|
10553
|
-
const make$
|
|
10529
|
+
const make$18 = (name, options) => {
|
|
10554
10530
|
const successSchema = options?.success ?? Void;
|
|
10555
10531
|
const failureSchema = options?.failure ?? Never;
|
|
10556
10532
|
return userDefinedProto({
|
|
@@ -10652,7 +10628,7 @@ function isEmptyParamsRecord(indexSignature) {
|
|
|
10652
10628
|
return indexSignature.parameter === string$1 && isNever(indexSignature.type);
|
|
10653
10629
|
}
|
|
10654
10630
|
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/ai/Toolkit.js
|
|
10655
|
-
const TypeId$
|
|
10631
|
+
const TypeId$7 = "~effect/ai/Toolkit";
|
|
10656
10632
|
const FailureOrigin = Reference("effect/ai/Toolkit/FailureOrigin", { defaultValue: () => "result" });
|
|
10657
10633
|
const PreliminaryBuffer = Reference("effect/ai/Toolkit/PreliminaryBuffer", { defaultValue: () => "unbounded" });
|
|
10658
10634
|
const RecordToolArguments = Reference("effect/ai/Toolkit/RecordToolArguments", { defaultValue: () => false });
|
|
@@ -10665,7 +10641,7 @@ const stringifyToolArguments = (params) => {
|
|
|
10665
10641
|
};
|
|
10666
10642
|
const failureCause = (error, origin) => annotate$1(fail$5(error), make$42(FailureOrigin, origin));
|
|
10667
10643
|
const failureOrigin = (error) => isSchemaError(error) ? "result" : "handler";
|
|
10668
|
-
const Proto$
|
|
10644
|
+
const Proto$3 = {
|
|
10669
10645
|
...Prototype({
|
|
10670
10646
|
label: "Toolkit",
|
|
10671
10647
|
evaluate: fnUntraced(function* (parent) {
|
|
@@ -10793,7 +10769,7 @@ const Proto$2 = {
|
|
|
10793
10769
|
};
|
|
10794
10770
|
})
|
|
10795
10771
|
}),
|
|
10796
|
-
[TypeId$
|
|
10772
|
+
[TypeId$7]: TypeId$7,
|
|
10797
10773
|
of: identity,
|
|
10798
10774
|
toHandlers(build) {
|
|
10799
10775
|
return gen({ self: this }, function* () {
|
|
@@ -10821,14 +10797,14 @@ const Proto$2 = {
|
|
|
10821
10797
|
};
|
|
10822
10798
|
}
|
|
10823
10799
|
};
|
|
10824
|
-
const makeProto$2 = (tools) => Object.assign(function() {}, Proto$
|
|
10800
|
+
const makeProto$2 = (tools) => Object.assign(function() {}, Proto$3, { tools });
|
|
10825
10801
|
const resolveInput = (...tools) => {
|
|
10826
10802
|
const output = {};
|
|
10827
10803
|
for (const tool of tools) assignProperty(output, tool.name, tool);
|
|
10828
10804
|
return output;
|
|
10829
10805
|
};
|
|
10830
10806
|
const empty = makeProto$2({});
|
|
10831
|
-
const make$
|
|
10807
|
+
const make$17 = (...tools) => makeProto$2(resolveInput(...tools));
|
|
10832
10808
|
const merge = (...toolkits) => {
|
|
10833
10809
|
const tools = {};
|
|
10834
10810
|
for (const toolkit of toolkits) for (const [name, tool] of Object.entries(toolkit.tools)) assignProperty(tools, name, tool);
|
|
@@ -11222,7 +11198,7 @@ var CommandLimits = class extends Reference("clanka/AgentTools/CommandLimits", {
|
|
|
11222
11198
|
timeout: void 0,
|
|
11223
11199
|
outputChars: void 0
|
|
11224
11200
|
}) }) {};
|
|
11225
|
-
const makeBashTool = (timeout) => make$
|
|
11201
|
+
const makeBashTool = (timeout) => make$18("bash", {
|
|
11226
11202
|
description: "Run a bash command and return a task.",
|
|
11227
11203
|
parameters: Struct({
|
|
11228
11204
|
command: String$7,
|
|
@@ -11233,12 +11209,12 @@ const makeBashTool = (timeout) => make$17("bash", {
|
|
|
11233
11209
|
dependencies: [CurrentDirectory]
|
|
11234
11210
|
});
|
|
11235
11211
|
const globNamesDirectory = (glob) => glob.split("/").slice(0, -1).some((segment) => segment.length > 0 && !/[*?[\]{}]/.test(segment));
|
|
11236
|
-
const AgentTools = make$
|
|
11212
|
+
const AgentTools = make$17(make$18("changeDirectory", {
|
|
11237
11213
|
description: "Change the executor's working directory to an existing directory and return its absolute path. The change persists across your scripts.",
|
|
11238
11214
|
parameters: String$7.annotate({ identifier: "directory" }),
|
|
11239
11215
|
success: String$7,
|
|
11240
11216
|
dependencies: [DirectoryChanger]
|
|
11241
|
-
}), make$
|
|
11217
|
+
}), make$18("readFile", {
|
|
11242
11218
|
description: "Read a file and optionally filter the lines to return. Returns null if the file doesn't exist. For png/jpeg/gif/webp files the image itself is attached to your next turn.",
|
|
11243
11219
|
parameters: Struct({
|
|
11244
11220
|
path: String$7,
|
|
@@ -11248,12 +11224,12 @@ const AgentTools = make$16(make$17("changeDirectory", {
|
|
|
11248
11224
|
}),
|
|
11249
11225
|
success: NullOr(String$7),
|
|
11250
11226
|
dependencies: [CurrentDirectory, ImageAttacher]
|
|
11251
|
-
}), make$
|
|
11227
|
+
}), make$18("run", {
|
|
11252
11228
|
description: "Run a shell command and return its output. If it takes too long it will become a background task. Use 'bash' for more control.",
|
|
11253
11229
|
parameters: String$7.annotate({ identifier: "command" }),
|
|
11254
11230
|
success: String$7,
|
|
11255
11231
|
dependencies: [CurrentDirectory]
|
|
11256
|
-
}), make$
|
|
11232
|
+
}), make$18("rg", {
|
|
11257
11233
|
description: "Search for a pattern in files using ripgrep",
|
|
11258
11234
|
parameters: Struct({
|
|
11259
11235
|
pattern: String$7,
|
|
@@ -11263,7 +11239,7 @@ const AgentTools = make$16(make$17("changeDirectory", {
|
|
|
11263
11239
|
}),
|
|
11264
11240
|
success: String$7,
|
|
11265
11241
|
dependencies: [CurrentDirectory]
|
|
11266
|
-
}), make$
|
|
11242
|
+
}), make$18("subagent", {
|
|
11267
11243
|
description: "Delegate a task to another software engineer / sub-agent. With `background: true` the sub-agent works in the background, and its result is sent to you when it finishes.",
|
|
11268
11244
|
parameters: Struct({
|
|
11269
11245
|
prompt: String$7,
|
|
@@ -11272,57 +11248,57 @@ const AgentTools = make$16(make$17("changeDirectory", {
|
|
|
11272
11248
|
success: Task,
|
|
11273
11249
|
failure: String$7,
|
|
11274
11250
|
dependencies: [AgentTaskExecutor]
|
|
11275
|
-
}), make$
|
|
11251
|
+
}), make$18("gh", {
|
|
11276
11252
|
description: "Use the GitHub CLI to run a command - use this instead of the bash tool.",
|
|
11277
11253
|
parameters: ArraySchema(String$7).annotate({ identifier: "args" }),
|
|
11278
11254
|
success: String$7,
|
|
11279
11255
|
dependencies: [CurrentDirectory]
|
|
11280
|
-
}), makeBashTool(defaultBashTimeout), make$
|
|
11256
|
+
}), makeBashTool(defaultBashTimeout), make$18("applyPatch", {
|
|
11281
11257
|
description: "Add, update or remove multiple files with a git diff / unified diff / wrapped patch.",
|
|
11282
11258
|
parameters: String$7.annotate({ identifier: "patch" }),
|
|
11283
11259
|
success: String$7,
|
|
11284
11260
|
dependencies: [CurrentDirectory]
|
|
11285
|
-
}), make$
|
|
11261
|
+
}), make$18("writeFile", {
|
|
11286
11262
|
description: "Write content to a file, creating parent directories if needed.",
|
|
11287
11263
|
parameters: Struct({
|
|
11288
11264
|
path: String$7,
|
|
11289
11265
|
content: Union([String$7, Uint8Array$2.annotate({ identifier: "Uint8Array" })])
|
|
11290
11266
|
}),
|
|
11291
11267
|
dependencies: [CurrentDirectory]
|
|
11292
|
-
}), make$
|
|
11268
|
+
}), make$18("removeFile", {
|
|
11293
11269
|
description: "Remove a file.",
|
|
11294
11270
|
parameters: String$7.annotate({ identifier: "path" }),
|
|
11295
11271
|
dependencies: [CurrentDirectory]
|
|
11296
|
-
}), make$
|
|
11272
|
+
}), make$18("renameFile", {
|
|
11297
11273
|
description: "Rename or move a file, creating parent directories if needed.",
|
|
11298
11274
|
parameters: Struct({
|
|
11299
11275
|
from: String$7,
|
|
11300
11276
|
to: String$7
|
|
11301
11277
|
}),
|
|
11302
11278
|
dependencies: [CurrentDirectory]
|
|
11303
|
-
}), make$
|
|
11279
|
+
}), make$18("ls", {
|
|
11304
11280
|
description: "List the contents of a directory",
|
|
11305
11281
|
parameters: String$7.annotate({ identifier: "directory" }),
|
|
11306
11282
|
success: ArraySchema(String$7),
|
|
11307
11283
|
dependencies: [CurrentDirectory]
|
|
11308
|
-
}), make$
|
|
11284
|
+
}), make$18("webSearch", {
|
|
11309
11285
|
description: "Search the web for recent information.",
|
|
11310
11286
|
parameters: ExaSearchOptions,
|
|
11311
11287
|
success: String$7
|
|
11312
|
-
}), make$
|
|
11288
|
+
}), make$18("fetchMarkdown", {
|
|
11313
11289
|
description: "Fetch a web page and convert it to markdown.",
|
|
11314
11290
|
parameters: String$7.annotate({ identifier: "url" }),
|
|
11315
11291
|
success: String$7
|
|
11316
|
-
}), make$
|
|
11292
|
+
}), make$18("sleep", {
|
|
11317
11293
|
description: "Sleep for a specified number of milliseconds",
|
|
11318
11294
|
parameters: Finite.annotate({ identifier: "ms" })
|
|
11319
|
-
}), make$
|
|
11295
|
+
}), make$18("taskOutput", {
|
|
11320
11296
|
description: "Return the status and output so far of one of your tasks: a background bash command or a sub-agent.",
|
|
11321
11297
|
parameters: String$7.annotate({ identifier: "id" }),
|
|
11322
11298
|
success: Task,
|
|
11323
11299
|
failure: String$7,
|
|
11324
11300
|
dependencies: [AgentTaskExecutor]
|
|
11325
|
-
}), make$
|
|
11301
|
+
}), make$18("waitTasks", {
|
|
11326
11302
|
description: "Wait until the given tasks have ended and return them, in the order given.",
|
|
11327
11303
|
parameters: Struct({
|
|
11328
11304
|
ids: ArraySchema(String$7),
|
|
@@ -11331,17 +11307,17 @@ const AgentTools = make$16(make$17("changeDirectory", {
|
|
|
11331
11307
|
success: ArraySchema(Task),
|
|
11332
11308
|
failure: String$7,
|
|
11333
11309
|
dependencies: [AgentTaskExecutor]
|
|
11334
|
-
}), make$
|
|
11310
|
+
}), make$18("stopTask", {
|
|
11335
11311
|
description: "Stop one of your tasks.",
|
|
11336
11312
|
parameters: String$7.annotate({ identifier: "id" }),
|
|
11337
11313
|
failure: String$7,
|
|
11338
11314
|
dependencies: [AgentTaskExecutor]
|
|
11339
|
-
}), make$
|
|
11315
|
+
}), make$18("listTasks", {
|
|
11340
11316
|
description: "List the tasks you have started, with their status.",
|
|
11341
11317
|
parameters: Void,
|
|
11342
11318
|
success: ArraySchema(Task),
|
|
11343
11319
|
dependencies: [AgentTaskExecutor]
|
|
11344
|
-
}), make$
|
|
11320
|
+
}), make$18("messageAgent", {
|
|
11345
11321
|
description: "Send a message to one of your sub-agents.",
|
|
11346
11322
|
parameters: Struct({
|
|
11347
11323
|
id: String$7,
|
|
@@ -11349,13 +11325,13 @@ const AgentTools = make$16(make$17("changeDirectory", {
|
|
|
11349
11325
|
}),
|
|
11350
11326
|
failure: String$7,
|
|
11351
11327
|
dependencies: [AgentTaskExecutor]
|
|
11352
|
-
}), make$
|
|
11328
|
+
}), make$18("taskComplete", {
|
|
11353
11329
|
description: "Only call this when the task is fully complete and you have a final output message to send.",
|
|
11354
11330
|
parameters: String$7.annotate({ identifier: "output" }),
|
|
11355
11331
|
dependencies: [TaskCompleter],
|
|
11356
11332
|
failure: String$7
|
|
11357
11333
|
}));
|
|
11358
|
-
const SearchTool = make$
|
|
11334
|
+
const SearchTool = make$17(make$18("search", {
|
|
11359
11335
|
description: "Semantic code search - you just need to describe what you are looking for",
|
|
11360
11336
|
parameters: String$7.annotate({ identifier: "query" }),
|
|
11361
11337
|
success: String$7,
|
|
@@ -11395,7 +11371,7 @@ const AgentToolHandlersNoDeps = AgentToolsWithSearch.toLayer(gen(function* () {
|
|
|
11395
11371
|
const tasks = new Map();
|
|
11396
11372
|
let nextTaskId = 1;
|
|
11397
11373
|
const registerAgentTask = gen(function* () {
|
|
11398
|
-
const id =
|
|
11374
|
+
const id = `subagent_${nextTaskId++}`;
|
|
11399
11375
|
tasks.set(id, {
|
|
11400
11376
|
kind: "agent",
|
|
11401
11377
|
id,
|
|
@@ -11406,7 +11382,7 @@ const AgentToolHandlersNoDeps = AgentToolsWithSearch.toLayer(gen(function* () {
|
|
|
11406
11382
|
const addBashTask = fnUntraced(function* (description, command) {
|
|
11407
11383
|
const entry = {
|
|
11408
11384
|
kind: "bash",
|
|
11409
|
-
id:
|
|
11385
|
+
id: `bash_${nextTaskId++}`,
|
|
11410
11386
|
owner: yield* TaskOwner,
|
|
11411
11387
|
description,
|
|
11412
11388
|
command: {
|
|
@@ -11608,7 +11584,7 @@ const AgentToolHandlersNoDeps = AgentToolsWithSearch.toLayer(gen(function* () {
|
|
|
11608
11584
|
const owner = yield* TaskOwner;
|
|
11609
11585
|
const bashTasks = Array$1.from(tasks.values()).flatMap((entry) => entry.kind === "bash" && entry.owner === owner ? [bashTask(entry)] : []);
|
|
11610
11586
|
const agentTasks = yield* AgentTaskExecutor;
|
|
11611
|
-
return [...bashTasks, ...yield* agentTasks.listTasks].toSorted((a, b) =>
|
|
11587
|
+
return [...bashTasks, ...yield* agentTasks.listTasks].toSorted((a, b) => taskNumber(a.id) - taskNumber(b.id));
|
|
11612
11588
|
}),
|
|
11613
11589
|
gh: fn("AgentTools.gh")(function* (args) {
|
|
11614
11590
|
yield* logInfo(`Calling "gh"`).pipe(annotateLogs({ args }));
|
|
@@ -11759,11 +11735,12 @@ const decodeParams$1 = (schema, usage) => {
|
|
|
11759
11735
|
return (input) => mapError(decode(input), () => usage);
|
|
11760
11736
|
};
|
|
11761
11737
|
const decodeSubagent = decodeParams$1(AgentTools.tools.subagent.parametersSchema, "subagent requires an options object, for example: subagent({ prompt: \"...\" }) or subagent({ prompt: \"...\", background: true }).");
|
|
11762
|
-
const decodeMessageAgent = decodeParams$1(AgentTools.tools.messageAgent.parametersSchema, "messageAgent requires an options object, for example: messageAgent({ id: \"
|
|
11763
|
-
const decodeTaskOutput = decodeParams$1(AgentTools.tools.taskOutput.parametersSchema, "taskOutput requires a task id, for example: taskOutput(\"
|
|
11764
|
-
const decodeWaitTasks = decodeParams$1(AgentTools.tools.waitTasks.parametersSchema, "waitTasks requires an options object, for example: waitTasks({ ids: [\"
|
|
11738
|
+
const decodeMessageAgent = decodeParams$1(AgentTools.tools.messageAgent.parametersSchema, "messageAgent requires an options object, for example: messageAgent({ id: \"subagent_3\", message: \"...\" }).");
|
|
11739
|
+
const decodeTaskOutput = decodeParams$1(AgentTools.tools.taskOutput.parametersSchema, "taskOutput requires a task id, for example: taskOutput(\"bash_1\").");
|
|
11740
|
+
const decodeWaitTasks = decodeParams$1(AgentTools.tools.waitTasks.parametersSchema, "waitTasks requires an options object, for example: waitTasks({ ids: [\"subagent_3\", \"bash_4\"] }) or waitTasks({ ids: [\"subagent_3\"], timeoutMs: 60000 }).");
|
|
11765
11741
|
const bashTimeoutMs = (limits) => toMillis(limits.timeout ?? defaultBashTimeout);
|
|
11766
|
-
const
|
|
11742
|
+
const taskNumber = (id) => Number(id.slice(id.indexOf("_") + 1));
|
|
11743
|
+
const decodeStopTask = decodeParams$1(AgentTools.tools.stopTask.parametersSchema, "stopTask requires a task id, for example: stopTask(\"bash_1\").");
|
|
11767
11744
|
const awaitCommand = (command, timeout) => {
|
|
11768
11745
|
const awaited = await_(command.fiber);
|
|
11769
11746
|
return (timeout === void 0 ? asSome(awaited) : timeoutOption(awaited, timeout)).pipe(onInterrupt(() => interrupt$2(command.fiber)));
|
|
@@ -12328,10 +12305,10 @@ const makeCollectorUnsafe = () => {
|
|
|
12328
12305
|
});
|
|
12329
12306
|
};
|
|
12330
12307
|
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/FiberSet.js
|
|
12331
|
-
const TypeId$
|
|
12332
|
-
const isFiberSet = (u) => hasProperty(u, TypeId$
|
|
12333
|
-
const Proto$
|
|
12334
|
-
[TypeId$
|
|
12308
|
+
const TypeId$6 = "~effect/FiberSet";
|
|
12309
|
+
const isFiberSet = (u) => hasProperty(u, TypeId$6);
|
|
12310
|
+
const Proto$2 = {
|
|
12311
|
+
[TypeId$6]: TypeId$6,
|
|
12335
12312
|
[Symbol.iterator]() {
|
|
12336
12313
|
if (this.state._tag === "Closed") return empty$9();
|
|
12337
12314
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -12345,7 +12322,7 @@ const Proto$1 = {
|
|
|
12345
12322
|
}
|
|
12346
12323
|
};
|
|
12347
12324
|
const makeUnsafe = (backing, deferred) => {
|
|
12348
|
-
const self = Object.create(Proto$
|
|
12325
|
+
const self = Object.create(Proto$2);
|
|
12349
12326
|
self.state = {
|
|
12350
12327
|
_tag: "Open",
|
|
12351
12328
|
backing
|
|
@@ -12353,7 +12330,7 @@ const makeUnsafe = (backing, deferred) => {
|
|
|
12353
12330
|
self.deferred = deferred;
|
|
12354
12331
|
return self;
|
|
12355
12332
|
};
|
|
12356
|
-
const make$
|
|
12333
|
+
const make$16 = () => acquireRelease(sync(() => makeUnsafe(new Set(), makeUnsafe$1())), (set) => suspend(() => {
|
|
12357
12334
|
const state = set.state;
|
|
12358
12335
|
if (state._tag === "Closed") return void_;
|
|
12359
12336
|
set.state = { _tag: "Closed" };
|
|
@@ -12441,9 +12418,9 @@ var ClientAbort = class extends Service()("effect/rpc/RpcSchema/ClientAbort") {
|
|
|
12441
12418
|
}));
|
|
12442
12419
|
};
|
|
12443
12420
|
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/rpc/Rpc.js
|
|
12444
|
-
const TypeId$
|
|
12445
|
-
const Proto = {
|
|
12446
|
-
[TypeId$
|
|
12421
|
+
const TypeId$5 = "~effect/rpc/Rpc";
|
|
12422
|
+
const Proto$1 = {
|
|
12423
|
+
[TypeId$5]: TypeId$5,
|
|
12447
12424
|
pipe() {
|
|
12448
12425
|
return pipeArguments(this, arguments);
|
|
12449
12426
|
},
|
|
@@ -12527,12 +12504,12 @@ const Proto = {
|
|
|
12527
12504
|
};
|
|
12528
12505
|
const makeProto$1 = (options) => {
|
|
12529
12506
|
function Rpc() {}
|
|
12530
|
-
Object.setPrototypeOf(Rpc, Proto);
|
|
12507
|
+
Object.setPrototypeOf(Rpc, Proto$1);
|
|
12531
12508
|
Object.assign(Rpc, options);
|
|
12532
12509
|
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
12533
12510
|
return Rpc;
|
|
12534
12511
|
};
|
|
12535
|
-
const make$
|
|
12512
|
+
const make$15 = (tag, options) => {
|
|
12536
12513
|
const successSchema = options?.success ?? Void;
|
|
12537
12514
|
const errorSchema = options?.error ?? Never;
|
|
12538
12515
|
const defectSchema = options?.defect ?? Defect();
|
|
@@ -12704,7 +12681,7 @@ const makeNoSerialization = fnUntraced(function* (group, options) {
|
|
|
12704
12681
|
spanId: span.spanId,
|
|
12705
12682
|
sampled: span.sampled
|
|
12706
12683
|
} : {},
|
|
12707
|
-
headers: merge$
|
|
12684
|
+
headers: merge$2(parentFiber.getRef(CurrentHeaders), headers),
|
|
12708
12685
|
...discard ? { discard: true } : {}
|
|
12709
12686
|
});
|
|
12710
12687
|
let fiber;
|
|
@@ -12775,7 +12752,7 @@ const makeNoSerialization = fnUntraced(function* (group, options) {
|
|
|
12775
12752
|
spanId: span.spanId,
|
|
12776
12753
|
sampled: span.sampled
|
|
12777
12754
|
} : {},
|
|
12778
|
-
headers: merge$
|
|
12755
|
+
headers: merge$2(fiber.getRef(CurrentHeaders), headers)
|
|
12779
12756
|
}).pipe(span ? withParentSpan(span, { captureStackTrace: false }) : identity, onError((cause) => {
|
|
12780
12757
|
if (!hasInterruptsOnly(cause)) entries.delete(id);
|
|
12781
12758
|
return failCause$2(queue, cause);
|
|
@@ -12866,7 +12843,7 @@ const makeNoSerialization = fnUntraced(function* (group, options) {
|
|
|
12866
12843
|
};
|
|
12867
12844
|
});
|
|
12868
12845
|
let clientIdCounter = 0;
|
|
12869
|
-
const make$
|
|
12846
|
+
const make$14 = fnUntraced(function* (group, options) {
|
|
12870
12847
|
const clientId = clientIdCounter++;
|
|
12871
12848
|
const { codecFor, run, send, supportsAck, supportsTransferables } = yield* Protocol;
|
|
12872
12849
|
const rpcSchemas = makeRpcSchemas(codecFor);
|
|
@@ -13136,7 +13113,7 @@ const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
|
13136
13113
|
requests: options.requests,
|
|
13137
13114
|
annotations: options.annotations
|
|
13138
13115
|
});
|
|
13139
|
-
const make$
|
|
13116
|
+
const make$13 = (...rpcs) => makeProto({
|
|
13140
13117
|
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
13141
13118
|
annotations: empty$8()
|
|
13142
13119
|
});
|
|
@@ -13854,7 +13831,7 @@ const makeLocalWith = fnUntraced(function* (options) {
|
|
|
13854
13831
|
const excluded = excludedToolNames(options.excludeTools);
|
|
13855
13832
|
const offersFetch = !excluded.has("fetch");
|
|
13856
13833
|
const search = yield* serviceOption(SemanticSearch);
|
|
13857
|
-
const BuiltInTools = make$
|
|
13834
|
+
const BuiltInTools = make$17(...Object.values(merge(isSome(search) ? AgentToolsWithSearch : AgentTools, make$17(makeBashTool(commandLimits.timeout ?? defaultBashTimeout))).tools).filter((tool) => !excluded.has(tool.name)));
|
|
13858
13835
|
const hasSearch = "search" in BuiltInTools.tools;
|
|
13859
13836
|
const AllTools = merge(BuiltInTools, options.tools ?? empty);
|
|
13860
13837
|
const tools = yield* AllTools;
|
|
@@ -14031,7 +14008,7 @@ const makeLocalWith = fnUntraced(function* (options) {
|
|
|
14031
14008
|
};
|
|
14032
14009
|
});
|
|
14033
14010
|
const makeRpc = gen(function* () {
|
|
14034
|
-
const client = yield* make$
|
|
14011
|
+
const client = yield* make$14(Rpcs, { spanPrefix: "AgentExecutorClient" });
|
|
14035
14012
|
return AgentExecutor.of({
|
|
14036
14013
|
capabilities: orDie(client.capabilities()),
|
|
14037
14014
|
execute: (opts) => Scope.useSync((scope) => {
|
|
@@ -14135,10 +14112,10 @@ const ExecuteOutput = TaggedUnion({
|
|
|
14135
14112
|
kind: TaskKind
|
|
14136
14113
|
}
|
|
14137
14114
|
});
|
|
14138
|
-
var Rpcs = class extends make$
|
|
14115
|
+
var Rpcs = class extends make$13(make$15("capabilities", { success: Capabilities }), make$15("respond", { payload: {
|
|
14139
14116
|
id: Finite,
|
|
14140
14117
|
response: AgentResponse
|
|
14141
|
-
} }), make$
|
|
14118
|
+
} }), make$15("execute", {
|
|
14142
14119
|
payload: Struct({
|
|
14143
14120
|
script: String$7,
|
|
14144
14121
|
environment: ExecutionEnvironment,
|
|
@@ -14148,21 +14125,21 @@ var Rpcs = class extends make$12(make$14("capabilities", { success: Capabilities
|
|
|
14148
14125
|
}),
|
|
14149
14126
|
success: ExecuteOutput,
|
|
14150
14127
|
stream: true
|
|
14151
|
-
}), make$
|
|
14128
|
+
}), make$15("awaitTask", {
|
|
14152
14129
|
payload: { id: String$7 },
|
|
14153
14130
|
success: Task,
|
|
14154
14131
|
error: String$7
|
|
14155
|
-
}), make$
|
|
14132
|
+
}), make$15("claimTask", {
|
|
14156
14133
|
payload: { id: String$7 },
|
|
14157
14134
|
success: Boolean$4,
|
|
14158
14135
|
error: String$7
|
|
14159
|
-
}), make$
|
|
14136
|
+
}), make$15("renderEnvironment", {
|
|
14160
14137
|
payload: {
|
|
14161
14138
|
environment: ExecutionEnvironment,
|
|
14162
14139
|
reset: Boolean$4
|
|
14163
14140
|
},
|
|
14164
14141
|
success: EnvironmentUpdate
|
|
14165
|
-
}), make$
|
|
14142
|
+
}), make$15("executeUnsafe", {
|
|
14166
14143
|
payload: Struct({
|
|
14167
14144
|
tool: String$7,
|
|
14168
14145
|
params: optionalKey(Json),
|
|
@@ -14411,6 +14388,233 @@ var QueueWriteStream = class extends Writable {
|
|
|
14411
14388
|
callback();
|
|
14412
14389
|
}
|
|
14413
14390
|
};
|
|
14391
|
+
// src/AcpSessionStore.ts
|
|
14392
|
+
const ThoughtLevel = Literals$2([
|
|
14393
|
+
"none",
|
|
14394
|
+
"minimal",
|
|
14395
|
+
"low",
|
|
14396
|
+
"medium",
|
|
14397
|
+
"high",
|
|
14398
|
+
"xhigh",
|
|
14399
|
+
"max"
|
|
14400
|
+
]);
|
|
14401
|
+
var SessionRecord = class extends Class$1("clanka/Acp/SessionRecord")({
|
|
14402
|
+
cwd: String$7,
|
|
14403
|
+
model: String$7,
|
|
14404
|
+
thoughtLevel: ThoughtLevel,
|
|
14405
|
+
fastMode: optionalKey(Boolean$4),
|
|
14406
|
+
history: Prompt,
|
|
14407
|
+
environment: optionalKey(ExecutionEnvironment)
|
|
14408
|
+
}) {};
|
|
14409
|
+
var AcpSessionStoreError = class extends TaggedError$1()("AcpSessionStoreError", {
|
|
14410
|
+
message: String$7,
|
|
14411
|
+
cause: optional$2(Defect())
|
|
14412
|
+
}) {};
|
|
14413
|
+
var AcpSessionStore = class extends Service()("clanka/AcpSessionStore") {};
|
|
14414
|
+
const keyValueStore = (kvs) => {
|
|
14415
|
+
const store = toSchemaStore(prefix(kvs, "session-"), SessionRecord);
|
|
14416
|
+
return AcpSessionStore.of({
|
|
14417
|
+
get: (sessionId) => store.get(sessionId).pipe(mapError((cause) => new AcpSessionStoreError({
|
|
14418
|
+
message: cause.message,
|
|
14419
|
+
cause
|
|
14420
|
+
}))),
|
|
14421
|
+
set: (sessionId, record) => store.set(sessionId, record).pipe(mapError((cause) => new AcpSessionStoreError({
|
|
14422
|
+
message: cause.message,
|
|
14423
|
+
cause
|
|
14424
|
+
})))
|
|
14425
|
+
});
|
|
14426
|
+
};
|
|
14427
|
+
const layerKeyValueStore = effect(AcpSessionStore, gen(function* () {
|
|
14428
|
+
return keyValueStore(yield* KeyValueStore);
|
|
14429
|
+
}));
|
|
14430
|
+
const Snapshot = TaggedStruct("Snapshot", {
|
|
14431
|
+
record: SessionRecord,
|
|
14432
|
+
id: String$7
|
|
14433
|
+
});
|
|
14434
|
+
const Update = TaggedStruct("Update", {
|
|
14435
|
+
cwd: optionalKey(String$7),
|
|
14436
|
+
model: optionalKey(String$7),
|
|
14437
|
+
thoughtLevel: optionalKey(ThoughtLevel),
|
|
14438
|
+
fastMode: optionalKey(Boolean$4),
|
|
14439
|
+
environment: optionalKey(ExecutionEnvironment),
|
|
14440
|
+
messages: optionalKey(ArraySchema(Message)),
|
|
14441
|
+
parent: String$7,
|
|
14442
|
+
id: String$7
|
|
14443
|
+
});
|
|
14444
|
+
const Entry = Union([Snapshot, Update]);
|
|
14445
|
+
const EntryJson = fromJsonString(toCodecJson(Entry));
|
|
14446
|
+
const decodeEntry$2 = decodeExit(EntryJson);
|
|
14447
|
+
const encodeEntry = encodeEffect$1(EntryJson);
|
|
14448
|
+
const fieldKeys = [
|
|
14449
|
+
"cwd",
|
|
14450
|
+
"model",
|
|
14451
|
+
"thoughtLevel",
|
|
14452
|
+
"fastMode",
|
|
14453
|
+
"environment"
|
|
14454
|
+
];
|
|
14455
|
+
const applyUpdate = (record, update) => {
|
|
14456
|
+
const { _tag, messages, parent: _parent, id: _id, ...fields } = update;
|
|
14457
|
+
return new SessionRecord({
|
|
14458
|
+
...record,
|
|
14459
|
+
...fields,
|
|
14460
|
+
history: messages === void 0 ? record.history : fromMessages([...record.history.content, ...messages])
|
|
14461
|
+
});
|
|
14462
|
+
};
|
|
14463
|
+
const diff = (previous, next) => {
|
|
14464
|
+
const before = previous.history.content;
|
|
14465
|
+
const after = next.history.content;
|
|
14466
|
+
if (after.length < before.length || before.some((message, index) => after[index] !== message)) return;
|
|
14467
|
+
const changes = {};
|
|
14468
|
+
for (const key of fieldKeys) {
|
|
14469
|
+
if (previous[key] === next[key]) continue;
|
|
14470
|
+
if (next[key] === void 0) return void 0;
|
|
14471
|
+
changes[key] = next[key];
|
|
14472
|
+
}
|
|
14473
|
+
if (after.length > before.length) changes.messages = after.slice(before.length);
|
|
14474
|
+
return changes;
|
|
14475
|
+
};
|
|
14476
|
+
const storeError = (message) => (cause) => new AcpSessionStoreError({
|
|
14477
|
+
message,
|
|
14478
|
+
cause
|
|
14479
|
+
});
|
|
14480
|
+
const encodeLine = (entry) => encodeEntry(entry).pipe(map$5((json) => encoder.encode(`${json}\n`)), mapError(storeError("Failed to encode session")));
|
|
14481
|
+
const newline = 10;
|
|
14482
|
+
const encoder = new TextEncoder();
|
|
14483
|
+
const decoder = new TextDecoder();
|
|
14484
|
+
const layerFileSystem = (directory) => effect(AcpSessionStore, gen(function* () {
|
|
14485
|
+
const fs = yield* FileSystem;
|
|
14486
|
+
const path = yield* Path$3;
|
|
14487
|
+
yield* fs.makeDirectory(directory, { recursive: true });
|
|
14488
|
+
const semaphore = yield* make$48(1);
|
|
14489
|
+
const files = new Map();
|
|
14490
|
+
const fileFor = (sessionId) => path.join(directory, `${encodeURIComponent(sessionId)}.jsonl`);
|
|
14491
|
+
const read = fnUntraced(function* (sessionId) {
|
|
14492
|
+
const file = fileFor(sessionId);
|
|
14493
|
+
files.delete(sessionId);
|
|
14494
|
+
const result = yield* fs.readFile(file).pipe(asSome, catchReason("PlatformError", "NotFound", () => succeedNone), mapError(storeError(`Failed to read session ${sessionId}`)));
|
|
14495
|
+
if (isNone(result)) return none();
|
|
14496
|
+
const bytes = result.value;
|
|
14497
|
+
let record;
|
|
14498
|
+
let id = "";
|
|
14499
|
+
let start = 0;
|
|
14500
|
+
while (start < bytes.length) {
|
|
14501
|
+
const end = bytes.indexOf(newline, start);
|
|
14502
|
+
if (end === -1) break;
|
|
14503
|
+
const entry = decodeEntry$2(decoder.decode(bytes.subarray(start, end)));
|
|
14504
|
+
start = end + 1;
|
|
14505
|
+
if (entry._tag === "Failure") continue;
|
|
14506
|
+
const line = entry.value;
|
|
14507
|
+
if (line._tag === "Snapshot") {
|
|
14508
|
+
if (record !== void 0) continue;
|
|
14509
|
+
record = line.record;
|
|
14510
|
+
} else {
|
|
14511
|
+
if (record === void 0 || line.parent !== id) continue;
|
|
14512
|
+
record = applyUpdate(record, line);
|
|
14513
|
+
}
|
|
14514
|
+
id = line.id;
|
|
14515
|
+
}
|
|
14516
|
+
if (record === void 0) return yield* new AcpSessionStoreError({ message: `Session file for ${sessionId} does not start with a snapshot` });
|
|
14517
|
+
if (start < bytes.length) yield* logWarning("Ignoring an incomplete end of an ACP session file").pipe(annotateLogs({
|
|
14518
|
+
sessionId,
|
|
14519
|
+
file
|
|
14520
|
+
}));
|
|
14521
|
+
else files.set(sessionId, {
|
|
14522
|
+
record,
|
|
14523
|
+
id,
|
|
14524
|
+
size: bytes.length,
|
|
14525
|
+
tail: bytes.slice(-64)
|
|
14526
|
+
});
|
|
14527
|
+
return some(record);
|
|
14528
|
+
});
|
|
14529
|
+
const writeSnapshot = fnUntraced(function* (sessionId, record) {
|
|
14530
|
+
const file = fileFor(sessionId);
|
|
14531
|
+
const temporary = `${file}.${crypto.randomUUID()}.tmp`;
|
|
14532
|
+
const id = crypto.randomUUID();
|
|
14533
|
+
const bytes = yield* encodeLine(Snapshot.make({
|
|
14534
|
+
record,
|
|
14535
|
+
id
|
|
14536
|
+
}));
|
|
14537
|
+
files.delete(sessionId);
|
|
14538
|
+
yield* fs.writeFile(temporary, bytes).pipe(andThen(fs.rename(temporary, file)), onError(() => ignore(fs.remove(temporary, { force: true }))), mapError(storeError(`Failed to write session ${sessionId}`)));
|
|
14539
|
+
files.set(sessionId, {
|
|
14540
|
+
record,
|
|
14541
|
+
id,
|
|
14542
|
+
size: bytes.length,
|
|
14543
|
+
tail: bytes.slice(-64)
|
|
14544
|
+
});
|
|
14545
|
+
});
|
|
14546
|
+
const append = fnUntraced(function* (sessionId, known, bytes) {
|
|
14547
|
+
const handle = yield* fs.open(fileFor(sessionId), { flag: "a+" });
|
|
14548
|
+
const info = yield* handle.stat;
|
|
14549
|
+
if (Number(info.size) !== known.size) return false;
|
|
14550
|
+
const tail = new Uint8Array(known.tail.length);
|
|
14551
|
+
if ((yield* handle.read(tail, { position: BigInt(known.size - tail.length) })) !== tail.length || tail.some((byte, index) => byte !== known.tail[index])) return false;
|
|
14552
|
+
if (bytes.length === 0) return true;
|
|
14553
|
+
files.delete(sessionId);
|
|
14554
|
+
yield* handle.writeAll(bytes);
|
|
14555
|
+
return true;
|
|
14556
|
+
}, scoped, (effect, sessionId) => mapError(effect, storeError(`Failed to write session ${sessionId}`)));
|
|
14557
|
+
const write = fnUntraced(function* (sessionId, record) {
|
|
14558
|
+
const known = files.get(sessionId);
|
|
14559
|
+
const changes = known && diff(known.record, record);
|
|
14560
|
+
if (known !== void 0 && changes !== void 0) {
|
|
14561
|
+
if (Object.keys(changes).length === 0) {
|
|
14562
|
+
if (yield* append(sessionId, known, new Uint8Array())) {
|
|
14563
|
+
files.set(sessionId, {
|
|
14564
|
+
...known,
|
|
14565
|
+
record
|
|
14566
|
+
});
|
|
14567
|
+
return;
|
|
14568
|
+
}
|
|
14569
|
+
} else {
|
|
14570
|
+
const id = crypto.randomUUID();
|
|
14571
|
+
const bytes = yield* encodeLine(Update.make({
|
|
14572
|
+
...changes,
|
|
14573
|
+
parent: known.id,
|
|
14574
|
+
id
|
|
14575
|
+
}));
|
|
14576
|
+
if (yield* append(sessionId, known, bytes)) {
|
|
14577
|
+
files.set(sessionId, {
|
|
14578
|
+
record,
|
|
14579
|
+
id,
|
|
14580
|
+
size: known.size + bytes.length,
|
|
14581
|
+
tail: bytes.slice(-64)
|
|
14582
|
+
});
|
|
14583
|
+
return;
|
|
14584
|
+
}
|
|
14585
|
+
}
|
|
14586
|
+
}
|
|
14587
|
+
yield* writeSnapshot(sessionId, record);
|
|
14588
|
+
});
|
|
14589
|
+
return AcpSessionStore.of({
|
|
14590
|
+
get: (sessionId) => semaphore.withPermit(read(sessionId)),
|
|
14591
|
+
set: (sessionId, record) => semaphore.withPermit(write(sessionId, record))
|
|
14592
|
+
});
|
|
14593
|
+
}));
|
|
14594
|
+
// node_modules/.pnpm/effect@4.1.3/node_modules/effect/dist/ai/Model.js
|
|
14595
|
+
const TypeId$4 = "~effect/ai/Model";
|
|
14596
|
+
var ProviderName = class extends Service()("effect/ai/Model/ProviderName") {};
|
|
14597
|
+
var ModelName = class extends Service()("effect/ai/Model/ModelName") {};
|
|
14598
|
+
const Proto = {
|
|
14599
|
+
[TypeId$4]: TypeId$4,
|
|
14600
|
+
["~effect/Layer"]: {
|
|
14601
|
+
_ROut: identity,
|
|
14602
|
+
_E: identity,
|
|
14603
|
+
_RIn: identity
|
|
14604
|
+
},
|
|
14605
|
+
get captureRequirements() {
|
|
14606
|
+
const self = this;
|
|
14607
|
+
return contextWith((context) => succeed$1(provide$3(self, succeedContext(context))));
|
|
14608
|
+
},
|
|
14609
|
+
...PipeInspectableProto,
|
|
14610
|
+
toJSON() {
|
|
14611
|
+
return {
|
|
14612
|
+
_id: "effect/ai/Model",
|
|
14613
|
+
provider: this.provider
|
|
14614
|
+
};
|
|
14615
|
+
}
|
|
14616
|
+
};
|
|
14617
|
+
const make$12 = (provider, modelName, layer) => Object.assign(Object.create(Proto), { provider }, merge$3(layer, succeedContext(ProviderName.context(provider).pipe(add(ModelName, modelName)))));
|
|
14414
14618
|
// node_modules/.pnpm/zod@4.4.2/node_modules/zod/v4/classic/compat.js
|
|
14415
14619
|
const ZodIssueCode = {
|
|
14416
14620
|
invalid_type: "invalid_type",
|
|
@@ -19551,7 +19755,7 @@ const make$9 = fnUntraced(function* (params) {
|
|
|
19551
19755
|
const queue = yield* make$46();
|
|
19552
19756
|
const deferredFinishParts = [];
|
|
19553
19757
|
if (preResolvedStreamParts.length > 0) yield* offerAll(queue, preResolvedStreamParts);
|
|
19554
|
-
const toolCallFibers = yield* make$
|
|
19758
|
+
const toolCallFibers = yield* make$16();
|
|
19555
19759
|
const toolCallSemaphore = concurrency === "unbounded" ? void 0 : yield* make$48(concurrency);
|
|
19556
19760
|
const pendingToolCalls = new Map();
|
|
19557
19761
|
const bufferedToolCalls = [];
|
|
@@ -19868,8 +20072,8 @@ const withParameterMode = (tool, mode) => {
|
|
|
19868
20072
|
}
|
|
19869
20073
|
return tools[mode] ??= tool.setParameters(mode === "opaque" ? Unknown : hasProviderParameters(tool) ? toEncoded$1(tool.parametersSchema) : toEncoded$1(toCodecJson(tool.parametersSchema)));
|
|
19870
20074
|
};
|
|
19871
|
-
const makeToolkitWithEncodedParameters = (toolkit) => make$
|
|
19872
|
-
const makeToolkitWithOpaqueParameters = (toolkit) => make$
|
|
20075
|
+
const makeToolkitWithEncodedParameters = (toolkit) => make$17(...Object.values(toolkit.tools).map((tool) => withParameterMode(tool, "encoded")));
|
|
20076
|
+
const makeToolkitWithOpaqueParameters = (toolkit) => make$17(...Object.values(toolkit.tools).map((tool) => withParameterMode(tool, "opaque")));
|
|
19873
20077
|
const isToolCallValidationDeferred = (options) => options.disableToolCallResolution === true && options.toolCallValidation === "deferred";
|
|
19874
20078
|
const UndeclaredToolCallPart = ToolCallPart("", Unknown).mapFields((fields) => ({
|
|
19875
20079
|
...fields,
|
|
@@ -20550,8 +20754,8 @@ const makeWith$1 = fnUntraced(function* (options) {
|
|
|
20550
20754
|
}), as(""), catchTag("AgentFinished", (finished) => succeed$1(finished.summary)));
|
|
20551
20755
|
}).pipe(onExit((exit) => finishTurn(child, turn, exit)), provideSubagentModel, provideContext(runContext), forkIn(runScope, { startImmediately: true }));
|
|
20552
20756
|
});
|
|
20553
|
-
const childTask = ({
|
|
20554
|
-
id:
|
|
20757
|
+
const childTask = ({ taskId, prompt, turn }) => ({
|
|
20758
|
+
id: taskId,
|
|
20555
20759
|
kind: "agent",
|
|
20556
20760
|
status: turn.status,
|
|
20557
20761
|
description: prompt,
|
|
@@ -20568,7 +20772,8 @@ const makeWith$1 = fnUntraced(function* (options) {
|
|
|
20568
20772
|
const agentTasks = {
|
|
20569
20773
|
subagent: fnUntraced(function* ({ id, prompt, background, environment }) {
|
|
20570
20774
|
const child = {
|
|
20571
|
-
id: Number(id),
|
|
20775
|
+
id: Number(id.slice(9)),
|
|
20776
|
+
taskId: id,
|
|
20572
20777
|
taskOwner: crypto.randomUUID(),
|
|
20573
20778
|
prompt,
|
|
20574
20779
|
history: make$45(empty$1),
|
|
@@ -20589,7 +20794,7 @@ ${prompt}`,
|
|
|
20589
20794
|
});
|
|
20590
20795
|
if (background) return childTask(child);
|
|
20591
20796
|
yield* _await(turn.done).pipe(onInterrupt(() => interrupt$2(turn.fiber)));
|
|
20592
|
-
if (turn.status !== "completed") return yield* die(new Error(`Sub-agent ${child.
|
|
20797
|
+
if (turn.status !== "completed") return yield* die(new Error(`Sub-agent ${child.taskId} ${turn.status}${turn.output ? `: ${turn.output}` : ""}`));
|
|
20593
20798
|
return childTask(child);
|
|
20594
20799
|
}),
|
|
20595
20800
|
taskOutput: (id) => map$5(lookupChild(id), reportChild),
|
|
@@ -20632,7 +20837,7 @@ ${prompt}`,
|
|
|
20632
20837
|
const onTaskComplete = (summary) => suspend(() => {
|
|
20633
20838
|
const running = runningChildren();
|
|
20634
20839
|
if (running.length > 0) {
|
|
20635
|
-
const ids = running.map((child) =>
|
|
20840
|
+
const ids = running.map((child) => child.taskId);
|
|
20636
20841
|
const quoted = ids.map((id) => JSON.stringify(id)).join(", ");
|
|
20637
20842
|
return fail$1(`taskComplete was rejected: sub-agents ${quoted} are still running. Call waitTasks({ ids: ${JSON.stringify(ids)} }) to wait for them, or stopTask(id) to stop them, before calling taskComplete.`);
|
|
20638
20843
|
}
|
|
@@ -21259,7 +21464,7 @@ And then you will receive back the console output:
|
|
|
21259
21464
|
files: [ 'package.json' ]
|
|
21260
21465
|
package.json: { name: 'my-project', version: '1.0.0' }
|
|
21261
21466
|
\`\`\``;
|
|
21262
|
-
const ReadSkillTools = make$
|
|
21467
|
+
const ReadSkillTools = make$17(make$18("readSkill", {
|
|
21263
21468
|
description: "Read the instructions of a skill listed under Skills, by its name.",
|
|
21264
21469
|
parameters: String$7.annotate({ identifier: "name" }),
|
|
21265
21470
|
success: String$7,
|
|
@@ -21294,7 +21499,7 @@ const makeLoopTools = fnUntraced(function* (options) {
|
|
|
21294
21499
|
});
|
|
21295
21500
|
const errorMessage = (error) => typeof error === "string" ? error : error instanceof Error ? error.message : JSON.stringify(error) ?? String(error);
|
|
21296
21501
|
var ScriptExecutor = class extends Service()("clanka/Agent/ScriptExecutor") {};
|
|
21297
|
-
const SingleTools = make$
|
|
21502
|
+
const SingleTools = make$17(make$18("execute", {
|
|
21298
21503
|
description: "Execute javascript code and return the output",
|
|
21299
21504
|
parameters: Struct({ script: String$7 }),
|
|
21300
21505
|
success: String$7,
|
|
@@ -21339,23 +21544,6 @@ const responseToSummary = (response) => {
|
|
|
21339
21544
|
return parts.join("\n\n");
|
|
21340
21545
|
};
|
|
21341
21546
|
// src/Acp.ts
|
|
21342
|
-
const ThoughtLevel = Literals$2([
|
|
21343
|
-
"none",
|
|
21344
|
-
"minimal",
|
|
21345
|
-
"low",
|
|
21346
|
-
"medium",
|
|
21347
|
-
"high",
|
|
21348
|
-
"xhigh",
|
|
21349
|
-
"max"
|
|
21350
|
-
]);
|
|
21351
|
-
var SessionRecord = class extends Class$1("clanka/Acp/SessionRecord")({
|
|
21352
|
-
cwd: String$7,
|
|
21353
|
-
model: String$7,
|
|
21354
|
-
thoughtLevel: ThoughtLevel,
|
|
21355
|
-
fastMode: optionalKey(Boolean$4),
|
|
21356
|
-
history: Prompt,
|
|
21357
|
-
environment: optionalKey(ExecutionEnvironment)
|
|
21358
|
-
}) {};
|
|
21359
21547
|
var RpcError = class extends TaggedError$1()("AcpRpcError", {
|
|
21360
21548
|
code: Number$2,
|
|
21361
21549
|
message: String$7
|
|
@@ -21549,13 +21737,12 @@ const historyUpdates = (history) => {
|
|
|
21549
21737
|
return updates;
|
|
21550
21738
|
};
|
|
21551
21739
|
const make$7 = fnUntraced(function* (options) {
|
|
21552
|
-
const
|
|
21740
|
+
const store = yield* AcpSessionStore;
|
|
21553
21741
|
const { contextWindow } = yield* CompactionConfig;
|
|
21554
21742
|
const size = Number.isFinite(contextWindow) ? Math.max(0, Math.round(contextWindow)) : 0;
|
|
21555
21743
|
const http = yield* serviceOption(HttpClient);
|
|
21556
21744
|
const fs = yield* serviceOption(FileSystem);
|
|
21557
21745
|
const path = yield* serviceOption(Path$3);
|
|
21558
|
-
const store = toSchemaStore(prefix(kvs, "session-"), SessionRecord);
|
|
21559
21746
|
const scope$3 = yield* scope;
|
|
21560
21747
|
const sessions = new Map();
|
|
21561
21748
|
yield* addFinalizer$1(() => {
|
|
@@ -21616,14 +21803,24 @@ const make$7 = fnUntraced(function* (options) {
|
|
|
21616
21803
|
configOptions: configOptions(session)
|
|
21617
21804
|
};
|
|
21618
21805
|
});
|
|
21619
|
-
const persist = (session) =>
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21806
|
+
const persist = (session) => {
|
|
21807
|
+
const history = session.agent.history.current;
|
|
21808
|
+
const environment = session.agent.environment.current;
|
|
21809
|
+
return store.set(session.id, new SessionRecord({
|
|
21810
|
+
cwd: session.cwd,
|
|
21811
|
+
model: session.model,
|
|
21812
|
+
thoughtLevel: session.thoughtLevel,
|
|
21813
|
+
fastMode: session.fastMode,
|
|
21814
|
+
history,
|
|
21815
|
+
environment
|
|
21816
|
+
})).pipe(tap(() => sync(() => {
|
|
21817
|
+
session.stored = {
|
|
21818
|
+
history,
|
|
21819
|
+
environment
|
|
21820
|
+
};
|
|
21821
|
+
})), catch_((error) => logWarning("Failed to persist session", error)));
|
|
21822
|
+
};
|
|
21823
|
+
const persistCommitted = (session) => suspend(() => session.stored?.history === session.agent.history.current && session.stored.environment === session.agent.environment.current ? void_ : persist(session));
|
|
21627
21824
|
const openSession = fnUntraced(function* (id, record, mcpServers) {
|
|
21628
21825
|
const sessionScope = yield* fork(scope$3);
|
|
21629
21826
|
let makeAgent = options.makeAgent(record.cwd);
|
|
@@ -21650,7 +21847,8 @@ const make$7 = fnUntraced(function* (options) {
|
|
|
21650
21847
|
toolCalls: 0,
|
|
21651
21848
|
announcedSubagents: new Set(),
|
|
21652
21849
|
scope: sessionScope,
|
|
21653
|
-
mcpFailures
|
|
21850
|
+
mcpFailures,
|
|
21851
|
+
stored: void 0
|
|
21654
21852
|
};
|
|
21655
21853
|
sessions.set(id, session);
|
|
21656
21854
|
return session;
|
|
@@ -21843,6 +22041,8 @@ const make$7 = fnUntraced(function* (options) {
|
|
|
21843
22041
|
}]
|
|
21844
22042
|
});
|
|
21845
22043
|
}
|
|
22044
|
+
case "HistoryAppended":
|
|
22045
|
+
case "HistoryReplaced": return persistCommitted(session);
|
|
21846
22046
|
default: return void_;
|
|
21847
22047
|
}
|
|
21848
22048
|
};
|
|
@@ -21989,7 +22189,7 @@ const make$7 = fnUntraced(function* (options) {
|
|
|
21989
22189
|
session.running = yield* runPrompt(session, input).pipe(provide$1(model), forkChild);
|
|
21990
22190
|
const exit$1 = yield* exit(join$3(session.running));
|
|
21991
22191
|
session.running = void 0;
|
|
21992
|
-
yield*
|
|
22192
|
+
yield* persistCommitted(session);
|
|
21993
22193
|
if (isSuccess(exit$1)) return { stopReason: "end_turn" };
|
|
21994
22194
|
if (hasInterruptsOnly(exit$1.cause)) return { stopReason: "cancelled" };
|
|
21995
22195
|
return yield* toRpcError(exit$1.cause);
|
|
@@ -26168,7 +26368,7 @@ const mapProviderResults = (inputLength, results) => {
|
|
|
26168
26368
|
};
|
|
26169
26369
|
// node_modules/.pnpm/@effect+ai-openai@4.1.3_effect@4.1.3/node_modules/@effect/ai-openai/dist/OpenAiEmbeddingModel.js
|
|
26170
26370
|
var Config$2 = class extends Service()("@effect/ai-openai/OpenAiEmbeddingModel/Config") {};
|
|
26171
|
-
const model$5 = (model, options) => make$
|
|
26371
|
+
const model$5 = (model, options) => make$12("openai", model, merge$3(layer$3({
|
|
26172
26372
|
model,
|
|
26173
26373
|
config: {
|
|
26174
26374
|
...options.config,
|
|
@@ -28366,7 +28566,7 @@ const transformToolCallParams$1 = fnUntraced(function* (options, toolName, toolP
|
|
|
28366
28566
|
return yield* decodeEffect(codec)(toolParams).pipe(flatMap$1((decoded) => encodeUnknownEffect(toCodecJson(tool.parametersSchema))(decoded)), orElseSucceed(() => toolParams));
|
|
28367
28567
|
});
|
|
28368
28568
|
// package.json
|
|
28369
|
-
var version$1 = "0.
|
|
28569
|
+
var version$1 = "0.26.1";
|
|
28370
28570
|
// src/ClaudeAgent.ts
|
|
28371
28571
|
const minimumClaudeCodeVersion = "2.1.248";
|
|
28372
28572
|
const serverName = "clanka";
|
|
@@ -29040,7 +29240,7 @@ const toParts = (parts) => {
|
|
|
29040
29240
|
}
|
|
29041
29241
|
return result;
|
|
29042
29242
|
};
|
|
29043
|
-
const model$4 = (model, options) => make$
|
|
29243
|
+
const model$4 = (model, options) => make$12("claude", model, merge$3(layerLanguageModel(model, options), AgentModelConfig.layer({
|
|
29044
29244
|
supportsImages: options?.supportsImages,
|
|
29045
29245
|
cutStreamOnSteering: false
|
|
29046
29246
|
})));
|
|
@@ -29279,8 +29479,8 @@ var CodexAuth = class CodexAuth extends Service()("clanka/CodexAuth") {
|
|
|
29279
29479
|
};
|
|
29280
29480
|
// src/Codex.ts
|
|
29281
29481
|
const layerClient$3 = layer$4({ apiUrl: "https://chatgpt.com/backend-api/codex" }).pipe(provide$3(CodexAuth.layerClient));
|
|
29282
|
-
const model$3 = (model, options) => make$
|
|
29283
|
-
const modelWebSocket$1 = (model, options) => make$
|
|
29482
|
+
const model$3 = (model, options) => make$12("openai", model, layerModel(model, options));
|
|
29483
|
+
const modelWebSocket$1 = (model, options) => make$12("openai", model, layerModel(model, options).pipe(merge$3(fresh(layerWebSocketMode))));
|
|
29284
29484
|
const layerModel = (model, options) => suspend$2(() => layer$2({
|
|
29285
29485
|
model,
|
|
29286
29486
|
config: {
|
|
@@ -29293,7 +29493,7 @@ const layerModel = (model, options) => suspend$2(() => layer$2({
|
|
|
29293
29493
|
...options?.reasoning
|
|
29294
29494
|
}
|
|
29295
29495
|
}
|
|
29296
|
-
})).pipe(merge$
|
|
29496
|
+
})).pipe(merge$3(AgentModelConfig.layer({
|
|
29297
29497
|
...pick(options ?? {}, AgentModelConfig.optionKeys),
|
|
29298
29498
|
systemPromptTransform: (system, effect) => withConfigOverride$1(effect, { instructions: system })
|
|
29299
29499
|
})));
|
|
@@ -30616,7 +30816,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service()("clanka/Github
|
|
|
30616
30816
|
};
|
|
30617
30817
|
// src/Copilot.ts
|
|
30618
30818
|
const layerClient$2 = layer$1({ apiUrl: API_URL }).pipe(provide$3(GithubCopilotAuth.layerClient));
|
|
30619
|
-
const model$2 = (model, options) => make$
|
|
30819
|
+
const model$2 = (model, options) => make$12("openai", model, mergeAll(layer({
|
|
30620
30820
|
model,
|
|
30621
30821
|
config: omit(options ?? {}, options?.reasoning === null ? ["reasoning", ...AgentModelConfig.optionKeys] : AgentModelConfig.optionKeys)
|
|
30622
30822
|
}), AgentModelConfig.layer(pick(options ?? {}, AgentModelConfig.optionKeys)), succeed$4(SummarizerTransform, (effect) => withConfigOverride(effect, { max_output_tokens: summarizerMaxOutputTokens }))));
|
|
@@ -30753,7 +30953,7 @@ var ModelsRepo = class ModelsRepo extends Service()("clanka/ModelsRepo") {
|
|
|
30753
30953
|
};
|
|
30754
30954
|
// src/OpenAiCompat.ts
|
|
30755
30955
|
const layerClient$1 = (options) => layer$1(options);
|
|
30756
|
-
const model$1 = (model, options) => make$
|
|
30956
|
+
const model$1 = (model, options) => make$12("openai-compat", model, mergeAll(layer({
|
|
30757
30957
|
model,
|
|
30758
30958
|
config: {
|
|
30759
30959
|
...omit(options ?? {}, ["reasoning", ...AgentModelConfig.optionKeys]),
|
|
@@ -30921,7 +31121,7 @@ var XaiAuth = class XaiAuth extends Service()("clanka/XaiAuth") {
|
|
|
30921
31121
|
};
|
|
30922
31122
|
// src/Xai.ts
|
|
30923
31123
|
const layerClient = layer$4({ apiUrl: "https://api.x.ai/v1" }).pipe(provide$3(XaiAuth.layerClient));
|
|
30924
|
-
const modelWebSocket = (model, options) => make$
|
|
31124
|
+
const modelWebSocket = (model, options) => make$12("xai", model, mergeAll(layer$2({
|
|
30925
31125
|
model,
|
|
30926
31126
|
config: {
|
|
30927
31127
|
...omit(options ?? {}, ["reasoning", ...AgentModelConfig.optionKeys]),
|
|
@@ -31126,10 +31326,16 @@ const fetch$1 = Boolean("fetch").pipe(withDescription$1("Expose the global Fetch
|
|
|
31126
31326
|
const mcp = Boolean("mcp").pipe(withDescription$1("Start the MCP servers from ~/.config/clanka/mcp.json, ./.mcp.json and --mcp-config. Disable with --no-mcp or CLANKA_MCP=false."), withFallbackConfig(Boolean$3("CLANKA_MCP").pipe(withDefault$2(true))));
|
|
31127
31327
|
const mcpConfig = String$1("mcp-config").pipe(withDescription$1("An MCP config file in the { \"mcpServers\": { ... } } format. Repeatable; a later file wins."), atLeast(0));
|
|
31128
31328
|
const mcpSummary = (status) => `MCP: ${Object.entries(status).map(([name, server]) => server._tag === "Connected" ? `${name} (${server.tools.length} tools)` : `${name} failed: ${server.error.split("\n")[0]}`).join(", ")}`;
|
|
31129
|
-
const
|
|
31329
|
+
const configDirectory = gen(function* () {
|
|
31130
31330
|
const path = yield* Path$3;
|
|
31131
31331
|
const configHome = yield* NonEmptyString("XDG_CONFIG_HOME").pipe(orElse(() => NonEmptyString("HOME").pipe(map$3((home) => path.join(home, ".config")))));
|
|
31132
|
-
return
|
|
31332
|
+
return path.join(configHome, "clanka");
|
|
31333
|
+
});
|
|
31334
|
+
const Kvs = unwrap$4(map$5(configDirectory, layerFileSystem$1)).pipe(provide$3(layer$9));
|
|
31335
|
+
const AcpSessions = unwrap$4(gen(function* () {
|
|
31336
|
+
const path = yield* Path$3;
|
|
31337
|
+
const directory = yield* configDirectory;
|
|
31338
|
+
return layerFileSystem(path.join(directory, "sessions"));
|
|
31133
31339
|
})).pipe(provide$3(layer$9));
|
|
31134
31340
|
const Search = (directory) => unwrap$4(gen(function* () {
|
|
31135
31341
|
const apiKey = yield* Redacted$3("OPENAI_API_KEY").pipe(option);
|
|
@@ -31138,7 +31344,7 @@ const Search = (directory) => unwrap$4(gen(function* () {
|
|
|
31138
31344
|
return empty$10;
|
|
31139
31345
|
}
|
|
31140
31346
|
const path = yield* Path$3;
|
|
31141
|
-
return (yield* promise(() => import("./SemanticSearch-
|
|
31347
|
+
return (yield* promise(() => import("./SemanticSearch-C3a7LAQr.mjs"))).layer({
|
|
31142
31348
|
directory: process.cwd(),
|
|
31143
31349
|
database: path.join(directory, "search.sqlite")
|
|
31144
31350
|
}).pipe(provide$3(model$5("text-embedding-3-small", { dimensions: 1536 })), provide$3(layer$4({ apiKey: apiKey.value })));
|
|
@@ -31186,7 +31392,7 @@ const acp = make$26("acp", {
|
|
|
31186
31392
|
auxiliary: auxiliaryModels(flags)
|
|
31187
31393
|
})
|
|
31188
31394
|
});
|
|
31189
|
-
})), provide((flags) => mergeAll(ConversationMode.layer(false), succeed$4(LogToStderr, true), layerLog, compactionConfig(flags), openAiCompatModels(flags))));
|
|
31395
|
+
})), provide((flags) => mergeAll(AcpSessions, ConversationMode.layer(false), succeed$4(LogToStderr, true), layerLog, compactionConfig(flags), openAiCompatModels(flags))));
|
|
31190
31396
|
make$26("clanka", {
|
|
31191
31397
|
provider,
|
|
31192
31398
|
fetch: fetch$1,
|
|
@@ -31209,7 +31415,7 @@ make$26("clanka", {
|
|
|
31209
31415
|
files: mcpConfig,
|
|
31210
31416
|
enabled: mcp
|
|
31211
31417
|
});
|
|
31212
|
-
const OutputFormatter = yield* promise(() => import("./OutputFormatter-
|
|
31418
|
+
const OutputFormatter = yield* promise(() => import("./OutputFormatter-DhhP2i-7.mjs"));
|
|
31213
31419
|
const { model, effort } = yield* match$2(modelRaw, {
|
|
31214
31420
|
onSome: (selected) => succeed$1(parseModel(selected)),
|
|
31215
31421
|
onNone: () => selectModel(provider)
|