🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/cli-linux-arm64

Package Overview
Dependencies
Maintainers
2
Versions
2382
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/cli-linux-arm64 - npm Package Compare versions

Comparing version
0.0.0-beta-202607232057
to
0.0.0-beta-202607240139
+10
bin/chunk-1c965ppn.js.map
{
"version": 3,
"sources": ["../../node_modules/.bun/p-map@7.0.6/node_modules/p-map/index.js"],
"sourcesContent": [
"export default async function pMap(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tstopOnError = true,\n\t\tsignal,\n\t} = {},\n) {\n\treturn new Promise((resolve_, reject_) => {\n\t\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t\t}\n\n\t\tif (typeof mapper !== 'function') {\n\t\t\tthrow new TypeError('Mapper function is required');\n\t\t}\n\n\t\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t\t}\n\n\t\tconst result = [];\n\t\tconst errors = [];\n\t\tconst skippedIndexesMap = new Map();\n\t\tlet isRejected = false;\n\t\tlet isResolved = false;\n\t\tlet isIterableDone = false;\n\t\tlet resolvingCount = 0;\n\t\tlet currentIndex = 0;\n\t\tconst iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n\t\tconst signalListener = () => {\n\t\t\treject(signal.reason);\n\t\t};\n\n\t\tconst cleanup = () => {\n\t\t\tsignal?.removeEventListener('abort', signalListener);\n\t\t};\n\n\t\tconst resolve = value => {\n\t\t\tresolve_(value);\n\t\t\tcleanup();\n\t\t};\n\n\t\tconst reject = reason => {\n\t\t\tisRejected = true;\n\t\t\tisResolved = true;\n\t\t\treject_(reason);\n\t\t\tcleanup();\n\t\t};\n\n\t\tif (signal) {\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(signal.reason);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', signalListener, {once: true});\n\t\t}\n\n\t\tconst next = async () => {\n\t\t\tif (isResolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nextItem = await iterator.next();\n\n\t\t\tconst index = currentIndex;\n\t\t\tcurrentIndex++;\n\n\t\t\t// Note: `iterator.next()` can be called many times in parallel.\n\t\t\t// This can cause multiple calls to this `next()` function to\n\t\t\t// receive a `nextItem` with `done === true`.\n\t\t\t// The shutdown logic that rejects/resolves must be protected\n\t\t\t// so it runs only one time as the `skippedIndex` logic is\n\t\t\t// non-idempotent.\n\t\t\tif (nextItem.done) {\n\t\t\t\tisIterableDone = true;\n\n\t\t\t\tif (resolvingCount === 0 && !isResolved) {\n\t\t\t\t\tif (!stopOnError && errors.length > 0) {\n\t\t\t\t\t\treject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tisResolved = true;\n\n\t\t\t\t\tif (skippedIndexesMap.size === 0) {\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst pureResult = [];\n\n\t\t\t\t\t// Support multiple `pMapSkip`'s.\n\t\t\t\t\tfor (const [index, value] of result.entries()) {\n\t\t\t\t\t\tif (skippedIndexesMap.get(index) === pMapSkip) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpureResult.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(pureResult);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolvingCount++;\n\n\t\t\t// Intentionally detached\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst element = await nextItem.value;\n\n\t\t\t\t\tif (isResolved) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = await mapper(element, index);\n\n\t\t\t\t\t// Use Map to stage the index of the element.\n\t\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\t\tskippedIndexesMap.set(index, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[index] = value;\n\n\t\t\t\t\tresolvingCount--;\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (stopOnError) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors.push(error);\n\t\t\t\t\t\tresolvingCount--;\n\n\t\t\t\t\t\t// In that case we can't really continue regardless of `stopOnError` state\n\t\t\t\t\t\t// since an iterable is likely to continue throwing after it throws once.\n\t\t\t\t\t\t// If we continue calling `next()` indefinitely we will likely end up\n\t\t\t\t\t\t// in an infinite loop of failed iteration.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait next();\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t};\n\n\t\t// Create the concurrent runners in a detached (non-awaited)\n\t\t// promise. We need this so we can await the `next()` calls\n\t\t// to stop creating runners before hitting the concurrency limit\n\t\t// if the iterable has already been marked as done.\n\t\t// NOTE: We *must* do this for async iterators otherwise we'll spin up\n\t\t// infinite `next()` calls by default and never start the event loop.\n\t\t(async () => {\n\t\t\tfor (let index = 0; index < concurrency; index++) {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (isIterableDone || isRejected) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t});\n}\n\nexport function pMapIterable(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tbackpressure = concurrency,\n\t} = {},\n) {\n\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t}\n\n\tif (typeof mapper !== 'function') {\n\t\tthrow new TypeError('Mapper function is required');\n\t}\n\n\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t}\n\n\tif (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`backpressure\\` to be an integer from \\`concurrency\\` (${concurrency}) and up or \\`Infinity\\`, got \\`${backpressure}\\` (${typeof backpressure})`);\n\t}\n\n\treturn {\n\t\tasync * [Symbol.asyncIterator]() {\n\t\t\tconst iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();\n\n\t\t\tconst promises = [];\n\t\t\tlet pendingPromisesCount = 0;\n\t\t\tlet isDone = false;\n\t\t\tlet index = 0;\n\n\t\t\tfunction trySpawn() {\n\t\t\t\tif (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tpendingPromisesCount++;\n\n\t\t\t\tconst promise = (async () => {\n\t\t\t\t\tconst {done, value} = await iterator.next();\n\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tpendingPromisesCount--;\n\t\t\t\t\t\treturn {done: true};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Spawn if still below concurrency and backpressure limit\n\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst currentIndex = index++;\n\t\t\t\t\t\tconst returnValue = await mapper(await value, currentIndex);\n\n\t\t\t\t\t\tpendingPromisesCount--;\n\n\t\t\t\t\t\tif (returnValue === pMapSkip) {\n\t\t\t\t\t\t\tconst index = promises.indexOf(promise);\n\n\t\t\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t\t\tpromises.splice(index, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Spawn if still below backpressure limit and just dropped below concurrency limit\n\t\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\t\treturn {done: false, value: returnValue};\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tpendingPromisesCount--;\n\t\t\t\t\t\tisDone = true;\n\t\t\t\t\t\treturn {error};\n\t\t\t\t\t}\n\t\t\t\t})();\n\n\t\t\t\tpromises.push(promise);\n\t\t\t}\n\n\t\t\ttrySpawn();\n\n\t\t\twhile (promises.length > 0) {\n\t\t\t\tconst {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop\n\n\t\t\t\tpromises.shift();\n\n\t\t\t\tif (error) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tif (done) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Spawn if just dropped below backpressure limit and below the concurrency limit\n\t\t\t\ttrySpawn();\n\n\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tyield value;\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport const pMapSkip = Symbol('skip');\n"
],
"mappings": ";oDAAA,eAA8B,CAAI,CACjC,EACA,GAEC,cAAc,OAAO,kBACrB,cAAc,GACd,UACG,CAAC,EACJ,C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EAAuB,EACvB,EAAS,GACT,EAAQ,EAEZ,SAAS,CAAQ,EAAG,CACnB,GAAI,GAAU,EAAE,EAAuB,GAAe,EAAS,OAAS,GACvE,OAGD,IAEA,IAAM,GAAW,SAAY,CAC5B,IAAO,OAAM,SAAS,MAAM,EAAS,KAAK,EAE1C,GAAI,EAEH,OADA,IACO,CAAC,KAAM,EAAI,EAInB,EAAS,EAET,GAAI,CACH,IAAM,EAAe,IACf,EAAc,MAAM,EAAO,MAAM,EAAO,CAAY,EAI1D,GAFA,IAEI,IAAgB,EAAU,CAC7B,IAAM,EAAQ,EAAS,QAAQ,CAAO,EAEtC,GAAI,EAAQ,EACX,EAAS,OAAO,EAAO,CAAC,EAO1B,OAFA,EAAS,EAEF,CAAC,KAAM,GAAO,MAAO,CAAW,EACtC,MAAO,EAAO,CAGf,OAFA,IACA,EAAS,GACF,CAAC,OAAK,KAEZ,EAEH,EAAS,KAAK,CAAO,EAGtB,EAAS,EAET,MAAO,EAAS,OAAS,EAAG,CAC3B,IAAO,QAAO,OAAM,SAAS,MAAM,EAAS,GAI5C,GAFA,EAAS,MAAM,EAEX,EACH,MAAM,EAGP,GAAI,EACH,OAMD,GAFA,EAAS,EAEL,IAAU,EACb,SAGD,MAAM,GAGT,MAGY,iBAAW,OAAO,MAAM",
"debugId": "2993968DE13B252964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/status.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.status,\n Effect.fn(\"cli.service.status\")(function* () {\n const url = yield* (yield* Daemon.Service).status()\n process.stdout.write((url ? `running ${url}` : \"stopped\") + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,OAC5B,EAAG,oBAAoB,EAAE,SAAU,EAAG,CAC3C,IAAM,EAAM,OAAQ,MAAO,EAAO,SAAS,OAAO,EAClD,QAAQ,OAAO,OAAO,EAAM,WAAW,IAAQ,WAAa,CAAG,EAChE,CACH",
"debugId": "80CD2CA9DB89664464756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/default.ts"],
"sourcesContent": [
"import { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Effect } from \"effect\"\nimport { Daemon } from \"../../services/daemon\"\n\nexport default Runtime.handler(Commands, () =>\n Effect.gen(function* () {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const { runTui } = yield* Effect.promise(() => import(\"../../tui\"))\n yield* runTui(transport)\n }),\n)\n"
],
"mappings": ";0SAKA,SAAe,SAAQ,aAAQ,OAAU,SACvC,OAAO,IAAI,SAAU,EAAG,CAEtB,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,GAClC,UAAW,MAAO,EAAO,QAAQ,IAAa,wCAAY,EAClE,MAAO,EAAO,CAAS,EACxB,CACH",
"debugId": "AD28FC29075199DB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/migrate.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\n\nexport default Runtime.handler(Commands.commands.migrate, (_input) => Effect.log(\"No migrations to run.\"))\n"
],
"mappings": ";qRAIA,SAAe,SAAQ,aAAQ,OAAS,cAAS,aAAS,CAAC,IAAkB,EAAI,uBAAuB,CAAC",
"debugId": "665C2D4352DB1B5A64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/api.ts"],
"sourcesContent": [
"import { EOL } from \"node:os\"\nimport { Effect, Option } from \"effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Daemon } from \"../../services/daemon\"\n\nconst methods = new Set([\"delete\", \"get\", \"head\", \"options\", \"patch\", \"post\", \"put\"])\n\ntype Operation = {\n operationId?: string\n}\n\ntype OpenApi = {\n paths?: Record<string, Record<string, Operation>>\n}\n\nexport default Runtime.handler(\n Commands.commands.api,\n Effect.fn(\"cli.api\")(function* (input) {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const params = Option.getOrElse(input.param, () => ({}))\n const request = yield* resolveRequest(transport, input.request, params)\n const headers = new Headers(transport.headers)\n for (const header of input.header) {\n const index = header.indexOf(\":\")\n if (index < 1) return yield* Effect.fail(new Error(`Invalid header, expected name:value: ${header}`))\n headers.set(header.slice(0, index).trim(), header.slice(index + 1).trim())\n }\n const body = Option.getOrUndefined(input.data)\n if (body !== undefined && !headers.has(\"content-type\")) headers.set(\"content-type\", \"application/json\")\n\n const response = yield* Effect.tryPromise(() =>\n fetch(new URL(request.path, transport.url), {\n method: request.method,\n headers,\n body,\n }),\n )\n const output = yield* Effect.promise(() => response.text())\n if (output) process.stdout.write(output + (output.endsWith(EOL) ? \"\" : EOL))\n }),\n)\n\nexport function resolveOperation(spec: OpenApi, operationID: string, params: Record<string, string>) {\n for (const [path, operations] of Object.entries(spec.paths ?? {})) {\n for (const [method, operation] of Object.entries(operations)) {\n if (!methods.has(method) || operation.operationId !== operationID) continue\n return { method: method.toUpperCase(), path: interpolate(path, params) }\n }\n }\n throw new Error(`Operation not found: ${operationID}`)\n}\n\nexport function rawRequest(input: readonly string[]) {\n if (input.length !== 2 || !methods.has(input[0].toLowerCase()) || !input[1].startsWith(\"/\")) return\n return { method: input[0].toUpperCase(), path: input[1] }\n}\n\nfunction resolveRequest(\n transport: { url: string; headers: RequestInit[\"headers\"] },\n input: readonly string[],\n params: Record<string, string>,\n) {\n const raw = rawRequest(input)\n if (raw) return Effect.succeed(raw)\n if (input.length !== 1) return Effect.fail(new Error(\"Expected an operation name or an HTTP method and path\"))\n return Effect.tryPromise(async () => {\n const response = await fetch(new URL(\"/openapi.json\", transport.url), { headers: transport.headers })\n if (!response.ok) throw new Error(`Failed to load OpenAPI document: HTTP ${response.status}`)\n return resolveOperation((await response.json()) as OpenApi, input[0], params)\n })\n}\n\nfunction interpolate(path: string, params: Record<string, string>) {\n const used = new Set<string>()\n const pathname = path.replaceAll(/\\{([^}]+)\\}/g, (_, name: string) => {\n const value = params[name]\n if (value === undefined) throw new Error(`Missing path parameter: ${name}`)\n used.add(name)\n return encodeURIComponent(value)\n })\n const query = new URLSearchParams(Object.entries(params).filter(([name]) => !used.has(name))).toString()\n return query ? `${pathname}?${query}` : pathname\n}\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAM,OAAU,SAAI,SAAI,CAAC,SAAU,MAAO,OAAQ,UAAW,QAAS,OAAQ,KAAK,CAAC,EAUrE,IAAQ,QACrB,EAAS,SAAS,IAClB,EAAO,GAAG,SAAS,EAAE,SAAU,CAAC,EAAO,CAErC,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,EACpC,EAAS,EAAO,UAAU,EAAM,MAAO,KAAO,CAAC,EAAE,EACjD,EAAU,MAAO,EAAe,EAAW,EAAM,QAAS,CAAM,EAChE,EAAU,IAAI,QAAQ,EAAU,OAAO,EAC7C,QAAW,KAAU,EAAM,OAAQ,CACjC,IAAM,EAAQ,EAAO,QAAQ,GAAG,EAChC,GAAI,EAAQ,EAAG,OAAO,MAAO,EAAO,KAAS,MAAM,wCAAwC,GAAQ,CAAC,EACpG,EAAQ,IAAI,EAAO,MAAM,EAAG,CAAK,EAAE,KAAK,EAAG,EAAO,MAAM,EAAQ,CAAC,EAAE,KAAK,CAAC,EAE3E,IAAM,EAAO,EAAO,eAAe,EAAM,IAAI,EAC7C,GAAI,IAAS,QAAa,CAAC,EAAQ,IAAI,cAAc,EAAG,EAAQ,IAAI,eAAgB,kBAAkB,EAEtG,IAAM,EAAW,MAAO,EAAO,WA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I,CAAM,EAC7E,EAGH,SAAS,CAAW,CAAC,EAAc,EAAgC,CACjE,IAAM,EAAO,IAAI,IACX,EAAW,EAAK,WAAW,eAAgB,CAAC,EAAG,IAAiB,CACpE,IAAM,EAAQ,EAAO,GACrB,GAAI,IAAU,OAAW,MAAU,MAAM,2BAA2B,GAAM,EAE1E,OADA,EAAK,IAAI,CAAI,EACN,mBAAmB,CAAK,EAChC,EACK,EAAQ,IAAI,gBAAgB,OAAO,QAAQ,CAAM,EAAE,OAAO,EAAE,KAAU,CAAC,EAAK,IAAI,CAAI,CAAC,CAAC,EAAE,SAAS,EACvG,OAAO,EAAQ,GAAG,KAAY,IAAU",
"debugId": "9B943A9E529FEAFE64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/image/photon.ts"],
"sourcesContent": [
"// @ts-ignore Bun's static file import is embedded by `bun build --compile`; some consumers also declare *.wasm.\nimport photonWasm from \"@silvia-odwyer/photon-node/photon_rs_bg.wasm\" with { type: \"file\" }\nimport { Effect } from \"effect\"\nimport path from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\nimport { FileSystem } from \"../filesystem\"\nimport { DecodeError, ResizerUnavailableError, SizeError } from \"../image\"\n\nconst JPEG_QUALITIES = [80, 85, 70, 55, 40]\n\nexport const make = Effect.gen(function* () {\n ;(globalThis as typeof globalThis & { __OPENCODE_PHOTON_WASM_PATH?: string }).__OPENCODE_PHOTON_WASM_PATH =\n path.isAbsolute(photonWasm) ? photonWasm : fileURLToPath(new URL(photonWasm, import.meta.url))\n const loadPhoton = yield* Effect.cached(\n Effect.tryPromise({\n try: () => import(\"@silvia-odwyer/photon-node\"),\n catch: () => new ResizerUnavailableError(),\n }),\n )\n return Effect.fn(\"Image.Photon.normalize\")(function* (\n resource: string,\n content: FileSystem.Content & { readonly encoding: \"base64\" },\n limits: {\n readonly autoResize: boolean\n readonly maxWidth: number\n readonly maxHeight: number\n readonly maxBase64Bytes: number\n },\n ) {\n const photon = yield* loadPhoton\n const decoded = yield* Effect.try({\n try: () => photon.PhotonImage.new_from_byteslice(Buffer.from(content.content, \"base64\")),\n catch: () => new DecodeError({ resource }),\n })\n try {\n const width = decoded.get_width()\n const height = decoded.get_height()\n const bytes = Buffer.byteLength(content.content, \"utf-8\")\n if (width <= limits.maxWidth && height <= limits.maxHeight && bytes <= limits.maxBase64Bytes) return content\n if (!limits.autoResize)\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n const scale = Math.min(1, limits.maxWidth / width, limits.maxHeight / height)\n const sizes = Array.from({ length: 32 }).reduce<Array<{ width: number; height: number }>>((acc) => {\n const previous = acc.at(-1) ?? {\n width: Math.max(1, Math.round(width * scale)),\n height: Math.max(1, Math.round(height * scale)),\n }\n const next =\n acc.length === 0\n ? previous\n : {\n width: previous.width === 1 ? 1 : Math.max(1, Math.floor(previous.width * 0.75)),\n height: previous.height === 1 ? 1 : Math.max(1, Math.floor(previous.height * 0.75)),\n }\n return acc.some((item) => item.width === next.width && item.height === next.height) ? acc : [...acc, next]\n }, [])\n for (const size of sizes) {\n const resized = photon.resize(decoded, size.width, size.height, photon.SamplingFilter.Lanczos3)\n try {\n const encoders: Array<readonly [mime: string, encode: () => Uint8Array]> = [\n [\"image/png\", () => resized.get_bytes()],\n ...JPEG_QUALITIES.map((quality) => [\"image/jpeg\", () => resized.get_bytes_jpeg(quality)] as const),\n ]\n for (const [mime, encode] of encoders) {\n const candidate = Buffer.from(encode()).toString(\"base64\")\n if (Buffer.byteLength(candidate, \"utf-8\") <= limits.maxBase64Bytes)\n return { ...content, content: candidate, encoding: \"base64\" as const, mime }\n }\n } finally {\n resized.free()\n }\n }\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n } finally {\n decoded.free()\n }\n })\n})\n"
],
"mappings": ";q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J,EAAI,SAAW,EACX,EACA,CACE,MAAO,EAAS,QAAU,EAAI,EAAI,KAAK,IAAI,EAAG,KAAK,MAAM,EAAS,MAAQ,IAAI,CAAC,EAC/E,OAAQ,EAAS,SAAW,EAAI,EAAI,KAAK,IAAI,EAAG,KAAK,MAAM,EAAS,OAAS,IAAI,CAAC,CACpF,EACN,OAAO,EAAI,KAAK,CAAC,IAAS,EAAK,QAAU,EAAK,OAAS,EAAK,SAAW,EAAK,MAAM,EAAI,EAAM,CAAC,GAAG,EAAK,CAAI,GACxG,CAAC,CAAC,EACL,QAAW,KAAQ,EAAO,CACxB,IAAM,EAAU,EAAO,OAAO,EAAS,EAAK,MAAO,EAAK,OAAQ,EAAO,eAAe,QAAQ,EAC9F,GAAI,CACF,IAAM,EAAqE,CACzE,CAAC,YAAa,IAAM,EAAQ,UAAU,CAAC,EACvC,GAAG,EAAe,IAAI,CAAC,IAAY,CAAC,aAAc,IAAM,EAAQ,eAAe,CAAO,CAAC,CAAU,CACnG,EACA,QAAY,EAAM,KAAW,EAAU,CACrC,IAAM,EAAY,OAAO,KAAK,EAAO,CAAC,EAAE,SAAS,QAAQ,EACzD,GAAI,OAAO,WAAW,EAAW,OAAO,GAAK,EAAO,eAClD,MAAO,IAAK,EAAS,QAAS,EAAW,SAAU,SAAmB,MAAK,UAE/E,CACA,EAAQ,KAAK,GAGjB,OAAO,MAAO,IAAI,EAAU,CAC1B,WACA,QACA,SACA,QACA,SAAU,EAAO,SACjB,UAAW,EAAO,UAClB,SAAU,EAAO,cACnB,CAAC,SACD,CACA,EAAQ,KAAK,GAEhB,EACF",
"debugId": "2AB5AE5D4A7A8B4164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/password.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport { Option } from \"effect\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.password,\n Effect.fn(\"cli.service.password\")(function* (input) {\n const daemon = yield* Daemon.Service\n const value = Option.getOrUndefined(input.value)\n if (value !== undefined) yield* daemon.stop()\n process.stdout.write((yield* daemon.password(value)) + EOL)\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAOT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,SAC5B,EAAG,sBAAsB,EAAE,SAAU,CAAC,EAAO,CAClD,IAAM,EAAS,MAAO,EAAO,QACvB,EAAQ,EAAO,eAAe,EAAM,KAAK,EAC/C,GAAI,IAAU,OAAW,MAAO,EAAO,KAAK,EAC5C,QAAQ,OAAO,OAAO,MAAO,EAAO,SAAS,CAAK,GAAK,CAAG,EAC3D,CACH",
"debugId": "42AA89F8A31337F564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/start.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.start,\n Effect.fn(\"cli.service.start\")(function* () {\n process.stdout.write((yield* (yield* Daemon.Service).start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,MAC5B,EAAG,mBAAmB,EAAE,SAAU,EAAG,CAC1C,QAAQ,OAAO,OAAO,OAAQ,MAAO,EAAO,SAAS,MAAM,GAAK,CAAG,EACpE,CACH",
"debugId": "50901BF4B57635BF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/stop.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.stop,\n Effect.fn(\"cli.service.stop\")(function* () {\n yield* (yield* Daemon.Service).stop()\n }),\n)\n"
],
"mappings": ";6RAKA,SAAe,SAAQ,aACrB,OAAS,cAAS,aAAQ,SAAS,KAC5B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CACzC,OAAQ,MAAO,EAAO,SAAS,KAAK,EACrC,CACH",
"debugId": "7E525EFB924E984464756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/restart.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.restart,\n Effect.fn(\"cli.service.restart\")(function* () {\n const daemon = yield* Daemon.Service\n yield* daemon.stop()\n process.stdout.write((yield* daemon.start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,QAC5B,EAAG,qBAAqB,EAAE,SAAU,EAAG,CAC5C,IAAM,EAAS,MAAO,EAAO,QAC7B,MAAO,EAAO,KAAK,EACnB,QAAQ,OAAO,OAAO,MAAO,EAAO,MAAM,GAAK,CAAG,EACnD,CACH",
"debugId": "7C68A313E67474AB64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/debug/agents.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.debug.commands.agents,\n Effect.fn(\"cli.debug.agents\")(function* () {\n const daemon = yield* Daemon.Service\n const client = yield* daemon.client()\n const response = yield* Effect.promise(() => client.v2.agent.list({ location: { directory: process.cwd() } }))\n process.stdout.write(\n JSON.stringify(\n response.data?.data.toSorted((a, b) => a.id.localeCompare(b.id)),\n null,\n 2,\n ) + EOL,\n )\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,MAAM,SAAS,OAC1B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CAEzC,IAAM,EAAS,OADA,MAAO,EAAO,SACA,OAAO,EAC9B,EAAW,MAAc,EAAQ,IAAM,EAAO,GAAG,MAAM,KAAK,CAAE,SAAU,CAAE,UAAW,QAAQ,IAAI,CAAE,CAAE,CAAC,CAAC,EAC7G,QAAQ,OAAO,MACb,KAAK,UACH,EAAS,MAAM,KAAK,SAAS,CAAC,EAAG,IAAM,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,EAC/D,KACA,CACF,EAAI,CACN,EACD,CACH",
"debugId": "CE5CE8A1492049D164756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

