clanka 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Acp.d.ts.map +1 -1
- package/dist/Acp.js +3 -3
- package/dist/Acp.js.map +1 -1
- package/dist/Acp.test.js +6 -5
- package/dist/Acp.test.js.map +1 -1
- package/dist/SemanticSearch.js +1 -1
- package/dist/SemanticSearch.js.map +1 -1
- package/dist/bin/{Effect-DvI8YVcR.mjs → Effect-BCeySOy1.mjs} +248 -247
- package/dist/bin/Effect-BCeySOy1.mjs.map +1 -0
- package/dist/bin/{McpClient-CM7u8ZVd.mjs → McpClient-DP4jlaD1.mjs} +3 -3
- package/dist/bin/{McpClient-CM7u8ZVd.mjs.map → McpClient-DP4jlaD1.mjs.map} +1 -1
- package/dist/bin/{OutputFormatter-BpggeGvI.mjs → OutputFormatter-Ch8yFytV.mjs} +3 -3
- package/dist/bin/{OutputFormatter-BpggeGvI.mjs.map → OutputFormatter-Ch8yFytV.mjs.map} +1 -1
- package/dist/bin/{Schema-DyJ738Wp.mjs → Schema-C9JQ5hI0.mjs} +36 -36
- package/dist/bin/Schema-C9JQ5hI0.mjs.map +1 -0
- package/dist/bin/{SemanticSearch-BHUGFT1y.mjs → SemanticSearch-BJGnYhFt.mjs} +19 -19
- package/dist/bin/{SemanticSearch-BHUGFT1y.mjs.map → SemanticSearch-BJGnYhFt.mjs.map} +1 -1
- package/dist/bin/{Stream-Dg7AGCgJ.mjs → Stream-CgH3SuLu.mjs} +16 -16
- package/dist/bin/{Stream-Dg7AGCgJ.mjs.map → Stream-CgH3SuLu.mjs.map} +1 -1
- package/dist/bin/cli.mjs +191 -191
- package/dist/bin/cli.mjs.map +1 -1
- package/package.json +7 -7
- package/src/Acp.test.ts +6 -5
- package/src/Acp.ts +6 -3
- package/src/SemanticSearch.ts +1 -1
- package/dist/bin/Effect-DvI8YVcR.mjs.map +0 -1
- package/dist/bin/Schema-DyJ738Wp.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as fnUntraced, G as forkIn, In as fail, It as scope, Os as identity, Ta as Service, Y as gen, Zn as pretty$1, _s as isTagged, _t as onExit, er as effect, rn as void_, u as asVoid } from "./Effect-
|
|
2
|
-
import { $ as tap, C as fromPubSub, O as map, Y as succeed, c as die, lt as makeUnsafe, q as runIntoPubSub, r as catchIf, wt as unbounded } from "./Stream-
|
|
1
|
+
import { B as fnUntraced, G as forkIn, In as fail, It as scope, Os as identity, Ta as Service, Y as gen, Zn as pretty$1, _s as isTagged, _t as onExit, er as effect, rn as void_, u as asVoid } from "./Effect-BCeySOy1.mjs";
|
|
2
|
+
import { $ as tap, C as fromPubSub, O as map, Y as succeed, c as die, lt as makeUnsafe, q as runIntoPubSub, r as catchIf, wt as unbounded } from "./Stream-CgH3SuLu.mjs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import tty from "node:tty";
|
|
@@ -572,4 +572,4 @@ const layerMuxer = (formatter) => effect(Muxer, gen(function* () {
|
|
|
572
572
|
//#endregion
|
|
573
573
|
export { Muxer, layerMuxer, pretty };
|
|
574
574
|
|
|
575
|
-
//# sourceMappingURL=OutputFormatter-
|
|
575
|
+
//# sourceMappingURL=OutputFormatter-Ch8yFytV.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutputFormatter-BpggeGvI.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.0/node_modules/chalk/source/utilities.js","../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/vendor/ansi-styles/index.js","../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/vendor/supports-color/index.js","../../node_modules/.pnpm/chalk@6.0.0/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\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 return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} starting (${output.modelAndProvider})`)}\n\n${chalk.dim(output.prompt)}\\n\\n`\n }\n case \"SubagentComplete\": {\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} complete`)}\n\n${output.summary}\\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 }\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"],"x_google_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;EACtC,eAAe,OAAO,MAAM,UAAW,UAAU,QAAQ,IAAI,KAAM,IAAI,UAAU,UAAU,SAAS,QAAQ;EAC5G,WAAW,QAAQ;EACnB,QAAQ,OAAO,QAAQ,MAAM,QAAQ;CACtC,SAAS,UAAU,CAAA;CAEnB,eAAe,OAAO,MA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OAAK,GACnBU,MACF;EACF;EACA,QAAQC,WAAkB,MAAM;CAClC,CAAC;AACH,CAAC,CACH"}
|
|
1
|
+
{"version":3,"file":"OutputFormatter-Ch8yFytV.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.0/node_modules/chalk/source/utilities.js","../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/vendor/ansi-styles/index.js","../../node_modules/.pnpm/chalk@6.0.0/node_modules/chalk/source/vendor/supports-color/index.js","../../node_modules/.pnpm/chalk@6.0.0/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\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 return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} starting (${output.modelAndProvider})`)}\n\n${chalk.dim(output.prompt)}\\n\\n`\n }\n case \"SubagentComplete\": {\n return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} complete`)}\n\n${output.summary}\\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 }\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"],"x_google_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,I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O,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,8 +1,8 @@
|
|
|
1
|
-
import { $a as map$4, $o as symbol, Ao as assignProperty$1, As as memoizeIdempotent, Bo as formatPath, Br as succeed$2, Co as args, Es as dual, Fo as NodeInspectSymbol, Fr as failCause, Ft as runSyncExit, Gn as isReason, Go as equals, Ha as fromNullOr, Hr as ClockRef, Ht as succeedNone, I as flatMap, J as fromResult, Jn as makeFailReason, Jo as combine, Ka as getOrNull, Ki as makeEquivalence$3, Ko as symbol$1, L as flatMapEager, Lo as format$1, Lr as isExit, M as fail$2, Mi as append, Mo as setStackTraceLimit, Ms as Class$2, No as BaseProto, Ns as Prototype, O as die, On as IllegalArgumentError, Os as identity, P as failCauseSync, Pi as empty$2, Pn as die$1, Pr as fail$3, Ps as pipeArguments, Qa as liftThrowable, Ra as filter, Ro as formatDate, Sa as toSeconds, So as TaggedError$2, Ui as isReadonlyArrayNonEmpty, Un as isCause, V as fnUntracedEager, Va as flatten, Vi as isArrayNonEmpty, Vo as formatPropertyKey, Vr as void_$1, Vt as succeed$3, Wn as isFailReason, Xa as isOption, Xn as map$5, Xo as number$1, Xr as effectIsExit, Xt as try_, Ya as isNone, Yn as makeInterruptReason, Yo as hash, Yr as currentTimeMillis$1, Yt as tryPromise, Za as isSome, Zo as string$1, _i as map$2, _o as strictEqual, _s as isTagged, ba as seconds, bi as resolveConcurrency, bo as Error$3, ca as succeed$1, co as Number$4, cs as isNotNullish, ct as mapEager, da as fromInputUnsafe, do as isGreaterThanOrEqualTo$1, ea as fail$1, eo as match, es as hasProperty, fa as infinity, fi as iterateConcurrent, fo as isLessThan$1, fs as isNumber, ga as millis, go as make$8, gs as isString, ho as Tuple$1, hs as isPropertyKey, io as some, is as isFunction, j as exit, jo as getStackTraceLimit, ko as assignProperties, ks as memoize, lo as String$4, ls as isNotUndefined, m as catchCause, ma as isFinite$2, mo as make$9, ms as isObjectKeyword, na as getOrThrow, ns as isBoolean, oo as BigInt$4, os as isNever$1, pa as isDuration, pi as iterateEager, po as isLessThanOrEqualTo$1, ps as isObject, qi as map$3, qn as makeDieReason, qo as array, rn as void_$2, rs as isError, sa as match$1, so as Date$3, st as mapBothEager, to as none, ts as isBigInt, uo as isGreaterThan$1, ut as mapErrorEager, va as nanos, xo as PipeInspectableProto, ya as negativeInfinity, ys as isUnknown, zi as fromIterable$1, zn as fromReasons, zo as formatJson, zr as isSuccess } from "./Effect-
|
|
2
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1
|
+
import { $a as map$4, $o as symbol, Ao as assignProperty$1, As as memoizeIdempotent, Bo as formatPath, Br as succeed$2, Co as args, Es as dual, Fo as NodeInspectSymbol, Fr as failCause, Ft as runSyncExit, Gn as isReason, Go as equals, Ha as fromNullOr, Hr as ClockRef, Ht as succeedNone, I as flatMap, J as fromResult, Jn as makeFailReason, Jo as combine, Ka as getOrNull, Ki as makeEquivalence$3, Ko as symbol$1, L as flatMapEager, Lo as format$1, Lr as isExit, M as fail$2, Mi as append, Mo as setStackTraceLimit, Ms as Class$2, No as BaseProto, Ns as Prototype, O as die, On as IllegalArgumentError, Os as identity, P as failCauseSync, Pi as empty$2, Pn as die$1, Pr as fail$3, Ps as pipeArguments, Qa as liftThrowable, Ra as filter, Ro as formatDate, Sa as toSeconds, So as TaggedError$2, Ui as isReadonlyArrayNonEmpty, Un as isCause, V as fnUntracedEager, Va as flatten, Vi as isArrayNonEmpty, Vo as formatPropertyKey, Vr as void_$1, Vt as succeed$3, Wn as isFailReason, Xa as isOption, Xn as map$5, Xo as number$1, Xr as effectIsExit, Xt as try_, Ya as isNone, Yn as makeInterruptReason, Yo as hash, Yr as currentTimeMillis$1, Yt as tryPromise, Za as isSome, Zo as string$1, _i as map$2, _o as strictEqual, _s as isTagged, ba as seconds, bi as resolveConcurrency, bo as Error$3, ca as succeed$1, co as Number$4, cs as isNotNullish, ct as mapEager, da as fromInputUnsafe, do as isGreaterThanOrEqualTo$1, ea as fail$1, eo as match, es as hasProperty, fa as infinity, fi as iterateConcurrent, fo as isLessThan$1, fs as isNumber, ga as millis, go as make$8, gs as isString, ho as Tuple$1, hs as isPropertyKey, io as some, is as isFunction, j as exit, jo as getStackTraceLimit, ko as assignProperties, ks as memoize, lo as String$4, ls as isNotUndefined, m as catchCause, ma as isFinite$2, mo as make$9, ms as isObjectKeyword, na as getOrThrow, ns as isBoolean, oo as BigInt$4, os as isNever$1, pa as isDuration, pi as iterateEager, po as isLessThanOrEqualTo$1, ps as isObject, qi as map$3, qn as makeDieReason, qo as array, rn as void_$2, rs as isError, sa as match$1, so as Date$3, st as mapBothEager, to as none, ts as isBigInt, uo as isGreaterThan$1, ut as mapErrorEager, va as nanos, xo as PipeInspectableProto, ya as negativeInfinity, ys as isUnknown, zi as fromIterable$1, zn as fromReasons, zo as formatJson, zr as isSuccess } from "./Effect-BCeySOy1.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Tuple.js
|
|
3
3
|
const makeEquivalence$2 = Tuple$1;
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
5
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Record.js
|
|
6
6
|
const has = dual(2, (self, key) => Object.hasOwn(self, key));
|
|
7
7
|
const map$1 = dual(2, (self, f) => {
|
|
8
8
|
const out = { ...self };
|
|
@@ -20,7 +20,7 @@ const makeEquivalence$1 = (equivalence) => {
|
|
|
20
20
|
return (self, that) => is(self, that) && is(that, self);
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
23
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Data.js
|
|
24
24
|
const Class$1 = class extends Class$2 {
|
|
25
25
|
constructor(props) {
|
|
26
26
|
super();
|
|
@@ -51,17 +51,17 @@ function taggedMatch() {
|
|
|
51
51
|
const Error$2 = Error$3;
|
|
52
52
|
const TaggedError$1 = TaggedError$2;
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
54
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/EncodingError.js
|
|
55
55
|
const EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
56
56
|
var EncodingError = class extends TaggedError$1("EncodingError") {
|
|
57
57
|
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
60
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Clock.js
|
|
61
61
|
const Clock = ClockRef;
|
|
62
62
|
const currentTimeMillis = currentTimeMillis$1;
|
|
63
63
|
//#endregion
|
|
64
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
64
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/dateTime.js
|
|
65
65
|
const TypeId$9 = "~effect/DateTime";
|
|
66
66
|
const TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
67
67
|
const Proto$3 = {
|
|
@@ -232,7 +232,7 @@ const formatIsoOffset = (self) => {
|
|
|
232
232
|
};
|
|
233
233
|
const formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
234
234
|
//#endregion
|
|
235
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
235
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/redacted.js
|
|
236
236
|
const redactedRegistry = new WeakMap();
|
|
237
237
|
const value$1 = (self) => {
|
|
238
238
|
if (redactedRegistry.has(self)) return redactedRegistry.get(self);
|
|
@@ -240,7 +240,7 @@ const value$1 = (self) => {
|
|
|
240
240
|
};
|
|
241
241
|
const stringOrRedacted = (val) => typeof val === "string" ? val : value$1(val);
|
|
242
242
|
//#endregion
|
|
243
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
243
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Redacted.js
|
|
244
244
|
const TypeId$8 = "~effect/Redacted";
|
|
245
245
|
const isRedacted = (u) => hasProperty(u, TypeId$8);
|
|
246
246
|
const make$6 = (value, options) => {
|
|
@@ -269,7 +269,7 @@ const Proto$2 = {
|
|
|
269
269
|
const value = value$1;
|
|
270
270
|
const makeEquivalence = (isEquivalent) => make$8((x, y) => isEquivalent(value(x), value(y)));
|
|
271
271
|
//#endregion
|
|
272
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
272
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/BigDecimal.js
|
|
273
273
|
const TypeId$7 = "~effect/BigDecimal";
|
|
274
274
|
const BigDecimalProto = {
|
|
275
275
|
[TypeId$7]: TypeId$7,
|
|
@@ -373,7 +373,7 @@ const toExponential = (n) => {
|
|
|
373
373
|
};
|
|
374
374
|
const isZero = (n) => n.value === bigint0;
|
|
375
375
|
//#endregion
|
|
376
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
376
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/DateTime.js
|
|
377
377
|
const isDateTime = isDateTime$1;
|
|
378
378
|
const isUtc = isUtc$1;
|
|
379
379
|
const fromDateUnsafe = fromDateUnsafe$1;
|
|
@@ -387,7 +387,7 @@ const removeTime = removeTime$1;
|
|
|
387
387
|
const formatIso = formatIso$1;
|
|
388
388
|
const formatIsoDate = formatIsoDate$1;
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
390
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/Base64.js
|
|
391
391
|
const encode = (input) => encodeBytes(typeof input === "string" ? encoder.encode(input) : input);
|
|
392
392
|
const decode = (str) => {
|
|
393
393
|
const stripped = stripCrlf(str);
|
|
@@ -458,7 +458,7 @@ const getCode = (charCode) => {
|
|
|
458
458
|
return codes[charCode];
|
|
459
459
|
};
|
|
460
460
|
//#endregion
|
|
461
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
461
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/Cookies.js
|
|
462
462
|
const TypeId$6 = "~effect/http/Cookies";
|
|
463
463
|
const isCookies = (u) => hasProperty(u, TypeId$6);
|
|
464
464
|
const CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
@@ -683,7 +683,7 @@ const tryDecodeURIComponent = (str) => {
|
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
685
|
//#endregion
|
|
686
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
686
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/UrlParams.js
|
|
687
687
|
const TypeId$5 = "~effect/http/UrlParams";
|
|
688
688
|
const isUrlParams = (u) => hasProperty(u, TypeId$5);
|
|
689
689
|
const Proto = {
|
|
@@ -757,7 +757,7 @@ const toRecord = (self) => {
|
|
|
757
757
|
};
|
|
758
758
|
const toReadonlyRecord = toRecord;
|
|
759
759
|
//#endregion
|
|
760
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
760
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/annotations.js
|
|
761
761
|
function resolve$1(ast) {
|
|
762
762
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
763
763
|
}
|
|
@@ -806,7 +806,7 @@ const annotationExcludedKeys = new Set([
|
|
|
806
806
|
"toCodecArbitrary"
|
|
807
807
|
]);
|
|
808
808
|
//#endregion
|
|
809
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
809
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/parser.js
|
|
810
810
|
const missing = Symbol();
|
|
811
811
|
const succeed = succeed$2;
|
|
812
812
|
const missingExit = succeed(missing);
|
|
@@ -814,7 +814,7 @@ const sameExit = succeed(missing);
|
|
|
814
814
|
const toOption = (value) => value === missing ? none() : some(value);
|
|
815
815
|
const fromOptionExit = (option) => option._tag === "None" ? missingExit : succeed(option.value);
|
|
816
816
|
//#endregion
|
|
817
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
817
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/SchemaIssue.js
|
|
818
818
|
const TypeId$4 = "~effect/SchemaIssue/Issue";
|
|
819
819
|
function isIssue(u) {
|
|
820
820
|
return hasProperty(u, TypeId$4) && u[TypeId$4] === TypeId$4;
|
|
@@ -1027,7 +1027,7 @@ function findMessage(issue) {
|
|
|
1027
1027
|
if (typeof message === "string") return message;
|
|
1028
1028
|
}
|
|
1029
1029
|
//#endregion
|
|
1030
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1030
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/cause.js
|
|
1031
1031
|
function getSchemaIssue(cause) {
|
|
1032
1032
|
let issue;
|
|
1033
1033
|
for (const reason of cause.reasons) {
|
|
@@ -1042,7 +1042,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
1042
1042
|
return issue;
|
|
1043
1043
|
}
|
|
1044
1044
|
//#endregion
|
|
1045
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1045
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/SchemaGetter.js
|
|
1046
1046
|
const runGetter = (self, input, options) => {
|
|
1047
1047
|
switch (self._tag) {
|
|
1048
1048
|
case "Passthrough": return succeed$3(input);
|
|
@@ -1170,7 +1170,7 @@ function dateTimeUtcFromInput$1() {
|
|
|
1170
1170
|
});
|
|
1171
1171
|
}
|
|
1172
1172
|
//#endregion
|
|
1173
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1173
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/SchemaTransformation.js
|
|
1174
1174
|
const Middleware = class extends Class$2 {
|
|
1175
1175
|
_tag = "Middleware";
|
|
1176
1176
|
decode;
|
|
@@ -1286,7 +1286,7 @@ function fromJsonString$1(options) {
|
|
|
1286
1286
|
return new Transformation(parseJson(options ?? {}), stringifyJson(options));
|
|
1287
1287
|
}
|
|
1288
1288
|
//#endregion
|
|
1289
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1289
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/SchemaAST.js
|
|
1290
1290
|
function makeGuard(tag) {
|
|
1291
1291
|
return (ast) => ast._tag === tag;
|
|
1292
1292
|
}
|
|
@@ -2784,7 +2784,7 @@ const StringTree = new Declaration([], () => (input, ast, options) => isStringTr
|
|
|
2784
2784
|
});
|
|
2785
2785
|
const unknownToStringTree = new Link(StringTree, passthrough());
|
|
2786
2786
|
//#endregion
|
|
2787
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2787
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/interpreter.js
|
|
2788
2788
|
const flatMapTransformation = (result, current, f) => result === sameExit ? f(current) : flatMapEager(result, f);
|
|
2789
2789
|
function compileTransformation(transformation) {
|
|
2790
2790
|
if (transformation._tag === "Middleware") return (result, current, options) => {
|
|
@@ -2916,7 +2916,7 @@ function compile(ast, compile, compileField, base, specialize) {
|
|
|
2916
2916
|
};
|
|
2917
2917
|
}
|
|
2918
2918
|
//#endregion
|
|
2919
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2919
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/compilerRegistry.js
|
|
2920
2920
|
const invalid = Symbol();
|
|
2921
2921
|
const cache = new WeakMap();
|
|
2922
2922
|
let compiler;
|
|
@@ -3004,7 +3004,7 @@ function resolve(ast) {
|
|
|
3004
3004
|
return entry;
|
|
3005
3005
|
}
|
|
3006
3006
|
//#endregion
|
|
3007
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3007
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/SchemaParser.js
|
|
3008
3008
|
function makeEffect(schema) {
|
|
3009
3009
|
const ast = schema.ast;
|
|
3010
3010
|
let parser;
|
|
@@ -3158,7 +3158,7 @@ function makeConstructorSync(ast) {
|
|
|
3158
3158
|
const normalCompiler = (ast) => resolve(ast).parser;
|
|
3159
3159
|
const constructorCompiler = (ast) => resolve(ast).makeEffect;
|
|
3160
3160
|
//#endregion
|
|
3161
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3161
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/make.js
|
|
3162
3162
|
const TypeId$1 = "~effect/Schema/Schema";
|
|
3163
3163
|
const SchemaProto = {
|
|
3164
3164
|
[TypeId$1]: TypeId$1,
|
|
@@ -3188,7 +3188,7 @@ function make$1(ast, options) {
|
|
|
3188
3188
|
return self;
|
|
3189
3189
|
}
|
|
3190
3190
|
//#endregion
|
|
3191
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3191
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/JsonPointer.js
|
|
3192
3192
|
function escapeToken(token) {
|
|
3193
3193
|
return token.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
3194
3194
|
}
|
|
@@ -3215,7 +3215,7 @@ function parseUriFragment(fragment) {
|
|
|
3215
3215
|
return pointer === void 0 ? void 0 : pointer.length === 0 ? [] : pointer.slice(1).split("/").map(unescapeToken);
|
|
3216
3216
|
}
|
|
3217
3217
|
//#endregion
|
|
3218
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3218
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/JsonSchema.js
|
|
3219
3219
|
function getReferenceKey($ref) {
|
|
3220
3220
|
const path = $ref.startsWith("#") ? parseUriFragment($ref) : void 0;
|
|
3221
3221
|
return path !== void 0 && path.length === 2 && path[0] === "$defs" ? path[1] : void 0;
|
|
@@ -3311,7 +3311,7 @@ const OPEN_API_30_TO_2020_COLLISIONS = [
|
|
|
3311
3311
|
"then"
|
|
3312
3312
|
];
|
|
3313
3313
|
//#endregion
|
|
3314
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3314
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/toCodec.js
|
|
3315
3315
|
function toCodecJson$1(schema) {
|
|
3316
3316
|
return make$1(toCodecJsonAST(schema.ast), { schema });
|
|
3317
3317
|
}
|
|
@@ -3446,17 +3446,17 @@ const toCodecStringTreeAST = applyToSelfOrLastLinkEncodingIdempotent((ast) => {
|
|
|
3446
3446
|
return out;
|
|
3447
3447
|
}, { stopAt: isCodecArrayFromSingleLink });
|
|
3448
3448
|
//#endregion
|
|
3449
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3449
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/RegExp.js
|
|
3450
3450
|
const RegExp$1 = globalThis.RegExp;
|
|
3451
3451
|
const escape = (string) => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
3452
3452
|
//#endregion
|
|
3453
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3453
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/errors.js
|
|
3454
3454
|
function errorWithPath(message, path) {
|
|
3455
3455
|
if (path.length > 0) message += `\n at ${formatPath(path)}`;
|
|
3456
3456
|
return new Error(message);
|
|
3457
3457
|
}
|
|
3458
3458
|
//#endregion
|
|
3459
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3459
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
|
|
3460
3460
|
function formatDefinitionReference(key) {
|
|
3461
3461
|
return `#/$defs/${formatUriFragmentToken(key)}`;
|
|
3462
3462
|
}
|
|
@@ -3963,7 +3963,7 @@ function toJsonSchemaDocument$1(document, options) {
|
|
|
3963
3963
|
};
|
|
3964
3964
|
}
|
|
3965
3965
|
//#endregion
|
|
3966
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3966
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schema/toRepresentation.js
|
|
3967
3967
|
const defaultReferencePolicy = ({ identifier }) => identifier;
|
|
3968
3968
|
function annotationsField(annotations) {
|
|
3969
3969
|
return annotations === void 0 ? void 0 : { annotations };
|
|
@@ -4227,7 +4227,7 @@ function toRepresentations(asts, options) {
|
|
|
4227
4227
|
}
|
|
4228
4228
|
}
|
|
4229
4229
|
//#endregion
|
|
4230
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
4230
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Struct.js
|
|
4231
4231
|
const omit = dual(2, (self, keys) => {
|
|
4232
4232
|
return buildStruct(self, (k, v) => !hasPropertyKey(keys, k) ? [k, v] : void 0);
|
|
4233
4233
|
});
|
|
@@ -4251,13 +4251,13 @@ function buildStruct(source, f) {
|
|
|
4251
4251
|
return out;
|
|
4252
4252
|
}
|
|
4253
4253
|
//#endregion
|
|
4254
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
4254
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schemaError.js
|
|
4255
4255
|
const SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
4256
4256
|
function isSchemaError$1(u) {
|
|
4257
4257
|
return hasProperty(u, "~effect/Schema/SchemaError") && u["~effect/Schema/SchemaError"] === "~effect/Schema/SchemaError";
|
|
4258
4258
|
}
|
|
4259
4259
|
//#endregion
|
|
4260
|
-
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
4260
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Schema.js
|
|
4261
4261
|
const TypeId = TypeId$1;
|
|
4262
4262
|
function declareConstructor() {
|
|
4263
4263
|
return (typeParameters, run, annotations) => {
|
|
@@ -5785,4 +5785,4 @@ const MutableJson = make(annotate(MutableJson$1, { toCode: () => ({
|
|
|
5785
5785
|
//#endregion
|
|
5786
5786
|
export { declare as $, Union$1 as $t, OptionFromNullOr as A, toString as An, tag as At, TaggedUnion as B, isRedacted as Bn, omit as Bt, Never as C, transform$1 as Cn, isSchemaError as Ct, NullOr as D, empty as Dn, mutable as Dt, Null as E, Pointer as En, makeFilterGroup as Et, String$1 as F, formatIso as Fn, toType as Ft, Uint8Array$1 as G, EncodingError as Gn, encodeEffect$1 as Gt, Tuple as H, value as Hn, _is as Ht, Struct as I, formatIsoDate as In, withConstructorDefault as It, Union as J, TaggedError$1 as Jn, FilterGroup as Jt, Uint8ArrayFromBase64 as K, Error$2 as Kn, Arrays as Kt, StructWithRest as L, fromDateUnsafe as Ln, withDecodingDefault as Lt, Record as M, fromSetCookie as Mn, toCodecStringTree as Mt, Redacted as N, decode as Nn, toEncoded as Nt, Number$1 as O, fromInput as On, optional as Ot, SchemaError as P, encode as Pn, toJsonSchemaDocument as Pt, check as Q, map$1 as Qn, Suspend as Qt, TaggedClass as R, now as Rn, withDecodingDefaultKey as Rt, Natural as S, passthrough$1 as Sn, isSchema as St, NonEmptyString as T, InvalidValue as Tn, makeFilter as Tt, URL$1 as U, stringOrRedacted as Un, decodeEffect$1 as Ut, TrueLiterals as V, make$6 as Vn, getReferenceKey as Vt, URLFromString as W, Clock as Wn, decodeUnknownEffect$1 as Wt, Void as X, assignProperty as Xn, Objects as Xt, Unknown as Y, taggedEnum as Yn, Literal$1 as Yt, brand as Z, makeEquivalence$1 as Zn, PropertySignature as Zt, Int as _, transform as _n, isMaxLength as _t, BooleanLiterals as a, null_ as an, decodeUnknownSync as at, Literals as b, dateTimeUtcFromInput$1 as bn, isPattern as bt, DateTimeUtcFromDate as c, resolveAt as cn, encodeUnknownEffect as ct, Defect as d, string as dn, is as dt, applyToSelfOrLastLinkEncoding as en, decodeEffect as et, Duration as f, toEncoded$1 as fn, isFinite as ft, Finite as g, passthrough as gn, isLessThanOrEqualTo as gt, FalseLiterals as h, Transformation as hn, isInt as ht, BooleanFromBit as i, mapOrSame as in, decodeUnknownOption as it, OptionFromOptional as j, empty$1 as jn, toCodecJson as jt, Option as k, setAll as kn, optionalKey as kt, DateTimeUtcFromMillis as l, resolveDescription as ln, fromJsonString as lt, Exit as m, unknown as mn, isGreaterThanOrEqualTo as mt, ArraySchema as n, isNever as nn, decodeTo as nt, Class as o, optionalKey$1 as on, encodeEffect as ot, Error$1 as p, toType$1 as pn, isGreaterThan as pt, UndefinedOr as q, TaggedClass$1 as qn, Filter as qt, Boolean as r, isOptional as rn, decodeUnknownEffect as rt, DateTimeUtc as s, replaceChecks as sn, encodeTo as st, Any as t, decodeTo$1 as tn, decodeSync as tt, DateTimeUtcFromString as u, resolveIdentifier as un, instanceOf as ut, Json as v, transformEffect as vn, isMaxProperties as vt, NonEmptyArray as w, transformEffect$1 as wn, make as wt, MutableJson as x, map as xn, isPropertyNames as xt, Literal as y, transformOptional as yn, isMinLength as yt, TaggedError as z, removeTime as zn, evolve as zt };
|
|
5787
5787
|
|
|
5788
|
-
//# sourceMappingURL=Schema-
|
|
5788
|
+
//# sourceMappingURL=Schema-C9JQ5hI0.mjs.map
|