clanka 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/dist/Acp.d.ts +1 -1
- package/dist/Acp.d.ts.map +1 -1
- package/dist/Acp.js +112 -7
- package/dist/Acp.js.map +1 -1
- package/dist/Acp.test.js +178 -0
- package/dist/Acp.test.js.map +1 -1
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +26 -8
- package/dist/Agent.js.map +1 -1
- package/dist/AgentExecutor.js +15 -1
- package/dist/AgentExecutor.js.map +1 -1
- package/dist/AgentTools.d.ts +7 -0
- package/dist/AgentTools.d.ts.map +1 -1
- package/dist/AgentTools.js +7 -0
- package/dist/AgentTools.js.map +1 -1
- package/dist/McpConfig.d.ts +36 -0
- package/dist/McpConfig.d.ts.map +1 -0
- package/dist/McpConfig.js +182 -0
- package/dist/McpConfig.js.map +1 -0
- package/dist/McpConfig.test.d.ts +2 -0
- package/dist/McpConfig.test.d.ts.map +1 -0
- package/dist/McpConfig.test.js +163 -0
- package/dist/McpConfig.test.js.map +1 -0
- package/dist/McpServers.d.ts +176 -0
- package/dist/McpServers.d.ts.map +1 -0
- package/dist/McpServers.js +707 -0
- package/dist/McpServers.js.map +1 -0
- package/dist/McpServers.test.d.ts +2 -0
- package/dist/McpServers.test.d.ts.map +1 -0
- package/dist/McpServers.test.js +717 -0
- package/dist/McpServers.test.js.map +1 -0
- package/dist/TypeBuilder.d.ts +9 -0
- package/dist/TypeBuilder.d.ts.map +1 -1
- package/dist/TypeBuilder.js +24 -11
- package/dist/TypeBuilder.js.map +1 -1
- package/dist/TypeBuilder.test.js +33 -0
- package/dist/TypeBuilder.test.js.map +1 -1
- package/dist/bin/{Effect-zUBunSAW.mjs → Effect-DuThyCJ1.mjs} +87 -9
- package/dist/bin/Effect-DuThyCJ1.mjs.map +1 -0
- package/dist/bin/McpClient-CIiPyMDJ.mjs +36 -0
- package/dist/bin/McpClient-CIiPyMDJ.mjs.map +1 -0
- package/dist/bin/{OutputFormatter-BPdc6RmH.mjs → OutputFormatter-BvIjvUmT.mjs} +3 -3
- package/dist/bin/{OutputFormatter-BPdc6RmH.mjs.map → OutputFormatter-BvIjvUmT.mjs.map} +1 -1
- package/dist/bin/{Schema-C2Y2y3tU.mjs → Schema-DcXUXpRg.mjs} +831 -35
- package/dist/bin/Schema-DcXUXpRg.mjs.map +1 -0
- package/dist/bin/{SemanticSearch-BKZxP19F.mjs → SemanticSearch-CdGA4CIC.mjs} +5 -5
- package/dist/bin/{SemanticSearch-BKZxP19F.mjs.map → SemanticSearch-CdGA4CIC.mjs.map} +1 -1
- package/dist/bin/{Stream-BvmRbTMu.mjs → Stream-I9SRMlLj.mjs} +20 -22
- package/dist/bin/Stream-I9SRMlLj.mjs.map +1 -0
- package/dist/bin/cli.mjs +17642 -802
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/{index.min-DbZbUHX3.mjs → index.min-Bkz7vIWv.mjs} +5 -5
- package/dist/bin/{index.min-DbZbUHX3.mjs.map → index.min-Bkz7vIWv.mjs.map} +1 -1
- package/dist/bin/rolldown-runtime-zY4HT0JA.mjs +30 -0
- package/dist/bin/{turndown.cjs-DK29wZw3.mjs → turndown.cjs-LntFxFyd.mjs} +2 -2
- package/dist/bin/{turndown.cjs-DK29wZw3.mjs.map → turndown.cjs-LntFxFyd.mjs.map} +1 -1
- package/dist/cli.js +24 -2
- package/dist/cli.js.map +1 -1
- package/dist/fixtures/McpFakeServer.d.ts +47 -0
- package/dist/fixtures/McpFakeServer.d.ts.map +1 -0
- package/dist/fixtures/McpFakeServer.js +112 -0
- package/dist/fixtures/McpFakeServer.js.map +1 -0
- package/dist/fixtures/McpStdioServer.d.ts +2 -0
- package/dist/fixtures/McpStdioServer.d.ts.map +1 -0
- package/dist/fixtures/McpStdioServer.js +53 -0
- package/dist/fixtures/McpStdioServer.js.map +1 -0
- 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 +242 -0
- package/src/Acp.ts +141 -5
- package/src/Agent.ts +38 -10
- package/src/AgentExecutor.ts +14 -1
- package/src/AgentTools.ts +8 -0
- package/src/McpConfig.test.ts +238 -0
- package/src/McpConfig.ts +255 -0
- package/src/McpServers.test.ts +1050 -0
- package/src/McpServers.ts +1072 -0
- package/src/TypeBuilder.test.ts +70 -0
- package/src/TypeBuilder.ts +41 -14
- package/src/cli.ts +46 -0
- package/src/fixtures/McpFakeServer.ts +162 -0
- package/src/fixtures/McpStdioServer.ts +60 -0
- package/src/index.ts +5 -0
- package/dist/bin/Effect-zUBunSAW.mjs.map +0 -1
- package/dist/bin/McpClient-CnP2P7c9.mjs +0 -14179
- package/dist/bin/McpClient-CnP2P7c9.mjs.map +0 -1
- package/dist/bin/Schema-C2Y2y3tU.mjs.map +0 -1
- package/dist/bin/Stream-BvmRbTMu.mjs.map +0 -1
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $i as sync$1, $r as interruptWith, $t as tryPromise, Ai as fiberAwait, Ba as isFailure, Br as addFinalizerExit, D as contextWith, Da as map$3, Di as exitInterrupt$1, Dt as provideService$2, E as context, Et as provideContext$2, Fa as fail$4, Fi as fiberJoin, Fn as catchDone, G as forkChild, Gr as makeUnsafe$2, Gt as succeedSome, Hi as makeLatch, Hn as nextPow2, Ii as fiberRunIn, In as doneExitFromCause, Io as map$4, Jt as tap$1, K as forkIn, Kr as provide, Kt as suspend$2, L as flatMap$2, Li as flatMap$3, Ln as filterDone, M as exit, Mi as fiberInterruptAll, N as fail$3, Na as headUnsafe, Ni as fiberInterruptAllAs, Oi as exitVoid, Ot as raceFirst, P as failCause$3, Pi as fiberInterruptAs, Po as isSome, Pt as runForkWith, Q as interrupt$2, Qi as suspend$3, Qr as doneUnsafe, R as flatMapEager, Rn as isDoneCause, Ro as none, Rr as Scope, Sa as isReadonlyArrayNonEmpty, Ss as toJson, Ta as lastNonEmpty, Tc as pipeArguments, U as forEach, Ui as makeLatchUnsafe, Ur as forkUnsafe, Ut as succeed$3, V as fnUntraced, Va as isSuccess$1, Vo as some, Vr as close, W as forever, Wa as succeed$5, Ws as hasProperty, Wt as succeedNone$1, X as gen, Xi as succeed$4, Zi as succeedNone, _c as dual, _t as onError, a as andThen, ai as asVoidAll, ba as isArrayNonEmpty, bi as asSome, bt as onInterrupt, c as as, cc as isTagged, ci as failCause$4, cn as when, cs as evaluate, di as isExit$1, do as get$1, ds as exitSucceed, ea as uninterruptibleMask, er as die$2, fi as isFailure$1, fs as isExit, gc as constant, gt as never, hc as constVoid, hi as void_$2, ii as makeUnsafe$3, ir as findError, is as PipeInspectableProto, j as ensuring$2, ji as fiberInterrupt, ka as of, ki as exitZipRight, ln as whileLoop, ls as exitFail, m as catchCause$1, mi as succeed$2, mn as yieldNow, ms as withFiber$1, mt as matchCauseEffect, na as void_$1, nn as uninterruptible, ns as Done, oc as isString$1, os as args, p as callback$1, pc as constTrue, pi as isSuccess, ps as makePrimitive, q as forkScoped, qi as onExitPrimitive, qt as sync, si as fail$5, sn as void_, ss as causeFail, st as map$2, t as acquireRelease, tr as done, u as asVoid, ui as interrupt$1, un as withFiber, us as exitFailCause, va as fromIterable$1, vt as onExit$1, w as catch_$2, wt as promise, xi as callback$2, yc as identity, yi as andThen$1, yt as onExitPrimitive$1, z as flatten$1, zi as getCurrentFiber, zn as matchEffect, zr as addFinalizer, zt as scopedWith } from "./Effect-DuThyCJ1.mjs";
|
|
2
2
|
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/count.js
|
|
3
3
|
const normalize = (n) => n > 0 ? Math.floor(n) : 0;
|
|
4
4
|
const normalizeNonEmpty = (n) => Math.max(1, normalize(n));
|
|
5
5
|
//#endregion
|
|
6
|
-
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Number.js
|
|
7
|
-
const Number$1 = globalThis.Number;
|
|
8
|
-
const nextPow2 = (n) => {
|
|
9
|
-
const nextPow = Math.ceil(Math.log(n) / Math.log(2));
|
|
10
|
-
return Math.max(Math.pow(2, nextPow), 2);
|
|
11
|
-
};
|
|
12
|
-
const parse = (s) => {
|
|
13
|
-
if (s === "NaN") return some(NaN);
|
|
14
|
-
if (s === "Infinity") return some(Infinity);
|
|
15
|
-
if (s === "-Infinity") return some(-Infinity);
|
|
16
|
-
if (s.trim() === "") return none();
|
|
17
|
-
const n = Number$1(s);
|
|
18
|
-
return Number$1.isNaN(n) ? none() : some(n);
|
|
19
|
-
};
|
|
20
|
-
const round = dual(2, (self, precision) => {
|
|
21
|
-
const factor = Math.pow(10, precision);
|
|
22
|
-
return Math.round(self * factor) / factor;
|
|
23
|
-
});
|
|
24
|
-
//#endregion
|
|
25
6
|
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/String.js
|
|
26
7
|
const String = globalThis.String;
|
|
27
8
|
const isString = isString$1;
|
|
@@ -1634,6 +1615,22 @@ const readableStreamToPullUnsafe = (options) => {
|
|
|
1634
1615
|
});
|
|
1635
1616
|
return as(addFinalizer(options.scope, options.releaseLockOnEnd ? sync(() => reader.releaseLock()) : promise(() => reader.cancel().catch(constVoid))), pull);
|
|
1636
1617
|
};
|
|
1618
|
+
const fromAsyncIterable$1 = (iterable, onError) => fromTransform(fnUntraced(function* (_, scope) {
|
|
1619
|
+
const iter = iterable[Symbol.asyncIterator]();
|
|
1620
|
+
let pulling = false;
|
|
1621
|
+
if (iter.return) yield* addFinalizer(scope, suspend$2(() => pulling ? sync(() => void iter.return().catch(constVoid)) : promise(() => iter.return())));
|
|
1622
|
+
return flatMap$2(tryPromise({
|
|
1623
|
+
try: () => {
|
|
1624
|
+
const promise = iter.next();
|
|
1625
|
+
pulling = true;
|
|
1626
|
+
return promise.finally(() => {
|
|
1627
|
+
pulling = false;
|
|
1628
|
+
});
|
|
1629
|
+
},
|
|
1630
|
+
catch: onError
|
|
1631
|
+
}), (result) => result.done ? done(result.value) : succeed$3(result.value));
|
|
1632
|
+
}));
|
|
1633
|
+
const fromAsyncIterableArray = (iterable, onError) => map$1(fromAsyncIterable$1(iterable, onError), of);
|
|
1637
1634
|
const map$1 = dual(2, (self, f) => transformPull$1(self, (pull) => sync(() => {
|
|
1638
1635
|
let i = 0;
|
|
1639
1636
|
return map$2(pull, (o) => f(o, i++));
|
|
@@ -2007,6 +2004,7 @@ const fromQueue = (queue) => fromChannel(fromQueueArray(queue));
|
|
|
2007
2004
|
const fromPubSub = (pubsub) => fromChannel(fromPubSubArray(pubsub));
|
|
2008
2005
|
const fromPubSubTake = (pubsub) => fromChannel(fromPubSubTake$1(pubsub));
|
|
2009
2006
|
const fromReadableStream = (options) => fromChannel(fromReadableStream$1(options));
|
|
2007
|
+
const fromAsyncIterable = (iterable, onError) => fromChannel(fromAsyncIterableArray(iterable, onError));
|
|
2010
2008
|
const unwrap = (effect) => fromChannel(unwrap$1(map$2(effect, toChannel)));
|
|
2011
2009
|
const map = dual(2, (self, f) => suspend(() => {
|
|
2012
2010
|
let i = 0;
|
|
@@ -2139,6 +2137,6 @@ const mkString = (self) => runFold$1(self.channel, () => "", (acc, chunk) => acc
|
|
|
2139
2137
|
const runIntoPubSub = dual((args) => isStream(args[0]), (self, pubsub, options) => runIntoPubSubArray(self.channel, pubsub, options));
|
|
2140
2138
|
const toPubSubTake = dual(2, (self, options) => toPubSubTake$1(self.channel, options));
|
|
2141
2139
|
//#endregion
|
|
2142
|
-
export {
|
|
2140
|
+
export { take as $, mapArray as A, makeUnsafe$1 as At, provideContext as B, toLowerCase as Bt, fromEffect as C, shutdownUnsafe as Ct, fromReadableStream as D, make$4 as Dt, fromQueue as E, unbounded$1 as Et, mergeAll as F, interruptAllAs as Ft, runFold as G, run as H, mkString as I, interruptAs as It, runIntoPubSub as J, runForEach as K, onEnd as L, join as Lt, mapEffect as M, getCurrent as Mt, mapError as N, interrupt as Nt, isStream as O, set as Ot, merge as P, interruptAll as Pt, suspend as Q, orDie as R, runIn as Rt, fromChannel as S, poll as St, fromPull as T, unbounded as Tt, runCollect as U, provideService as V, normalizeNonEmpty as Vt, runDrain as W, splitLines as X, runLast as Y, succeed as Z, flattenArray as _, make$1 as _t, catchTags as a, fromTransform as at, fromArrayEffect as b, offerAllUnsafe as bt, die as c, unwrap$1 as ct, ensuring as d, bounded as dt, takeUntil as et, fail as f, end as ft, flatMap as g, failCauseUnsafe as gt, filterMap as h, failCause$2 as ht, catchReason as i, unwrap as it, mapArrayEffect as j, await_ as jt, map as k, update as kt, drop as l, make as lt, filter as m, fail$2 as mt, callback as n, tap as nt, catch_ as o, mapDone as ot, failCause as p, endUnsafe as pt, runForEachArray as q, catchIf as r, transduce as rt, decodeText as s, toTransform as st, broadcast as t, takeWhile as tt, empty as u, makeUnsafe as ut, flattenIterable as v, offer as vt, fromPubSub as w, take$1 as wt, fromAsyncIterable as x, offerUnsafe as xt, fromArray as y, offerAll as yt, pipeThroughChannel as z, camelToSnake as zt };
|
|
2143
2141
|
|
|
2144
|
-
//# sourceMappingURL=Stream-
|
|
2142
|
+
//# sourceMappingURL=Stream-I9SRMlLj.mjs.map
|