+1
-1
{
"name": "@opencode-ai/cli-linux-arm64",
"version": "0.0.0-beta-202607232057",
"version": "0.0.0-beta-202607240139",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

{
"version": 3,
"sources": ["../../node_modules/.bun/p-map@7.0.5/node_modules/p-map/index.js"],
"sourcesContent": [
"export default async function pMap(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tstopOnError = true,\n\t\tsignal,\n\t} = {},\n) {\n\treturn new Promise((resolve_, reject_) => {\n\t\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t\t}\n\n\t\tif (typeof mapper !== 'function') {\n\t\t\tthrow new TypeError('Mapper function is required');\n\t\t}\n\n\t\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t\t}\n\n\t\tconst result = [];\n\t\tconst errors = [];\n\t\tconst skippedIndexesMap = new Map();\n\t\tlet isRejected = false;\n\t\tlet isResolved = false;\n\t\tlet isIterableDone = false;\n\t\tlet resolvingCount = 0;\n\t\tlet currentIndex = 0;\n\t\tconst iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n\t\tconst signalListener = () => {\n\t\t\treject(signal.reason);\n\t\t};\n\n\t\tconst cleanup = () => {\n\t\t\tsignal?.removeEventListener('abort', signalListener);\n\t\t};\n\n\t\tconst resolve = value => {\n\t\t\tresolve_(value);\n\t\t\tcleanup();\n\t\t};\n\n\t\tconst reject = reason => {\n\t\t\tisRejected = true;\n\t\t\tisResolved = true;\n\t\t\treject_(reason);\n\t\t\tcleanup();\n\t\t};\n\n\t\tif (signal) {\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(signal.reason);\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', signalListener, {once: true});\n\t\t}\n\n\t\tconst next = async () => {\n\t\t\tif (isResolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nextItem = await iterator.next();\n\n\t\t\tconst index = currentIndex;\n\t\t\tcurrentIndex++;\n\n\t\t\t// Note: `iterator.next()` can be called many times in parallel.\n\t\t\t// This can cause multiple calls to this `next()` function to\n\t\t\t// receive a `nextItem` with `done === true`.\n\t\t\t// The shutdown logic that rejects/resolves must be protected\n\t\t\t// so it runs only one time as the `skippedIndex` logic is\n\t\t\t// non-idempotent.\n\t\t\tif (nextItem.done) {\n\t\t\t\tisIterableDone = true;\n\n\t\t\t\tif (resolvingCount === 0 && !isResolved) {\n\t\t\t\t\tif (!stopOnError && errors.length > 0) {\n\t\t\t\t\t\treject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tisResolved = true;\n\n\t\t\t\t\tif (skippedIndexesMap.size === 0) {\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst pureResult = [];\n\n\t\t\t\t\t// Support multiple `pMapSkip`'s.\n\t\t\t\t\tfor (const [index, value] of result.entries()) {\n\t\t\t\t\t\tif (skippedIndexesMap.get(index) === pMapSkip) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpureResult.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(pureResult);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolvingCount++;\n\n\t\t\t// Intentionally detached\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst element = await nextItem.value;\n\n\t\t\t\t\tif (isResolved) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = await mapper(element, index);\n\n\t\t\t\t\t// Use Map to stage the index of the element.\n\t\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\t\tskippedIndexesMap.set(index, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[index] = value;\n\n\t\t\t\t\tresolvingCount--;\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (stopOnError) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors.push(error);\n\t\t\t\t\t\tresolvingCount--;\n\n\t\t\t\t\t\t// In that case we can't really continue regardless of `stopOnError` state\n\t\t\t\t\t\t// since an iterable is likely to continue throwing after it throws once.\n\t\t\t\t\t\t// If we continue calling `next()` indefinitely we will likely end up\n\t\t\t\t\t\t// in an infinite loop of failed iteration.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait next();\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t};\n\n\t\t// Create the concurrent runners in a detached (non-awaited)\n\t\t// promise. We need this so we can await the `next()` calls\n\t\t// to stop creating runners before hitting the concurrency limit\n\t\t// if the iterable has already been marked as done.\n\t\t// NOTE: We *must* do this for async iterators otherwise we'll spin up\n\t\t// infinite `next()` calls by default and never start the event loop.\n\t\t(async () => {\n\t\t\tfor (let index = 0; index < concurrency; index++) {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (isIterableDone || isRejected) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t});\n}\n\nexport function pMapIterable(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tbackpressure = concurrency,\n\t} = {},\n) {\n\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t}\n\n\tif (typeof mapper !== 'function') {\n\t\tthrow new TypeError('Mapper function is required');\n\t}\n\n\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t}\n\n\tif (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`backpressure\\` to be an integer from \\`concurrency\\` (${concurrency}) and up or \\`Infinity\\`, got \\`${backpressure}\\` (${typeof backpressure})`);\n\t}\n\n\treturn {\n\t\tasync * [Symbol.asyncIterator]() {\n\t\t\tconst iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();\n\n\t\t\tconst promises = [];\n\t\t\tlet pendingPromisesCount = 0;\n\t\t\tlet isDone = false;\n\t\t\tlet index = 0;\n\n\t\t\tfunction trySpawn() {\n\t\t\t\tif (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tpendingPromisesCount++;\n\n\t\t\t\tconst promise = (async () => {\n\t\t\t\t\tconst {done, value} = await iterator.next();\n\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tpendingPromisesCount--;\n\t\t\t\t\t\treturn {done: true};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Spawn if still below concurrency and backpressure limit\n\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst currentIndex = index++;\n\t\t\t\t\t\tconst returnValue = await mapper(await value, currentIndex);\n\n\t\t\t\t\t\tpendingPromisesCount--;\n\n\t\t\t\t\t\tif (returnValue === pMapSkip) {\n\t\t\t\t\t\t\tconst index = promises.indexOf(promise);\n\n\t\t\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t\t\tpromises.splice(index, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Spawn if still below backpressure limit and just dropped below concurrency limit\n\t\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\t\treturn {done: false, value: returnValue};\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tpendingPromisesCount--;\n\t\t\t\t\t\tisDone = true;\n\t\t\t\t\t\treturn {error};\n\t\t\t\t\t}\n\t\t\t\t})();\n\n\t\t\t\tpromises.push(promise);\n\t\t\t}\n\n\t\t\ttrySpawn();\n\n\t\t\twhile (promises.length > 0) {\n\t\t\t\tconst {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop\n\n\t\t\t\tpromises.shift();\n\n\t\t\t\tif (error) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tif (done) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Spawn if just dropped below backpressure limit and below the concurrency limit\n\t\t\t\ttrySpawn();\n\n\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tyield value;\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport const pMapSkip = Symbol('skip');\n"
],
"mappings": ";oDAAA,eAA8B,CAAI,CACjC,EACA,GAEC,cAAc,OAAO,kBACrB,cAAc,GACd,UACG,CAAC,EACJ,CACD,OAAO,IAAI,QAAQ,CAAC,EAAU,IAAY,CACzC,GAAI,EAAS,OAAO,YAAc,QAAa,EAAS,OAAO,iBAAmB,OACjF,MAAU,UAAU,8EAA8E,OAAO,IAAW,EAGrH,GAAI,OAAO,IAAW,WACrB,MAAU,UAAU,6BAA6B,EAGlD,GAAI,EAAG,OAAO,cAAc,CAAW,GAAK,GAAe,GAAM,IAAgB,OAAO,mBACvF,MAAU,UAAU,kFAAkF,QAAkB,OAAO,IAAc,EAG9I,IAAM,EAAS,CAAC,EACV,EAAS,CAAC,EACV,EAAoB,IAAI,IAC1B,EAAa,GACb,EAAa,GACb,EAAiB,GACjB,EAAiB,EACjB,EAAe,EACb,EAAW,EAAS,OAAO,YAAc,OAAY,EAAS,OAAO,eAAe,EAAI,EAAS,OAAO,UAAU,EAElH,EAAiB,IAAM,CAC5B,EAAO,EAAO,MAAM,GAGf,EAAU,IAAM,CACrB,GAAQ,oBAAoB,QAAS,CAAc,GAG9C,EAAU,KAAS,CACxB,EAAS,CAAK,EACd,EAAQ,GAGH,EAAS,KAAU,CACxB,EAAa,GACb,EAAa,GACb,EAAQ,CAAM,EACd,EAAQ,GAGT,GAAI,EAAQ,CACX,GAAI,EAAO,QACV,EAAO,EAAO,MA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AAW,OAAO,MAAM",
"debugId": "6DD4102455CF816164756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/restart.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.restart,\n Effect.fn(\"cli.service.restart\")(function* () {\n const daemon = yield* Daemon.Service\n yield* daemon.stop()\n process.stdout.write((yield* daemon.start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,QAC5B,EAAG,qBAAqB,EAAE,SAAU,EAAG,CAC5C,IAAM,EAAS,MAAO,EAAO,QAC7B,MAAO,EAAO,KAAK,EACnB,QAAQ,OAAO,OAAO,MAAO,EAAO,MAAM,GAAK,CAAG,EACnD,CACH",
"debugId": "7C68A313E67474AB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/stop.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.stop,\n Effect.fn(\"cli.service.stop\")(function* () {\n yield* (yield* Daemon.Service).stop()\n }),\n)\n"
],
"mappings": ";6RAKA,SAAe,SAAQ,aACrB,OAAS,cAAS,aAAQ,SAAS,KAC5B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CACzC,OAAQ,MAAO,EAAO,SAAS,KAAK,EACrC,CACH",
"debugId": "7E525EFB924E984464756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/migrate.ts"],
"sourcesContent": [
"import * as Effect from \"effect/Effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\n\nexport default Runtime.handler(Commands.commands.migrate, (_input) => Effect.log(\"No migrations to run.\"))\n"
],
"mappings": ";qRAIA,SAAe,SAAQ,aAAQ,OAAS,cAAS,aAAS,CAAC,IAAkB,EAAI,uBAAuB,CAAC",
"debugId": "665C2D4352DB1B5A64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["../core/src/image/photon.ts"],
"sourcesContent": [
"// @ts-ignore Bun's static file import is embedded by `bun build --compile`; some consumers also declare *.wasm.\nimport photonWasm from \"@silvia-odwyer/photon-node/photon_rs_bg.wasm\" with { type: \"file\" }\nimport { Effect } from \"effect\"\nimport path from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\nimport { FileSystem } from \"../filesystem\"\nimport { DecodeError, ResizerUnavailableError, SizeError } from \"../image\"\n\nconst JPEG_QUALITIES = [80, 85, 70, 55, 40]\n\nexport const make = Effect.gen(function* () {\n ;(globalThis as typeof globalThis & { __OPENCODE_PHOTON_WASM_PATH?: string }).__OPENCODE_PHOTON_WASM_PATH =\n path.isAbsolute(photonWasm) ? photonWasm : fileURLToPath(new URL(photonWasm, import.meta.url))\n const loadPhoton = yield* Effect.cached(\n Effect.tryPromise({\n try: () => import(\"@silvia-odwyer/photon-node\"),\n catch: () => new ResizerUnavailableError(),\n }),\n )\n return Effect.fn(\"Image.Photon.normalize\")(function* (\n resource: string,\n content: FileSystem.Content & { readonly encoding: \"base64\" },\n limits: {\n readonly autoResize: boolean\n readonly maxWidth: number\n readonly maxHeight: number\n readonly maxBase64Bytes: number\n },\n ) {\n const photon = yield* loadPhoton\n const decoded = yield* Effect.try({\n try: () => photon.PhotonImage.new_from_byteslice(Buffer.from(content.content, \"base64\")),\n catch: () => new DecodeError({ resource }),\n })\n try {\n const width = decoded.get_width()\n const height = decoded.get_height()\n const bytes = Buffer.byteLength(content.content, \"utf-8\")\n if (width <= limits.maxWidth && height <= limits.maxHeight && bytes <= limits.maxBase64Bytes) return content\n if (!limits.autoResize)\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n const scale = Math.min(1, limits.maxWidth / width, limits.maxHeight / height)\n const sizes = Array.from({ length: 32 }).reduce<Array<{ width: number; height: number }>>((acc) => {\n const previous = acc.at(-1) ?? {\n width: Math.max(1, Math.round(width * scale)),\n height: Math.max(1, Math.round(height * scale)),\n }\n const next =\n acc.length === 0\n ? previous\n : {\n width: previous.width === 1 ? 1 : Math.max(1, Math.floor(previous.width * 0.75)),\n height: previous.height === 1 ? 1 : Math.max(1, Math.floor(previous.height * 0.75)),\n }\n return acc.some((item) => item.width === next.width && item.height === next.height) ? acc : [...acc, next]\n }, [])\n for (const size of sizes) {\n const resized = photon.resize(decoded, size.width, size.height, photon.SamplingFilter.Lanczos3)\n try {\n const encoders: Array<readonly [mime: string, encode: () => Uint8Array]> = [\n [\"image/png\", () => resized.get_bytes()],\n ...JPEG_QUALITIES.map((quality) => [\"image/jpeg\", () => resized.get_bytes_jpeg(quality)] as const),\n ]\n for (const [mime, encode] of encoders) {\n const candidate = Buffer.from(encode()).toString(\"base64\")\n if (Buffer.byteLength(candidate, \"utf-8\") <= limits.maxBase64Bytes)\n return { ...content, content: candidate, encoding: \"base64\" as const, mime }\n }\n } finally {\n resized.free()\n }\n }\n return yield* new SizeError({\n resource,\n width,\n height,\n bytes,\n maxWidth: limits.maxWidth,\n maxHeight: limits.maxHeight,\n maxBytes: limits.maxBase64Bytes,\n })\n } finally {\n decoded.free()\n }\n })\n})\n"
],
"mappings": ";qaAGA,yBACA,6BAAS,iBAIT,SAAM,OAAiB,MAAC,QAAI,QAAI,QAAI,iBAAI,EAAE,EAE7B,EAAO,EAAO,IAAI,SAAU,EAAG,CACxC,WAA4E,4BAC5E,EAAK,WAAW,CAAU,EAAI,EAAa,EAAc,IAAI,IAAI,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EAAS,OAAS,IAAI,CAAC,CACpF,EACN,OAAO,EAAI,KAAK,CAAC,IAAS,EAAK,QAAU,EAAK,OAAS,EAAK,SAAW,EAAK,MAAM,EAAI,EAAM,CAAC,GAAG,EAAK,CAAI,GACxG,CAAC,CAAC,EACL,QAAW,KAAQ,EAAO,CACxB,IAAM,EAAU,EAAO,OAAO,EAAS,EAAK,MAAO,EAAK,OAAQ,EAAO,eAAe,QAAQ,EAC9F,GAAI,CACF,IAAM,EAAqE,CACzE,CAAC,YAAa,IAAM,EAAQ,UAAU,CAAC,EACvC,GAAG,EAAe,IAAI,CAAC,IAAY,CAAC,aAAc,IAAM,EAAQ,eAAe,CAAO,CAAC,CAAU,CACnG,EACA,QAAY,EAAM,KAAW,EAAU,CACrC,IAAM,EAAY,OAAO,KAAK,EAAO,CAAC,EAAE,SAAS,QAAQ,EACzD,GAAI,OAAO,WAAW,EAAW,OAAO,GAAK,EAAO,eAClD,MAAO,IAAK,EAAS,QAAS,EAAW,SAAU,SAAmB,MAAK,UAE/E,CACA,EAAQ,KAAK,GAGjB,OAAO,MAAO,IAAI,EAAU,CAC1B,WACA,QACA,SACA,QACA,SAAU,EAAO,SACjB,UAAW,EAAO,UAClB,SAAU,EAAO,cACnB,CAAC,SACD,CACA,EAAQ,KAAK,GAEhB,EACF",
"debugId": "2AB5AE5D4A7A8B4164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/api.ts"],
"sourcesContent": [
"import { EOL } from \"node:os\"\nimport { Effect, Option } from \"effect\"\nimport { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Daemon } from \"../../services/daemon\"\n\nconst methods = new Set([\"delete\", \"get\", \"head\", \"options\", \"patch\", \"post\", \"put\"])\n\ntype Operation = {\n operationId?: string\n}\n\ntype OpenApi = {\n paths?: Record<string, Record<string, Operation>>\n}\n\nexport default Runtime.handler(\n Commands.commands.api,\n Effect.fn(\"cli.api\")(function* (input) {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const params = Option.getOrElse(input.param, () => ({}))\n const request = yield* resolveRequest(transport, input.request, params)\n const headers = new Headers(transport.headers)\n for (const header of input.header) {\n const index = header.indexOf(\":\")\n if (index < 1) return yield* Effect.fail(new Error(`Invalid header, expected name:value: ${header}`))\n headers.set(header.slice(0, index).trim(), header.slice(index + 1).trim())\n }\n const body = Option.getOrUndefined(input.data)\n if (body !== undefined && !headers.has(\"content-type\")) headers.set(\"content-type\", \"application/json\")\n\n const response = yield* Effect.tryPromise(() =>\n fetch(new URL(request.path, transport.url), {\n method: request.method,\n headers,\n body,\n }),\n )\n const output = yield* Effect.promise(() => response.text())\n if (output) process.stdout.write(output + (output.endsWith(EOL) ? \"\" : EOL))\n }),\n)\n\nexport function resolveOperation(spec: OpenApi, operationID: string, params: Record<string, string>) {\n for (const [path, operations] of Object.entries(spec.paths ?? {})) {\n for (const [method, operation] of Object.entries(operations)) {\n if (!methods.has(method) || operation.operationId !== operationID) continue\n return { method: method.toUpperCase(), path: interpolate(path, params) }\n }\n }\n throw new Error(`Operation not found: ${operationID}`)\n}\n\nexport function rawRequest(input: readonly string[]) {\n if (input.length !== 2 || !methods.has(input[0].toLowerCase()) || !input[1].startsWith(\"/\")) return\n return { method: input[0].toUpperCase(), path: input[1] }\n}\n\nfunction resolveRequest(\n transport: { url: string; headers: RequestInit[\"headers\"] },\n input: readonly string[],\n params: Record<string, string>,\n) {\n const raw = rawRequest(input)\n if (raw) return Effect.succeed(raw)\n if (input.length !== 1) return Effect.fail(new Error(\"Expected an operation name or an HTTP method and path\"))\n return Effect.tryPromise(async () => {\n const response = await fetch(new URL(\"/openapi.json\", transport.url), { headers: transport.headers })\n if (!response.ok) throw new Error(`Failed to load OpenAPI document: HTTP ${response.status}`)\n return resolveOperation((await response.json()) as OpenApi, input[0], params)\n })\n}\n\nfunction interpolate(path: string, params: Record<string, string>) {\n const used = new Set<string>()\n const pathname = path.replaceAll(/\\{([^}]+)\\}/g, (_, name: string) => {\n const value = params[name]\n if (value === undefined) throw new Error(`Missing path parameter: ${name}`)\n used.add(name)\n return encodeURIComponent(value)\n })\n const query = new URLSearchParams(Object.entries(params).filter(([name]) => !used.has(name))).toString()\n return query ? `${pathname}?${query}` : pathname\n}\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAM,OAAU,SAAI,SAAI,CAAC,SAAU,MAAO,OAAQ,UAAW,QAAS,OAAQ,KAAK,CAAC,EAUrE,IAAQ,QACrB,EAAS,SAAS,IAClB,EAAO,GAAG,SAAS,EAAE,SAAU,CAAC,EAAO,CAErC,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,EACpC,EAAS,EAAO,UAAU,EAAM,MAAO,KAAO,CAAC,EAAE,EACjD,EAAU,MAAO,EAAe,EAAW,EAAM,QAAS,CAAM,EAChE,EAAU,IAAI,QAAQ,EAAU,OAAO,EAC7C,QAAW,KAAU,EAAM,OAAQ,CACjC,IAAM,EAAQ,EAAO,QAAQ,GAAG,EAChC,GAAI,EAAQ,EAAG,OAAO,MAAO,EAAO,KAAS,MAAM,wCAAwC,GAAQ,CAAC,EACpG,EAAQ,IAAI,EAAO,MAAM,EAAG,CAAK,EAAE,KAAK,EAAG,EAAO,MAAM,EAAQ,CAAC,EAAE,KAAK,CAAC,EAE3E,IAAM,EAAO,EAAO,eAAe,EAAM,IAAI,EAC7C,GAAI,IAAS,QAAa,CAAC,EAAQ,IAAI,cAAc,EAAG,EAAQ,IAAI,eAAgB,kBAAkB,EAEtG,IAAM,EAAW,MAAO,EAAO,WAAW,IACxC,MAAM,IAAI,IAAI,EAAQ,KAAM,EAAU,GAAG,EAAG,CAC1C,OAAQ,EAAQ,OAChB,UACA,MACF,CAAC,CACH,EACM,EAAS,MAAO,EAAO,QAAQ,IAAM,EAAS,KAAK,CAAC,EAC1D,GAAI,EAAQ,QAAQ,OAAO,MAAM,GAAU,EAAO,SAAS,CAAG,EAAI,GAAK,EAAI,EAC5E,CACH,EAEO,SAAS,CAAgB,C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gBAAgB,OAAO,QAAQ,CAAM,EAAE,OAAO,EAAE,KAAU,CAAC,EAAK,IAAI,CAAI,CAAC,CAAC,EAAE,SAAS,EACvG,OAAO,EAAQ,GAAG,KAAY,IAAU",
"debugId": "9B943A9E529FEAFE64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/password.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport { Option } from \"effect\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.password,\n Effect.fn(\"cli.service.password\")(function* (input) {\n const daemon = yield* Daemon.Service\n const value = Option.getOrUndefined(input.value)\n if (value !== undefined) yield* daemon.stop()\n process.stdout.write((yield* daemon.password(value)) + EOL)\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAOT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,SAC5B,EAAG,sBAAsB,EAAE,SAAU,CAAC,EAAO,CAClD,IAAM,EAAS,MAAO,EAAO,QACvB,EAAQ,EAAO,eAAe,EAAM,KAAK,EAC/C,GAAI,IAAU,OAAW,MAAO,EAAO,KAAK,EAC5C,QAAQ,OAAO,OAAO,MAAO,EAAO,SAAS,CAAK,GAAK,CAAG,EAC3D,CACH",
"debugId": "42AA89F8A31337F564756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/service/start.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.start,\n Effect.fn(\"cli.service.start\")(function* () {\n process.stdout.write((yield* (yield* Daemon.Service).start()) + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,MAC5B,EAAG,mBAAmB,EAAE,SAAU,EAAG,CAC1C,QAAQ,OAAO,OAAO,OAAQ,MAAO,EAAO,SAAS,MAAM,GAAK,CAAG,EACpE,CACH",
"debugId": "50901BF4B57635BF64756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/debug/agents.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.debug.commands.agents,\n Effect.fn(\"cli.debug.agents\")(function* () {\n const daemon = yield* Daemon.Service\n const client = yield* daemon.client()\n const response = yield* Effect.promise(() => client.v2.agent.list({ location: { directory: process.cwd() } }))\n process.stdout.write(\n JSON.stringify(\n response.data?.data.toSorted((a, b) => a.id.localeCompare(b.id)),\n null,\n 2,\n ) + EOL,\n )\n }),\n)\n"
],
"mappings": ";qSAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,MAAM,SAAS,OAC1B,EAAG,kBAAkB,EAAE,SAAU,EAAG,CAEzC,IAAM,EAAS,OADA,MAAO,EAAO,SACA,OAAO,EAC9B,EAAW,MAAc,EAAQ,IAAM,EAAO,GAAG,MAAM,KAAK,CAAE,SAAU,CAAE,UAAW,QAAQ,IAAI,CAAE,CAAE,CAAC,CAAC,EAC7G,QAAQ,OAAO,MACb,KAAK,UACH,EAAS,MAAM,KAAK,SAAS,CAAC,EAAG,IAAM,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,EAC/D,KACA,CACF,EAAI,CACN,EACD,CACH",
"debugId": "CE5CE8A1492049D164756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

