clanka 0.17.3 → 0.18.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/README.md +24 -0
- package/dist/Acp.d.ts.map +1 -1
- package/dist/Acp.js +5 -0
- package/dist/Acp.js.map +1 -1
- package/dist/Agent.d.ts +11 -0
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +35 -15
- package/dist/Agent.js.map +1 -1
- package/dist/Agent.test.js +23 -0
- package/dist/Agent.test.js.map +1 -1
- package/dist/AgentExecutor.d.ts.map +1 -1
- package/dist/AgentExecutor.js +40 -8
- package/dist/AgentExecutor.js.map +1 -1
- package/dist/AgentExecutor.test.js +51 -2
- package/dist/AgentExecutor.test.js.map +1 -1
- package/dist/AgentOutput.d.ts +23 -4
- package/dist/AgentOutput.d.ts.map +1 -1
- package/dist/AgentOutput.js +19 -0
- package/dist/AgentOutput.js.map +1 -1
- package/dist/AgentTools.d.ts +4 -4
- package/dist/AgentTools.d.ts.map +1 -1
- package/dist/AgentTools.js +7 -2
- package/dist/AgentTools.js.map +1 -1
- package/dist/AgentTools.test.js +22 -0
- package/dist/AgentTools.test.js.map +1 -1
- package/dist/ClaudeAgent.d.ts.map +1 -1
- package/dist/ClaudeAgent.js +37 -4
- package/dist/ClaudeAgent.js.map +1 -1
- package/dist/ClaudeAgent.test.js +82 -0
- package/dist/ClaudeAgent.test.js.map +1 -1
- package/dist/Codex.js +9 -5
- package/dist/Codex.js.map +1 -1
- package/dist/Codex.test.js +26 -7
- package/dist/Codex.test.js.map +1 -1
- package/dist/Compaction.d.ts +41 -6
- package/dist/Compaction.d.ts.map +1 -1
- package/dist/Compaction.js +52 -11
- package/dist/Compaction.js.map +1 -1
- package/dist/Compaction.test.js +5 -4
- package/dist/Compaction.test.js.map +1 -1
- package/dist/CompactionTransport.test.js +11 -0
- package/dist/CompactionTransport.test.js.map +1 -1
- package/dist/Copilot.d.ts.map +1 -1
- package/dist/Copilot.js +3 -6
- package/dist/Copilot.js.map +1 -1
- package/dist/ModelLayer.d.ts +35 -6
- package/dist/ModelLayer.d.ts.map +1 -1
- package/dist/ModelLayer.js +30 -18
- package/dist/ModelLayer.js.map +1 -1
- package/dist/ModelLayer.test.js +11 -3
- package/dist/ModelLayer.test.js.map +1 -1
- package/dist/OutputFormatter.d.ts.map +1 -1
- package/dist/OutputFormatter.js +3 -0
- package/dist/OutputFormatter.js.map +1 -1
- package/dist/Xai.d.ts.map +1 -1
- package/dist/Xai.js +4 -12
- package/dist/Xai.js.map +1 -1
- package/dist/bin/{Effect-DNYYQ84C.mjs → Effect-5XYMLOiB.mjs} +31 -30
- package/dist/bin/Effect-5XYMLOiB.mjs.map +1 -0
- package/dist/bin/{Latch-BSlIwuxI.mjs → Latch-BnrpWMd1.mjs} +2 -2
- package/dist/bin/{Latch-BSlIwuxI.mjs.map → Latch-BnrpWMd1.mjs.map} +1 -1
- package/dist/bin/{McpClient-C7ctqJWo.mjs → McpClient-DoPNaNzW.mjs} +3 -3
- package/dist/bin/{McpClient-C7ctqJWo.mjs.map → McpClient-DoPNaNzW.mjs.map} +1 -1
- package/dist/bin/{OutputFormatter-DXej05JW.mjs → OutputFormatter-Dqxyk2qD.mjs} +4 -3
- package/dist/bin/{OutputFormatter-DXej05JW.mjs.map → OutputFormatter-Dqxyk2qD.mjs.map} +1 -1
- package/dist/bin/{Schema-CSQN_Zso.mjs → Schema-Box_9VZG.mjs} +6 -3
- package/dist/bin/{Schema-CSQN_Zso.mjs.map → Schema-Box_9VZG.mjs.map} +1 -1
- package/dist/bin/{SemanticSearch-BiwCnpKX.mjs → SemanticSearch-CH125AHH.mjs} +4 -4
- package/dist/bin/{SemanticSearch-BiwCnpKX.mjs.map → SemanticSearch-CH125AHH.mjs.map} +1 -1
- package/dist/bin/{Stream-Dwvj9X5X.mjs → Stream-C51usiew.mjs} +3 -3
- package/dist/bin/{Stream-Dwvj9X5X.mjs.map → Stream-C51usiew.mjs.map} +1 -1
- package/dist/bin/cli.mjs +337 -229
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/{upgrade-BSNjCnra.mjs → upgrade-HMRGSqq8.mjs} +4 -4
- package/dist/bin/{upgrade-BSNjCnra.mjs.map → upgrade-HMRGSqq8.mjs.map} +1 -1
- package/dist/cli.js +45 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/Acp.ts +7 -0
- package/src/Agent.test.ts +27 -0
- package/src/Agent.ts +49 -15
- package/src/AgentExecutor.test.ts +80 -2
- package/src/AgentExecutor.ts +70 -10
- package/src/AgentOutput.ts +23 -0
- package/src/AgentTools.test.ts +28 -0
- package/src/AgentTools.ts +7 -2
- package/src/ClaudeAgent.test.ts +113 -0
- package/src/ClaudeAgent.ts +51 -4
- package/src/Codex.test.ts +37 -9
- package/src/Codex.ts +25 -20
- package/src/Compaction.test.ts +18 -15
- package/src/Compaction.ts +89 -20
- package/src/CompactionTransport.test.ts +36 -0
- package/src/Copilot.ts +5 -6
- package/src/ModelLayer.test.ts +17 -2
- package/src/ModelLayer.ts +68 -22
- package/src/OutputFormatter.ts +3 -0
- package/src/Xai.ts +8 -12
- package/src/cli.ts +97 -5
- package/dist/bin/Effect-DNYYQ84C.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ji as makeLatchUnsafe, qi as makeLatch } from "./Effect-5XYMLOiB.mjs";
|
|
2
2
|
// node_modules/.pnpm/effect@4.1.1/node_modules/effect/dist/Latch.js
|
|
3
3
|
const makeUnsafe = makeLatchUnsafe;
|
|
4
4
|
const make = makeLatch;
|
|
5
5
|
export { makeUnsafe as n, make as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=Latch-
|
|
7
|
+
//# sourceMappingURL=Latch-BnrpWMd1.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Latch-
|
|
1
|
+
{"version":3,"file":"Latch-BnrpWMd1.mjs","names":["internal.makeLatchUnsafe","internal.makeLatch"],"sources":["../../node_modules/.pnpm/effect@4.1.1/node_modules/effect/dist/Latch.js"],"sourcesContent":["import * as internal from \"./internal/effect.js\";\n/**\n * Creates a `Latch` synchronously, outside of `Effect`.\n *\n * **When to use**\n *\n * Use when you need to allocate a `Latch` synchronously outside an Effect\n * workflow.\n *\n * **Details**\n *\n * The latch starts closed by default; pass `true` to create it open.\n *\n * **Example** (Creating a latch unsafely)\n *\n * ```ts import.meta.vitest\n * import { Effect, Fiber, Latch } from \"effect\"\n *\n * const latch = Latch.makeUnsafe(false)\n * const waiter = latch.await.pipe(Effect.as(\"opened\"))\n *\n * const program = Effect.gen(function*() {\n * const fiber = yield* Effect.forkChild(waiter)\n * yield* latch.open\n * return yield* Fiber.join(fiber)\n * })\n *\n * await Effect.runPromise(program) // => \"opened\"\n * ```\n *\n * @see {@link make} for creating a latch inside Effect code\n *\n * @stability stable\n * @category constructors\n * @since 4.0.0\n */\nexport const makeUnsafe = internal.makeLatchUnsafe;\n/**\n * Creates a `Latch` inside `Effect`.\n *\n * **When to use**\n *\n * Use to create a latch for coordinating fibers inside Effect code.\n *\n * **Details**\n *\n * The latch starts closed by default; pass `true` to create it open.\n *\n * **Example** (Creating a latch)\n *\n * ```ts import.meta.vitest\n * import { Effect, Fiber, Latch } from \"effect\"\n *\n * const program = Effect.gen(function*() {\n * const latch = yield* Latch.make(false)\n * const waiter = latch.await.pipe(Effect.as(\"opened\"))\n *\n * const fiber = yield* Effect.forkChild(waiter)\n * yield* latch.open\n * return yield* Fiber.join(fiber)\n * })\n *\n * await Effect.runPromise(program) // => \"opened\"\n * ```\n *\n * @see {@link makeUnsafe} for synchronous allocation outside Effect code\n *\n * @stability stable\n * @category constructors\n * @since 4.0.0\n */\nexport const make = internal.makeLatch;\n/**\n * Opens the latch and releases fibers waiting on it.\n *\n * **When to use**\n *\n * Use to open a latch and release all fibers that are waiting on it.\n *\n * **Details**\n *\n * The returned effect succeeds with `true` when this call changed the latch\n * from closed to open, or `false` if it was already open.\n *\n * @see {@link openUnsafe} for a synchronous variant\n * @see {@link release} to release waiting fibers without opening the latch\n *\n * @stability stable\n * @category combinators\n * @since 4.0.0\n */\nexport const open = self => self.open;\n/**\n * Opens the latch synchronously and releases fibers waiting on it.\n *\n * **When to use**\n *\n * Use when you need synchronous code to open a latch immediately and release\n * the fibers waiting on it.\n *\n * **Details**\n *\n * Returns `true` when this call changed the latch from closed to open, or\n * `false` if it was already open. This unsafe variant performs the state\n * change immediately instead of returning an `Effect`.\n *\n * @see {@link open} for the effectful variant\n * @see {@link release} to release waiting fibers without opening the latch\n * @see {@link closeUnsafe} for the synchronous inverse operation\n *\n * @stability stable\n * @category unsafe\n * @since 4.0.0\n */\nexport const openUnsafe = self => self.openUnsafe();\n/**\n * Releases the fibers currently waiting on a closed latch without opening it.\n *\n * **When to use**\n *\n * Use to let the fibers currently waiting on a latch proceed while keeping the\n * latch closed for future waiters.\n *\n * **Details**\n *\n * The returned effect succeeds with `true` when release was requested while\n * the latch was closed, or `false` if the latch was already open. Future\n * waiters still suspend until the latch is opened or released again.\n *\n * @see {@link open} for opening the latch for current and future waiters\n *\n * @stability stable\n * @category combinators\n * @since 4.0.0\n */\nexport const release = self => self.release;\nconst _await = self => self.await;\nexport {\n/**\n * Waits for the latch to be opened.\n *\n * **When to use**\n *\n * Use to suspend the current fiber until the latch is opened or the current\n * set of waiters is released.\n *\n * **Details**\n *\n * Awaiting an already open latch completes immediately. Awaiting a closed\n * latch suspends until `open` or `release` resumes the waiters.\n *\n * **Gotchas**\n *\n * `release` can resume current waiters without opening the latch, so later\n * waiters may still suspend.\n *\n * @see {@link open} for opening the latch for current and future waiters\n * @see {@link release} for resuming current waiters without opening the latch\n * @see {@link whenOpen} for waiting before running another effect\n *\n * @stability stable\n * @category getters\n * @since 4.0.0\n */\n_await as await };\n/**\n * Closes the latch so future `await` and `whenOpen` calls suspend.\n *\n * **When to use**\n *\n * Use to re-enable waiting on a latch after it was opened, so later `await`\n * and `whenOpen` calls suspend again.\n *\n * **Details**\n *\n * The returned effect succeeds with `true` when this call changed the latch\n * from open to closed, or `false` if it was already closed.\n *\n * @see {@link closeUnsafe} for a synchronous variant\n * @see {@link open} for opening the latch for current and future waiters\n *\n * @stability stable\n * @category combinators\n * @since 4.0.0\n */\nexport const close = self => self.close;\n/**\n * Closes the latch synchronously so future `await` and `whenOpen` calls\n * suspend.\n *\n * **When to use**\n *\n * Use to close a latch synchronously when the state change must happen outside\n * an `Effect`.\n *\n * **Details**\n *\n * Returns `true` when this call changed the latch from open to closed, or\n * `false` if it was already closed. This unsafe variant performs the state\n * change immediately instead of returning an `Effect`.\n *\n * @see {@link close} for the effectful variant\n * @see {@link openUnsafe} to synchronously open the latch and release waiting\n * fibers\n *\n * @stability stable\n * @category unsafe\n * @since 4.0.0\n */\nexport const closeUnsafe = self => self.closeUnsafe();\n/**\n * Waits on the latch, then runs the provided effect.\n *\n * **When to use**\n *\n * Use to gate another effect so it starts only after the latch is opened or\n * the current waiters are released.\n *\n * **Details**\n *\n * If the latch is open, the effect runs immediately. If it is closed, the\n * returned effect suspends until the latch is opened or the current waiters are\n * released. The provided effect's success, failure, and requirements are\n * preserved.\n *\n * @see `await` for waiting without running another effect\n * @see {@link open} for opening the latch for current and future waiters\n * @see {@link release} for resuming current waiters without opening the latch\n *\n * @stability stable\n * @category combinators\n * @since 4.0.0\n */\nexport const whenOpen = (...args) => {\n if (args.length === 1) {\n const [self] = args;\n return effect => self.whenOpen(effect);\n }\n const [self, effect] = args;\n return self.whenOpen(effect);\n};\n/**\n * Checks whether the latch is currently open or closed.\n *\n * **When to use**\n *\n * Use to check the state of the latch without suspending or changing its state.\n *\n * @stability stable\n * @category predicates\n * @since 4.0.0\n */\nexport const isOpen = self => self.isOpen();\n//# sourceMappingURL=Latch.js.map"],"ignoreList":[0],"mappings":";;AAoCA,MAAa,aAAaA;AAmC1B,MAAa,OAAOC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as fn, Dr as effect, Et as promise, Xt as sync, Z as gen,
|
|
2
|
-
import { K as TaggedError, p as Defect } from "./Schema-
|
|
1
|
+
import { B as fn, Dr as effect, Et as promise, Xt as sync, Z as gen, bo as Service, rn as tryPromise, t as acquireRelease } from "./Effect-5XYMLOiB.mjs";
|
|
2
|
+
import { K as TaggedError, p as Defect } from "./Schema-Box_9VZG.mjs";
|
|
3
3
|
import { c as StreamableHTTPClientTransport, l as Client } from "./cli.mjs";
|
|
4
4
|
// src/McpClient.ts
|
|
5
5
|
var McpClient = class extends Service()("clanka/McpClient") {};
|
|
@@ -32,4 +32,4 @@ const layer = effect(McpClient, gen(function* () {
|
|
|
32
32
|
}));
|
|
33
33
|
export { McpClient, McpClientError, layer };
|
|
34
34
|
|
|
35
|
-
//# sourceMappingURL=McpClient-
|
|
35
|
+
//# sourceMappingURL=McpClient-DoPNaNzW.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpClient-
|
|
1
|
+
{"version":3,"file":"McpClient-DoPNaNzW.mjs","names":["Context.Service","Schema.TaggedError","Schema.Defect","Layer.effect","Effect.gen","Effect.acquireRelease","Effect.sync","Effect.promise","Effect.fn","Effect.tryPromise"],"sources":["../../src/McpClient.ts"],"sourcesContent":["/**\n * @since 1.0.0\n */\nimport * as Effect from \"effect/Effect\"\nimport * as Layer from \"effect/Layer\"\nimport * as Schema from \"effect/Schema\"\nimport * as Context from \"effect/Context\"\nimport { Client } from \"@modelcontextprotocol/sdk/client\"\nimport { StreamableHTTPClientTransport } from \"@modelcontextprotocol/sdk/client/streamableHttp.js\"\nimport type { Transport } from \"@modelcontextprotocol/sdk/shared/transport.js\"\n\n/**\n * @since 1.0.0\n * @category Services\n */\nexport class McpClient extends Context.Service<\n McpClient,\n {\n connect(options: {\n readonly url: string\n }): Effect.Effect<void, McpClientError>\n toolCall(options: {\n readonly name: string\n readonly arguments: Record<string, unknown>\n }): Effect.Effect<unknown, McpClientError>\n }\n>()(\"clanka/McpClient\") {}\n\n/**\n * @since 1.0.0\n * @category Errors\n */\nexport class McpClientError extends Schema.TaggedError<McpClientError>()(\n \"McpClientError\",\n {\n cause: Schema.Defect(),\n },\n) {}\n\n/**\n * @since 1.0.0\n * @category Layers\n */\nexport const layer = Layer.effect(\n McpClient,\n Effect.gen(function* () {\n const client = yield* Effect.acquireRelease(\n Effect.sync(\n () =>\n new Client({\n name: \"clanka\",\n version: \"0.1.0\",\n }),\n ),\n (client) => Effect.promise(() => client.close()),\n )\n\n const connect = Effect.fn(\"McpClient.connect\")(function* (options: {\n readonly url: string\n }) {\n const transport = new StreamableHTTPClientTransport(new URL(options.url))\n return yield* Effect.tryPromise({\n try: (signal) => client.connect(transport as Transport, { signal }),\n catch: (cause) => new McpClientError({ cause }),\n })\n })\n\n return McpClient.of({\n connect,\n toolCall: Effect.fn(\"McpClient.toolCall\")((options) =>\n Effect.tryPromise({\n try: async () => {\n const response = await client.callTool({\n name: options.name,\n arguments: options.arguments,\n })\n return response.structuredContent ?? response.content\n },\n catch: (cause) => new McpClientError({ cause }),\n }),\n ),\n })\n }),\n)\n"],"mappings":";;;;AAeA,IAAa,YAAb,cAA+BA,QAW7B,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAMzB,IAAa,iBAAb,cAAoCC,YAAmC,CAAC,CACtE,kBACA,EACE,OAAOC,OAAc,EACvB,CACF,CAAC,CAAC,CAAC;AAMH,MAAa,QAAQC,OACnB,WACAC,IAAW,aAAa;CACtB,MAAM,SAAS,OAAOC,eACpBC,WAEI,IAAI,OAAO;EACT,MAAM;EACN,SAAS;CACX,CAAC,CACL,IACC,WAAWC,cAAqB,OAAO,MAAM,CAAC,CACjD;CAEA,MAAM,UAAUC,GAAU,mBAAmB,CAAC,CAAC,WAAW,SAEvD;EACD,MAAM,YAAY,IAAI,8BAA8B,IAAI,IAAI,QAAQ,GAAG,CAAC;EACxE,OAAO,OAAOC,WAAkB;GAC9B,MAAM,WAAW,OAAO,QAAQ,WAAwB,EAAE,OAAO,CAAC;GAClE,QAAQ,UAAU,IAAI,eAAe,EAAE,MAAM,CAAC;EAChD,CAAC;CACH,CAAC;CAED,OAAO,UAAU,GAAG;EAClB;EACA,UAAUD,GAAU,oBAAoB,CAAC,EAAE,YACzCC,WAAkB;GAChB,KAAK,YAAY;IACf,MAAM,WAAW,MAAM,OAAO,SAAS;KACrC,MAAM,QAAQ;KACd,WAAW,QAAQ;IACrB,CAAC;IACD,OAAO,SAAS,qBAAqB,SAAS;GAChD;GACA,QAAQ,UAAU,IAAI,eAAe,EAAE,MAAM,CAAC;EAChD,CAAC,CACH;CACF,CAAC;AACH,CAAC,CACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bt as scope,
|
|
2
|
-
import { N as map, O as fromPubSub, Pt as unbounded, Q as runIntoPubSub, _t as makeUnsafe, i as catchIf, nt as succeed, st as tap, u as die } from "./Stream-
|
|
1
|
+
import { Bt as scope, Cc as isTagged, Dr as effect, Pc as identity, Sr as pretty$1, V as fnUntraced, Z as gen, ar as fail, bo as Service, bt as onExit, dn as void_, q as forkIn, u as asVoid } from "./Effect-5XYMLOiB.mjs";
|
|
2
|
+
import { N as map, O as fromPubSub, Pt as unbounded, Q as runIntoPubSub, _t as makeUnsafe, i as catchIf, nt as succeed, st as tap, u as die } from "./Stream-C51usiew.mjs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import tty from "node:tty";
|
|
@@ -517,6 +517,7 @@ ${chalk.dim(output.summary)}\n\n`;
|
|
|
517
517
|
case "ExecuteOutputCapped": return `${prefix}${chalkInfoHeading(`${infoIcon} Output capped:`)} ${numberFormat.format(output.charsBefore)} chars reduced to ${numberFormat.format(output.charsAfter)}\n\n`;
|
|
518
518
|
case "CompactionStarted": return `${prefix}${chalkInfoHeading(`${infoIcon} Compacting context (${output.reason})...`)}\n\n`;
|
|
519
519
|
case "CompactionEnded": return `${prefix}${chalkInfoHeading(`${infoIcon} Context compacted (${output.reason}):`)} ~${numberFormat.format(output.tokensBefore)} tokens to ~${numberFormat.format(output.tokensAfter)}\n\n`;
|
|
520
|
+
case "SessionRestarted": return `${prefix}${chalkInfoHeading(`${infoIcon} Session restarted (${output.reason}):`)} ${numberFormat.format(output.contextTokens)} context tokens resent, ${numberFormat.format(output.cacheWrite)} cache write\n\n`;
|
|
520
521
|
case "EnvironmentUpdated": return `${prefix}${chalkInfoHeading(`${infoIcon} Environment update:`)}\n\n${chalk.dim(truncate(output.update))}\n\n`;
|
|
521
522
|
case "HistoryAppended":
|
|
522
523
|
case "HistoryReplaced": return "";
|
|
@@ -579,4 +580,4 @@ const layerMuxer = (formatter) => effect(Muxer, gen(function* () {
|
|
|
579
580
|
}));
|
|
580
581
|
export { Muxer, layerMuxer, pretty };
|
|
581
582
|
|
|
582
|
-
//# sourceMappingURL=OutputFormatter-
|
|
583
|
+
//# sourceMappingURL=OutputFormatter-Dqxyk2qD.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutputFormatter-DXej05JW.mjs","names":["styles","Stream.map","Cause.pretty","Cause.fail","Stream.catchIf","Predicate.isTagged","Stream.succeed","Stream.die","Context.Service","Layer.effect","Effect.gen","scope","Effect.scope","PubSub.unbounded","Semaphore.makeUnsafe","Stream.tap","Effect.fnUntraced","Stream.runIntoPubSub","Effect.onExit","Effect.void","Effect.forkIn","Effect.asVoid","Stream.fromPubSub"],"sources":["../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/utilities.js","../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/vendor/ansi-styles/index.js","../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/vendor/supports-color/index.js","../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/index.js","../../src/OutputFormatter.ts"],"sourcesContent":["// Note: Each match is kept and `postfix` is inserted after it. `String#replaceAll(substring, substring + postfix)` does the same, but it has to scan the replacement for `$` patterns and it is several times slower on the no-match path that most calls take.\nexport function stringReplaceAll(string, substring, postfix) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + postfix;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst isGotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (isGotCR ? index - 1 : index)) + prefix + (isGotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\nconst ANSI_UNDERLINE_OFFSET = 20;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u{1B}[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u{1B}[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u{1B}[${38 + offset};2;${red};${green};${blue}m`;\n\n// `SGR 58` has no basic 16-color form, so the basic color code is mapped to its palette index instead.\nconst wrapUnderlineAnsi = code => `\\u{1B}[58;5;${code < 90 ? code - 30 : code - 90 + 8}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\t// Extended underline styles (`SGR 4:x` sub-parameters). Not in upstream `ansi-styles`.\n\t\tunderlineDouble: ['4:2', 24],\n\t\tunderlineCurly: ['4:3', 24],\n\t\tunderlineDotted: ['4:4', 24],\n\t\tunderlineDashed: ['4:5', 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n\t// Underline color (`SGR 58`/`59`). Not in upstream `ansi-styles`.\n\tunderlineColor: {\n\t\tunderlineBlack: ['58;5;0', 59],\n\t\tunderlineRed: ['58;5;1', 59],\n\t\tunderlineGreen: ['58;5;2', 59],\n\t\tunderlineYellow: ['58;5;3', 59],\n\t\tunderlineBlue: ['58;5;4', 59],\n\t\tunderlineMagenta: ['58;5;5', 59],\n\t\tunderlineCyan: ['58;5;6', 59],\n\t\tunderlineWhite: ['58;5;7', 59],\n\n\t\t// Bright color\n\t\tunderlineBlackBright: ['58;5;8', 59],\n\t\tunderlineGray: ['58;5;8', 59], // Alias of `underlineBlackBright`\n\t\tunderlineGrey: ['58;5;8', 59], // Alias of `underlineBlackBright`\n\t\tunderlineRedBright: ['58;5;9', 59],\n\t\tunderlineGreenBright: ['58;5;10', 59],\n\t\tunderlineYellowBright: ['58;5;11', 59],\n\t\tunderlineBlueBright: ['58;5;12', 59],\n\t\tunderlineMagentaBright: ['58;5;13', 59],\n\t\tunderlineCyanBright: ['58;5;14', 59],\n\t\tunderlineWhiteBright: ['58;5;15', 59],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const underlineColorNames = Object.keys(styles.underlineColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u{1B}[${style[0]}m`,\n\t\t\t\tclose: `\\u{1B}[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\t// Only the leading SGR parameter identifies a style, so `4:3` and `58;5;1` are keyed as `4` and `58`.\n\t\t\tcodes.set(Number.parseInt(style[0], 10), style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u{1B}[39m';\n\tstyles.bgColor.close = '\\u{1B}[49m';\n\tstyles.underlineColor.close = '\\u{1B}[59m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\tstyles.underlineColor.ansi = wrapUnderlineAnsi;\n\tstyles.underlineColor.ansi256 = wrapAnsi256(ANSI_UNDERLINE_OFFSET);\n\tstyles.underlineColor.ansi16m = wrapAnsi16m(ANSI_UNDERLINE_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[\\da-f]{6}|[\\da-f]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise -- We need the speed */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\n// Whether `FORCE_COLOR` names a level. Shared with the exact-level check below so that the two cannot disagree on what counts as numeric.\nfunction hasNumericForceColor() {\n\treturn /^\\d+$/.test(env.FORCE_COLOR);\n}\n\nfunction envForceColor() {\n\tif (!('FORCE_COLOR' in env)) {\n\t\treturn;\n\t}\n\n\tif (env.FORCE_COLOR === 'false') {\n\t\treturn 0;\n\t}\n\n\tif (env.FORCE_COLOR === 'true' || env.FORCE_COLOR.length === 0) {\n\t\treturn 1;\n\t}\n\n\tif (!hasNumericForceColor()) {\n\t\treturn;\n\t}\n\n\treturn Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// A numeric `FORCE_COLOR` requests an exact level, while `FORCE_COLOR=true` and `FORCE_COLOR=` only enable color and let the level be detected.\n\tif (forceColor !== undefined && hasNumericForceColor()) {\n\t\treturn forceColor;\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(?:9\\.0*[1-9]\\d*\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.', 1)[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(?:color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n","import {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\nimport ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\nconst LEVEL = Symbol('LEVEL');\n\nconst styles = Object.create(null);\n\nconst assertValidLevel = level => {\n\tif (!Number.isSafeInteger(level) || level < 0 || level > 3) {\n\t\tthrow new Error('The `level` should be an integer from 0 to 3');\n\t}\n};\n\n// The level is stored under a symbol so the hot path can read it as a plain property, while `level` itself is an accessor that rejects values the rest of the code could not handle.\nconst levelDescriptor = {\n\tenumerable: true,\n\tget() {\n\t\treturn this[LEVEL];\n\t},\n\tset(level) {\n\t\tassertValidLevel(level);\n\t\tthis[LEVEL] = level;\n\t},\n};\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level !== undefined) {\n\t\tassertValidLevel(options.level);\n\t}\n\n\t// Detect level if not set manually. Written under the symbol rather than through `level`, as the prototype carrying that accessor is not installed until after this runs.\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject[LEVEL] = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\n// eslint-disable-next-line unicorn/no-top-level-side-effects -- The prototype chain must be set up at module load.\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\n// Resolve a color model to one converter per `level`, so that a call only has to look up the converter for the current level instead of re-deciding the model and level every time.\nconst createModelConverters = (model, type) => {\n\tconst style = ansiStyles[type];\n\n\tif (model === 'rgb') {\n\t\tconst ansi = (red, green, blue) => style.ansi(ansiStyles.rgbToAnsi(red, green, blue));\n\t\tconst ansi256 = (red, green, blue) => style.ansi256(ansiStyles.rgbToAnsi256(red, green, blue));\n\t\treturn [ansi, ansi, ansi256, style.ansi16m];\n\t}\n\n\tif (model === 'hex') {\n\t\tconst ansi = hex => style.ansi(ansiStyles.hexToAnsi(hex));\n\t\tconst ansi256 = hex => style.ansi256(ansiStyles.hexToAnsi256(hex));\n\t\treturn [ansi, ansi, ansi256, hex => style.ansi16m(...ansiStyles.hexToRgb(hex))];\n\t}\n\n\t// `ansi256` is already the native form, so only the 16-color levels need converting.\n\tconst ansi = code => style.ansi(ansiStyles.ansi256ToAnsi(code));\n\treturn [ansi, ansi, style.ansi256, style.ansi256];\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tconst capitalizedModel = model[0].toUpperCase() + model.slice(1);\n\n\tfor (const [styleName, type] of [\n\t\t[model, 'color'],\n\t\t['bg' + capitalizedModel, 'bgColor'],\n\t\t['underline' + capitalizedModel, 'underlineColor'],\n\t]) {\n\t\tconst {close} = ansiStyles[type];\n\t\tconst converters = createModelConverters(model, type);\n\n\t\tstyles[styleName] = {\n\t\t\tget() {\n\t\t\t\t// The level is read on call rather than captured here so the function can be cached on the instance instead of being reallocated on every property access.\n\t\t\t\t// `rgb` is the widest model, so naming the three parameters avoids a rest array.\n\t\t\t\tconst styleFunction = function (first, second, third) {\n\t\t\t\t\tconst open = converters[this.level](first, second, third);\n\t\t\t\t\treturn createBuilder(this, createStyler(open, close, this[STYLER]), this[IS_EMPTY]);\n\t\t\t\t};\n\n\t\t\t\tObject.defineProperty(this, styleName, {value: styleFunction});\n\t\t\t\treturn styleFunction;\n\t\t\t},\n\t\t};\n\t}\n}\n\nconst proto = Object.defineProperties(\n\t() => {},\n\t{\n\t\t...styles,\n\t\tlevel: {\n\t\t\tenumerable: true,\n\t\t\tget() {\n\t\t\t\treturn this[GENERATOR].level;\n\t\t\t},\n\t\t\tset(level) {\n\t\t\t\tthis[GENERATOR].level = level;\n\t\t\t},\n\t\t},\n\t},\n);\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\tconst builder = (...arguments_) => {\n\t\tif (arguments_.length === 1) {\n\t\t\t// eslint-disable-next-line no-implicit-coercion\n\t\t\treturn applyStyle(builder, '' + arguments_[0]);\n\t\t}\n\n\t\tif (arguments_.length === 2) {\n\t\t\t// The template literal matches `Array#join` coercion (`null` and `undefined` become empty, objects use `toString`) while being faster.\n\t\t\treturn applyStyle(builder, `${arguments_[0] ?? ''} ${arguments_[1] ?? ''}`);\n\t\t}\n\n\t\treturn applyStyle(builder, arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\t// Point every builder at the root generator instead of its immediate parent, so reading the level costs one property load rather than walking a `level` getter per link of the chain.\n\tbuilder[GENERATOR] = self[GENERATOR] ?? self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\t// Read the level directly off the generator to skip the `level` getter dispatch on this hot path\n\tif (self[GENERATOR][LEVEL] <= 0 || !string) {\n\t\t// eslint-disable-next-line unicorn/no-computed-property-existence-check -- Reads the boolean value, not a property existence check.\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u{1B}')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\n// `level` lives on the prototype rather than on each instance, so it costs nothing to construct an instance and matches how builders already expose it. It is inherited rather than own, so it does not show up in `Object.keys()`, same as for a builder.\n// eslint-disable-next-line unicorn/no-top-level-side-effects -- The style getters must be installed at module load.\nObject.defineProperties(createChalk.prototype, {...styles, level: levelDescriptor});\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tunderlineColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/**\n * @since 1.0.0\n */\nimport * as Effect from \"effect/Effect\"\nimport * as Layer from \"effect/Layer\"\nimport * as PubSub from \"effect/PubSub\"\nimport * as Semaphore from \"effect/Semaphore\"\nimport * as Context from \"effect/Context\"\nimport * as Stream from \"effect/Stream\"\nimport type { AgentFinished, Output } from \"./AgentOutput.ts\"\nimport chalk from \"chalk\"\nimport type * as Prompt from \"effect/ai/Prompt\"\nimport * as Cause from \"effect/Cause\"\nimport { identity } from \"effect/Function\"\nimport * as Predicate from \"effect/Predicate\"\n\n/**\n * @since 1.0.0\n * @category Models\n */\nexport type OutputFormatter = <E, R>(\n stream: Stream.Stream<Output, AgentFinished | E, R>,\n) => Stream.Stream<string, Exclude<E, AgentFinished>, R>\n\n/**\n * @since 1.0.0\n * @category Pretty\n */\nexport const pretty = (options?: {\n readonly outputTruncation?: number | boolean | undefined\n}): OutputFormatter => {\n const maxLines =\n typeof options?.outputTruncation === \"number\"\n ? options.outputTruncation\n : 20\n const truncate =\n options?.outputTruncation === true ||\n typeof options?.outputTruncation === \"number\"\n ? (text: string): string => {\n const lines = text.split(\"\\n\")\n if (lines.length > maxLines) {\n return (\n lines.slice(0, maxLines).join(\"\\n\") +\n `\\n... (truncated, total ${lines.length} lines)`\n )\n }\n return text\n }\n : identity\n return (stream) =>\n stream.pipe(\n Stream.map((output) => {\n let prefix = \"\"\n if (output._tag === \"SubagentPart\") {\n prefix = chalk.magenta(`Subagent #${output.id}:`) + \" \"\n output = output.part\n }\n switch (output._tag) {\n case \"AgentStart\": {\n return `${chalkAgentHeading(`${subagentIcon} Agent #${output.id} starting (${output.modelAndProvider})`)}\\n\\n${promptToString(output.prompt)}\\n\\n`\n }\n case \"SubagentStart\": {\n const mode = output.background ? \" in the background\" : \"\"\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} starting${mode} (${output.modelAndProvider})`)}\n\n${chalk.dim(output.prompt)}\\n\\n`\n }\n case \"SubagentComplete\": {\n switch (output.status) {\n case \"completed\":\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} complete`)}\n\n${output.summary}\\n\\n`\n case \"failed\":\n return `${chalk.bold.red(`${subagentIcon} Subagent #${output.id} failed`)}\n\n${chalk.dim(output.summary)}\\n\\n`\n case \"cancelled\":\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} cancelled`)}\\n\\n`\n }\n }\n case \"ReasoningStart\": {\n return (\n prefix + chalkReasoningHeading(`${thinkingIcon} Thinking:`) + \" \"\n )\n }\n case \"ReasoningDelta\": {\n return output.delta\n }\n case \"ReasoningEnd\": {\n return \"\\n\\n\"\n }\n case \"ScriptStart\": {\n return `${prefix}${chalkScriptHeading(`${scriptIcon} Executing script`)}\\n\\n`\n }\n case \"ScriptDelta\": {\n return chalk.dim(output.delta)\n }\n case \"ScriptEnd\": {\n return \"\\n\\n\"\n }\n case \"ScriptOutput\": {\n return `${prefix}${chalkScriptHeading(`${scriptIcon} Script output`)}\\n\\n${chalk.dim(truncate(output.output))}\\n\\n`\n }\n case \"ErrorRetry\": {\n return `${prefix}${chalk.red(`Error: ${output.error.reason._tag}. Retrying...`)}\\n\\n${chalk.dim(Cause.pretty(Cause.fail(output.error)))}\\n\\n`\n }\n case \"Usage\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Usage:`)} ${numberFormat.format(output.contextTokens)} context / ${numberFormat.format(output.inputTokens)} input / ${numberFormat.format(output.outputTokens)} output\\n\\n`\n }\n case \"ExecuteOutputCapped\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Output capped:`)} ${numberFormat.format(output.charsBefore)} chars reduced to ${numberFormat.format(output.charsAfter)}\\n\\n`\n }\n case \"CompactionStarted\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Compacting context (${output.reason})...`)}\\n\\n`\n }\n case \"CompactionEnded\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Context compacted (${output.reason}):`)} ~${numberFormat.format(output.tokensBefore)} tokens to ~${numberFormat.format(output.tokensAfter)}\\n\\n`\n }\n case \"EnvironmentUpdated\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Environment update:`)}\\n\\n${chalk.dim(truncate(output.update))}\\n\\n`\n }\n case \"HistoryAppended\":\n case \"HistoryReplaced\": {\n return \"\"\n }\n }\n }),\n Stream.catchIf(\n (e): e is AgentFinished => Predicate.isTagged(e, \"AgentFinished\"),\n (finished) =>\n Stream.succeed(\n `\\n${chalk.bold.green(`${doneIcon} Task complete:`)}\\n\\n${(finished as AgentFinished).summary}`,\n ),\n (e) => Stream.die(e),\n ),\n )\n}\n\nconst promptToString = (prompt: Prompt.Prompt): string => {\n let textParts: Array<string> = []\n for (const message of prompt.content) {\n if (message.role !== \"user\") continue\n let content = message.content\n for (const part of content) {\n if (part.type !== \"text\") continue\n textParts.push(part.text)\n }\n }\n return textParts.join(\"\\n\")\n}\n\nconst numberFormat = new Intl.NumberFormat()\n\nconst chalkAgentHeading = chalk.bold.green\nconst chalkScriptHeading = chalk.bold.blue\nconst chalkSubagentHeading = chalk.bold.magenta\nconst chalkReasoningHeading = chalk.bold.yellow\nconst chalkInfoHeading = chalk.bold.cyan\n\nconst scriptIcon = \"\\u{f0bc1}\"\nconst subagentIcon = \"\\u{ee0d} \"\nconst thinkingIcon = \"\\u{f07f6}\"\nconst doneIcon = \"\\u{eab2}\"\nconst infoIcon = \"\\u{f05a}\"\n\n/**\n * @since 1.0.0\n * @category Muxer\n */\nexport class Muxer extends Context.Service<\n Muxer,\n {\n add<E, R>(\n agent: Stream.Stream<Output, AgentFinished | E, R>,\n ): Effect.Effect<void, never, R>\n readonly output: Stream.Stream<string>\n }\n>()(\"clanka/OutputFormatter/Muxer\") {}\n\n/**\n * @since 1.0.0\n * @category Muxer\n */\nexport const layerMuxer = (formatter: OutputFormatter) =>\n Layer.effect(\n Muxer,\n Effect.gen(function* () {\n const scope = yield* Effect.scope\n const output = yield* PubSub.unbounded<string>()\n let agentCount = 0\n let currentAgentId: number | null = null\n const semaphore = Semaphore.makeUnsafe(1)\n\n return Muxer.of({\n add(stream) {\n const id = ++agentCount\n return stream.pipe(\n Stream.tap(\n Effect.fnUntraced(function* (part_) {\n if (currentAgentId === null || id !== currentAgentId) {\n yield* semaphore.take(1)\n }\n const part = part_._tag === \"SubagentPart\" ? part_.part : part_\n switch (part._tag) {\n case \"ReasoningStart\":\n case \"ScriptStart\": {\n currentAgentId = id\n break\n }\n case \"ScriptDelta\":\n case \"ReasoningDelta\": {\n break\n }\n default: {\n currentAgentId = null\n break\n }\n }\n if (id !== currentAgentId) {\n yield* semaphore.release(1)\n }\n }),\n ),\n formatter,\n Stream.runIntoPubSub(output),\n Effect.onExit(() => {\n if (currentAgentId !== id) return Effect.void\n currentAgentId = null\n return semaphore.release(1)\n }),\n Effect.forkIn(scope),\n Effect.asVoid,\n )\n },\n output: Stream.fromPubSub(output),\n })\n }),\n )\n"],"ignoreList":[0,1,2,3],"mappings":";;;;;;AACA,SAAgB,iBAAiB,QAAQ,WAAW,SAAS;CAC5D,IAAI,QAAQ,OAAO,QAAQ,SAAS;CACpC,IAAI,UAAU,CAAA,GACb,OAAO;CAGR,MAAM,kBAAkB,UAAU;CAClC,IAAI,WAAW;CACf,IAAI,cAAc;CAClB,GAAG;EACF,eAAe,OAAO,MAAM,UAAU,KAAK,IAAI,YAAY;EAC3D,WAAW,QAAQ;EACnB,QAAQ,OAAO,QAAQ,WAAW,QAAQ;CAC3C,SAAS,UAAU,CAAA;CAEnB,eAAe,OAAO,MAAM,QAAQ;CACpC,OAAO;AACR;AAEA,SAAgB,+BAA+B,QAAQ,QAAQ,SAAS,OAAO;CAC9E,IAAI,WAAW;CACf,IAAI,cAAc;CAClB,GAAG;EACF,MAAM,UAAU,OAAO,QAAQ,OAAO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,UAAQ,OAAOC;CACrB,MAAM,SAAS,OAAOC,UAAyB;CAC/C,IAAI,aAAa;CACjB,IAAI,iBAAgC;CACpC,MAAM,YAAYC,WAAqB,CAAC;CAExC,OAAO,MAAM,GAAG;EACd,IAAI,QAAQ;GACV,MAAM,KAAK,EAAE;GACb,OAAO,OAAO,KACZC,IACEC,WAAkB,WAAW,OAAO;IAClC,IAAI,mBAAmB,QAAQ,OAAO,gBACpC,OAAO,UAAU,KAAK,CAAC;IAGzB,SADa,MAAM,SAAS,iBAAiB,MAAM,OAAO,MAAA,CAC7C,MAAb;KACE,KAAK;KACL,KAAK;MACH,iBAAiB;MACjB;KAEF,KAAK;KACL,KAAK,kBACH;KAEF,SACE,iBAAiB;IAGrB;IACA,IAAI,OAAO,gBACT,OAAO,UAAU,QAAQ,CAAC;GAE9B,CAAC,CACH,GACA,WACAC,cAAqB,MAAM,GAC3BC,aAAoB;IAClB,IAAI,mBAAmB,IAAI,OAAOC;IAClC,iBAAiB;IACjB,OAAO,UAAU,QAAQ,CAAC;GAC5B,CAAC,GACDC,OAAcT,OAAK,GACnBU,MACF;EACF;EACA,QAAQC,WAAkB,MAAM;CAClC,CAAC;AACH,CAAC,CACH"}
|
|
1
|
+
{"version":3,"file":"OutputFormatter-Dqxyk2qD.mjs","names":["styles","Stream.map","Cause.pretty","Cause.fail","Stream.catchIf","Predicate.isTagged","Stream.succeed","Stream.die","Context.Service","Layer.effect","Effect.gen","scope","Effect.scope","PubSub.unbounded","Semaphore.makeUnsafe","Stream.tap","Effect.fnUntraced","Stream.runIntoPubSub","Effect.onExit","Effect.void","Effect.forkIn","Effect.asVoid","Stream.fromPubSub"],"sources":["../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/utilities.js","../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/vendor/ansi-styles/index.js","../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/vendor/supports-color/index.js","../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/index.js","../../src/OutputFormatter.ts"],"sourcesContent":["// Note: Each match is kept and `postfix` is inserted after it. `String#replaceAll(substring, substring + postfix)` does the same, but it has to scan the replacement for `$` patterns and it is several times slower on the no-match path that most calls take.\nexport function stringReplaceAll(string, substring, postfix) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + postfix;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst isGotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (isGotCR ? index - 1 : index)) + prefix + (isGotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\nconst ANSI_UNDERLINE_OFFSET = 20;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u{1B}[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u{1B}[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u{1B}[${38 + offset};2;${red};${green};${blue}m`;\n\n// `SGR 58` has no basic 16-color form, so the basic color code is mapped to its palette index instead.\nconst wrapUnderlineAnsi = code => `\\u{1B}[58;5;${code < 90 ? code - 30 : code - 90 + 8}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\t// Extended underline styles (`SGR 4:x` sub-parameters). Not in upstream `ansi-styles`.\n\t\tunderlineDouble: ['4:2', 24],\n\t\tunderlineCurly: ['4:3', 24],\n\t\tunderlineDotted: ['4:4', 24],\n\t\tunderlineDashed: ['4:5', 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n\t// Underline color (`SGR 58`/`59`). Not in upstream `ansi-styles`.\n\tunderlineColor: {\n\t\tunderlineBlack: ['58;5;0', 59],\n\t\tunderlineRed: ['58;5;1', 59],\n\t\tunderlineGreen: ['58;5;2', 59],\n\t\tunderlineYellow: ['58;5;3', 59],\n\t\tunderlineBlue: ['58;5;4', 59],\n\t\tunderlineMagenta: ['58;5;5', 59],\n\t\tunderlineCyan: ['58;5;6', 59],\n\t\tunderlineWhite: ['58;5;7', 59],\n\n\t\t// Bright color\n\t\tunderlineBlackBright: ['58;5;8', 59],\n\t\tunderlineGray: ['58;5;8', 59], // Alias of `underlineBlackBright`\n\t\tunderlineGrey: ['58;5;8', 59], // Alias of `underlineBlackBright`\n\t\tunderlineRedBright: ['58;5;9', 59],\n\t\tunderlineGreenBright: ['58;5;10', 59],\n\t\tunderlineYellowBright: ['58;5;11', 59],\n\t\tunderlineBlueBright: ['58;5;12', 59],\n\t\tunderlineMagentaBright: ['58;5;13', 59],\n\t\tunderlineCyanBright: ['58;5;14', 59],\n\t\tunderlineWhiteBright: ['58;5;15', 59],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const underlineColorNames = Object.keys(styles.underlineColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u{1B}[${style[0]}m`,\n\t\t\t\tclose: `\\u{1B}[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\t// Only the leading SGR parameter identifies a style, so `4:3` and `58;5;1` are keyed as `4` and `58`.\n\t\t\tcodes.set(Number.parseInt(style[0], 10), style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u{1B}[39m';\n\tstyles.bgColor.close = '\\u{1B}[49m';\n\tstyles.underlineColor.close = '\\u{1B}[59m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\tstyles.underlineColor.ansi = wrapUnderlineAnsi;\n\tstyles.underlineColor.ansi256 = wrapAnsi256(ANSI_UNDERLINE_OFFSET);\n\tstyles.underlineColor.ansi16m = wrapAnsi16m(ANSI_UNDERLINE_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[\\da-f]{6}|[\\da-f]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise -- We need the speed */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\n// Whether `FORCE_COLOR` names a level. Shared with the exact-level check below so that the two cannot disagree on what counts as numeric.\nfunction hasNumericForceColor() {\n\treturn /^\\d+$/.test(env.FORCE_COLOR);\n}\n\nfunction envForceColor() {\n\tif (!('FORCE_COLOR' in env)) {\n\t\treturn;\n\t}\n\n\tif (env.FORCE_COLOR === 'false') {\n\t\treturn 0;\n\t}\n\n\tif (env.FORCE_COLOR === 'true' || env.FORCE_COLOR.length === 0) {\n\t\treturn 1;\n\t}\n\n\tif (!hasNumericForceColor()) {\n\t\treturn;\n\t}\n\n\treturn Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// A numeric `FORCE_COLOR` requests an exact level, while `FORCE_COLOR=true` and `FORCE_COLOR=` only enable color and let the level be detected.\n\tif (forceColor !== undefined && hasNumericForceColor()) {\n\t\treturn forceColor;\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(?:9\\.0*[1-9]\\d*\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.', 1)[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(?:color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n","import {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\nimport ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\nconst LEVEL = Symbol('LEVEL');\n\nconst styles = Object.create(null);\n\nconst assertValidLevel = level => {\n\tif (!Number.isSafeInteger(level) || level < 0 || level > 3) {\n\t\tthrow new Error('The `level` should be an integer from 0 to 3');\n\t}\n};\n\n// The level is stored under a symbol so the hot path can read it as a plain property, while `level` itself is an accessor that rejects values the rest of the code could not handle.\nconst levelDescriptor = {\n\tenumerable: true,\n\tget() {\n\t\treturn this[LEVEL];\n\t},\n\tset(level) {\n\t\tassertValidLevel(level);\n\t\tthis[LEVEL] = level;\n\t},\n};\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level !== undefined) {\n\t\tassertValidLevel(options.level);\n\t}\n\n\t// Detect level if not set manually. Written under the symbol rather than through `level`, as the prototype carrying that accessor is not installed until after this runs.\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject[LEVEL] = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\n// eslint-disable-next-line unicorn/no-top-level-side-effects -- The prototype chain must be set up at module load.\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\n// Resolve a color model to one converter per `level`, so that a call only has to look up the converter for the current level instead of re-deciding the model and level every time.\nconst createModelConverters = (model, type) => {\n\tconst style = ansiStyles[type];\n\n\tif (model === 'rgb') {\n\t\tconst ansi = (red, green, blue) => style.ansi(ansiStyles.rgbToAnsi(red, green, blue));\n\t\tconst ansi256 = (red, green, blue) => style.ansi256(ansiStyles.rgbToAnsi256(red, green, blue));\n\t\treturn [ansi, ansi, ansi256, style.ansi16m];\n\t}\n\n\tif (model === 'hex') {\n\t\tconst ansi = hex => style.ansi(ansiStyles.hexToAnsi(hex));\n\t\tconst ansi256 = hex => style.ansi256(ansiStyles.hexToAnsi256(hex));\n\t\treturn [ansi, ansi, ansi256, hex => style.ansi16m(...ansiStyles.hexToRgb(hex))];\n\t}\n\n\t// `ansi256` is already the native form, so only the 16-color levels need converting.\n\tconst ansi = code => style.ansi(ansiStyles.ansi256ToAnsi(code));\n\treturn [ansi, ansi, style.ansi256, style.ansi256];\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tconst capitalizedModel = model[0].toUpperCase() + model.slice(1);\n\n\tfor (const [styleName, type] of [\n\t\t[model, 'color'],\n\t\t['bg' + capitalizedModel, 'bgColor'],\n\t\t['underline' + capitalizedModel, 'underlineColor'],\n\t]) {\n\t\tconst {close} = ansiStyles[type];\n\t\tconst converters = createModelConverters(model, type);\n\n\t\tstyles[styleName] = {\n\t\t\tget() {\n\t\t\t\t// The level is read on call rather than captured here so the function can be cached on the instance instead of being reallocated on every property access.\n\t\t\t\t// `rgb` is the widest model, so naming the three parameters avoids a rest array.\n\t\t\t\tconst styleFunction = function (first, second, third) {\n\t\t\t\t\tconst open = converters[this.level](first, second, third);\n\t\t\t\t\treturn createBuilder(this, createStyler(open, close, this[STYLER]), this[IS_EMPTY]);\n\t\t\t\t};\n\n\t\t\t\tObject.defineProperty(this, styleName, {value: styleFunction});\n\t\t\t\treturn styleFunction;\n\t\t\t},\n\t\t};\n\t}\n}\n\nconst proto = Object.defineProperties(\n\t() => {},\n\t{\n\t\t...styles,\n\t\tlevel: {\n\t\t\tenumerable: true,\n\t\t\tget() {\n\t\t\t\treturn this[GENERATOR].level;\n\t\t\t},\n\t\t\tset(level) {\n\t\t\t\tthis[GENERATOR].level = level;\n\t\t\t},\n\t\t},\n\t},\n);\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\tconst builder = (...arguments_) => {\n\t\tif (arguments_.length === 1) {\n\t\t\t// eslint-disable-next-line no-implicit-coercion\n\t\t\treturn applyStyle(builder, '' + arguments_[0]);\n\t\t}\n\n\t\tif (arguments_.length === 2) {\n\t\t\t// The template literal matches `Array#join` coercion (`null` and `undefined` become empty, objects use `toString`) while being faster.\n\t\t\treturn applyStyle(builder, `${arguments_[0] ?? ''} ${arguments_[1] ?? ''}`);\n\t\t}\n\n\t\treturn applyStyle(builder, arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\t// Point every builder at the root generator instead of its immediate parent, so reading the level costs one property load rather than walking a `level` getter per link of the chain.\n\tbuilder[GENERATOR] = self[GENERATOR] ?? self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\t// Read the level directly off the generator to skip the `level` getter dispatch on this hot path\n\tif (self[GENERATOR][LEVEL] <= 0 || !string) {\n\t\t// eslint-disable-next-line unicorn/no-computed-property-existence-check -- Reads the boolean value, not a property existence check.\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u{1B}')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\n// `level` lives on the prototype rather than on each instance, so it costs nothing to construct an instance and matches how builders already expose it. It is inherited rather than own, so it does not show up in `Object.keys()`, same as for a builder.\n// eslint-disable-next-line unicorn/no-top-level-side-effects -- The style getters must be installed at module load.\nObject.defineProperties(createChalk.prototype, {...styles, level: levelDescriptor});\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tunderlineColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/**\n * @since 1.0.0\n */\nimport * as Effect from \"effect/Effect\"\nimport * as Layer from \"effect/Layer\"\nimport * as PubSub from \"effect/PubSub\"\nimport * as Semaphore from \"effect/Semaphore\"\nimport * as Context from \"effect/Context\"\nimport * as Stream from \"effect/Stream\"\nimport type { AgentFinished, Output } from \"./AgentOutput.ts\"\nimport chalk from \"chalk\"\nimport type * as Prompt from \"effect/ai/Prompt\"\nimport * as Cause from \"effect/Cause\"\nimport { identity } from \"effect/Function\"\nimport * as Predicate from \"effect/Predicate\"\n\n/**\n * @since 1.0.0\n * @category Models\n */\nexport type OutputFormatter = <E, R>(\n stream: Stream.Stream<Output, AgentFinished | E, R>,\n) => Stream.Stream<string, Exclude<E, AgentFinished>, R>\n\n/**\n * @since 1.0.0\n * @category Pretty\n */\nexport const pretty = (options?: {\n readonly outputTruncation?: number | boolean | undefined\n}): OutputFormatter => {\n const maxLines =\n typeof options?.outputTruncation === \"number\"\n ? options.outputTruncation\n : 20\n const truncate =\n options?.outputTruncation === true ||\n typeof options?.outputTruncation === \"number\"\n ? (text: string): string => {\n const lines = text.split(\"\\n\")\n if (lines.length > maxLines) {\n return (\n lines.slice(0, maxLines).join(\"\\n\") +\n `\\n... (truncated, total ${lines.length} lines)`\n )\n }\n return text\n }\n : identity\n return (stream) =>\n stream.pipe(\n Stream.map((output) => {\n let prefix = \"\"\n if (output._tag === \"SubagentPart\") {\n prefix = chalk.magenta(`Subagent #${output.id}:`) + \" \"\n output = output.part\n }\n switch (output._tag) {\n case \"AgentStart\": {\n return `${chalkAgentHeading(`${subagentIcon} Agent #${output.id} starting (${output.modelAndProvider})`)}\\n\\n${promptToString(output.prompt)}\\n\\n`\n }\n case \"SubagentStart\": {\n const mode = output.background ? \" in the background\" : \"\"\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} starting${mode} (${output.modelAndProvider})`)}\n\n${chalk.dim(output.prompt)}\\n\\n`\n }\n case \"SubagentComplete\": {\n switch (output.status) {\n case \"completed\":\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} complete`)}\n\n${output.summary}\\n\\n`\n case \"failed\":\n return `${chalk.bold.red(`${subagentIcon} Subagent #${output.id} failed`)}\n\n${chalk.dim(output.summary)}\\n\\n`\n case \"cancelled\":\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} cancelled`)}\\n\\n`\n }\n }\n case \"ReasoningStart\": {\n return (\n prefix + chalkReasoningHeading(`${thinkingIcon} Thinking:`) + \" \"\n )\n }\n case \"ReasoningDelta\": {\n return output.delta\n }\n case \"ReasoningEnd\": {\n return \"\\n\\n\"\n }\n case \"ScriptStart\": {\n return `${prefix}${chalkScriptHeading(`${scriptIcon} Executing script`)}\\n\\n`\n }\n case \"ScriptDelta\": {\n return chalk.dim(output.delta)\n }\n case \"ScriptEnd\": {\n return \"\\n\\n\"\n }\n case \"ScriptOutput\": {\n return `${prefix}${chalkScriptHeading(`${scriptIcon} Script output`)}\\n\\n${chalk.dim(truncate(output.output))}\\n\\n`\n }\n case \"ErrorRetry\": {\n return `${prefix}${chalk.red(`Error: ${output.error.reason._tag}. Retrying...`)}\\n\\n${chalk.dim(Cause.pretty(Cause.fail(output.error)))}\\n\\n`\n }\n case \"Usage\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Usage:`)} ${numberFormat.format(output.contextTokens)} context / ${numberFormat.format(output.inputTokens)} input / ${numberFormat.format(output.outputTokens)} output\\n\\n`\n }\n case \"ExecuteOutputCapped\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Output capped:`)} ${numberFormat.format(output.charsBefore)} chars reduced to ${numberFormat.format(output.charsAfter)}\\n\\n`\n }\n case \"CompactionStarted\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Compacting context (${output.reason})...`)}\\n\\n`\n }\n case \"CompactionEnded\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Context compacted (${output.reason}):`)} ~${numberFormat.format(output.tokensBefore)} tokens to ~${numberFormat.format(output.tokensAfter)}\\n\\n`\n }\n case \"SessionRestarted\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Session restarted (${output.reason}):`)} ${numberFormat.format(output.contextTokens)} context tokens resent, ${numberFormat.format(output.cacheWrite)} cache write\\n\\n`\n }\n case \"EnvironmentUpdated\": {\n return `${prefix}${chalkInfoHeading(`${infoIcon} Environment update:`)}\\n\\n${chalk.dim(truncate(output.update))}\\n\\n`\n }\n case \"HistoryAppended\":\n case \"HistoryReplaced\": {\n return \"\"\n }\n }\n }),\n Stream.catchIf(\n (e): e is AgentFinished => Predicate.isTagged(e, \"AgentFinished\"),\n (finished) =>\n Stream.succeed(\n `\\n${chalk.bold.green(`${doneIcon} Task complete:`)}\\n\\n${(finished as AgentFinished).summary}`,\n ),\n (e) => Stream.die(e),\n ),\n )\n}\n\nconst promptToString = (prompt: Prompt.Prompt): string => {\n let textParts: Array<string> = []\n for (const message of prompt.content) {\n if (message.role !== \"user\") continue\n let content = message.content\n for (const part of content) {\n if (part.type !== \"text\") continue\n textParts.push(part.text)\n }\n }\n return textParts.join(\"\\n\")\n}\n\nconst numberFormat = new Intl.NumberFormat()\n\nconst chalkAgentHeading = chalk.bold.green\nconst chalkScriptHeading = chalk.bold.blue\nconst chalkSubagentHeading = chalk.bold.magenta\nconst chalkReasoningHeading = chalk.bold.yellow\nconst chalkInfoHeading = chalk.bold.cyan\n\nconst scriptIcon = \"\\u{f0bc1}\"\nconst subagentIcon = \"\\u{ee0d} \"\nconst thinkingIcon = \"\\u{f07f6}\"\nconst doneIcon = \"\\u{eab2}\"\nconst infoIcon = \"\\u{f05a}\"\n\n/**\n * @since 1.0.0\n * @category Muxer\n */\nexport class Muxer extends Context.Service<\n Muxer,\n {\n add<E, R>(\n agent: Stream.Stream<Output, AgentFinished | E, R>,\n ): Effect.Effect<void, never, R>\n readonly output: Stream.Stream<string>\n }\n>()(\"clanka/OutputFormatter/Muxer\") {}\n\n/**\n * @since 1.0.0\n * @category Muxer\n */\nexport const layerMuxer = (formatter: OutputFormatter) =>\n Layer.effect(\n Muxer,\n Effect.gen(function* () {\n const scope = yield* Effect.scope\n const output = yield* PubSub.unbounded<string>()\n let agentCount = 0\n let currentAgentId: number | null = null\n const semaphore = Semaphore.makeUnsafe(1)\n\n return Muxer.of({\n add(stream) {\n const id = ++agentCount\n return stream.pipe(\n Stream.tap(\n Effect.fnUntraced(function* (part_) {\n if (currentAgentId === null || id !== currentAgentId) {\n yield* semaphore.take(1)\n }\n const part = part_._tag === \"SubagentPart\" ? part_.part : part_\n switch (part._tag) {\n case \"ReasoningStart\":\n case \"ScriptStart\": {\n currentAgentId = id\n break\n }\n case \"ScriptDelta\":\n case \"ReasoningDelta\": {\n break\n }\n default: {\n currentAgentId = null\n break\n }\n }\n if (id !== currentAgentId) {\n yield* semaphore.release(1)\n }\n }),\n ),\n formatter,\n Stream.runIntoPubSub(output),\n Effect.onExit(() => {\n if (currentAgentId !== id) return Effect.void\n currentAgentId = null\n return semaphore.release(1)\n }),\n Effect.forkIn(scope),\n Effect.asVoid,\n )\n },\n output: Stream.fromPubSub(output),\n })\n }),\n )\n"],"ignoreList":[0,1,2,3],"mappings":";;;;;;AACA,SAAgB,iBAAiB,QAAQ,WAAW,SAAS;CAC5D,IAAI,QAAQ,OAAO,QAAQ,SAAS;CACpC,IAAI,UAAU,CAAA,GACb,OAAO;CAGR,MAAM,kBAAkB,UAAU;CAClC,IAAI,WAAW;CACf,IAAI,cAAc;CAClB,GAAG;EACF,eAAe,OAA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@@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $a as succeed$1, $s as optimize, As as assignProperty$1, Bc as pipeArguments, Bs as formatPath, Cc as isTagged, Co as get, Ea as fromIterable$1, Fa as makeEquivalence$3, Fc as memoize, Fs as NodeInspectSymbol, Gi as iterateConcurrent, Go as isNone, Gs as asEquivalence, H as fnUntracedEager, Ho as getOrNull, Hs as currentFiberTypeId, Ia as map$3, Ic as memoizeIdempotent, Jo as liftThrowable, Js as symbol$2, Ka as flatMap$1, Ki as iterateEager, Ko as isOption, Kt as succeed$3, L as flatMap, Lo as flatten, Ls as format$1, M as fail$2, Mc as dual, Ms as setStackTraceLimit, Ns as BaseProto, O as die, Oi as currentTimeMillis$1, P as failCauseSync, Pc as identity, Po as filter, Qa as match$1, Qs as number$1, R as flatMapEager, Rc as Class$2, Ro as fromNullOr, Rs as formatDate, Sc as isSymbol, So as empty$3, Tc as isUnknown, Us as redact$2, Vs as formatPropertyKey, Wa as fail$1, Ws as symbolRedactable, X as fromResult, Xa as isSuccess$1, Xi as map$2, Xn as IllegalArgumentError, Xo as match, Xs as combine, Ya as isFailure, Yo as map$4, Ys as array, Yt as suspend$1, Za as map$6, Zi as monotonicTimeNanos$1, Zo as none, Zs as hash, _a as append, _c as isNumber, _o as toSeconds, _s as Error$3, ac as hasProperty, as as String$4, ba as empty$4, bc as isPropertyKey, bi as void_$1, br as makeInterruptReason, bs as args, cc as isError, co as isFinite$2, cr as fromReasons, cs as isLessThan$1, dc as isNever$1, dn as void_$2, do as millis, dt as mapEager, ea as resolveConcurrency, es as some, fa as encode$1, fi as fail$3, fr as isCause, fs as Tuple$1, gi as isExit, go as toMillis, gr as isReason, ho as seconds, hr as isFailReason, ic as symbol$1, in as try_, io as fromInputUnsafe, is as Number$4, j as exit, ja as isReadonlyArrayNonEmpty, js as getStackTraceLimit, ka as isArrayNonEmpty, ki as effectIsExit, ks as assignProperties, lc as isFunction, ls as isLessThanOrEqualTo$1, m as catchCause, mc as isNotUndefined, mo as negativeInfinity, ms as strictEqual, nc as structure, ns as BigInt$4, oc as isBigInt, oo as infinity, os as isGreaterThan$1, pc as isNotNullish, pi as failCause, po as nanos, ps as make$9, pt as mapErrorEager, qa as getOrThrow, qn as remainder, qo as isSome, qs as equals, qt as succeedNone, rc as structureKeys, rn as tryPromise, rr as die$1, rs as Date$3, sc as isBoolean, so as isDuration, ss as isGreaterThanOrEqualTo$1, tc as string$1, us as make$10, ut as mapBothEager, vc as isObject, vi as isSuccess, vr as makeDieReason, vs as PipeInspectableProto, xc as isString$1, xi as ClockRef, xr as map$5, ya as dedupe, yc as isObjectKeyword, yi as succeed$2, yo as Reference, yr as makeFailReason, ys as TaggedError$2, zc as Prototype, zs as formatJson, zt as runSyncExit } from "./Effect-5XYMLOiB.mjs";
|
|
2
2
|
// node_modules/.pnpm/effect@4.1.1/node_modules/effect/dist/Tuple.js
|
|
3
3
|
const makeEquivalence$2 = Tuple$1;
|
|
4
4
|
// node_modules/.pnpm/effect@4.1.1/node_modules/effect/dist/Record.js
|
|
@@ -4981,6 +4981,9 @@ function toRepresentations(asts, options) {
|
|
|
4981
4981
|
}
|
|
4982
4982
|
}
|
|
4983
4983
|
// node_modules/.pnpm/effect@4.1.1/node_modules/effect/dist/Struct.js
|
|
4984
|
+
const pick = dual(2, (self, keys) => {
|
|
4985
|
+
return buildStruct(self, (k, v) => hasPropertyKey(keys, k) ? [k, v] : void 0);
|
|
4986
|
+
});
|
|
4984
4987
|
const omit = dual(2, (self, keys) => {
|
|
4985
4988
|
return buildStruct(self, (k, v) => !hasPropertyKey(keys, k) ? [k, v] : void 0);
|
|
4986
4989
|
});
|
|
@@ -7331,6 +7334,6 @@ const MutableJson = make(annotate(MutableJson$1, { toCode: () => ({
|
|
|
7331
7334
|
runtime: "Schema.MutableJson",
|
|
7332
7335
|
Type: "Schema.MutableJson"
|
|
7333
7336
|
}) }));
|
|
7334
|
-
export { URLFromString as $,
|
|
7337
|
+
export { URLFromString as $, optionalKey$1 as $n, make$7 as $r, isPattern as $t, Null as A, escapeToken as An, fromBody as Ar, isGreaterThan as At, String$1 as B, Objects as Bn, retryAfterDelay as Br, isLessThanDate as Bt, Literal as C, evolve as Cn, jsonSchemaAnnotationKeys as Cr, isBetweenCodePoints as Ct, Never as D, fromSchemaDraft07 as Dn, redactUrl as Dr, isBetweenSize as Dt, Natural as E, errorWithPath as En, fromInput as Er, isBetweenProperties as Et, OptionFromOptional as F, encodeEffect$1 as Fn, fromRecordUnsafe as Fr, isGreaterThanOrEqualToDate as Ft, TaggedClass as G, decodeTo$1 as Gn, formatIso as Gr, isMaxLength as Gt, Struct as H, Suspend as Hn, setAll$1 as Hr, isLessThanOrEqualToBigInt as Ht, Record as I, Arrays as In, isRedactedName$1 as Ir, isIncluding as It, TaggedUnion as J, isJson as Jn, now as Jr, isMinCodePoints as Jt, TaggedError as K, defaultParseOptions as Kn, formatIsoDate as Kr, isMaxProperties as Kt, Redacted as L, Filter as Ln, merge as Lr, isInt as Lt, Number$1 as M, getSubschemaKind as Mn, CurrentRedactedNames$1 as Mr, isGreaterThanDate as Mt, Option as N, decodeEffect$1 as Nn, empty$1 as Nr, isGreaterThanOrEqualTo as Nt, NonEmptyArray as O, fromSchemaDraft2020_12 as On, setAll as Or, isEndingWith as Ot, OptionFromNullOr as P, decodeUnknownEffect$1 as Pn, fromInput$1 as Pr, isGreaterThanOrEqualToBigInt as Pt, URL$1 as Q, null_ as Qn, isRedacted as Qr, isMultipleOf as Qt, RedactedFromValue as R, FilterGroup as Rn, parseRetryAfter as Rr, isLessThan as Rt, JsonObject as S, withDecodingDefaultKey as Sn, annotationExcludedKeys as Sr, isBetweenBigInt as St, MutableJson as T, pick as Tn, empty as Tr, isBetweenLength as Tt, StructWithRest as U, Union$1 as Un, empty$2 as Ur, isLessThanOrEqualToDate as Ut, StringForLiteralAutocomplete as V, PropertySignature as Vn, set as Vr, isLessThanOrEqualTo as Vt, Symbol$1 as W, applyToSelfOrLastLinkEncoding as Wn, fromSetCookie as Wr, isMaxCodePoints as Wt, Tuple as X, isOptional as Xn, decode as Xr, isMinProperties as Xt, TrueLiterals as Y, isNever as Yn, removeTime as Yr, isMinLength as Yt, TupleWithRest as Z, mapOrSame as Zn, encode as Zr, isMinSize as Zt, Exit as _, toEncoded as _n, transform$1 as _r, encodeUnknownEffect as _t, BooleanFromBit as a, EncodingError as ai, isUnique as an, toEncoded$1 as ar, Void as at, Int as b, withConstructorDefault as bn, InvalidValue as br, is as bt, Date$1 as c, TaggedError$1 as ci, makeFilter as cn, Transformation as cr, declare as ct, DateTimeUtcFromMillis as d, map$1 as di, optional as dn, transformEffect as dr, decodeTo as dt, value as ei, isPropertyNames as en, replaceChecks as er, Uint8Array$1 as et, DateTimeUtcFromString as f, optionalKey as fn, transformOptional as fr, decodeUnknownEffect as ft, Error$1 as g, toCodecStringTree as gn, passthroughSubtype as gr, encodeTo as gt, DurationFromMillis as h, toCodecJson as hn, passthrough$1 as hr, encodeEffect as ht, Boolean as i, monotonicTimeNanos as ii, isUUID as in, string as ir, Unknown as it, NullOr as j, parseUriFragment as jn, unwrap as jr, isGreaterThanBigInt as jt, NonEmptyString as k, getReferenceKey as kn, toString as kr, isFinite as kt, DateTimeUtc as l, taggedEnum as li, makeFilterGroup as ln, passthrough as lr, decodeEffect as lt, Duration as m, tag as mn, map as mr, decodeUnknownSync as mt, ArraySchema as n, Clock as ni, isSchemaError as nn, resolveDescription as nr, UndefinedOr as nt, BooleanLiterals as o, Error$2 as oi, link as on, toType$1 as or, brand as ot, Defect as p, suspend as pn, dateTimeUtcFromInput$1 as pr, decodeUnknownOption as pt, TaggedStruct as q, getIndexSignatureKeys as qn, fromDateUnsafe as qr, isMaxSize as qt, BigInt$1 as r, currentTimeMillis as ri, isStartingWith as rn, resolveIdentifier as rr, Union as rt, Class as s, TaggedClass$1 as si, make as sn, unknown as sr, check as st, Any as t, stringOrRedacted as ti, isSchema as tn, resolveAt as tr, Uint8ArrayFromBase64 as tt, DateTimeUtcFromDate as u, assignProperty as ui, mutable as un, transform as ur, decodeSync as ut, FalseLiterals as v, toJsonSchemaDocument as vn, transformEffect$1 as vr, fromJsonString as vt, Literals as w, omit as wn, CurrentRedactedNames as wr, isBetweenDate as wt, Json as x, withDecodingDefault as xn, Pointer as xr, isBetween as xt, Finite as y, toType as yn, transformOptional$1 as yr, instanceOf as yt, SchemaError as z, Literal$1 as zn, remove as zr, isLessThanBigInt as zt };
|
|
7335
7338
|
|
|
7336
|
-
//# sourceMappingURL=Schema-
|
|
7339
|
+
//# sourceMappingURL=Schema-Box_9VZG.mjs.map
|