{
"version": 3,
"sources": ["src/commands/handlers/default.ts"],
"sourcesContent": [
"import { Commands } from \"../commands\"\nimport { Runtime } from \"../../framework/runtime\"\nimport { Effect } from \"effect\"\nimport { Daemon } from \"../../services/daemon\"\n\nexport default Runtime.handler(Commands, () =>\n Effect.gen(function* () {\n const daemon = yield* Daemon.Service\n const transport = yield* daemon.transport()\n const { runTui } = yield* Effect.promise(() => import(\"../../tui\"))\n yield* runTui(transport)\n }),\n)\n"
],
"mappings": ";0SAKA,SAAe,SAAQ,aAAQ,OAAU,SACvC,OAAO,IAAI,SAAU,EAAG,CAEtB,IAAM,EAAY,OADH,MAAO,EAAO,SACG,UAAU,GAClC,UAAW,MAAO,EAAO,QAAQ,IAAa,wCAAY,EAClE,MAAO,EAAO,CAAS,EACxB,CACH",
"debugId": "AD28FC29075199DB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["src/commands/handlers/service/status.ts"],
"sourcesContent": [
"import { EOL } from \"os\"\nimport * as Effect from \"effect/Effect\"\nimport { Commands } from \"../../commands\"\nimport { Runtime } from \"../../../framework/runtime\"\nimport { Daemon } from \"../../../services/daemon\"\n\nexport default Runtime.handler(\n Commands.commands.service.commands.status,\n Effect.fn(\"cli.service.status\")(function* () {\n const url = yield* (yield* Daemon.Service).status()\n process.stdout.write((url ? `running ${url}` : \"stopped\") + EOL)\n }),\n)\n"
],
"mappings": ";6RAAA,mBAAS,gBAMT,SAAe,SAAQ,aACrB,OAAS,SAAS,QAAQ,SAAS,OAC5B,EAAG,oBAAoB,EAAE,SAAU,EAAG,CAC3C,IAAM,EAAM,OAAQ,MAAO,EAAO,SAAS,OAAO,EAClD,QAAQ,OAAO,OAAO,EAAM,WAAW,IAAQ,WAAa,CAAG,EAChE,CACH",
"debugId": "80CD2CA9DB89664464756E2164756E21",
"names": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet