🎩 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
2378
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-202607220034
to
0.0.0-beta-202607220143
+9
bin/chunk-00w28qgj.js.map
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "D5CD235E36203F8964756E2164756E21",
"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": ";qaAGA,yBACA,6BAAS,iBAIT,SAAM,OAAiB,MAAC,QAAI,QAAI,QAAI,iBAAI,EAAE,EAE7B,EAAO,EAAO,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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": "03D911E49EDD150A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260612174303_project_dir_strategy.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260612174303_project_dir_strategy\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`project_directory\\` ADD \\`strategy\\` text;`)\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_project_directory\\` (\n \\`project_id\\` text NOT NULL,\n \\`directory\\` text NOT NULL,\n \\`type\\` text,\n \\`strategy\\` text,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`project_directory_pk\\` PRIMARY KEY(\\`project_id\\`, \\`directory\\`),\n CONSTRAINT \\`fk_project_directory_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `INSERT INTO \\`__new_project_directory\\`(\\`project_id\\`, \\`directory\\`, \\`type\\`, \\`time_created\\`) SELECT \\`project_id\\`, \\`directory\\`, \\`type\\`, \\`time_created\\` FROM \\`project_directory\\`;`,\n )\n yield* tx.run(`DROP TABLE \\`project_directory\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_project_directory\\` RENAME TO \\`project_directory\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sDAA0D,EACxE,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,wdAUb,EACD,MAAO,EAAG,IACR,6KACF,EACA,MAAO,EAAG,IAAI,iCAAmC,EACjD,MAAO,EAAG,IAAI,sEAA0E,EACxF,MAAO,EAAG,IAAI,yBAAyB,EACxC,EAEL",
"debugId": "D097B693750CC79364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "EA1F3D7E8177F52164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260601010001_normalize_storage_paths.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260601010001_normalize_storage_paths\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(\n `UPDATE project SET worktree = REPLACE(worktree, char(92), '/') WHERE worktree GLOB '[A-Za-z]:' || char(92) || '*' OR worktree LIKE char(92) || char(92) || '%';`,\n )\n yield* tx.run(\n `UPDATE project SET sandboxes = REPLACE(sandboxes, char(92) || char(92), '/') WHERE instr(sandboxes, char(92)) > 0 AND (worktree GLOB '[A-Za-z]:*' OR worktree LIKE '//%');`,\n )\n yield* tx.run(\n `UPDATE session SET directory = REPLACE(directory, char(92), '/') WHERE directory GLOB '[A-Za-z]:' || char(92) || '*' OR directory LIKE char(92) || char(92) || '%';`,\n )\n yield* tx.run(\n `UPDATE session SET path = REPLACE(path, char(92), '/') WHERE path IS NOT NULL AND instr(path, char(92)) > 0 AND (directory GLOB '[A-Za-z]:*' OR directory LIKE '//%');`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IACR,iKACF,EACA,MAAO,EAAG,IACR,4KACF,EACA,MAAO,EAAG,IACR,qKACF,EACA,MAAO,EAAG,IACR,wKACF,EACD,EAEL",
"debugId": "7469224CE08FDF2364756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+core@3.24.5/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js"],
"sourcesContent": [
"'use strict';\n\nvar serde = require('@smithy/core/serde');\nvar schema = require('@smithy/core/schema');\nvar transport = require('@smithy/core/transport');\nvar types = require('@smithy/types');\n\nconst collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return serde.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return serde.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return serde.Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\nclass SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n\nclass HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = schema.TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return transport.HttpRequest;\n }\n getResponseType() {\n return transport.HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name].join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name];\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = schema.NormalizedSchema.of(operationSchema.input);\n const opTraits = schema.translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n for (const [name, member] of inputNs.structIterator()) {\n if (!member.getMergedTraits().hostLabel) {\n continue;\n }\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde } = await import('@smithy/core/event-streams');\n return new EventStreamSerde({\n marshaller: this.getEventStreamMarshaller(),\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n\nclass HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = _input && typeof _input === \"object\" ? _input : {};\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = schema.NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new transport.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = schema.translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n for (const [key, value] of traitSearchParams) {\n query[key] = value;\n }\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const key in inputMemberValue) {\n const val = inputMemberValue[key];\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const key in data) {\n if (!(key in query)) {\n const val = data[key];\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema$1, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(schema$1);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = serde.sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = serde.splitEvery(value, \",\", 2);\n }\n else {\n sections = serde.splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const header in response.headers) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const value = response.headers[header];\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n\nclass RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = schema.NormalizedSchema.of(operationSchema?.input);\n const schema$1 = ns.getSchema();\n let payload;\n const input = _input && typeof _input === \"object\" ? _input : {};\n const request = new transport.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && input[memberName]) {\n serializer.write(memberSchema, input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema$1, input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = schema.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n\nconst resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nclass RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new transport.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n\nfunction determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n\nclass FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = schema.NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? serde.fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return serde._parseRfc3339DateTimeWithOffset(data);\n case 6:\n return serde._parseRfc7231DateTime(data);\n case 7:\n return serde._parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = serde.LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new serde.NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? serde.toUtf8)((this.serdeContext?.base64Decoder ?? serde.fromBase64)(base64String));\n }\n}\n\nclass HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema$1, data) {\n const ns = schema.NormalizedSchema.of(schema$1);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? serde.toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? serde.fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n\nclass ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema$1, value) {\n const ns = schema.NormalizedSchema.of(schema$1);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = serde.dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? serde.toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : serde.quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = serde.LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? serde.toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = serde.generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n\nclass HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema$1, value) {\n const ns = schema.NormalizedSchema.of(schema$1);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n\nclass Field {\n name;\n kind;\n values;\n constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n\nclass Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n\nconst getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nconst resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (transport.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (error) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nconst contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nconst getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n\nconst escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n\nconst escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n\nexports.HttpRequest = transport.HttpRequest;\nexports.HttpResponse = transport.HttpResponse;\nexports.isValidHostname = transport.isValidHostname;\nexports.parseQueryString = transport.parseQueryString;\nexports.parseUrl = transport.parseUrl;\nexports.Field = Field;\nexports.Fields = Fields;\nexports.FromStringShapeDeserializer = FromStringShapeDeserializer;\nexports.HttpBindingProtocol = HttpBindingProtocol;\nexports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;\nexports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;\nexports.HttpProtocol = HttpProtocol;\nexports.RequestBuilder = RequestBuilder;\nexports.RpcProtocol = RpcProtocol;\nexports.SerdeContext = SerdeContext;\nexports.ToStringShapeSerializer = ToStringShapeSerializer;\nexports.buildQueryString = buildQueryString;\nexports.collectBody = collectBody;\nexports.contentLengthMiddleware = contentLengthMiddleware;\nexports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;\nexports.determineTimestampFormat = determineTimestampFormat;\nexports.escapeUri = escapeUri;\nexports.escapeUriPath = escapeUriPath;\nexports.extendedEncodeURIComponent = extendedEncodeURIComponent;\nexports.getContentLengthPlugin = getContentLengthPlugin;\nexports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;\nexports.requestBuilder = requestBuilder;\nexports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;\nexports.resolvedPath = resolvedPath;\n"
],
"mappings": ";2IAEA,SAAI,MACA,MACA,MACA,MAEE,EAAc,MAAO,EAAa,IAAI,WAAc,IAAY,CAClE,GAAI,aAAsB,WACtB,OAAO,EAAM,sBAAsB,OAAO,CAAU,EAExD,GAAI,CAAC,EACD,OAAO,EAAM,sBAAsB,OAAO,IAAI,UAAY,EAE9D,IAAM,EAAc,EAAQ,gBAAgB,CAAU,EACtD,OAAO,EAAM,sBAAsB,OAAO,MAAM,CAAW,GAG/D,SAAS,CAA0B,CAAC,EAAK,CACrC,OAAO,mBAAmB,CAAG,EAAE,QAAQ,WAAY,QAAS,CAAC,EAAG,CAC5D,MAAO,IAAM,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,YAAY,EACzD,EAGL,MAAM,CAAa,CACf,aACA,eAAe,CAAC,EAAc,CAC1B,KAAK,aAAe,EAE5B,CAEA,MAAM,UAAqB,CAAa,CACpC,QACA,uBACA,WAAW,CAAC,EAAS,CACjB,MAAM,EACN,KAAK,QAAU,EACf,KAAK,uBAAyB,EAAO,aAAa,IAAI,EAAQ,gBAAgB,EAC9E,QAAW,KAAO,EAAQ,qBAAuB,CAAC,EAC9C,KAAK,uBAAuB,SAAS,CAAG,EAGhD,cAAc,EAAG,CACb,OAAO,EAAU,YAErB,eAAe,EAAG,CACd,OAAO,EAAU,aAErB,eAAe,CAAC,EAAc,CAI1B,GAH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,MAAM,GAAG,EAAE,IAAI,CAAS,EAAE,KAAK,GAAG,EAErE,SAAS,EAAgB,CAAC,EAAO,CAC7B,IAAM,EAAQ,CAAC,EACf,QAAS,KAAO,OAAO,KAAK,CAAK,EAAE,KAAK,EAAG,CACvC,IAAM,EAAQ,EAAM,GAEpB,GADA,EAAM,EAAU,CAAG,EACf,MAAM,QAAQ,CAAK,EACnB,QAAS,EAAI,EAAG,EAAO,EAAM,OAAQ,EAAI,EAAM,IAC3C,EAAM,KAAK,GAAG,KAAO,EAAU,EAAM,EAAE,GAAG,EAG7C,KACD,IAAI,EAAU,EACd,GAAI,GAAS,OAAO,IAAU,SAC1B,GAAW,IAAI,EAAU,CAAK,IAElC,EAAM,KAAK,CAAO,GAG1B,OAAO,EAAM,KAAK,GAAG,EAGjB,eAAc,EAAU,YACxB,gBAAe,EAAU,aACzB,mBAAkB,EAAU,gBAC5B,oBAAmB,EAAU,iBAC7B,YAAW,EAAU,SACrB,SAAQ,EACR,UAAS,EACT,+BAA8B,EAC9B,uBAAsB,EACtB,qCAAoC,EACpC,mCAAkC,EAClC,gBAAe,EACf,kBAAiB,EACjB,eAAc,EACd,gBAAe,EACf,2BAA0B,EAC1B,oBAAmB,GACnB,eAAc,EACd,2BAA0B,EAC1B,kCAAiC,EACjC,4BAA2B,EAC3B,aAAY,EACZ,iBAAgB,GAChB,8BAA6B,EAC7B,0BAAyB,EACzB,wCAAuC,EACvC,kBAAiB,EACjB,mCAAkC,EAClC,gBAAe",
"debugId": "60E5615D11C1F38564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0B74FA6CAD3EBAC564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "508B8A2EF684408E64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/util/which.ts"],
"sourcesContent": [
"import whichPkg from \"which\"\nimport path from \"path\"\nimport { Global } from \"../global\"\n\nexport function which(cmd: string, env?: NodeJS.ProcessEnv) {\n const base = env?.PATH ?? env?.Path ?? process.env.PATH ?? process.env.Path ?? \"\"\n const full = base ? base + path.delimiter + Global.Path.bin : Global.Path.bin\n const result = whichPkg.sync(cmd, {\n nothrow: true,\n path: full,\n pathExt: env?.PATHEXT ?? env?.PathExt ?? process.env.PATHEXT ?? process.env.PathExt,\n })\n return typeof result === \"string\" ? result : null\n}\n"
],
"mappings": ";kJAAA,oBACA,yBAGO,SAAS,CAAK,CAAC,EAAa,EAAyB,CAC1D,IAAM,EAAO,GAAK,MAAQ,GAAK,MAAQ,QAAQ,IAAI,MAAQ,QAAQ,IAAI,MAAQ,GACzE,EAAO,EAAO,EAAO,EAAK,UAAY,EAAO,KAAK,IAAM,EAAO,KAAK,IACpE,EAAS,UAAS,KAAK,EAAK,CAChC,QAAS,GACT,KAAM,EACN,QAAS,GAAK,SAAW,GAAK,SAAW,QAAQ,IAAI,SAAW,QAAQ,IAAI,OAC9E,CAAC,EACD,OAAO,OAAO,IAAW,SAAW,EAAS",
"debugId": "4C3DB015A64B715B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/effect/layer-node.ts", "../core/src/global.ts", "../../node_modules/.bun/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js", "../core/src/util/flock.ts", "../core/src/util/hash.ts", "../core/src/flag/flag.ts", "../core/src/effect/app-node.ts"],
"sourcesContent": [
"import { Brand, Context, Layer } from \"effect\"\n\ntype AnyNode = Node<unknown, unknown, any>\ntype RuntimeLayer = Layer.Layer<never, unknown, unknown>\ntype NodeList<Item extends AnyNode = AnyNode> = readonly [] | readonly [Item, ...Item[]]\nexport type Output<Item> = [Item] extends [never] ? never : Item extends Node<infer A, unknown, any> ? A : never\nexport type Error<Item> = [Item] extends [never] ? never : Item extends Node<unknown, infer E, any> ? E : never\ntype NodeTag<Item> = [Item] extends [never] ? undefined : Item extends Node<unknown, unknown, infer T> ? T : never\ntype Missing<Required, Dependencies extends NodeList> = Exclude<Required, Output<Dependencies[number]>>\ntype CheckDependencies<Implementation extends Layer.Any, Dependencies extends NodeList> = [\n Missing<Layer.Services<Implementation>, Dependencies>,\n] extends [never]\n ? unknown\n : { readonly \"Missing dependencies\": Missing<Layer.Services<Implementation>, Dependencies> }\ndeclare const $OutputType: unique symbol\ndeclare const $ErrorType: unique symbol\n\nexport type Tag<Name extends string = string> = Name & Brand.Brand<\"LayerNode.Tag\">\n\nconst makeTag = Brand.nominal<Tag>()\n\nexport interface Node<A, E = never, T extends Tag | undefined = undefined> {\n readonly kind: \"layer\" | \"unbound\" | \"group\"\n readonly name: string\n readonly service?: Context.Service.Any\n readonly implementation?: Layer.Any\n readonly dependencies: readonly AnyNode[]\n readonly tag?: T\n readonly [$OutputType]?: () => A\n readonly [$ErrorType]?: () => E\n}\n\ntype NodeIdentity =\n | { readonly service: Context.Service.Any; readonly name?: never }\n | { readonly name: string; readonly service?: never }\ntype DistributiveOmit<A, K extends PropertyKey> = A extends unknown ? Omit<A, K> : never\n\nexport type TagConfig = Readonly<Record<string, readonly string[]>>\ntype TagNames<Config extends TagConfig> = keyof Config & string\ntype NodeInTags<Names extends string> = Node<unknown, unknown, Tag<Names> | undefined>\ntype CheckTags<Items extends NodeList, Names extends string> = [Exclude<Items[number], NodeInTags<Names>>] extends [\n never,\n]\n ? unknown\n : { readonly \"Invalid tag dependencies\": Exclude<Items[number], NodeInTags<Names>> }\n\nexport interface Tags<Config extends TagConfig> {\n readonly values: { readonly [Name in TagNames<Config>]: Tag<Name> }\n readonly make: <Name extends TagNames<Config>>(\n name: Name,\n ) => <const Implementation extends Layer.Any, const Items extends NodeList>(\n input: DistributiveOmit<MakeInput<Implementation, Items, Tag<Name>>, \"tag\"> &\n CheckTags<Items, Name | Extract<Config[Name][number], string>>,\n ) => Node<Layer.Success<Implementation>, Layer.Error<Implementation> | Error<Items[number]>, Tag<Name>>\n}\n\nexport function tags<const Config extends { readonly [Name in keyof Config]: readonly (keyof Config & string)[] }>(\n config: Config,\n): Tags<Config> {\n const names = Object.keys(config) as TagNames<Config>[]\n const values = Object.fromEntries(names.map((name) => [name, makeTag(name)])) as Tags<Config>[\"values\"]\n return {\n values,\n make: ((name: TagNames<Config>) => (input: DistributiveOmit<MakeInput<Layer.Any, NodeList, Tag>, \"tag\">) =>\n make({ ...input, tag: values[name] })) as Tags<Config>[\"make\"],\n }\n}\n\n// Nodes ---------------------------------------------------------------------\n\ntype MakeInput<\n Implementation extends Layer.Any,\n Items extends NodeList,\n T extends Tag | undefined = undefined,\n> = NodeIdentity & {\n readonly layer: Implementation\n readonly deps: Items & CheckDependencies<Implementation, NoInfer<Items>>\n readonly tag?: T\n}\n\nexport function make<\n const Implementation extends Layer.Any,\n const Items extends NodeList,\n const T extends Tag | undefined = undefined,\n>(\n input: MakeInput<Implementation, Items, T>,\n): Node<Layer.Success<Implementation>, Layer.Error<Implementation> | Error<Items[number]>, T> {\n return {\n kind: \"layer\",\n name: input.service !== undefined ? input.service.key : input.name,\n service: input.service,\n implementation: input.layer,\n dependencies: input.deps,\n tag: input.tag,\n }\n}\n\nexport function unbound<R, Shape, const T extends Tag>(service: Context.Key<R, Shape>, tag: T): Node<R, never, T> {\n return {\n kind: \"unbound\",\n name: service.key,\n service,\n dependencies: [],\n tag,\n }\n}\n\nexport function group<const Items extends readonly AnyNode[]>(\n dependencies: Items,\n): Node<Output<Items[number]>, Error<Items[number]>, NodeTag<Items[number]>> {\n return { kind: \"group\", name: \"group\", dependencies }\n}\n\nexport type Replacement = readonly [source: AnyNode, replacement: AnyNode | Layer.Any]\nexport type Replacements = readonly Replacement[]\n\ntype CheckReplacementErrors<SourceError, ReplacementError> = [Exclude<ReplacementError, SourceError>] extends [never]\n ? unknown\n : { readonly \"New replacement errors\": Exclude<ReplacementError, SourceError> }\n\ntype CheckReplacement<Item> = Item extends readonly [Node<infer A, infer E, infer T>, infer Replacement]\n ? Replacement extends Node<NoInfer<A>, infer E2, T>\n ? CheckReplacementErrors<E, NoInfer<E2>>\n : Replacement extends Layer.Layer<NoInfer<A>, infer E2, never>\n ? CheckReplacementErrors<E, NoInfer<E2>>\n : { readonly \"Invalid replacement\": Replacement }\n : { readonly \"Invalid replacement\": Item }\n\ntype CheckReplacements<Items extends Replacements> = {\n readonly [K in keyof Items]: CheckReplacement<Items[K]>\n}\n\ntype ValidReplacements<Items extends Replacements> = Items & CheckReplacements<Items>\n\nfunction replacementNode(source: AnyNode, replacement: AnyNode | Layer.Any) {\n const replacementNode = isNode(replacement)\n ? replacement\n : make({\n ...nodeMakeIdentity(source),\n layer: replacement as Layer.Layer<unknown, unknown>,\n deps: [],\n tag: source.tag,\n })\n if (source.name !== replacementNode.name) {\n throw new Error(`Cannot replace ${source.name} with ${replacementNode.name}`)\n }\n if (source.tag !== replacementNode.tag) {\n throw new Error(`Cannot replace ${source.name} across tags`)\n }\n return replacementNode\n}\n\nfunction nodeMakeIdentity(node: AnyNode): NodeIdentity {\n if (node.service !== undefined) return { service: node.service }\n return { name: node.name }\n}\n\nfunction isNode(input: Layer.Any | AnyNode): input is AnyNode {\n return \"kind\" in input && \"dependencies\" in input\n}\n\n// Tree -----------------------------------------------------------------------\n\ntype Visit<Result> = (node: AnyNode, context: VisitContext<Result>) => Result\n\ntype VisitContext<Result> = {\n readonly cache: Map<AnyNode, Result>\n readonly visit: (node: AnyNode) => Result\n}\n\nfunction walk<Result>(\n root: AnyNode,\n visit: Visit<Result>,\n options: {\n readonly cache?: Map<AnyNode, Result>\n readonly resolve?: (node: AnyNode) => AnyNode\n readonly detectCycles?: boolean\n } = {},\n) {\n const cache = options.cache ?? new Map<AnyNode, Result>()\n const visiting = new Set<AnyNode>()\n const stack: AnyNode[] = []\n\n const recur = (node: AnyNode): Result => {\n const target = options.resolve?.(node) ?? node\n const cached = cache.get(target)\n if (cached !== undefined || cache.has(target)) return cached!\n\n if (options.detectCycles !== false && visiting.has(target)) {\n const start = stack.indexOf(target)\n throw new Error(\n `Cycle detected in layer tree: ${[...stack.slice(start), target].map((item) => item.name).join(\" -> \")}`,\n )\n }\n\n visiting.add(target)\n stack.push(target)\n try {\n const result = visit(target, { cache, visit: recur })\n if (!cache.has(target)) cache.set(target, result)\n return result\n } finally {\n stack.pop()\n visiting.delete(target)\n }\n }\n\n return recur(root)\n}\n\nexport function hoist<A, E, T extends Tag, const Items extends Replacements = readonly []>(\n root: Node<A, E, any>,\n tag: T,\n replacements?: ValidReplacements<Items>,\n): {\n readonly node: Node<A, E>\n readonly hoisted: Node<unknown, E>\n} {\n const hoisted = new Map<string, AnyNode>()\n const replacementMap = replacementMapFrom(replacements)\n\n const node = walk<AnyNode>(\n root,\n (node, context) => {\n if (node.kind === \"group\") {\n return { ...node, dependencies: node.dependencies.map(context.visit) }\n }\n if (node.tag === tag) {\n const existing = hoisted.get(node.name)\n if (existing && existing !== node) {\n throw new Error(`Tag ${tag} has conflicting implementations for ${node.name}`)\n }\n hoisted.set(node.name, rewriteReplacementDependencies(node, replacementMap))\n return group([])\n }\n if (node.kind === \"unbound\") {\n return node\n }\n return { ...node, dependencies: node.dependencies.map(context.visit) }\n },\n { resolve: (node) => replacementMap.get(node.name) ?? node },\n )\n\n return {\n node: node as Node<A, E>,\n hoisted: group(Array.from(hoisted.values())) as Node<unknown, E>,\n }\n}\n\nexport function compile<A, E, const Items extends Replacements = readonly []>(\n root: Node<A, E, any>,\n replacements?: ValidReplacements<Items>,\n): Layer.Layer<A, E> {\n const replacementMap = replacementMapFrom(replacements)\n const cache = new Map<AnyNode, RuntimeLayer>()\n const compileNode = (node: AnyNode) =>\n walk<RuntimeLayer>(\n node,\n (node, context) => {\n if (node.kind === \"unbound\") throw new Error(`Unbound layer node: ${node.name}`)\n const dependencies = node.dependencies.flatMap(flatten).map(context.visit)\n const implementation = node.implementation! as RuntimeLayer\n return dependencies.length === 0\n ? implementation\n : implementation.pipe(Layer.provide(dependencies as [RuntimeLayer, ...RuntimeLayer[]]))\n },\n { cache, resolve: (node) => replacementMap.get(node.name) ?? node },\n )\n const layers = flatten(root).map((node) => compileNode(node))\n const layer = layers.reduce<RuntimeLayer>((result, layer) => layer.pipe(Layer.provideMerge(result)), Layer.empty)\n return layer as Layer.Layer<A, E>\n}\n\nfunction replacementMapFrom(replacements?: Replacements) {\n return (\n replacements?.reduce((map, [source, replacement]) => {\n const normalized = rewriteReplacementDependencies(replacementNode(source, replacement), map)\n const current = new Map([[source.name, normalized]])\n for (const [name, node] of map) map.set(name, rewriteReplacementDependencies(node, current))\n map.set(source.name, normalized)\n return map\n }, new Map<string, AnyNode>()) ?? new Map<string, AnyNode>()\n )\n}\n\nfunction rewriteReplacementDependencies(root: AnyNode, replacements: ReadonlyMap<string, AnyNode>) {\n if (replacements.size === 0) return root\n const cache = new Map<AnyNode, AnyNode>()\n const visiting = new Set<AnyNode>()\n const stack: AnyNode[] = []\n\n const recur = (node: AnyNode, isRoot = false): AnyNode => {\n const target = isRoot ? node : (replacements.get(node.name) ?? node)\n const cached = cache.get(target)\n if (cached !== undefined || cache.has(target)) return cached!\n if (visiting.has(target)) {\n const start = stack.indexOf(target)\n throw new Error(\n `Cycle detected in layer tree: ${[...stack.slice(start), target].map((item) => item.name).join(\" -> \")}`,\n )\n }\n\n visiting.add(target)\n stack.push(target)\n try {\n const dependencies = target.dependencies.map((dependency) => recur(dependency))\n const result = dependencies.every((dependency, index) => dependency === target.dependencies[index])\n ? target\n : { ...target, dependencies }\n cache.set(target, result)\n return result\n } finally {\n stack.pop()\n visiting.delete(target)\n }\n }\n\n return recur(root, true)\n}\n\nexport function hasUnbound(root: Node<unknown, unknown, any>, source: AnyNode): boolean {\n if (source.kind !== \"unbound\") throw new Error(`Cannot check non-unbound layer node: ${source.name}`)\n return walk<boolean>(root, (node, context) => {\n if (node === source) return true\n return node.dependencies.some(context.visit)\n })\n}\n\nfunction flatten(node: AnyNode): readonly AnyNode[] {\n return node.kind === \"group\" ? node.dependencies.flatMap(flatten) : [node]\n}\n\nexport * as LayerNode from \"./layer-node\"\n",
"import path from \"path\"\nimport fs from \"fs/promises\"\nimport { xdgData, xdgCache, xdgConfig, xdgState } from \"xdg-basedir\"\nimport os from \"os\"\nimport { Context, Effect, Layer } from \"effect\"\nimport { Flock } from \"./util/flock\"\nimport { Flag } from \"./flag/flag\"\nimport { makeGlobalNode } from \"./effect/app-node\"\n\nconst app = \"opencode\"\nconst data = path.join(xdgData!, app)\nconst cache = path.join(xdgCache!, app)\nconst config = path.join(xdgConfig!, app)\nconst state = path.join(xdgState!, app)\nconst tmp = path.join(os.tmpdir(), app)\n\nconst paths = {\n get home() {\n return process.env.OPENCODE_TEST_HOME ?? os.homedir()\n },\n data,\n bin: path.join(cache, \"bin\"),\n log: path.join(data, \"log\"),\n repos: path.join(data, \"repos\"),\n cache,\n config,\n state,\n tmp,\n}\n\nexport const Path = paths\n\nFlock.setGlobal({ state })\n\nawait Promise.all([\n fs.mkdir(Path.data, { recursive: true }),\n fs.mkdir(Path.config, { recursive: true }),\n fs.mkdir(Path.state, { recursive: true }),\n fs.mkdir(Path.tmp, { recursive: true }),\n fs.mkdir(Path.log, { recursive: true }),\n fs.mkdir(Path.bin, { recursive: true }),\n fs.mkdir(Path.repos, { recursive: true }),\n])\n\nexport class Service extends Context.Service<Service, Interface>()(\"@opencode/Global\") {}\n\nexport interface Interface {\n readonly home: string\n readonly data: string\n readonly cache: string\n readonly config: string\n readonly state: string\n readonly tmp: string\n readonly bin: string\n readonly log: string\n readonly repos: string\n}\n\nexport function make(input: Partial<Interface> = {}): Interface {\n return {\n home: Path.home,\n data: Path.data,\n cache: Path.cache,\n config: Flag.OPENCODE_CONFIG_DIR ?? Path.config,\n state: Path.state,\n tmp: Path.tmp,\n bin: Path.bin,\n log: Path.log,\n repos: Path.repos,\n ...input,\n }\n}\n\nconst layer = Layer.effect(\n Service,\n Effect.sync(() => Service.of(make())),\n)\n\nexport const node = makeGlobalNode({ service: Service, layer: layer, deps: [] })\n\nexport const layerWith = (input: Partial<Interface>) =>\n Layer.effect(\n Service,\n Effect.sync(() => Service.of(make(input))),\n )\n\nexport * as Global from \"./global\"\n",
"import os from 'os';\nimport path from 'path';\n\nconst homeDirectory = os.homedir();\nconst {env} = process;\n\nexport const xdgData = env.XDG_DATA_HOME ||\n\t(homeDirectory ? path.join(homeDirectory, '.local', 'share') : undefined);\n\nexport const xdgConfig = env.XDG_CONFIG_HOME ||\n\t(homeDirectory ? path.join(homeDirectory, '.config') : undefined);\n\nexport const xdgState = env.XDG_STATE_HOME ||\n\t(homeDirectory ? path.join(homeDirectory, '.local', 'state') : undefined);\n\nexport const xdgCache = env.XDG_CACHE_HOME || (homeDirectory ? path.join(homeDirectory, '.cache') : undefined);\n\nexport const xdgRuntime = env.XDG_RUNTIME_DIR || undefined;\n\nexport const xdgDataDirectories = (env.XDG_DATA_DIRS || '/usr/local/share/:/usr/share/').split(':');\n\nif (xdgData) {\n\txdgDataDirectories.unshift(xdgData);\n}\n\nexport const xdgConfigDirectories = (env.XDG_CONFIG_DIRS || '/etc/xdg').split(':');\n\nif (xdgConfig) {\n\txdgConfigDirectories.unshift(xdgConfig);\n}\n",
"import path from \"path\"\nimport os from \"os\"\nimport { randomBytes, randomUUID } from \"crypto\"\nimport { mkdir, readFile, rm, stat, utimes, writeFile } from \"fs/promises\"\nimport { Hash } from \"./hash\"\nimport { Effect } from \"effect\"\n\nexport type FlockGlobal = {\n state: string\n}\n\nexport namespace Flock {\n let global: FlockGlobal | undefined\n\n export function setGlobal(g: FlockGlobal) {\n global = g\n }\n\n const root = () => {\n if (!global) throw new Error(\"Flock global not set\")\n return path.join(global.state, \"locks\")\n }\n\n // Defaults for callers that do not provide timing options.\n const defaultOpts = {\n staleMs: 60_000,\n timeoutMs: 5 * 60_000,\n baseDelayMs: 100,\n maxDelayMs: 2_000,\n }\n\n export interface WaitEvent {\n key: string\n attempt: number\n delay: number\n waited: number\n }\n\n export type Wait = (input: WaitEvent) => void | Promise<void>\n\n export interface Options {\n dir?: string\n signal?: AbortSignal\n staleMs?: number\n timeoutMs?: number\n baseDelayMs?: number\n maxDelayMs?: number\n onWait?: Wait\n }\n\n type Opts = {\n staleMs: number\n timeoutMs: number\n baseDelayMs: number\n maxDelayMs: number\n }\n\n type Owned = {\n acquired: true\n startHeartbeat: (intervalMs?: number) => void\n release: () => Promise<void>\n }\n\n export interface Lease {\n release: () => Promise<void>\n [Symbol.asyncDispose]: () => Promise<void>\n }\n\n function code(err: unknown) {\n if (typeof err !== \"object\" || err === null || !(\"code\" in err)) return\n const value = err.code\n if (typeof value !== \"string\") return\n return value\n }\n\n function sleep(ms: number, signal?: AbortSignal) {\n return new Promise<void>((resolve, reject) => {\n if (signal?.aborted) {\n reject(signal.reason ?? new Error(\"Aborted\"))\n return\n }\n\n let timer: NodeJS.Timeout | undefined\n\n const done = () => {\n signal?.removeEventListener(\"abort\", abort)\n resolve()\n }\n\n const abort = () => {\n if (timer) {\n clearTimeout(timer)\n }\n signal?.removeEventListener(\"abort\", abort)\n reject(signal?.reason ?? new Error(\"Aborted\"))\n }\n\n signal?.addEventListener(\"abort\", abort, { once: true })\n timer = setTimeout(done, ms)\n })\n }\n\n function jitter(ms: number) {\n const j = Math.floor(ms * 0.3)\n const d = Math.floor(Math.random() * (2 * j + 1)) - j\n return Math.max(0, ms + d)\n }\n\n function mono() {\n return performance.now()\n }\n\n function wall() {\n return performance.timeOrigin + mono()\n }\n\n async function stats(file: string) {\n try {\n return await stat(file)\n } catch (err) {\n const errCode = code(err)\n if (errCode === \"ENOENT\" || errCode === \"ENOTDIR\") return\n throw err\n }\n }\n\n async function stale(lockDir: string, heartbeatPath: string, metaPath: string, staleMs: number) {\n // Stale detection allows automatic recovery after crashed owners.\n const now = wall()\n const heartbeat = await stats(heartbeatPath)\n if (heartbeat) {\n return now - heartbeat.mtimeMs > staleMs\n }\n\n const meta = await stats(metaPath)\n if (meta) {\n return now - meta.mtimeMs > staleMs\n }\n\n const dir = await stats(lockDir)\n if (!dir) {\n return false\n }\n\n return now - dir.mtimeMs > staleMs\n }\n\n async function tryAcquireLockDir(lockDir: string, opts: Opts): Promise<Owned | { acquired: false }> {\n const token = randomUUID?.() ?? randomBytes(16).toString(\"hex\")\n const metaPath = path.join(lockDir, \"meta.json\")\n const heartbeatPath = path.join(lockDir, \"heartbeat\")\n\n try {\n await mkdir(lockDir, { mode: 0o700 })\n } catch (err) {\n if (code(err) !== \"EEXIST\") {\n throw err\n }\n\n if (!(await stale(lockDir, heartbeatPath, metaPath, opts.staleMs))) {\n return { acquired: false }\n }\n\n const breakerPath = lockDir + \".breaker\"\n try {\n await mkdir(breakerPath, { mode: 0o700 })\n } catch (claimErr) {\n const errCode = code(claimErr)\n if (errCode === \"EEXIST\") {\n const breaker = await stats(breakerPath)\n if (breaker && wall() - breaker.mtimeMs > opts.staleMs) {\n await rm(breakerPath, { recursive: true, force: true }).catch(() => undefined)\n }\n return { acquired: false }\n }\n\n if (errCode === \"ENOENT\" || errCode === \"ENOTDIR\") {\n return { acquired: false }\n }\n\n throw claimErr\n }\n\n try {\n // Breaker ownership ensures only one contender performs stale cleanup.\n if (!(await stale(lockDir, heartbeatPath, metaPath, opts.staleMs))) {\n return { acquired: false }\n }\n\n await rm(lockDir, { recursive: true, force: true })\n\n try {\n await mkdir(lockDir, { mode: 0o700 })\n } catch (retryErr) {\n const errCode = code(retryErr)\n if (errCode === \"EEXIST\" || errCode === \"ENOTEMPTY\") {\n return { acquired: false }\n }\n throw retryErr\n }\n } finally {\n await rm(breakerPath, { recursive: true, force: true }).catch(() => undefined)\n }\n }\n\n const meta = {\n token,\n pid: process.pid,\n hostname: os.hostname(),\n createdAt: new Date().toISOString(),\n }\n\n await writeFile(heartbeatPath, \"\", { flag: \"wx\" }).catch(async () => {\n await rm(lockDir, { recursive: true, force: true })\n throw new Error(\"Lock acquired but heartbeat already existed (possible compromise).\")\n })\n\n await writeFile(metaPath, JSON.stringify(meta, null, 2), { flag: \"wx\" }).catch(async () => {\n await rm(lockDir, { recursive: true, force: true })\n throw new Error(\"Lock acquired but meta.json already existed (possible compromise).\")\n })\n\n let timer: NodeJS.Timeout | undefined\n\n const startHeartbeat = (intervalMs = Math.max(100, Math.floor(opts.staleMs / 3))) => {\n if (timer) return\n // Heartbeat prevents long critical sections from being evicted as stale.\n timer = setInterval(() => {\n const t = new Date()\n void utimes(heartbeatPath, t, t).catch(() => undefined)\n }, intervalMs)\n timer.unref?.()\n }\n\n const release = async () => {\n if (timer) {\n clearInterval(timer)\n timer = undefined\n }\n\n const current = await readFile(metaPath, \"utf8\")\n .then((raw) => {\n const parsed = JSON.parse(raw)\n if (!parsed || typeof parsed !== \"object\") return {}\n return {\n token: \"token\" in parsed && typeof parsed.token === \"string\" ? parsed.token : undefined,\n }\n })\n .catch((err) => {\n const errCode = code(err)\n if (errCode === \"ENOENT\" || errCode === \"ENOTDIR\") {\n throw new Error(\"Refusing to release: lock is compromised (metadata missing).\")\n }\n if (err instanceof SyntaxError) {\n throw new Error(\"Refusing to release: lock is compromised (metadata invalid).\")\n }\n throw err\n })\n // Token check prevents deleting a lock that was re-acquired by another process.\n if (current.token !== token) {\n throw new Error(\"Refusing to release: lock token mismatch (not the owner).\")\n }\n\n await rm(lockDir, { recursive: true, force: true })\n }\n\n return {\n acquired: true,\n startHeartbeat,\n release,\n }\n }\n\n async function acquireLockDir(\n lockDir: string,\n input: { key: string; onWait?: Wait; signal?: AbortSignal },\n opts: Opts,\n ) {\n const stop = mono() + opts.timeoutMs\n let attempt = 0\n let waited = 0\n let delay = opts.baseDelayMs\n\n while (true) {\n input.signal?.throwIfAborted()\n\n const res = await tryAcquireLockDir(lockDir, opts)\n if (res.acquired) {\n return res\n }\n\n if (mono() > stop) {\n throw new Error(`Timed out waiting for lock: ${input.key}`)\n }\n\n attempt += 1\n const ms = jitter(delay)\n await input.onWait?.({\n key: input.key,\n attempt,\n delay: ms,\n waited,\n })\n await sleep(ms, input.signal)\n waited += ms\n delay = Math.min(opts.maxDelayMs, Math.floor(delay * 1.7))\n }\n }\n\n export async function acquire(key: string, input: Options = {}): Promise<Lease> {\n input.signal?.throwIfAborted()\n const cfg: Opts = {\n staleMs: input.staleMs ?? defaultOpts.staleMs,\n timeoutMs: input.timeoutMs ?? defaultOpts.timeoutMs,\n baseDelayMs: input.baseDelayMs ?? defaultOpts.baseDelayMs,\n maxDelayMs: input.maxDelayMs ?? defaultOpts.maxDelayMs,\n }\n const dir = input.dir ?? root()\n\n await mkdir(dir, { recursive: true })\n const lockfile = path.join(dir, Hash.fast(key) + \".lock\")\n const lock = await acquireLockDir(\n lockfile,\n {\n key,\n onWait: input.onWait,\n signal: input.signal,\n },\n cfg,\n )\n lock.startHeartbeat()\n\n const release = () => lock.release()\n return {\n release,\n [Symbol.asyncDispose]() {\n return release()\n },\n }\n }\n\n export async function withLock<T>(key: string, fn: () => Promise<T>, input: Options = {}) {\n await using _ = await acquire(key, input)\n input.signal?.throwIfAborted()\n return await fn()\n }\n\n export const effect = Effect.fn(\"Flock.effect\")(function* (key: string, input: Options = {}) {\n return yield* Effect.acquireRelease(\n Effect.promise((signal) => Flock.acquire(key, { ...input, signal })).pipe(\n Effect.withSpan(\"Flock.acquire\", {\n attributes: { key },\n }),\n ),\n (lock) => Effect.promise(() => lock.release()).pipe(Effect.withSpan(\"Flock.release\")),\n ).pipe(Effect.asVoid)\n })\n}\n",
"import { createHash } from \"crypto\"\n\nexport namespace Hash {\n export function fast(input: string | Buffer): string {\n return createHash(\"sha1\").update(input).digest(\"hex\")\n }\n\n export function sha256(input: string | Buffer): string {\n return createHash(\"sha256\").update(input).digest(\"hex\")\n }\n}\n",
"import { Config } from \"effect\"\n\nexport function truthy(key: string) {\n const value = process.env[key]?.toLowerCase()\n return value === \"true\" || value === \"1\"\n}\n\nconst copy = process.env[\"OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT\"]\nconst fff = process.env[\"OPENCODE_DISABLE_FFF\"]\n\nfunction enabledByExperimental(key: string) {\n return process.env[key] === undefined ? truthy(\"OPENCODE_EXPERIMENTAL\") : truthy(key)\n}\n\nexport const Flag = {\n OTEL_EXPORTER_OTLP_ENDPOINT: process.env[\"OTEL_EXPORTER_OTLP_ENDPOINT\"],\n OTEL_EXPORTER_OTLP_HEADERS: process.env[\"OTEL_EXPORTER_OTLP_HEADERS\"],\n\n OPENCODE_AUTO_HEAP_SNAPSHOT: truthy(\"OPENCODE_AUTO_HEAP_SNAPSHOT\"),\n OPENCODE_GIT_BASH_PATH: process.env[\"OPENCODE_GIT_BASH_PATH\"],\n OPENCODE_CONFIG: process.env[\"OPENCODE_CONFIG\"],\n OPENCODE_CONFIG_CONTENT: process.env[\"OPENCODE_CONFIG_CONTENT\"],\n OPENCODE_DISABLE_AUTOUPDATE: truthy(\"OPENCODE_DISABLE_AUTOUPDATE\"),\n OPENCODE_ALWAYS_NOTIFY_UPDATE: truthy(\"OPENCODE_ALWAYS_NOTIFY_UPDATE\"),\n OPENCODE_DISABLE_PRUNE: truthy(\"OPENCODE_DISABLE_PRUNE\"),\n OPENCODE_DISABLE_TERMINAL_TITLE: truthy(\"OPENCODE_DISABLE_TERMINAL_TITLE\"),\n OPENCODE_SHOW_TTFD: truthy(\"OPENCODE_SHOW_TTFD\"),\n OPENCODE_DISABLE_AUTOCOMPACT: truthy(\"OPENCODE_DISABLE_AUTOCOMPACT\"),\n OPENCODE_DISABLE_MODELS_FETCH: truthy(\"OPENCODE_DISABLE_MODELS_FETCH\"),\n OPENCODE_DISABLE_MOUSE: truthy(\"OPENCODE_DISABLE_MOUSE\"),\n OPENCODE_FAKE_VCS: process.env[\"OPENCODE_FAKE_VCS\"],\n OPENCODE_SERVER_PASSWORD: process.env[\"OPENCODE_SERVER_PASSWORD\"],\n OPENCODE_SERVER_USERNAME: process.env[\"OPENCODE_SERVER_USERNAME\"],\n OPENCODE_DISABLE_FFF: fff === undefined ? process.platform === \"win32\" : truthy(\"OPENCODE_DISABLE_FFF\"),\n\n // Experimental\n OPENCODE_EXPERIMENTAL_FILEWATCHER: Config.boolean(\"OPENCODE_EXPERIMENTAL_FILEWATCHER\").pipe(\n Config.withDefault(false),\n ),\n OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: Config.boolean(\"OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER\").pipe(\n Config.withDefault(false),\n ),\n OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT:\n copy === undefined ? process.platform === \"win32\" : truthy(\"OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT\"),\n OPENCODE_MODELS_URL: process.env[\"OPENCODE_MODELS_URL\"],\n OPENCODE_MODELS_PATH: process.env[\"OPENCODE_MODELS_PATH\"],\n OPENCODE_DB: process.env[\"OPENCODE_DB\"],\n\n OPENCODE_WORKSPACE_ID: process.env[\"OPENCODE_WORKSPACE_ID\"],\n OPENCODE_EXPERIMENTAL_WORKSPACES: enabledByExperimental(\"OPENCODE_EXPERIMENTAL_WORKSPACES\"),\n\n // Evaluated at access time (not module load) because tests, the CLI, and\n // external tooling set these env vars at runtime.\n get OPENCODE_DISABLE_PROJECT_CONFIG() {\n return truthy(\"OPENCODE_DISABLE_PROJECT_CONFIG\")\n },\n get OPENCODE_EXPERIMENTAL_REFERENCES() {\n return enabledByExperimental(\"OPENCODE_EXPERIMENTAL_REFERENCES\")\n },\n get OPENCODE_TUI_CONFIG() {\n return process.env[\"OPENCODE_TUI_CONFIG\"]\n },\n get OPENCODE_CONFIG_DIR() {\n return process.env[\"OPENCODE_CONFIG_DIR\"]\n },\n get OPENCODE_PURE() {\n return truthy(\"OPENCODE_PURE\")\n },\n get OPENCODE_PERMISSION() {\n return process.env[\"OPENCODE_PERMISSION\"]\n },\n get OPENCODE_PLUGIN_META_FILE() {\n return process.env[\"OPENCODE_PLUGIN_META_FILE\"]\n },\n get OPENCODE_CLIENT() {\n return process.env[\"OPENCODE_CLIENT\"] ?? \"cli\"\n },\n}\n",
"import { LayerNode } from \"./layer-node\"\n\nexport const tags = LayerNode.tags({\n location: [\"global\"],\n global: [],\n})\n\nexport type GlobalNode<A, E = never> = LayerNode.Node<A, E, (typeof tags.values)[\"global\"]>\nexport type LocationNode<A, E = never> = LayerNode.Node<A, E, (typeof tags.values)[\"location\"]>\n\nexport const makeGlobalNode = tags.make(\"global\")\nexport const makeLocationNode = tags.make(\"location\")\n\nexport * as Node from \"./app-node\"\n"
],
"mappings": ";qQAmBA,SAAM,GAAU,GAAM,QAAa,EAqC5B,SAAS,EAAkG,CAChH,EACc,CACd,IAAM,EAAQ,OAAO,KAAK,CAAM,EAC1B,EAAS,OAAO,YAAY,EAAM,IAAI,CAAC,IAAS,CAAC,EAAM,GAAQ,CAAI,CAAC,CAAC,CAAC,EAC5E,MAAO,CACL,SACA,KAAO,CAAC,IAA2B,CAAC,IAClC,EAAK,IAAK,EAAO,IAAK,EAAO,EAAM,CAAC,CACxC,EAeK,SAAS,CAIf,CACC,EAC4F,CAC5F,MAAO,CACL,KAAM,QACN,KAAM,EAAM,UAAY,OAAY,EAAM,QAAQ,IAAM,EAAM,KAC9D,QAAS,EAAM,QACf,eAAgB,EAAM,MACtB,aAAc,EAAM,KACpB,IAAK,EAAM,GACb,EAGK,SAAS,EAAsC,CAAC,EAAgC,EAA2B,CAChH,MAAO,CACL,KAAM,UACN,KAAM,EAAQ,IACd,UACA,aAAc,CAAC,EACf,KACF,EAGK,SAAS,CAA6C,CAC3D,EAC2E,CAC3E,MAAO,CAAE,KAAM,QAAS,KAAM,QAAS,cAAa,EAwBtD,SAAS,EAAe,CAAC,EAAiB,EAAkC,CAC1E,IAAM,EAAkB,GAAO,CAAW,EACtC,EACA,EAAK,IACA,GAAiB,CAAM,EAC1B,MAAO,EACP,KAAM,CAAC,EACP,IAAK,EAAO,GACd,CAAC,EACL,GAAI,EAAO,OAAS,EAAgB,KAClC,MAAU,MAAM,kBAAkB,EAAO,aAAa,EAAgB,MAAM,EAE9E,GAAI,EAAO,MAAQ,EAAgB,IACjC,MAAU,MAAM,kBAAkB,EAAO,kBAAkB,EAE7D,OAAO,EAGT,SAAS,EAAgB,CAAC,EAA6B,CACrD,GAAI,EAAK,UAA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F,IAAM,GAAQ,EAAM,OAClB,EACA,EAAO,KAAK,IAAM,EAAQ,GAAG,GAAK,CAAC,CAAC,CACtC,EAEa,GAAO,GAAe,CAAE,QAAS,EAAS,MAAO,GAAO,KAAM,CAAC,CAAE,CAAC,EAElE,GAAY,CAAC,IACxB,EAAM,OACJ,EACA,EAAO,KAAK,IAAM,EAAQ,GAAG,GAAK,CAAK,CAAC,CAAC,CAC3C",
"debugId": "48C0FD919003D67264756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260225215848_workspace.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260225215848_workspace\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`workspace\\` (\n \\`id\\` text PRIMARY KEY,\n \\`branch\\` text,\n \\`project_id\\` text NOT NULL,\n \\`config\\` text NOT NULL,\n CONSTRAINT \\`fk_workspace_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,2BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sUAQb,EACF,EAEL",
"debugId": "7941BAE6A0B7160064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "D06B7C8F2AE6D0DC64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260228203230_blue_harpoon.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260228203230_blue_harpoon\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`account\\` (\n \\`id\\` text PRIMARY KEY,\n \\`email\\` text NOT NULL,\n \\`url\\` text NOT NULL,\n \\`access_token\\` text NOT NULL,\n \\`refresh_token\\` text NOT NULL,\n \\`token_expiry\\` integer,\n \\`selected_org_id\\` text,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`account_state\\` (\n \\`id\\` integer PRIMARY KEY NOT NULL,\n \\`active_account_id\\` text,\n FOREIGN KEY (\\`active_account_id\\`) REFERENCES \\`account\\`(\\`id\\`) ON UPDATE no action ON DELETE set null\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,8BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,4YAYb,EACD,MAAO,EAAG,IAAI,gQAMb,EACF,EAEL",
"debugId": "F0520BCBC9F2A43664756E2164756E21",
"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": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "06CD12C3BDDC973164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3DA9C14C9611010164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "F11F2A394F803A0264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "998A99723D50D3A764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-error.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.js"],
"sourcesContent": [
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_error_exports = {};\n__export(token_error_exports, {\n VercelOidcTokenError: () => VercelOidcTokenError\n});\nmodule.exports = __toCommonJS(token_error_exports);\nclass VercelOidcTokenError extends Error {\n constructor(message, cause) {\n super(message);\n this.name = \"VercelOidcTokenError\";\n this.cause = cause;\n }\n toString() {\n if (this.cause) {\n return `${this.name}: ${this.message}: ${this.cause}`;\n }\n return `${this.name}: ${this.message}`;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n VercelOidcTokenError\n});\n",
"\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_io_exports = {};\n__export(token_io_exports, {\n findRootDir: () => findRootDir,\n getUserDataDir: () => getUserDataDir\n});\nmodule.exports = __toCommonJS(token_io_exports);\nvar import_path = __toESM(require(\"path\"));\nvar import_fs = __toESM(require(\"fs\"));\nvar import_os = __toESM(require(\"os\"));\nvar import_token_error = require(\"./token-error\");\nfunction findRootDir() {\n try {\n let dir = process.cwd();\n while (dir !== import_path.default.dirname(dir)) {\n const pkgPath = import_path.default.join(dir, \".vercel\");\n if (import_fs.default.existsSync(pkgPath)) {\n return dir;\n }\n dir = import_path.default.dirname(dir);\n }\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(\n \"Token refresh only supported in node server environments\"\n );\n }\n return null;\n}\nfunction getUserDataDir() {\n if (process.env.XDG_DATA_HOME) {\n return process.env.XDG_DATA_HOME;\n }\n switch (import_os.default.platform()) {\n case \"darwin\":\n return import_path.default.join(import_os.default.homedir(), \"Library/Application Support\");\n case \"linux\":\n return import_path.default.join(import_os.default.homedir(), \".local/share\");\n case \"win32\":\n if (process.env.LOCALAPPDATA) {\n return process.env.LOCALAPPDATA;\n }\n return null;\n default:\n return null;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n findRootDir,\n getUserDataDir\n});\n",
"\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_config_exports = {};\n__export(auth_config_exports, {\n isValidAccessToken: () => isValidAccessToken,\n readAuthConfig: () => readAuthConfig,\n writeAuthConfig: () => writeAuthConfig\n});\nmodule.exports = __toCommonJS(auth_config_exports);\nvar fs = __toESM(require(\"fs\"));\nvar path = __toESM(require(\"path\"));\nvar import_token_util = require(\"./token-util\");\nfunction getAuthConfigPath() {\n const dataDir = (0, import_token_util.getVercelDataDir)();\n if (!dataDir) {\n throw new Error(\n `Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`\n );\n }\n return path.join(dataDir, \"auth.json\");\n}\nfunction readAuthConfig() {\n try {\n const authPath = getAuthConfigPath();\n if (!fs.existsSync(authPath)) {\n return null;\n }\n const content = fs.readFileSync(authPath, \"utf8\");\n if (!content) {\n return null;\n }\n return JSON.parse(content);\n } catch (error) {\n return null;\n }\n}\nfunction writeAuthConfig(config) {\n const authPath = getAuthConfigPath();\n const authDir = path.dirname(authPath);\n if (!fs.existsSync(authDir)) {\n fs.mkdirSync(authDir, { mode: 504, recursive: true });\n }\n fs.writeFileSync(authPath, JSON.stringify(config, null, 2), { mode: 384 });\n}\nfunction isValidAccessToken(authConfig, expirationBufferMs = 0) {\n if (!authConfig.token)\n return false;\n if (typeof authConfig.expiresAt !== \"number\")\n return true;\n const nowInSeconds = Math.floor(Date.now() / 1e3);\n const bufferInSeconds = expirationBufferMs / 1e3;\n return authConfig.expiresAt >= nowInSeconds + bufferInSeconds;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n isValidAccessToken,\n readAuthConfig,\n writeAuthConfig\n});\n",
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar oauth_exports = {};\n__export(oauth_exports, {\n processTokenResponse: () => processTokenResponse,\n refreshTokenRequest: () => refreshTokenRequest\n});\nmodule.exports = __toCommonJS(oauth_exports);\nvar import_os = require(\"os\");\nconst VERCEL_ISSUER = \"https://vercel.com\";\nconst VERCEL_CLI_CLIENT_ID = \"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp\";\nconst userAgent = `@vercel/oidc node-${process.version} ${(0, import_os.platform)()} (${(0, import_os.arch)()}) ${(0, import_os.hostname)()}`;\nlet _tokenEndpoint = null;\nasync function getTokenEndpoint() {\n if (_tokenEndpoint) {\n return _tokenEndpoint;\n }\n const discoveryUrl = `${VERCEL_ISSUER}/.well-known/openid-configuration`;\n const response = await fetch(discoveryUrl, {\n headers: { \"user-agent\": userAgent }\n });\n if (!response.ok) {\n throw new Error(\"Failed to discover OAuth endpoints\");\n }\n const metadata = await response.json();\n if (!metadata || typeof metadata.token_endpoint !== \"string\") {\n throw new Error(\"Invalid OAuth discovery response\");\n }\n const endpoint = metadata.token_endpoint;\n _tokenEndpoint = endpoint;\n return endpoint;\n}\nasync function refreshTokenRequest(options) {\n const tokenEndpoint = await getTokenEndpoint();\n return await fetch(tokenEndpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"user-agent\": userAgent\n },\n body: new URLSearchParams({\n client_id: VERCEL_CLI_CLIENT_ID,\n grant_type: \"refresh_token\",\n ...options\n })\n });\n}\nasync function processTokenResponse(response) {\n const json = await response.json();\n if (!response.ok) {\n const errorMsg = typeof json === \"object\" && json && \"error\" in json ? String(json.error) : \"Token refresh failed\";\n return [new Error(errorMsg)];\n }\n if (typeof json !== \"object\" || json === null) {\n return [new Error(\"Invalid token response\")];\n }\n if (typeof json.access_token !== \"string\") {\n return [new Error(\"Missing access_token in response\")];\n }\n if (json.token_type !== \"Bearer\") {\n return [new Error(\"Invalid token_type in response\")];\n }\n if (typeof json.expires_in !== \"number\") {\n return [new Error(\"Missing expires_in in response\")];\n }\n return [null, json];\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n processTokenResponse,\n refreshTokenRequest\n});\n",
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_errors_exports = {};\n__export(auth_errors_exports, {\n AccessTokenMissingError: () => AccessTokenMissingError,\n RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError\n});\nmodule.exports = __toCommonJS(auth_errors_exports);\nclass AccessTokenMissingError extends Error {\n constructor() {\n super(\n \"No authentication found. Please log in with the Vercel CLI (vercel login).\"\n );\n this.name = \"AccessTokenMissingError\";\n }\n}\nclass RefreshAccessTokenFailedError extends Error {\n constructor(cause) {\n super(\"Failed to refresh authentication token.\", { cause });\n this.name = \"RefreshAccessTokenFailedError\";\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AccessTokenMissingError,\n RefreshAccessTokenFailedError\n});\n",
"\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_util_exports = {};\n__export(token_util_exports, {\n assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,\n findProjectInfo: () => findProjectInfo,\n getTokenPayload: () => getTokenPayload,\n getVercelDataDir: () => getVercelDataDir,\n getVercelOidcToken: () => getVercelOidcToken,\n getVercelToken: () => getVercelToken,\n isExpired: () => isExpired,\n loadToken: () => loadToken,\n saveToken: () => saveToken\n});\nmodule.exports = __toCommonJS(token_util_exports);\nvar path = __toESM(require(\"path\"));\nvar fs = __toESM(require(\"fs\"));\nvar import_token_error = require(\"./token-error\");\nvar import_token_io = require(\"./token-io\");\nvar import_auth_config = require(\"./auth-config\");\nvar import_oauth = require(\"./oauth\");\nvar import_auth_errors = require(\"./auth-errors\");\nfunction getVercelDataDir() {\n const vercelFolder = \"com.vercel.cli\";\n const dataDir = (0, import_token_io.getUserDataDir)();\n if (!dataDir) {\n return null;\n }\n return path.join(dataDir, vercelFolder);\n}\nasync function getVercelToken(options) {\n const authConfig = (0, import_auth_config.readAuthConfig)();\n if (!authConfig?.token) {\n throw new import_auth_errors.AccessTokenMissingError();\n }\n if ((0, import_auth_config.isValidAccessToken)(authConfig, options?.expirationBufferMs)) {\n return authConfig.token;\n }\n if (!authConfig.refreshToken) {\n (0, import_auth_config.writeAuthConfig)({});\n throw new import_auth_errors.RefreshAccessTokenFailedError(\"No refresh token available\");\n }\n try {\n const tokenResponse = await (0, import_oauth.refreshTokenRequest)({\n refresh_token: authConfig.refreshToken\n });\n const [tokensError, tokens] = await (0, import_oauth.processTokenResponse)(tokenResponse);\n if (tokensError || !tokens) {\n (0, import_auth_config.writeAuthConfig)({});\n throw new import_auth_errors.RefreshAccessTokenFailedError(tokensError);\n }\n const updatedConfig = {\n token: tokens.access_token,\n expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in\n };\n if (tokens.refresh_token) {\n updatedConfig.refreshToken = tokens.refresh_token;\n }\n (0, import_auth_config.writeAuthConfig)(updatedConfig);\n return updatedConfig.token;\n } catch (error) {\n (0, import_auth_config.writeAuthConfig)({});\n if (error instanceof import_auth_errors.AccessTokenMissingError || error instanceof import_auth_errors.RefreshAccessTokenFailedError) {\n throw error;\n }\n throw new import_auth_errors.RefreshAccessTokenFailedError(error);\n }\n}\nasync function getVercelOidcToken(authToken, projectId, teamId) {\n const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : \"\"}`;\n const res = await fetch(url, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${authToken}`\n }\n });\n if (!res.ok) {\n throw new import_token_error.VercelOidcTokenError(\n `Failed to refresh OIDC token: ${res.statusText}`\n );\n }\n const tokenRes = await res.json();\n assertVercelOidcTokenResponse(tokenRes);\n return tokenRes;\n}\nfunction assertVercelOidcTokenResponse(res) {\n if (!res || typeof res !== \"object\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again\"\n );\n }\n if (!(\"token\" in res) || typeof res.token !== \"string\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again\"\n );\n }\n}\nfunction findProjectInfo() {\n const dir = (0, import_token_io.findRootDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find project root directory. Have you linked your project with `vc link?`\"\n );\n }\n const prjPath = path.join(dir, \".vercel\", \"project.json\");\n if (!fs.existsSync(prjPath)) {\n throw new import_token_error.VercelOidcTokenError(\n \"project.json not found, have you linked your project with `vc link?`\"\n );\n }\n const prj = JSON.parse(fs.readFileSync(prjPath, \"utf8\"));\n if (typeof prj.projectId !== \"string\" && typeof prj.orgId !== \"string\") {\n throw new TypeError(\n \"Expected a string-valued projectId property. Try running `vc link` to re-link your project.\"\n );\n }\n return { projectId: prj.projectId, teamId: prj.orgId };\n}\nfunction saveToken(token, projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n const tokenJson = JSON.stringify(token);\n fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });\n fs.writeFileSync(tokenPath, tokenJson);\n fs.chmodSync(tokenPath, 432);\n return;\n}\nfunction loadToken(projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n if (!fs.existsSync(tokenPath)) {\n return null;\n }\n const token = JSON.parse(fs.readFileSync(tokenPath, \"utf8\"));\n assertVercelOidcTokenResponse(token);\n return token;\n}\nfunction getTokenPayload(token) {\n const tokenParts = token.split(\".\");\n if (tokenParts.length !== 3) {\n throw new import_token_error.VercelOidcTokenError(\n \"Invalid token. Please run `vc env pull` and try again\"\n );\n }\n const base64 = tokenParts[1].replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64.padEnd(\n base64.length + (4 - base64.length % 4) % 4,\n \"=\"\n );\n return JSON.parse(Buffer.from(padded, \"base64\").toString(\"utf8\"));\n}\nfunction isExpired(token, bufferMs = 0) {\n return token.exp * 1e3 < Date.now() + bufferMs;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n assertVercelOidcTokenResponse,\n findProjectInfo,\n getTokenPayload,\n getVercelDataDir,\n getVercelOidcToken,\n getVercelToken,\n isEx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,EAChD,GAAI,CAAC,EACH,MAAM,IAAI,EAAmB,qBAC3B,yEACF,EAEF,IAAM,EAAY,EAAK,KAAK,EAAK,mBAAoB,GAAG,QAAgB,EACxE,GAAI,CAAC,EAAG,WAAW,CAAS,EAC1B,OAAO,KAET,IAAM,EAAQ,KAAK,MAAM,EAAG,aAAa,EAAW,MAAM,CAAC,EAE3D,OADA,EAA8B,CAAK,EAC5B,EAET,SAAS,EAAe,CAAC,EAAO,CAC9B,IAAM,EAAa,EAAM,MAAM,GAAG,EAClC,GAAI,EAAW,SAAW,EACxB,MAAM,IAAI,EAAmB,qBAC3B,uDACF,EAEF,IAAM,EAAS,EAAW,GAAG,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAC3D,EAAS,EAAO,OACpB,EAAO,QAAU,EAAI,EAAO,OAAS,GAAK,EAC1C,GACF,EACA,OAAO,KAAK,MAAM,OAAO,KAAK,EAAQ,QAAQ,EAAE,SAAS,MAAM,CAAC,EAElE,SAAS,EAAS,CAAC,EAAO,EAAW,EAAG,CACtC,OAAO,EAAM,IAAM,KAAM,KAAK,IAAI,EAAI",
"debugId": "1BE9F85F7274965264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260602002951_lowly_union_jack.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260602002951_lowly_union_jack\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`permission\\` (\n \\`id\\` text PRIMARY KEY,\n \\`project_id\\` text NOT NULL,\n \\`action\\` text NOT NULL,\n \\`resource\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`fk_permission_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`permission_project_action_resource_idx\\` ON \\`permission\\` (\\`project_id\\`,\\`action\\`,\\`resource\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2aAUb,EACD,MAAO,EAAG,IACR,kHACF,EACD,EAEL",
"debugId": "64B0C05FBCDA405864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "22CE1439B51230CA64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "04D9D255E62DB47264756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/index.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractAsyncHooksContextManager = void 0;\nconst events_1 = require(\"events\");\nconst ADD_LISTENER_METHODS = [\n 'addListener',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n];\nclass AbstractAsyncHooksContextManager {\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n if (target instanceof events_1.EventEmitter) {\n return this._bindEventEmitter(context, target);\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n }\n _bindFunction(context, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n /**\n * It isn't possible to tell Typescript that contextWrapper is the same as T\n * so we forced to cast as any here.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return contextWrapper;\n }\n /**\n * By default, EventEmitter call their callback with their context, which we do\n * not want, instead we will bind a specific context to all callbacks that\n * go through it.\n * @param context the context we want to bind\n * @param ee EventEmitter an instance of EventEmitter to patch\n */\n _bindEventEmitter(context, ee) {\n const map = this._getPatchMap(ee);\n if (map !== undefined)\n return ee;\n this._createPatchMap(ee);\n // patch methods that add a listener to propagate context\n ADD_LISTENER_METHODS.forEach(methodName => {\n if (ee[methodName] === undefined)\n return;\n ee[methodName] = this._patchAddListener(ee, ee[methodName], context);\n });\n // patch methods that remove a listener\n if (typeof ee.removeListener === 'function') {\n ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);\n }\n if (typeof ee.off === 'function') {\n ee.off = this._patchRemoveListener(ee, ee.off);\n }\n // patch method that remove all listeners\n if (typeof ee.removeAllListeners === 'function') {\n ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners);\n }\n return ee;\n }\n /**\n * Patch methods that remove a given listener so that we match the \"patched\"\n * version of that listener (the one that propagate context).\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveListener(ee, original) {\n const contextManager = this;\n return function (event, listener) {\n const events = contextManager._getPatchMap(ee)?.[event];\n if (events === undefined) {\n return original.call(this, event, listener);\n }\n const patchedListener = events.get(listener);\n return original.call(this, event, patchedListener || listener);\n };\n }\n /**\n * Patch methods that remove all listeners so we remove our\n * internal references for a given event.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveAllListeners(ee, original) {\n const contextManager = this;\n return function (event) {\n const map = contextManager._getPatchMap(ee);\n if (map !== undefined) {\n if (arguments.length === 0) {\n contextManager._createPatchMap(ee);\n }\n else if (map[event] !== undefined) {\n delete map[event];\n }\n }\n return original.apply(this, arguments);\n };\n }\n /**\n * Patch methods on an event emitter instance that can add listeners so we\n * can force them to propagate a given context.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n * @param [context] context to propagate when calling listeners\n */\n _patchAddListener(ee, original, context) {\n const contextManager = this;\n return function (event, listener) {\n /**\n * This check is required to prevent double-wrapping the listener.\n * The implementation for ee.once wraps the listener and calls ee.on.\n * Without this check, we would wrap that wrapped listener.\n * This causes an issue because ee.removeListener depends on the onceWrapper\n * to properly remove the listener. If we wrap their wrapper, we break\n * that detection.\n */\n if (contextManager._wrapped) {\n return original.call(this, event, listener);\n }\n let map = contextManager._getPatchMap(ee);\n if (map === undefined) {\n map = contextManager._createPatchMap(ee);\n }\n let listeners = map[event];\n if (listeners === undefined) {\n listeners = new WeakMap();\n map[event] = listeners;\n }\n const patchedListener = contextManager.bind(context, listener);\n // store a weak reference of the user listener to ours\n listeners.set(listener, patchedListener);\n /**\n * See comment at the start of this function for the explanation of this property.\n */\n contextManager._wrapped = true;\n try {\n return original.call(this, event, patchedListener);\n }\n finally {\n contextManager._wrapped = false;\n }\n };\n }\n _createPatchMap(ee) {\n const map = Object.create(null);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ee[this._kOtListeners] = map;\n return map;\n }\n _getPatchMap(ee) {\n return ee[this._kOtListeners];\n }\n _kOtListeners = Symbol('OtListeners');\n _wrapped = false;\n}\nexports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager;\n//# sourceMappingURL=AbstractAsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncHooksContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst asyncHooks = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\n/**\n * @deprecated Use AsyncLocalStorageContextManager instead.\n */\nclass AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncHook;\n _contexts = new Map();\n _stack = [];\n constructor() {\n super();\n this._asyncHook = asyncHooks.createHook({\n init: this._init.bind(this),\n before: this._before.bind(this),\n after: this._after.bind(this),\n destroy: this._destroy.bind(this),\n promiseResolve: this._destroy.bind(this),\n });\n }\n active() {\n return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n this._enterContext(context);\n try {\n return fn.call(thisArg, ...args);\n }\n finally {\n this._exitContext();\n }\n }\n enable() {\n this._asyncHook.enable();\n return this;\n }\n disable() {\n this._asyncHook.disable();\n this._contexts.clear();\n this._stack = [];\n return this;\n }\n /**\n * Init hook will be called when userland create a async context, setting the\n * context as the current one if it exist.\n * @param uid id of the async context\n * @param type the resource type\n */\n _init(uid, type) {\n // ignore TIMERWRAP as they combine timers with same timeout which can lead to\n // false context propagation. TIMERWRAP has been removed in node 11\n // every timer has it's own `Timeout` resource anyway which is used to propagate\n // context.\n if (type === 'TIMERWRAP')\n return;\n const context = this._stack[this._stack.length - 1];\n if (context !== undefined) {\n this._contexts.set(uid, context);\n }\n }\n /**\n * Destroy hook will be called when a given context is no longer used so we can\n * remove its attached context.\n * @param uid uid of the async context\n */\n _destroy(uid) {\n this._contexts.delete(uid);\n }\n /**\n * Before hook is called just before executing a async context.\n * @param uid uid of the async context\n */\n _before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }\n /**\n * After hook is called just after completing the execution of a async context.\n */\n _after() {\n this._exitContext();\n }\n /**\n * Set the given context as active\n */\n _enterContext(context) {\n this._stack.push(context);\n }\n /**\n * Remove the context at the root of the stack\n */\n _exitContext() {\n this._stack.pop();\n }\n}\nexports.AsyncHooksContextManager = AsyncHooksContextManager;\n//# sourceMappingURL=AsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst async_hooks_1 = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\nclass AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncLocalStorage;\n constructor() {\n super();\n this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();\n }\n active() {\n return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n const cb = thisArg == null ? fn : fn.bind(thisArg);\n return this._asyncLocalStorage.run(context, cb, ...args);\n }\n enable() {\n return this;\n }\n disable() {\n this._asyncLocalStorage.disable();\n return this;\n }\n}\nexports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager;\n//# sourceMappingURL=AsyncLocalStorageContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;\nvar AsyncHooksContextManager_1 = require(\"./AsyncHooksContextManager\");\nObject.defineProperty(exports, \"AsyncHooksContextManager\", { enumerable: true, get: function () { return AsyncHooksContextManager_1.AsyncHooksContextManager; } });\nvar AsyncLocalStorageContextManager_1 = require(\"./AsyncLocalStorageContextManager\");\nObject.defineProperty(exports, \"AsyncLocalStorageContextManager\", { enumerable: true, get: function () { return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";yHAKA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,mCAAwC,OAChD,IAAM,cACA,EAAuB,CACzB,cACA,KACA,OACA,kBACA,qBACJ,EACA,MAAM,CAAiC,CAOnC,IAAI,CAAC,EAAS,EAAQ,CAClB,GAAI,aAAkB,EAAS,aAC3B,OAAO,KAAK,kBAAkB,EAAS,CAAM,EAEjD,GAAI,OAAO,IAAW,WAClB,OAAO,KAAK,cAAc,EAAS,CAAM,EAE7C,OAAO,EAEX,aAAa,CAAC,EAAS,EAAQ,CAC3B,IAAM,EAAU,KACV,EAAiB,QAAS,IAAI,EAAM,CACtC,OAAO,EAAQ,KAAK,EAAS,IAAM,EAAO,MAAM,KAAM,CAAI,CAAC,GAa/D,OAXA,OAAO,eAAe,EAAgB,SAAU,CAC5C,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,EAAO,MAClB,CAAC,EAMM,EASX,iBAAiB,CAAC,EAAS,EAAI,CAE3B,GADY,KAAK,aAAa,CAAE,IACpB,OACR,OAAO,EASX,GARA,KAAK,gBAAgB,CAAE,EAEvB,EAAqB,QAAQ,KAAc,CACvC,GAAI,EAAG,KAAgB,OACnB,OACJ,EAAG,GAAc,KAAK,kBAAkB,EAAI,EAAG,GAAa,CAAO,EACtE,EAEG,OAAO,EAAG,iBAAmB,WAC7B,EAAG,eAAiB,KAAK,qBAAqB,EAAI,EAAG,cAAc,EAEvE,GAAI,OAAO,EAAG,MAAQ,WAClB,EAAG,IAAM,KAAK,qBAAqB,EAAI,EAAG,GAAG,EAGjD,GAAI,OAAO,EAAG,qBAAuB,WACjC,EAAG,mBAAqB,KAAK,yBAAyB,EAAI,EAAG,kBAAkB,EAEnF,OAAO,EAQX,oBAAoB,CAAC,EAAI,EAAU,CAC/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,EAExB,CACQ,2BAA2B,kBCnGnC,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,kCAAuC,OAC/C,IAAM,MACA,mBACA,MACN,MAAM,UAAwC,EAAmC,gCAAiC,CAC9G,mBACA,WAAW,EAAG,CACV,MAAM,EACN,KAAK,mBAAqB,IAAI,EAAc,kBAEhD,MAAM,EAAG,CACL,OAAO,KAAK,mBAAmB,SAAS,GAAK,EAAM,aAEvD,IAAI,CAAC,EAAS,EAAI,KAAY,EAAM,CAChC,IAAM,EAAK,GAAW,KAAO,EAAK,EAAG,KAAK,CAAO,EACjD,OAAO,KAAK,mBAAmB,IAAI,EAAS,EAAI,GAAG,CAAI,EAE3D,MAAM,EAAG,CACL,OAAO,KAEX,OAAO,EAAG,CAEN,OADA,KAAK,mBAAmB,QAAQ,EACzB,KAEf,CACQ,kCAAkC,kBC1B1C,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,kCAA0C,2BAAgC,OAClF,IAAI,MACJ,OAAO,eAAe,EAAS,2BAA4B,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,EAA2B,yBAA4B,CAAC,EACjK,IAAI,MACJ,OAAO,eAAe,EAAS,kCAAmC,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,EAAkC,gCAAmC,CAAC",
"debugId": "FCAF02F405AF37AA64756E2164756E21",
"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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,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": "237156AD624F958464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3D7D16453500744B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "BFE7D6EE5E746C9E64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "A52B343B499A053464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260423070820_add_icon_url_override.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260423070820_add_icon_url_override\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n ALTER TABLE \\`project\\` ADD \\`icon_url_override\\` text;\n UPDATE \\`project\\` SET \\`icon_url_override\\` = \\`icon_url\\` WHERE \\`icon_url\\` IS NOT NULL;\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,oKAGb,EACF,EAEL",
"debugId": "0BA0F9B130FA2AA664756E2164756E21",
"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": "62FD65243A1EBB3D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260601202201_amazing_prowler.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260601202201_amazing_prowler\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP TABLE \\`permission\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,iCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0BAA4B,EAC3C,EAEL",
"debugId": "DE47D6E2DB2D070D64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cerebras@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/cerebras/dist/index.mjs"],
"sourcesContent": [
"// src/cerebras-provider.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/cerebras-provider.ts\nvar cerebrasErrorSchema = z.object({\n message: z.string(),\n type: z.string(),\n param: z.string(),\n code: z.string()\n});\nvar cerebrasErrorStructure = {\n errorSchema: cerebrasErrorSchema,\n errorToMessage: (data) => data.message\n};\nfunction createCerebras(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.cerebras.ai/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"CEREBRAS_API_KEY\",\n description: \"Cerebras API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cerebras/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n provider: `cerebras.chat`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n errorStructure: cerebrasErrorStructure,\n supportsStructuredOutputs: true\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cerebras = createCerebras();\nexport {\n VERSION,\n cerebras,\n createCerebras\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qRAaA,SAAI,OAAiB,cAGjB,OAAsB,OAAE,OAAO,CACjC,QAAS,EAAE,OAAO,EAClB,KAAM,EAAE,OAAO,EACf,MAAO,EAAE,OAAO,EAChB,KAAM,EAAE,OAAO,CACjB,CAAC,EACG,EAAyB,CAC3B,YAAa,EACb,eAAgB,CAAC,IAAS,EAAK,OACjC,EACA,SAAS,CAAc,CAAC,EAAU,CAAC,EAAG,CACpC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,4BACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,mBACzB,YAAa,kBACf,CAAC,OACE,EAAQ,OACb,EACA,mBAAmB,GACrB,EACM,EAAsB,CAAC,IAAY,CACvC,OAAO,IAAI,EAAkC,EAAS,CACpD,SAAU,gBACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,MACf,eAAgB,EAChB,0BAA2B,EAC7B,CAAC,GAEG,EAAW,CAAC,IAAY,EAAoB,CAAO,EAWzD,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAW,EAAe",
"debugId": "6930F954F8D9466F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+vercel@2.0.39+d6123d32214422cb/node_modules/@ai-sdk/vercel/dist/index.mjs"],
"sourcesContent": [
"// src/vercel-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.39\" : \"0.0.0-test\";\n\n// src/vercel-provider.ts\nfunction createVercel(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.v0.dev/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"VERCEL_API_KEY\",\n description: \"Vercel\"\n })}`,\n ...options.headers\n },\n `ai-sdk/vercel/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `vercel.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n ...getCommonModelConfig(\"chat\")\n });\n };\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar vercel = createVercel();\nexport {\n VERSION,\n createVercel,\n vercel\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wQAYA,SAAI,OAAiB,cAGrB,cAAS,MAAY,CAAC,EAAU,CAAC,EAAG,CAClC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,uBACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,iBACzB,YAAa,QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,GACnB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,UAAU,IACpB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EAAkC,EAAS,IACjD,EAAqB,MAAM,CAChC,CAAC,GAEG,EAAW,CAAC,IAAY,EAAgB,CAAO,EAUrD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAS,EAAa",
"debugId": "2740D1C5BDB77E8B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260622170816_reset_v2_session_state.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260622170816_reset_v2_session_state\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DELETE FROM \\`session_context_epoch\\`;`)\n yield* tx.run(`DELETE FROM \\`session_input\\`;`)\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`DELETE FROM \\`event\\`;`)\n yield* tx.run(`DELETE FROM \\`event_sequence\\`;`)\n yield* tx.run(`UPDATE \\`session\\` SET \\`workspace_id\\` = NULL WHERE \\`workspace_id\\` IS NOT NULL;`)\n yield* tx.run(`DELETE FROM \\`workspace\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sCAAwC,EACtD,MAAO,EAAG,IAAI,8BAAgC,EAC9C,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,sBAAwB,EACtC,MAAO,EAAG,IAAI,+BAAiC,EAC/C,MAAO,EAAG,IAAI,8EAAoF,EAClG,MAAO,EAAG,IAAI,0BAA4B,EAC3C,EAEL",
"debugId": "2778A6F721C275C664756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js", "../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js"],
"sourcesContent": [
"class ParseError extends Error {\n constructor(message, options) {\n super(message), this.name = \"ParseError\", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;\n }\n}\nconst LF = 10, CR = 13, SPACE = 32;\nfunction noop(_arg) {\n}\nfunction createParser(config) {\n if (typeof config == \"function\")\n throw new TypeError(\n \"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?\"\n );\n const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];\n let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = \"\", dataLines = 0, eventType, terminated = !1;\n function feed(chunk) {\n if (terminated)\n throw new Error(\n \"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.\"\n );\n if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {\n const trailing2 = processLines(chunk);\n trailing2 !== \"\" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();\n return;\n }\n if (chunk.indexOf(`\n`) === -1 && chunk.indexOf(\"\\r\") === -1) {\n pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();\n return;\n }\n pendingFragments.push(chunk);\n const input = pendingFragments.join(\"\");\n pendingFragments.length = 0, pendingFragmentsLength = 0;\n const trailing = processLines(input);\n trailing !== \"\" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();\n }\n function checkBufferSize() {\n maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, onError(\n new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {\n type: \"max-buffer-size-exceeded\"\n })\n )));\n }\n function processLines(chunk) {\n let searchIndex = 0;\n if (chunk.indexOf(\"\\r\") === -1) {\n let lfIndex = chunk.indexOf(`\n`, searchIndex);\n for (; lfIndex !== -1; ) {\n if (searchIndex === lfIndex) {\n dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = \"\", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n const firstCharCode = chunk.charCodeAt(searchIndex);\n if (isDataPrefix(chunk, searchIndex, firstCharCode)) {\n const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);\n if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {\n onEvent({ id, event: eventType, data: value }), id = void 0, data = \"\", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n } else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(\n chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,\n lfIndex\n ) || void 0 : parseLine(chunk, searchIndex, lfIndex);\n searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n }\n return chunk.slice(searchIndex);\n }\n for (; searchIndex < chunk.length; ) {\n const crIndex = chunk.indexOf(\"\\r\", searchIndex), lfIndex = chunk.indexOf(`\n`, searchIndex);\n let lineEnd = -1;\n if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)\n break;\n parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;\n }\n return chunk.slice(searchIndex);\n }\n function parseLine(chunk, start, end) {\n if (start === end) {\n dispatchEvent();\n return;\n }\n const firstCharCode = chunk.charCodeAt(start);\n if (isDataPrefix(chunk, start, firstCharCode)) {\n const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);\n data = dataLines === 0 ? value2 : `${data}\n${value2}`, dataLines++;\n return;\n }\n if (isEventPrefix(chunk, start, firstCharCode)) {\n eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;\n return;\n }\n if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {\n const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);\n id = value2.includes(\"\\0\") ? void 0 : value2;\n return;\n }\n if (firstCharCode === 58) {\n if (onComment) {\n const line2 = chunk.slice(start, end);\n onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));\n }\n return;\n }\n const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(\":\");\n if (fieldSeparatorIndex === -1) {\n processField(line, \"\", line);\n return;\n }\n const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);\n processField(field, value, line);\n }\n function processField(field, value, line) {\n switch (field) {\n case \"event\":\n eventType = value || void 0;\n break;\n case \"data\":\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n break;\n case \"id\":\n id = value.includes(\"\\0\") ? void 0 : value;\n break;\n case \"retry\":\n /^\\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: \"invalid-retry\",\n value,\n line\n })\n );\n break;\n default:\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}\\u2026` : field}\"`,\n { type: \"unknown-field\", field, value, line }\n )\n );\n break;\n }\n }\n function dispatchEvent() {\n dataLines > 0 && onEvent({\n id,\n event: eventType,\n data\n }), id = void 0, data = \"\", dataLines = 0, eventType = void 0;\n }\n function reset(options = {}) {\n if (options.consume && pendingFragments.length > 0) {\n const incompleteLine = pendingFragments.join(\"\");\n parseLine(incompleteLine, 0, incompleteLine.length);\n }\n isFirstChunk = !0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;\n }\n return { feed, reset };\n}\nfunction isDataPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;\n}\nfunction isEventPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;\n}\nexport {\n ParseError,\n createParser\n};\n//# sourceMappingURL=index.js.map\n",
"import { createParser } from \"./index.js\";\nimport { ParseError } from \"./index.js\";\nclass EventSourceParserStream extends TransformStream {\n constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {\n let parser;\n super({\n start(controller) {\n parser = createParser({\n onEvent: (event) => {\n controller.enqueue(event);\n },\n onError(error) {\n typeof onError == \"function\" && onError(error), (onError === \"terminate\" || error.type === \"max-buffer-size-exceeded\") && controller.error(error);\n },\n onRetry,\n onComment,\n maxBufferSize\n });\n },\n transform(chunk) {\n parser.feed(chunk);\n }\n });\n }\n}\nexport {\n EventSourceParserStream,\n ParseError\n};\n//# sourceMappingURL=stream.js.map\n"
],
"mappings": ";AAAA,MAAM,U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EAC/C,EAAU,EAAgB,EAAG,EAAe,MAAM,EAEpD,EAAe,GAAI,EAAU,OAAG,EAAO,GAAI,EAAY,EAAG,EAAiB,OAAG,EAAiB,OAAS,EAAG,EAAyB,EAAG,EAAa,GAEtJ,MAAO,CAAE,OAAM,OAAM,EAEvB,SAAS,CAAY,CAAC,EAAO,EAAG,EAAe,CAC7C,OAAO,IAAkB,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,IAAM,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,IAAM,EAAM,WAAW,EAAI,CAAC,IAAM,GAErK,SAAS,CAAa,CAAC,EAAO,EAAG,EAAe,CAC9C,OAAO,IAAkB,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,KAAO,EAAM,WAAW,EAAI,CAAC,IAAM,GCxK1M,MAAM,UAAgC,eAAgB,CACpD,WAAW,EAAG,UAAS,UAAS,YAAW,iBAAkB,CAAC,EAAG,CAC/D,IAAI,EACJ,MAAM,CACJ,KAAK,CAAC,EAAY,CAChB,EAAS,EAAa,CACpB,QAAS,CAAC,IAAU,CAClB,EAAW,QAAQ,CAAK,GAE1B,OAAO,CAAC,EAAO,CACb,OAAO,GAAW,YAAc,EAAQ,CAAK,GAAI,IAAY,aAAe,EAAM,OAAS,6BAA+B,EAAW,MAAM,CAAK,GAElJ,UACA,YACA,eACF,CAAC,GAEH,SAAS,CAAC,EAAO,CACf,EAAO,KAAK,CAAK,EAErB,CAAC,EAEL",
"debugId": "55E9F8FDB5DF4FD364756E2164756E21",
"names": []
}

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

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": ["../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.41/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
"debugId": "5050FCC13F92E2D564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.js", "../../node_modules/.bun/which@2.0.2/node_modules/which/which.js", "../../node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js", "../../node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.js", "../../node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"],
"sourcesContent": [
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n",
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n",
"var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n",
"const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n",
"'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n",
"'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n",
"'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input\n // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(?=(\\\\+?)?)\\1\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(?=(\\\\+?)?)\\1$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n",
"'use strict';\nmodule.exports = /^#!(.*)/;\n",
"'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n",
"'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n",
"'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n",
"'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n",
"'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n"
],
"mappings": ";6EAAA,EAAO,QAAU,EACjB,EAAM,KAAO,GAEb,IAAI,UA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-map@7.0.4/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 returnValue = await mapper(await value, index++);\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,I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AAO,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": "D9BF0948B687AA6C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3CBF9A105506D26164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260603160727_jittery_ezekiel_stane.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603160727_jittery_ezekiel_stane\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_input_session_pending_seq_idx\\`;`)\n yield* tx.run(\n `CREATE INDEX IF NOT EXISTS \\`event_aggregate_type_seq_idx\\` ON \\`event\\` (\\`aggregate_id\\`,\\`type\\`,\\`seq\\`);`,\n )\n yield* tx.run(\n `CREATE INDEX IF NOT EXISTS \\`session_input_session_pending_delivery_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`,\\`delivery\\`,\\`seq\\`);`,\n )\n yield* tx.run(\n `CREATE INDEX IF NOT EXISTS \\`session_message_session_time_created_id_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`time_created\\`,\\`id\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+DAAiE,EAC/E,MAAO,EAAG,IACR,qGACF,EACA,MAAO,EAAG,IACR,gJACF,EACA,MAAO,EAAG,IACR,mIACF,EACD,EAEL",
"debugId": "856FAAAFE9FC7F7A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@4.0.0/node_modules/isexe/dist/commonjs/index.min.js", "../../node_modules/.bun/which@6.0.1/node_modules/which/lib/index.js"],
"sourcesContent": [
"\"use strict\";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});i.sync=i.isexe=void 0;var M=require(\"node:fs\"),x=require(\"node:fs/promises\"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error(\"cannot get uid or gid\");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt(\"100\",8),l=parseInt(\"010\",8),j=parseInt(\"001\",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});o.sync=o.isexe=void 0;var T=require(\"node:fs\"),I=require(\"node:fs/promises\"),D=require(\"node:path\"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||\"\"}=e,s=r.split(D.delimiter);if(s.indexOf(\"\")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{\"use strict\";Object.defineProperty(h,\"__esModule\",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!==\"default\"&&v(r,e,s[n]);return G(r,e),r}})(),X=exports&&exports.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&v(e,t,r)};Object.defineProperty(exports,\"__esModule\",{value:!0});exports.sync=exports.isexe=exports.posix=exports.win32=void 0;var E=w(_());exports.posix=E;var O=w(g());exports.win32=O;X(p(),exports);var H=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=H===\"win32\"?O:E;exports.isexe=b.isexe;exports.sync=b.sync;\n//# sourceMappingURL=index.min.js.map\n",
"const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"
],
"mappings": ";0EAAa,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,EAAE,EAAE,SAAa,EAAE,EAAE,KAAG,CAAc,OAAO,eAAe,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAW,OAAE,IAAI,UAAqB,mBAA8B,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,GAAG,EAAE,OAAO,SAAS,MAAM,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC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AAU,EAAI,EAEpB,GADW,EAAU,EAAS,CAAE,QAAS,EAAY,aAAc,EAAK,CAAC,EACjE,CACN,GAAI,CAAC,EAAI,IACP,OAAO,EAET,EAAM,KAAK,CAAO,IAKxB,GAAI,EAAI,KAAO,EAAM,OACnB,OAAO,EAGT,GAAI,EAAI,QACN,OAAO,KAGT,MAAM,EAAiB,CAAG,GAG5B,EAAO,QAAU,EACjB,EAAM,KAAO",
"debugId": "CE2E5401EB6BD53164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+provider@3.0.10/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM,UAAqB,EAAK,MAAO,EAAK,GAAQ,EAAI,CASvE,WAAW,EACT,KAAM,EACN,UACA,SACC,CACD,MAAM,CAAO,EACb,KAAK,GAAM,GACX,KAAK,KAAO,EACZ,KAAK,MAAQ,QAOR,WAAU,CAAC,EAAO,CACvB,OAAO,EAAY,UAAU,EAAO,CAAM,QAErC,UAAS,CAAC,EAAO,EAAU,CAChC,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,EAAM,QAAU,KAAW,EAAO,EAAM,UAAY,KAAY,OAAI,EAAK,UAAY,GAAW,KAAY,OAAI,EAAQ,UAAY,EAAO,EAAM,UAAY,KAAY,OAAI,EAAK,eAAiB,GAAW,KAAY,OAAI,EAAQ,eAAiB,EAAK,EAAM,UAAY,KAAY,OAAI,EAAG,aAAe,GAAW,KAAY,OAAI,EAAQ,UAC/X,OAAO,EAET,OAAO,IAAI,EAAqB,CAAE,QAAO,QAAO,SAAQ,CAAC,EAE7D,EAGI,GAAS,mCACT,GAAW,mBAAmB,KAC9B,GAAW,OAAO,IAAI,EAAQ,EAC9B,EAAM,EACN,GAAgC,cAAe,EAAO,EAAY,EAAO,GAAU,EAAM,CAC3F,WAAW,EACT,gBACA,UAAU,IAAI,mCACb,CACD,MAAM,CAAE,KAAM,GAAQ,SAAQ,CAAC,EAC/B,KAAK,GAAQ,GACb,KAAK,cAAgB,QAEhB,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,EAAQ,EAE/C",
"debugId": "47DB9A50FCB00B4664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1C467B1A6C11733864756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cohere@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/cohere/dist/index.mjs"],
"sourcesContent": [
"// src/cohere-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/cohere-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/cohere-chat-options.ts\nimport { z } from \"zod/v4\";\nvar cohereLanguageModelOptions = z.object({\n /**\n * Configuration for reasoning features (optional)\n *\n * Can be set to an object with the two properties `type` and `tokenBudget`. `type` can be set to `'enabled'` or `'disabled'` (defaults to `'enabled'`).\n * `tokenBudget` is the maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response\n *\n * @see https://docs.cohere.com/reference/chat#request.body.thinking\n */\n thinking: z.object({\n type: z.enum([\"enabled\", \"disabled\"]).optional(),\n tokenBudget: z.number().optional()\n }).optional()\n});\n\n// src/cohere-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar cohereErrorDataSchema = z2.object({\n message: z2.string()\n});\nvar cohereFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: cohereErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/cohere-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const cohereTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n cohereTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n case \"none\":\n return { tools: cohereTools, toolChoice: \"NONE\", toolWarnings };\n case \"required\":\n return { tools: cohereTools, toolChoice: \"REQUIRED\", toolWarnings };\n case \"tool\":\n return {\n tools: cohereTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"REQUIRED\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/convert-cohere-usage.ts\nfunction convertCohereUsage(tokens) {\n if (tokens == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const inputTokens = tokens.input_tokens;\n const outputTokens = tokens.output_tokens;\n return {\n inputTokens: {\n total: inputTokens,\n noCache: inputTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: outputTokens,\n text: outputTokens,\n reasoning: void 0\n },\n raw: tokens\n };\n}\n\n// src/convert-to-cohere-chat-prompt.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction convertToCohereChatPrompt(prompt) {\n const messages = [];\n const documents = [];\n const warnings = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return part.text;\n }\n case \"file\": {\n let textContent;\n if (typeof part.data === \"string\") {\n textContent = part.data;\n } else if (part.data instanceof Uint8Array) {\n if (!(((_a = part.mediaType) == null ? void 0 : _a.startsWith(\"text/\")) || part.mediaType === \"application/json\")) {\n throw new UnsupportedFunctionalityError2({\n functionality: `document media type: ${part.mediaType}`,\n message: `Media type '${part.mediaType}' is not supported. Supported media types are: text/* and application/json.`\n });\n }\n textContent = new TextDecoder().decode(part.data);\n } else {\n throw new UnsupportedFunctionalityError2({\n functionality: \"File URL data\",\n message: \"URLs should be downloaded by the AI SDK and not reach this point. This indicates a configuration issue.\"\n });\n }\n documents.push({\n data: {\n text: textContent,\n title: part.filename\n }\n });\n return \"\";\n }\n }\n }).join(\"\")\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: toolCalls.length > 0 ? void 0 : text,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0,\n tool_plan: void 0\n });\n break;\n }\n case \"tool\": {\n messages.push(\n ...content.filter((toolResult) => toolResult.type !== \"tool-approval-response\").map((toolResult) => {\n var _a;\n const output = toolResult.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n return {\n role: \"tool\",\n content: contentValue,\n tool_call_id: toolResult.toolCallId\n };\n })\n );\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return { messages, documents, warnings };\n}\n\n// src/map-cohere-finish-reason.ts\nfunction mapCohereFinishReason(finishReason) {\n switch (finishReason) {\n case \"COMPLETE\":\n case \"STOP_SEQUENCE\":\n return \"stop\";\n case \"MAX_TOKENS\":\n return \"length\";\n case \"ERROR\":\n return \"error\";\n case \"TOOL_CALL\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/cohere-chat-language-model.ts\nvar CohereChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b;\n const cohereOptions = (_a = await parseProviderOptions({\n provider: \"cohere\",\n providerOptions,\n schema: cohereLanguageModelOptions\n })) != null ? _a : {};\n const {\n messages: chatPrompt,\n documents: cohereDocuments,\n warnings: promptWarnings\n } = convertToCohereChatPrompt(prompt);\n const {\n tools: cohereTools,\n toolChoice: cohereToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice });\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n max_tokens: maxOutputTokens,\n temperature,\n p: topP,\n k: topK,\n seed,\n stop_sequences: stopSequences,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? { type: \"json_object\", json_schema: responseFormat.schema } : void 0,\n // messages:\n messages: chatPrompt,\n // tools:\n tools: cohereTools,\n tool_choice: cohereToolChoice,\n // documents for RAG:\n ...cohereDocuments.length > 0 && { documents: cohereDocuments },\n // reasoning\n ...cohereOptions.thinking && {\n thinking: {\n type: (_b = cohereOptions.thinking.type) != null ? _b : \"enabled\",\n token_budget: cohereOptions.thinking.tokenBudget\n }\n }\n },\n warnings: [...toolWarnings, ...promptWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const { args, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n cohereChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const content = [];\n for (const item of (_a = response.message.content) != null ? _a : []) {\n if (item.type === \"text\" && item.text.length > 0) {\n content.push({ type: \"text\", text: item.text });\n continue;\n }\n if (item.type === \"thinking\" && item.thinking.length > 0) {\n content.push({ type: \"reasoning\", text: item.thinking });\n continue;\n }\n }\n for (const citation of (_b = response.message.citations) != null ? _b : []) {\n content.push({\n type: \"source\",\n sourceType: \"document\",\n id: this.config.generateId(),\n mediaType: \"text/plain\",\n title: ((_d = (_c = citation.sources[0]) == null ? void 0 : _c.document) == null ? void 0 : _d.title) || \"Document\",\n providerMetadata: {\n cohere: {\n start: citation.start,\n end: citation.end,\n text: citation.text,\n sources: citation.sources,\n ...citation.type && { citationType: citation.type }\n }\n }\n });\n }\n for (const toolCall of (_e = response.message.tool_calls) != null ? _e : []) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n // Cohere sometimes returns `null` for tool call arguments for tools\n // defined as having no arguments.\n input: toolCall.function.arguments.replace(/^null$/, \"{}\")\n });\n }\n return {\n content,\n finishReason: {\n unified: mapCohereFinishReason(response.finish_reason),\n raw: (_f = response.finish_reason) != null ? _f : void 0\n },\n usage: convertCohereUsage(response.usage.tokens),\n request: { body: args },\n response: {\n // TODO timestamp, model id\n id: (_g = response.generation_id) != null ? _g : void 0,\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: { ...args, stream: true },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n cohereChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let pendingToolCall = null;\n let isActiveReasoning = false;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = { unified: \"error\", raw: void 0 };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n const type = value.type;\n switch (type) {\n case \"content-start\": {\n if (value.delta.message.content.type === \"thinking\") {\n controller.enqueue({\n type: \"reasoning-start\",\n id: String(value.index)\n });\n isActiveReasoning = true;\n return;\n }\n controller.enqueue({\n type: \"text-start\",\n id: String(value.index)\n });\n return;\n }\n case \"content-delta\": {\n if (\"thinking\" in value.delta.message.content) {\n controller.enqueue({\n type: \"reasoning-delta\",\n id: String(value.index),\n delta: value.delta.message.content.thinking\n });\n return;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: String(value.index),\n delta: value.delta.message.content.text\n });\n return;\n }\n case \"content-end\": {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: String(value.index)\n });\n isActiveReasoning = false;\n return;\n }\n controller.enqueue({\n type: \"text-end\",\n id: String(value.index)\n });\n return;\n }\n case \"tool-call-start\": {\n const toolId = value.delta.message.tool_calls.id;\n const toolName = value.delta.message.tool_calls.function.name;\n const initialArgs = value.delta.message.tool_calls.function.arguments;\n pendingToolCall = {\n id: toolId,\n name: toolName,\n arguments: initialArgs,\n hasFinished: false\n };\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolId,\n toolName\n });\n if (initialArgs.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolId,\n delta: initialArgs\n });\n }\n return;\n }\n case \"tool-call-delta\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n const argsDelta = value.delta.message.tool_calls.function.arguments;\n pendingToolCall.arguments += argsDelta;\n controller.enqueue({\n type: \"tool-input-delta\",\n id: pendingToolCall.id,\n delta: argsDelta\n });\n }\n return;\n }\n case \"tool-call-end\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: pendingToolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: pendingToolCall.id,\n toolName: pendingToolCall.name,\n input: JSON.stringify(\n JSON.parse(((_a = pendingToolCall.arguments) == null ? void 0 : _a.trim()) || \"{}\")\n )\n });\n pendingToolCall.hasFinished = true;\n pendingToolCall = null;\n }\n return;\n }\n case \"message-start\": {\n controller.enqueue({\n type: \"response-metadata\",\n id: (_b = value.id) != null ? _b : void 0\n });\n return;\n }\n case \"message-end\": {\n finishReason = {\n unified: mapCohereFinishReason(value.delta.finish_reason),\n raw: value.delta.finish_reason\n };\n usage = value.delta.usage.tokens;\n return;\n }\n default: {\n return;\n }\n }\n },\n flush(controller) {\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertCohereUsage(usage)\n });\n }\n })\n ),\n request: { body: { ...args, stream: true } },\n response: { headers: responseHeaders }\n };\n }\n};\nvar cohereChatResponseSchema = z3.object({\n generation_id: z3.string().nullish(),\n message: z3.object({\n role: z3.string(),\n content: z3.array(\n z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n ).nullish(),\n tool_plan: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish(),\n citations: z3.array(\n z3.object({\n start: z3.number(),\n end: z3.number(),\n text: z3.string(),\n sources: z3.array(\n z3.object({\n type: z3.string().optional(),\n id: z3.string().optional(),\n document: z3.object({\n id: z3.string().optional(),\n text: z3.string(),\n title: z3.string()\n })\n })\n ),\n type: z3.string().optional()\n })\n ).nullish()\n }),\n finish_reason: z3.string(),\n usage: z3.object({\n billed_units: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n }),\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n});\nvar cohereChatChunkSchema = z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"citation-start\")\n }),\n z3.object({\n type: z3.literal(\"citation-end\")\n }),\n z3.object({\n type: z3.literal(\"content-start\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-delta\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n text: z3.string()\n }),\n z3.object({\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-end\"),\n index: z3.number()\n }),\n z3.object({\n type: z3.literal(\"message-start\"),\n id: z3.string().nullish()\n }),\n z3.object({\n type: z3.literal(\"message-end\"),\n delta: z3.object({\n finish_reason: z3.string(),\n usage: z3.object({\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n })\n }),\n // https://docs.cohere.com/v2/docs/streaming#tool-use-stream-events-for-tool-calling\n z3.object({\n type: z3.literal(\"tool-plan-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_plan: z3.string()\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-start\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n })\n })\n }),\n // A single tool call's `arguments` stream in chunks and must be accumulated\n // in a string and so the full tool object info can only be parsed once we see\n // `tool-call-end`.\n z3.object({\n type: z3.literal(\"tool-call-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n function: z3.object({\n arguments: z3.string()\n })\n })\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-end\")\n })\n]);\n\n// src/cohere-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/cohere-embedding-options.ts\nimport { z as z4 } from \"zod/v4\";\nvar cohereEmbeddingModelOptions = z4.object({\n /**\n * Specifies the type of input passed to the model. Default is `search_query`.\n *\n * - \"search_document\": Used for embeddings stored in a vector database for search use-cases.\n * - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents.\n * - \"classification\": Used for embeddings passed through a text classifier.\n * - \"clustering\": Used for embeddings run through a clustering algorithm.\n */\n inputType: z4.enum([\"search_document\", \"search_query\", \"classification\", \"clustering\"]).optional(),\n /**\n * Specifies how the API will handle inputs longer than the maximum token length.\n * Default is `END`.\n *\n * - \"NONE\": If selected, when the input exceeds the maximum input token length will return an error.\n * - \"START\": Will discard the start of the input until the remaining input is exactly the maximum input token length for the model.\n * - \"END\": Will discard the end of the input until the remaining input is exactly the maximum input token length for the model.\n */\n truncate: z4.enum([\"NONE\", \"START\", \"END\"]).optional(),\n /**\n * The number of dimensions of the output embedding.\n * Only available for `embed-v4.0` and newer models.\n *\n * Possible values are `256`, `512`, `1024`, and `1536`.\n * The default is `1536`.\n */\n outputDimension: z4.union([z4.literal(256), z4.literal(512), z4.literal(1024), z4.literal(1536)]).optional()\n});\n\n// src/cohere-embedding-model.ts\nvar CohereEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 96;\n this.supportsParallelCalls = true;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n headers,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const embeddingOptions = await parseProviderOptions2({\n provider: \"cohere\",\n providerOptions,\n schema: cohereEmbeddingModelOptions\n });\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embed`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n // The AI SDK only supports 'float' embeddings. Note that the Cohere API\n // supports other embedding types, but they are not currently supported by the AI SDK.\n // https://docs.cohere.com/v2/reference/embed#request.body.embedding_types\n embedding_types: [\"float\"],\n texts: values,\n input_type: (_a = embeddingOptions == null ? void 0 : embeddingOptions.inputType) != null ? _a : \"search_query\",\n truncate: embeddingOptions == null ? void 0 : embeddingOptions.truncate,\n output_dimension: embeddingOptions == null ? void 0 : embeddingOptions.outputDimension\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n cohereTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.embeddings.float,\n usage: { tokens: response.meta.billed_units.input_tokens },\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar cohereTextEmbeddingResponseSchema = z5.object({\n embeddings: z5.object({\n float: z5.array(z5.array(z5.number()))\n }),\n meta: z5.object({\n billed_units: z5.object({\n input_tokens: z5.number()\n })\n })\n});\n\n// src/reranking/cohere-reranking-model.ts\nimport {\n combineHeaders as combineHeaders3,\n createJsonResponseHandler as createJsonResponseHandler3,\n parseProviderOptions as parseProviderOptions3,\n postJsonToApi as postJsonToApi3\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/cohere-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar cohereRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z6.object({\n id: z6.string().nullish(),\n results: z6.array(\n z6.object({\n index: z6.number(),\n relevance_score: z6.number()\n })\n ),\n meta: z6.any()\n })\n )\n);\n\n// src/reranking/cohere-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar cohereRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z7.object({\n maxTokensPerDoc: z7.number().optional(),\n priority: z7.number().optional()\n })\n )\n);\n\n// src/reranking/cohere-reranking-model.ts\nvar CohereRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // current implementation is based on v2 of the API: https://docs.cohere.com/v2/reference/rerank\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const rerankingOptions = await parseProviderOptions3({\n provider: \"cohere\",\n providerOptions,\n schema: cohereRerankingModelOptionsSchema\n });\n const warnings = [];\n if (documents.type === \"object\") {\n warnings.push({\n type: \"compatibility\",\n feature: \"object documents\",\n details: \"Object documents are converted to strings.\"\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi3({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders3(this.config.headers(), headers),\n body: {\n model: this.modelId,\n query,\n documents: documents.type === \"text\" ? documents.values : documents.values.map((value) => JSON.stringify(value)),\n top_n: topN,\n max_tokens_per_doc: rerankingOptions == null ? void 0 : rerankingOptions.maxTokensPerDoc,\n priority: rerankingOptions == null ? void 0 : rerankingOptions.priority\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler3(\n cohereRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n warnings,\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/cohere-provider.ts\nfunction createCohere(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.cohere.com/v2\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"COHERE_API_KEY\",\n description: \"Cohere\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cohere/${VERSION}`\n );\n const createChatModel = (modelId) => {\n var _a2;\n return new CohereChatLanguageModel(modelId, {\n provider: \"cohere.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: (_a2 = options.generateId) != null ? _a2 : generateId\n });\n };\n const createEmbeddingModel = (modelId) => new CohereEmbeddingModel(modelId, {\n provider: \"cohere.textEmbedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createRerankingModel = (modelId) => new CohereRerankingModel(modelId, {\n provider: \"cohere.reranking\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Cohere model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cohere = createCohere();\nexport {\n VERSION,\n cohere,\n createCohere\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAuBA,SAAI,OAA6B,OAAE,YAAO,CASxC,SAAU,EAAE,OAAO,CACjB,KAAM,EAAE,KAAK,CAAC,UAAW,UAAU,CAAC,EAAE,SAAS,EAC/C,YAAa,EAAE,OAAO,EAAE,SAAS,CACnC,CAAC,EAAE,SAAS,CACd,CAAC,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,eACzB,EAAE,EACF,WACA,SAAU,CACR,IAAK,EAAK,EAAS,KAAO,KAAO,EAAU,OAC3C,QAAS,EACT,KAAM,CACR,CACF,EAEJ,EAGI,GAAiB,SAGrB,SAAS,EAAY,CAAC,EAAU,CAAC,EAAG,CAClC,IAAI,EACJ,IAAM,GAAW,EAAK,EAAqB,EAAQ,OAAO,IAAM,KAAO,EAAK,4BACtE,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,iBACzB,YAAa,QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,IACnB,EACM,EAAkB,CAAC,IAAY,CACnC,IAAI,EACJ,OAAO,IAAI,EAAwB,EAAS,CAC1C,SAAU,cACV,UACA,QAAS,EACT,MAAO,EAAQ,MACf,YAAa,EAAM,EAAQ,aAAe,KAAO,EAAM,CACzD,CAAC,GAEG,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,uBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,mBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAW,QAAQ,CAAC,EAAS,CACjC,GAAI,WACF,MAAU,MACR,kEACF,EAEF,OAAO,EAAgB,CAAO,GAahC,OAXA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAS,GAAa",
"debugId": "565CBD6641E66C5364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260501142318_next_venus.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260501142318_next_venus\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`agent\\` text;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`model\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,4BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,yCAA6C,EAC3D,MAAO,EAAG,IAAI,yCAA6C,EAC5D,EAEL",
"debugId": "43F6A1D3E30C7F2F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260604172448_event_sourced_session_input.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260604172448_event_sourced_session_input\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DELETE FROM \\`session_input\\`;`)\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`DELETE FROM \\`event\\`;`)\n yield* tx.run(`DELETE FROM \\`event_sequence\\`;`)\n yield* tx.run(`UPDATE \\`session\\` SET \\`workspace_id\\` = NULL;`)\n yield* tx.run(`DELETE FROM \\`workspace\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`event_aggregate_seq_idx\\`;`)\n yield* tx.run(`CREATE UNIQUE INDEX \\`event_aggregate_seq_idx\\` ON \\`event\\` (\\`aggregate_id\\`,\\`seq\\`);`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_seq_idx\\`;`)\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`session_message_session_seq_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`seq\\`);`,\n )\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_session_input\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`prompt\\` text NOT NULL,\n \\`delivery\\` text NOT NULL,\n \\`admitted_seq\\` integer NOT NULL,\n \\`promoted_seq\\` integer,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`fk_session_input_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`DROP TABLE \\`session_input\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_session_input\\` RENAME TO \\`session_input\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n yield* tx.run(\n `CREATE INDEX \\`session_input_session_pending_delivery_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`,\\`delivery\\`,\\`admitted_seq\\`);`,\n )\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`session_input_session_admitted_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`admitted_seq\\`);`,\n )\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`session_input_session_promoted_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,6CACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,8BAAgC,EAC9C,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,sBAAwB,EACtC,MAAO,EAAG,IAAI,+BAAiC,EAC/C,MAAO,EAAG,IAAI,6CAAiD,EAC/D,MAAO,EAAG,IAAI,0BAA4B,EAC1C,MAAO,EAAG,IAAI,iDAAmD,EACjE,MAAO,EAAG,IAAI,kFAA0F,EACxG,MAAO,EAAG,IAAI,yDAA2D,EACzE,MAAO,EAAG,IACR,kGACF,EACA,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,0dAWb,EACD,MAAO,EAAG,IAAI,6BAA+B,EAC7C,MAAO,EAAG,IAAI,8DAAkE,EAChF,MAAO,EAAG,IAAI,yBAAyB,EACvC,MAAO,EAAG,IACR,2IACF,EACA,MAAO,EAAG,IACR,gHACF,EACA,MAAO,EAAG,IACR,gHACF,EACD,EAEL",
"debugId": "EDE95B60B2682C0B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260211171708_add_project_commands.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260211171708_add_project_commands\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`project\\` ADD \\`commands\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,4CAAgD,EAC/D,EAEL",
"debugId": "BFBF6B9AF5C0357864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n if (!idLine) {\n return undefined;\n }\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-darwin.js.map"
],
"mappings": ";gKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,wCAAwC,GAClE,OACjB,MAAM;AAAA,CAAI,EACV,KAAK,KAAQ,EAAK,SAAS,gBAAgB,CAAC,EACjD,GAAI,CAAC,EACD,OAEJ,IAAM,EAAQ,EAAO,MAAM,OAAO,EAClC,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,MAAM,EAAG,EAAE,EAGnC,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "41AD1D828E066AB464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { fn: f, argv: [i, \"name\"] }, k = {}, l = [{ [m]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [g, [j, \"aws\"]],\n [g, [j, \"aws-cn\"]],\n [g, [j, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://{Region}.signin.aws.amazon.com\", k],\n [\"https://{Region}.signin.amazonaws.cn\", k],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", k],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 15,\n 3,\n 1,\n 4,\n r + 14,\n 2,\n 5,\n r + 14,\n 3,\n 11,\n 6,\n 4,\n 10,\n 7,\n 7,\n r + 4,\n 8,\n 8,\n r + 5,\n 9,\n 9,\n r + 6,\n r + 13,\n 5,\n r + 11,\n r + 12,\n 4,\n 13,\n 12,\n 6,\n r + 9,\n r + 10,\n 5,\n 14,\n r + 8,\n 6,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 16,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SigninServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SigninServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nclass InternalServerException extends SigninServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nclass TooManyRequestsError extends SigninServiceException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nclass ValidationException extends SigninServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _ISE = \"InternalServerException\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.signin\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(SigninServiceException$, SigninServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);\nvar ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(ValidationException$, ValidationException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar AccessToken$ = [\n 3,\n n0,\n _AT,\n 8,\n [_aKI, _sAK, _sT],\n [\n [0, { [_jN]: _aKI }],\n [0, { [_jN]: _sAK }],\n [0, { [_jN]: _sT }],\n ],\n 3,\n];\nvar CreateOAuth2TokenRequest$ = [\n 3,\n n0,\n _COATR,\n 0,\n [_tI],\n [[() => CreateOAuth2TokenRequestBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenRequestBody$ = [\n 3,\n n0,\n _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [\n [0, { [_jN]: _cI }],\n [0, { [_jN]: _gT }],\n 0,\n [0, { [_jN]: _rU }],\n [0, { [_jN]: _cV }],\n [() => RefreshToken, { [_jN]: _rT }],\n ],\n 2,\n];\nvar CreateOAuth2TokenResponse$ = [\n 3,\n n0,\n _COATRr,\n 0,\n [_tO],\n [[() => CreateOAuth2TokenResponseBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenResponseBody$ = [\n 3,\n n0,\n _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [\n [() => AccessToken$, { [_jN]: _aT }],\n [0, { [_jN]: _tT }],\n [1, { [_jN]: _eI }],\n [() => RefreshToken, { [_jN]: _rT }],\n [0, { [_jN]: _iT }],\n ],\n 4,\n];\nvar CreateOAuth2Token$ = [\n 9,\n n0,\n _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] },\n () => CreateOAuth2TokenRequest$,\n () => CreateOAuth2TokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2023-01-01\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateOAuth2TokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nclient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessToken$ = AccessToken$;\nexports.CreateOAuth2Token$ = CreateOAuth2Token$;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;\nexports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;\nexports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;\nexports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nexports.SigninServiceException = SigninServiceException;\nexports.SigninServiceException$ = SigninServiceException$;\nexports.TooManyRequestsError = TooManyRequestsError;\nexports.TooManyRequestsError$ = TooManyRequestsError$;\nexports.ValidationException = ValidationException;\nexports.ValidationException$ = ValidationException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAgD,MAAO,EAAQ,EAAS,IAAU,CACpF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,SACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAsC,CAAC,IAAmB,CAC5D,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,oBAAqB,CACtB,EAAQ,KAAK,GAAoC,CAAC,EAClD,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEL,GAA8B,CAAC,IAAW,CAC5C,IAAM,EAAW,EAAgB,yBAAyB,CAAM,EAChE,OAAO,OAAO,OAAO,EAAU,CAC3B,qBAAsB,EAAO,kBAAkB,EAAO,sBAAwB,CAAC,CAAC,CACpF,CAAC,GAGC,GAAkC,CAAC,IAAY,CACjD,OAAO,OAAO,OAAO,EAAS,CAC1B,qBAAsB,EAAQ,sBAAwB,GACtD,gBAAiB,EAAQ,iBAAmB,GAC5C,mBAAoB,QACxB,CAAC,GAEC,GAAe,CACjB,QAAS,CAAE,KAAM,gBAAiB,KAAM,iBAAkB,EAC1D,SAAU,CAAE,KAAM,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AM,EAE9C,IAAM,GAAkB,CACpB,iBAAkB,mBAClB,yBAA0B,2BAC1B,gBAAiB,kBACjB,aAAc,eACd,cAAe,gBACf,yBAA0B,0BAC9B,EAEA,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EACX,GAAwB,EACxB,GAAyB,GACzB,GAAe,GACf,GAAqB,GACrB,GAA2B,EAC3B,GAA4B,GAC5B,GAAgC,GAChC,GAA6B,GAC7B,GAAiC,GACjC,GAA0B,EAC1B,GAA2B,GAC3B,GAAkB,GAClB,GAAS,EACT,GAAe,EACf,GAAyB,EACzB,GAA0B,GAC1B,GAAuB,EACvB,GAAwB,GACxB,GAAsB,EACtB,GAAuB,GACvB,GAAsB",
"debugId": "76CFB8502D12506B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E51C3B363243322B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js"],
"sourcesContent": [
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken(options) {\n let projectId = options?.project;\n let teamId = options?.team;\n if (!projectId && !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectInfo.projectId;\n teamId = projectInfo.teamId;\n } else if (!projectId || !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectId ?? projectInfo.projectId;\n teamId = teamId ?? projectInfo.teamId;\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`\"\n );\n }\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {\n const authToken = await (0, import_token_util.getVercelToken)({\n expirationBufferMs: options?.expirationBufferMs\n });\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"
],
"mappings": ";yHACA,SAAuB,eAAnB,EAC0B,yBAA1B,EAC2B,oBAA3B,GADmB,OAEnB,EAAe,OAAO,UAAU,eAChC,EAAW,CAAC,EAAQ,IAAQ,CAC9B,QAAS,KAAQ,EACf,EAAU,EAAQ,EAAM,CAAE,IAAK,EAAI,GAAO,WAAY,EAAK,CAAC,GAE5D,EAAc,CAAC,EAAI,EAAM,EAAQ,IAAS,CAC5C,GAAI,GAAQ,OAAO,IAAS,UAAY,OAAO,IAAS,YACtD,QAAS,KAAO,EAAkB,CAAI,EACpC,GAAI,CAAC,EAAa,KAAK,EAAI,CAAG,GAAK,IAAQ,EACzC,EAAU,EAAI,EAAK,CAAE,IAAK,IAAM,EAAK,GAAM,WAAY,EAAE,EAAO,EAAiB,EAAM,CAAG,IAAM,EAAK,UAAW,CAAC,EAEvH,OAAO,GAEL,EAAe,CAAC,IAAQ,EAAY,EAAU,CAAC,EAAG,aAAc,CAAE,MAAO,EAAK,CAAC,EAAG,CAAG,EACrF,EAAgB,CAAC,EACrB,EAAS,EAAe,CACtB,aAAc,IAAM,CACtB,CAAC,EACD,EAAO,QAAU,EAAa,CAAa,EAC3C,IAAI,MACA,MACJ,eAAe,CAAY,CAAC,EAAS,CACnC,IAAI,EAAY,GAAS,QACrB,EAAS,GAAS,KACtB,GAAI,CAAC,GAAa,CAAC,EAAQ,CACzB,IAAM,GAAe,EAAG,EAAkB,iBAAiB,EAC3D,EAAY,EAAY,UACxB,EAAS,EAAY,OAChB,QAAI,CAAC,GAAa,CAAC,EAAQ,CAChC,IAAM,GAAe,EAAG,EAAkB,iBAAiB,EAC3D,EAAY,GAAa,EAAY,UACrC,EAAS,GAAU,EAAY,OAEjC,GAAI,CAAC,EACH,MAAM,IAAI,EAAmB,qBAC3B,gGACF,EAEF,IAAI,GAAc,EAAG,EAAkB,WAAW,CAAS,EAC3D,GAAI,CAAC,IAAe,EAAG,EAAkB,YAAY,EAAG,EAAkB,iBAAiB,EAAW,KAAK,EAAG,GAAS,kBAAkB,EAAG,CAC1I,IAAM,EAAY,MAAO,EAAG,EAAkB,gBAAgB,CAC5D,mBAAoB,GAAS,kBAC/B,CAAC,EAED,GADA,EAAa,MAAO,EAAG,EAAkB,oBAAoB,EAAW,EAAW,CAAM,EACrF,CAAC,EACH,MAAM,IAAI,EAAmB,qBAAqB,8BAA8B,GAEjF,EAAG,EAAkB,WAAW,EAAY,CAAS,EAExD,QAAQ,IAAI,kBAAoB,EAAW,MAC3C",
"debugId": "F068A4F3BDBA817764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C941F7E76EF587F64756E2164756E21",
"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": "4AAE57BEA02041B664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1CF0E0CF6F8E5DBA64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "FA961639478BBF3C64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "FEC88F39D7BF95D764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260507164347_add_workspace_time.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260507164347_add_workspace_time\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`time_used\\` integer NOT NULL DEFAULT 0;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,oCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,qEAAyE,EACxF,EAEL",
"debugId": "D30C5B6EEA6B9AE564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "88AC4D20675CC78064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+togetherai@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/togetherai/dist/index.mjs"],
"sourcesContent": [
"// src/togetherai-provider.ts\nimport {\n OpenAICompatibleChatLanguageModel,\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-model.ts\nimport {\n combineHeaders,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar togetheraiErrorSchema = lazySchema(\n () => zodSchema(\n z.object({\n error: z.object({\n message: z.string()\n })\n })\n )\n);\nvar togetheraiRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z.object({\n id: z.string().nullish(),\n model: z.string().nullish(),\n results: z.array(\n z.object({\n index: z.number(),\n relevance_score: z.number()\n })\n ),\n usage: z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number()\n })\n })\n )\n);\n\n// src/reranking/togetherai-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar togetheraiRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z2.object({\n rankFields: z2.array(z2.string()).optional()\n })\n )\n);\n\n// src/reranking/togetherai-reranking-model.ts\nvar TogetherAIRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // see https://docs.together.ai/reference/rerank-1\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a, _b;\n const rerankingOptions = await parseProviderOptions({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiRerankingModelOptionsSchema\n });\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n model: this.modelId,\n documents: documents.values,\n query,\n top_n: topN,\n rank_fields: rerankingOptions == null ? void 0 : rerankingOptions.rankFields,\n return_documents: false\n // reduce response size\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: togetheraiErrorSchema,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler(\n togetheraiRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n modelId: (_b = response.model) != null ? _b : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/togetherai-image-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertImageModelFileToDataUri,\n createJsonResponseHandler as createJsonResponseHandler2,\n createJsonErrorResponseHandler as createJsonErrorResponseHandler2,\n lazySchema as lazySchema3,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2,\n zodSchema as zodSchema3\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\nvar TogetherAIImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c;\n const warnings = [];\n if (mask != null) {\n throw new Error(\n \"Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.\"\n );\n }\n if (size != null) {\n warnings.push({\n type: \"unsupported\",\n feature: \"aspectRatio\",\n details: \"This model does not support the `aspectRatio` option. Use `size` instead.\"\n });\n }\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const togetheraiOptions = await parseProviderOptions2({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiImageModelOptionsSchema\n });\n let imageUrl;\n if (files != null && files.length > 0) {\n imageUrl = convertImageModelFileToDataUri(files[0]);\n if (files.length > 1) {\n warnings.push({\n type: \"other\",\n message: \"Together AI only supports a single input image. Additional images are ignored.\"\n });\n }\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi2({\n url: `${this.config.baseURL}/images/generations`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n prompt,\n seed,\n ...n > 1 ? { n } : {},\n ...splitSize && {\n width: parseInt(splitSize[0]),\n height: parseInt(splitSize[1])\n },\n ...imageUrl != null ? { image_url: imageUrl } : {},\n response_format: \"base64\",\n ...togetheraiOptions != null ? togetheraiOptions : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler2({\n errorSchema: togetheraiErrorSchema2,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler2(\n togetheraiImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n};\nvar togetheraiImageResponseSchema = z3.object({\n data: z3.array(\n z3.object({\n b64_json: z3.string()\n })\n )\n});\nvar togetheraiErrorSchema2 = z3.object({\n error: z3.object({\n message: z3.string()\n })\n});\nvar togetheraiImageModelOptionsSchema = lazySchema3(\n () => zodSchema3(\n z3.object({\n /**\n * Number of generation steps. Higher values can improve quality.\n */\n steps: z3.number().nullish(),\n /**\n * Guidance scale for image generation.\n */\n guidance: z3.number().nullish(),\n /**\n * Negative prompt to guide what to avoid.\n */\n negative_prompt: z3.string().nullish(),\n /**\n * Disable the safety checker for image generation.\n * When true, the API will not reject images flagged as potentially NSFW.\n * Not available for Flux Schnell Free and Flux Pro models.\n */\n disable_safety_checker: z3.boolean().nullish()\n }).passthrough()\n )\n);\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/togetherai-provider.ts\nfunction loadDeprecatedApiKey() {\n if (typeof process === \"undefined\") {\n return void 0;\n }\n if (typeof process.env.TOGETHER_API_KEY === \"string\") {\n return void 0;\n }\n const key = process.env.TOGETHER_AI_API_KEY;\n if (typeof key === \"string\") {\n console.warn(\n \"TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.\"\n );\n }\n return key;\n}\nfunction createTogetherAI(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.together.xyz/v1/\"\n );\n const getHeaders = () => {\n var _a2;\n return withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: (_a2 = options.apiKey) != null ? _a2 : loadDeprecatedApiKey(),\n environmentVariableName: \"TOGETHER_API_KEY\",\n description: \"TogetherAI\"\n })}`,\n ...options.headers\n },\n `ai-sdk/togetherai/${VERSION}`\n );\n };\n const getCommonModelConfig = (modelType) => ({\n provider: `togetherai.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new TogetherAIImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const createRerankingModel = (modelId) => new TogetherAIRerankingModel(modelId, {\n ...getCommonModelConfig(\"reranking\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.languageModel = createChatModel;\n provider.chatModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n return provider;\n}\nvar togetherai = createTogetherAI();\nexport {\n VERSION,\n createTogetherAI,\n togetherai\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wVAwBA,SAAI,OAAwB,OAC1B,SAAM,OACJ,EAAE,OAAO,CACP,MAAO,EAAE,OAAO,CACd,QAAS,EAAE,OAAO,CACpB,CAAC,CACH,CAAC,CACH,CACF,EACI,EAAoC,EACtC,IAAM,EACJ,EAAE,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O,EAAM,EAAqB,EACpE,wBAAyB,mBACzB,YAAa,YACf,CAAC,OACE,EAAQ,OACb,EACA,qBAAqB,GACvB,GAEI,EAAuB,CAAC,KAAe,CAC3C,SAAU,cAAc,IACxB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAqB,EAAS,IACnE,EAAqB,OAAO,EAC/B,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAyB,EAAS,IAC3E,EAAqB,WAAW,EACnC,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EAWrD,OAVA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,UAAY,EACrB,EAAS,eAAiB,EACnB,EAET,IAAI,GAAa,EAAiB",
"debugId": "E2BBA640D6C137A864756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/createCredentialChain.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/resolveLogins.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/IndexedDbStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/InMemoryStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.38/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/localStorage.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromEnv.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.47/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromNodeProviderChain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.base.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { ProviderError } from \"@smithy/core/config\";\nexport const createCredentialChain = (...credentialProviders) => {\n let expireAfter = -1;\n const baseFunction = async (awsIdentityProperties) => {\n const credentials = await propertyProviderChain(...credentialProviders)(awsIdentityProperties);\n if (!credentials.expiration && expireAfter !== -1) {\n credentials.expiration = new Date(Date.now() + expireAfter);\n }\n return credentials;\n };\n const withOptions = Object.assign(baseFunction, {\n expireAfter(milliseconds) {\n if (milliseconds < 5 * 60_000) {\n throw new Error(\"@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.\");\n }\n expireAfter = milliseconds;\n return withOptions;\n },\n });\n return withOptions;\n};\nexport const propertyProviderChain = (...providers) => async (awsIdentityProperties) => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\", { tryNextLink: false });\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentity(parameters) {\n return async (awsIdentityProperties) => {\n parameters.logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const { GetCredentialsForIdentityCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => parameters.clientConfig?.[property] ??\n parameters.parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters.logger), SessionToken, } = throwOnMissingCredentials(parameters.logger), } = await (parameters.client ??\n new CognitoIdentityClient(Object.assign({}, parameters.clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }))).send(new GetCredentialsForIdentityCommand({\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId,\n Logins: parameters.logins ? await resolveLogins(parameters.logins) : undefined,\n }));\n return {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration,\n };\n };\n}\nfunction throwOnMissingAccessKeyId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no access key ID\", { logger });\n}\nfunction throwOnMissingCredentials(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no credentials\", { logger });\n}\nfunction throwOnMissingSecretKey(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no secret key\", { logger });\n}\n",
"export function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce((arr, name) => {\n const tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n }\n else {\n arr.push(tokenOrProvider().then((token) => [name, token]));\n }\n return arr;\n }, [])).then((resolvedPairs) => resolvedPairs.reduce((logins, [key, value]) => {\n logins[key] = value;\n return logins;\n }, {}));\n}\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentityPool({ accountId, cache = localStorage(), client, clientConfig, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined, logger, parentClientConfig, }) {\n logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const cacheKey = userIdentifier\n ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}`\n : undefined;\n let provider = async (awsIdentityProperties) => {\n const { GetIdCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => clientConfig?.[property] ??\n parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const _client = client ??\n new CognitoIdentityClient(Object.assign({}, clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }));\n let identityId = (cacheKey && (await cache.getItem(cacheKey)));\n if (!identityId) {\n const { IdentityId = throwOnMissingId(logger) } = await _client.send(new GetIdCommand({\n AccountId: accountId,\n IdentityPoolId: identityPoolId,\n Logins: logins ? await resolveLogins(logins) : undefined,\n }));\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => { });\n }\n }\n provider = fromCognitoIdentity({\n client: _client,\n customRoleArn,\n logins,\n identityId,\n });\n return provider(awsIdentityProperties);\n };\n return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(() => { });\n }\n throw err;\n });\n}\nfunction throwOnMissingId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no identity ID\", { logger });\n}\n",
"const STORE_NAME = \"IdentityIds\";\nexport class IndexedDbStorage {\n dbName;\n constructor(dbName = \"aws:cognito-identity-ids\") {\n this.dbName = dbName;\n }\n getItem(key) {\n return this.withObjectStore(\"readonly\", (store) => {\n const req = store.get(key);\n return new Promise((resolve) => {\n req.onerror = () => resolve(null);\n req.onsuccess = () => resolve(req.result ? req.result.value : null);\n });\n }).catch(() => null);\n }\n removeItem(key) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.delete(key);\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n setItem(id, value) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.put({ id, value });\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n getDb() {\n const openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise((resolve, reject) => {\n openDbRequest.onsuccess = () => {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = () => {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = () => {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = () => {\n const db = openDbRequest.result;\n db.onerror = () => {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n }\n withObjectStore(mode, action) {\n return this.getDb().then((db) => {\n const tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = () => db.close();\n return new Promise((resolve, reject) => {\n tx.onerror = () => reject(tx.error);\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch((err) => {\n db.close();\n throw err;\n });\n });\n }\n}\n",
"export class InMemoryStorage {\n store;\n constructor(store = {}) {\n this.store = store;\n }\n getItem(key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n }\n removeItem(key) {\n delete this.store[key];\n }\n setItem(key, value) {\n this.store[key] = value;\n }\n}\n",
"import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nconst inMemoryStorage = new InMemoryStorage();\nexport function localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n",
"import { fromCognitoIdentity as _fromCognitoIdentity } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentity = (options) => _fromCognitoIdentity({\n ...options,\n});\n",
"import { fromCognitoIdentityPool as _fromCognitoIdentityPool } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentityPool = (options) => _fromCognitoIdentityPool({\n ...options,\n});\n",
"import { fromContainerMetadata as _fromContainerMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromContainerMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromContainerMetadata\");\n return _fromContainerMetadata(init);\n};\n",
"import { fromEnv as _fromEnv } from \"@aws-sdk/credential-provider-env\";\nexport const fromEnv = (init) => _fromEnv(init);\n",
"import { fromIni as _fromIni } from \"@aws-sdk/credential-provider-ini\";\nexport const fromIni = (init = {}) => _fromIni({\n ...init,\n});\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromInstanceMetadata as _fromInstanceMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromInstanceMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromInstanceMetadata\");\n return async () => _fromInstanceMetadata(init)().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_IMDS\", \"0\"));\n};\n",
"import { fromLoginCredentials as _fromLoginCredentials, } from \"@aws-sdk/credential-provider-login\";\nexport const fromLoginCredentials = (init) => _fromLoginCredentials({\n ...init,\n});\n",
"import { ENV_KEY, ENV_SECRET, fromEnv } from \"@aws-sdk/credential-provider-env\";\nimport { CredentialsProviderError, ENV_PROFILE } from \"@smithy/core/config\";\nimport { remoteProvider } from \"./remoteProvider\";\nimport { memoizeChain } from \"./runtime/memoize-chain\";\nlet multipleCredentialSourceWarningEmitted = false;\nexport const defaultProvider = (init = {}) => memoizeChain([\n async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\"\n ? init.logger.warn.bind(init.logger)\n : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await import(\"@aws-sdk/credential-provider-ini\");\n return fromIni(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n return fromProcess(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n return fromTokenFile(init)(awsIdentityProperties);\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n },\n], credentialsTreatedAsExpired);\nexport const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nexport const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n",
"import { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n};\n",
"export function memoizeChain(providers, treatAsExpired) {\n const chain = internalCreateChain(providers);\n let activeLock;\n let passiveLock;\n let credentials;\n const provider = async (options) => {\n if (options?.forceRefresh) {\n return await chain(options);\n }\n if (credentials?.expiration) {\n if (credentials?.expiration?.getTime() < Date.now()) {\n credentials = undefined;\n }\n }\n if (activeLock) {\n await activeLock;\n }\n else if (!credentials || treatAsExpired?.(credentials)) {\n if (credentials) {\n if (!passiveLock) {\n passiveLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n passiveLock = undefined;\n });\n }\n }\n else {\n activeLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n activeLock = undefined;\n });\n return provider(options);\n }\n }\n return credentials;\n };\n return provider;\n}\nexport const internalCreateChain = (providers) => async (awsIdentityProperties) => {\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { defaultProvider } from \"@aws-sdk/credential-provider-node\";\nexport const fromNodeProviderChain = (init = {}) => defaultProvider({\n ...init,\n});\n",
"import { fromProcess as _fromProcess } from \"@aws-sdk/credential-provider-process\";\nexport const fromProcess = (init) => _fromProcess(init);\n",
"import { fromSSO as _fromSSO } from \"@aws-sdk/credential-provider-sso\";\nexport const fromSSO = (init = {}) => {\n return _fromSSO({ ...init });\n};\n",
"import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS } from \"@smithy/core/config\";\nimport { fromNodeProviderChain } from \"./fromNodeProviderChain\";\nimport { fromTemporaryCredentials as fromTemporaryCredentialsBase } from \"./fromTemporaryCredentials.base\";\nexport const fromTemporaryCredentials = (options) => {\n return fromTemporaryCredentialsBase(options, fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => loadConfig({\n environmentVariableSelector: (env) => env.AWS_REGION,\n configFileSelector: (profileData) => {\n return profileData.region;\n },\n default: () => undefined,\n }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, profile })());\n};\n",
"import { normalizeProvider } from \"@smithy/core\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nexport const fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {\n let stsClient;\n return async (awsIdentityProperties = {}) => {\n const { callerClientConfig } = awsIdentityProperties;\n const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;\n const logger = options.logger ?? callerClientConfig?.logger;\n logger?.debug(\"@aws-sdk/credential-providers - fromTemporaryCredentials (STS)\");\n const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? \"aws-sdk-js-\" + Date.now() };\n if (params?.SerialNumber) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {\n tryNextLink: false,\n logger,\n });\n }\n params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);\n }\n const { AssumeRoleCommand, STSClient } = await import(\"./loadSts.js\");\n if (!stsClient) {\n const defaultCredentialsOrError = typeof credentialDefaultProvider === \"function\" ? credentialDefaultProvider() : undefined;\n const credentialSources = [\n options.masterCredentials,\n options.clientConfig?.credentials,\n void callerClientConfig?.credentials,\n callerClientConfig?.credentialDefaultProvider?.(),\n defaultCredentialsOrError,\n ];\n let credentialSource = \"STS client default credentials\";\n if (credentialSources[0]) {\n credentialSource = \"options.masterCredentials\";\n }\n else if (credentialSources[1]) {\n credentialSource = \"options.clientConfig.credentials\";\n }\n else if (credentialSources[2]) {\n credentialSource = \"caller client's credentials\";\n throw new Error(\"fromTemporaryCredentials recursion in callerClientConfig.credentials\");\n }\n else if (credentialSources[3]) {\n credentialSource = \"caller client's credentialDefaultProvider\";\n }\n else if (credentialSources[4]) {\n credentialSource = \"AWS SDK default credentials\";\n }\n const regionSources = [\n options.clientConfig?.region,\n callerClientConfig?.region,\n await regionProvider?.({\n profile,\n }),\n ASSUME_ROLE_DEFAULT_REGION,\n ];\n let regionSource = \"default partition's default region\";\n if (regionSources[0]) {\n regionSource = \"options.clientConfig.region\";\n }\n else if (regionSources[1]) {\n regionSource = \"caller client's region\";\n }\n else if (regionSources[2]) {\n regionSource = \"file or env region\";\n }\n const requestHandlerSources = [\n filterRequestHandler(options.clientConfig?.requestHandler),\n filterRequestHandler(callerClientConfig?.requestHandler),\n ];\n let requestHandlerSource = \"STS default requestHandler\";\n if (requestHandlerSources[0]) {\n requestHandlerSource = \"options.clientConfig.requestHandler\";\n }\n else if (requestHandlerSources[1]) {\n requestHandlerSource = \"caller client's requestHandler\";\n }\n logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +\n `${regionSource}=${await normalizeProvider(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);\n stsClient = new STSClient({\n userAgentAppId: callerClientConfig?.userAgentAppId,\n ...options.clientConfig,\n credentials: coalesce(credentialSources),\n logger,\n profile,\n region: coalesce(regionSources),\n requestHandler: coalesce(requestHandlerSources),\n });\n }\n if (options.clientPlugins) {\n for (const plugin of options.clientPlugins) {\n stsClient.middlewareStack.use(plugin);\n }\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {\n logger,\n });\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n credentialScope: Credentials.CredentialScope,\n };\n };\n};\nconst filterRequestHandler = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\" ? undefined : requestHandler;\n};\nconst coalesce = (args) => {\n for (const item of args) {\n if (item !== undefined) {\n return item;\n }\n }\n};\n",
"import { fromTokenFile as _fromTokenFile } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromTokenFile = (init = {}) => _fromTokenFile({\n ...init,\n});\n",
"import { fromWebToken as _fromWebToken } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromWebToken = (init) => _fromWebToken({\n ...init,\n});\n"
],
"mappings": ";4lBAAA,oBACa,QAAwB,SAAI,SAAwB,MAC7D,SAAI,OAAc,QAQZ,OAAc,YAAO,YAPN,MAAO,IAA0B,CAClD,IAAM,EAAc,MAAM,GAAsB,GAAG,CAAmB,EAAE,CAAqB,EAC7F,GAAI,CAAC,EAAY,YAAc,IAAgB,GAC3C,EAAY,WAAa,IAAI,KAAK,KAAK,IAAI,EAAI,CAAW,EAE9D,OAAO,GAEqC,CAC5C,WAAW,CAAC,EAAc,CACtB,GAAI,EAAe,OACf,MAAU,MAAM,uIAAuI,EAG3J,OADA,EAAc,EACP,EAEf,CAAC,EACD,OAAO,GAEE,GAAwB,IAAI,IAAc,MAAO,IAA0B,CACpF,GAAI,EAAU,SAAW,EACrB,MAAM,IAAI,gBAAc,wBAAyB,CAAE,YAAa,EAAM,CAAC,EAE3E,IAAI,EACJ,QAAW,KAAY,EACnB,GAAI,CACA,OAAO,MAAM,EAAS,CAAqB,EAE/C,MAAO,EAAK,CAER,GADA,EAAoB,EAChB,GAAK,YACL,SAEJ,MAAM,EAGd,MAAM,GCtCV,eCAO,SAAS,CAAa,CAAC,EAAQ,CAClC,OAAO,QAAQ,IAAI,OAAO,KAAK,CAAM,EAAE,OAAO,CAAC,EAAK,IAAS,CACzD,IAAM,EAAkB,EAAO,GAC/B,GAAI,OAAO,IAAoB,SAC3B,EAAI,KAAK,CAAC,EAAM,CAAe,CAAC,EAGhC,OAAI,KAAK,EAAgB,EAAE,KAAK,CAAC,IAAU,CAAC,EAAM,CAAK,CAAC,CAAC,EAE7D,OAAO,GACR,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,IAAkB,EAAc,OAAO,CAAC,GAAS,EAAK,KAAW,CAE3E,OADA,EAAO,GA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T,OAAO,GD/GZ,IAAM,GAA2B,CAAC,IAAY,CACjD,OAAO,GAA6B,EAAS,EAAuB,OAAS,UAAU,QAAQ,IAAI,eAAkB,aAAW,CAC5H,4BAA6B,CAAC,IAAQ,EAAI,WAC1C,mBAAoB,CAAC,IAAgB,CACjC,OAAO,EAAY,QAEvB,QAAS,IAAG,CAAG,OACnB,EAAG,IAAK,kCAAiC,SAAQ,CAAC,EAAE,CAAC,GETlD,IAAM,GAAgB,CAAC,EAAO,CAAC,IAAM,GAAe,IACpD,CACP,CAAC,ECFM,IAAM,GAAe,CAAC,IAAS,GAAc,IAC7C,CACP,CAAC",
"debugId": "3B44CDE8E8E4D5F564756E2164756E21",
"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": "E65AC75CD30E153864756E2164756E21",
"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": "F3A18474D05B760264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+groq@3.0.31+d6123d32214422cb/node_modules/@ai-sdk/groq/dist/index.mjs"],
"sourcesContent": [
"// src/groq-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/groq-chat-language-model.ts\nimport {\n InvalidResponseDataError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n isParsableJson,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-groq-usage.ts\nfunction convertGroqUsage(usage) {\n var _a, _b, _c, _d;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_d = (_c = usage.completion_tokens_details) == null ? void 0 : _c.reasoning_tokens) != null ? _d : void 0;\n const textTokens = reasoningTokens != null ? completionTokens - reasoningTokens : completionTokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: textTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-groq-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToGroqChatMessages(prompt) {\n var _a;\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n if (content.length === 1 && content[0].type === \"text\") {\n messages.push({ role: \"user\", content: content[0].text });\n break;\n }\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (!part.mediaType.startsWith(\"image/\")) {\n throw new UnsupportedFunctionalityError({\n functionality: \"Non-image file content parts\"\n });\n }\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: {\n url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`\n }\n };\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n let reasoning = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n // groq supports reasoning for tool-calls in multi-turn conversations\n // https://github.com/vercel/ai/issues/7860\n case \"reasoning\": {\n reasoning += part.text;\n break;\n }\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n ...reasoning.length > 0 ? { reasoning } : null,\n ...toolCalls.length > 0 ? { tool_calls: toolCalls } : null\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/groq-chat-options.ts\nimport { z } from \"zod/v4\";\nvar groqLanguageModelOptions = z.object({\n reasoningFormat: z.enum([\"parsed\", \"raw\", \"hidden\"]).optional(),\n /**\n * Specifies the reasoning effort level for model inference.\n * @see https://console.groq.com/docs/reasoning#reasoning-effort\n */\n reasoningEffort: z.enum([\"none\", \"default\", \"low\", \"medium\", \"high\"]).optional(),\n /**\n * Whether to enable parallel function calling during tool use. Default to true.\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * A unique identifier representing your end-user, which can help OpenAI to\n * monitor and detect abuse. Learn more.\n */\n user: z.string().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n * When true, the model uses constrained decoding to guarantee schema compliance.\n * Only used when structured outputs are enabled and a schema is provided.\n *\n * @default true\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Service tier for the request.\n * - 'on_demand': Default tier with consistent performance and fairness\n * - 'flex': Higher throughput tier optimized for workloads that can handle occasional request failures\n * - 'auto': Uses on_demand rate limits, then falls back to flex tier if exceeded\n *\n * @default 'on_demand'\n */\n serviceTier: z.enum([\"on_demand\", \"flex\", \"auto\"]).optional()\n});\n\n// src/groq-error.ts\nimport { z as z2 } from \"zod/v4\";\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nvar groqErrorDataSchema = z2.object({\n error: z2.object({\n message: z2.string(),\n type: z2.string()\n })\n});\nvar groqFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: groqErrorDataSchema,\n errorToMessage: (data) => data.error.message\n});\n\n// src/groq-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\n\n// src/groq-browser-search-models.ts\nvar BROWSER_SEARCH_SUPPORTED_MODELS = [\n \"openai/gpt-oss-20b\",\n \"openai/gpt-oss-120b\"\n];\nfunction isBrowserSearchSupportedModel(modelId) {\n return BROWSER_SEARCH_SUPPORTED_MODELS.includes(modelId);\n}\nfunction getSupportedModelsString() {\n return BROWSER_SEARCH_SUPPORTED_MODELS.join(\", \");\n}\n\n// src/groq-prepare-tools.ts\nfunction prepareTools({\n tools,\n toolChoice,\n modelId\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const groqTools2 = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n if (tool.id === \"groq.browser_search\") {\n if (!isBrowserSearchSupportedModel(modelId)) {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`,\n details: `Browser search is only supported on the following models: ${getSupportedModelsString()}. Current model: ${modelId}`\n });\n } else {\n groqTools2.push({\n type: \"browser_search\"\n });\n }\n } else {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n }\n } else {\n groqTools2.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: groqTools2, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n case \"required\":\n return { tools: groqTools2, toolChoice: type, toolWarnings };\n case \"tool\":\n return {\n tools: groqTools2,\n toolChoice: {\n type: \"function\",\n function: {\n name: toolChoice.toolName\n }\n },\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/map-groq-finish-reason.ts\nfunction mapGroqFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n return \"length\";\n case \"content_filter\":\n return \"content-filter\";\n case \"function_call\":\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/groq-chat-language-model.ts\nvar GroqChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"image/*\": [/^https?:\\/\\/.*$/]\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n stream,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b, _c;\n const warnings = [];\n const groqOptions = await parseProviderOptions({\n provider: \"groq\",\n providerOptions,\n schema: groqLanguageModelOptions\n });\n const structuredOutputs = (_a = groqOptions == null ? void 0 : groqOptions.structuredOutputs) != null ? _a : true;\n const strictJsonSchema = (_b = groqOptions == null ? void 0 : groqOptions.strictJsonSchema) != null ? _b : true;\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && !structuredOutputs) {\n warnings.push({\n type: \"unsupported\",\n feature: \"responseFormat\",\n details: \"JSON response format schema is only supported with structuredOutputs\"\n });\n }\n const {\n tools: groqTools2,\n toolChoice: groqToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice, modelId: this.modelId });\n return {\n args: {\n // model id:\n model: this.modelId,\n // model specific settings:\n user: groqOptions == null ? void 0 : groqOptions.user,\n parallel_tool_calls: groqOptions == null ? void 0 : groqOptions.parallelToolCalls,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n stop: stopSequences,\n seed,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && responseFormat.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_c = responseFormat.name) != null ? _c : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // provider options:\n reasoning_format: groqOptions == null ? void 0 : groqOptions.reasoningFormat,\n reasoning_effort: groqOptions == null ? void 0 : groqOptions.reasoningEffort,\n service_tier: groqOptions == null ? void 0 : groqOptions.serviceTier,\n // messages:\n messages: convertToGroqChatMessages(prompt),\n // tools:\n tools: groqTools2,\n tool_choice: groqToolChoice\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b;\n const { args, warnings } = await this.getArgs({\n ...options,\n stream: false\n });\n const body = JSON.stringify(args);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n groqChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n const reasoning = choice.message.reasoning;\n if (reasoning != null && reasoning.length > 0) {\n content.push({\n type: \"reasoning\",\n text: reasoning\n });\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: (_a = toolCall.id) != null ? _a : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: (_b = choice.finish_reason) != null ? _b : void 0\n },\n usage: convertGroqUsage(response.usage),\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n request: { body }\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs({ ...options, stream: true });\n const body = JSON.stringify({ ...args, stream: true });\n const { responseHeaders, value: response } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: {\n ...args,\n stream: true\n },\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(groqChatChunkSchema),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const toolCalls = [];\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let isActiveText = false;\n let isActiveReasoning = false;\n let providerMetadata;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (\"error\" in value) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: value.error });\n return;\n }\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (((_a = value.x_groq) == null ? void 0 : _a.usage) != null) {\n usage = value.x_groq.usage;\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n if (delta.reasoning != null && delta.reasoning.length > 0) {\n if (!isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-start\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = true;\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: \"reasoning-0\",\n delta: delta.reasoning\n });\n }\n if (delta.content != null && delta.content.length > 0) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n if (!isActiveText) {\n controller.enqueue({ type: \"text-start\", id: \"txt-0\" });\n isActiveText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"txt-0\",\n delta: delta.content\n });\n }\n if (delta.tool_calls != null) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n for (const toolCallDelta of delta.tool_calls) {\n const index = toolCallDelta.index;\n if (toolCalls[index] == null) {\n if (toolCallDelta.type !== \"function\") {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function' type.`\n });\n }\n if (toolCallDelta.id == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'id' to be a string.`\n });\n }\n if (((_b = toolCallDelta.function) == null ? void 0 : _b.name) == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function.name' to be a string.`\n });\n }\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallDelta.id,\n toolName: toolCallDelta.function.name\n });\n toolCalls[index] = {\n id: toolCallDelta.id,\n type: \"function\",\n function: {\n name: toolCallDelta.function.name,\n arguments: (_c = toolCallDelta.function.arguments) != null ? _c : \"\"\n },\n hasFinished: false\n };\n const toolCall2 = toolCalls[index];\n if (((_d = toolCall2.function) == null ? void 0 : _d.name) != null && ((_e = toolCall2.function) == null ? void 0 : _e.arguments) != null) {\n if (toolCall2.function.arguments.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall2.id,\n delta: toolCall2.function.arguments\n });\n }\n if (isParsableJson(toolCall2.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall2.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_f = toolCall2.id) != null ? _f : generateId(),\n toolName: toolCall2.function.name,\n input: toolCall2.function.arguments\n });\n toolCall2.hasFinished = true;\n }\n }\n continue;\n }\n const toolCall = toolCalls[index];\n if (toolCall.hasFinished) {\n continue;\n }\n if (((_g = toolCallDelta.function) == null ? void 0 : _g.arguments) != null) {\n toolCall.function.arguments += (_i = (_h = toolCallDelta.function) == null ? void 0 : _h.arguments) != null ? _i : \"\";\n }\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall.id,\n delta: (_j = toolCallDelta.function.arguments) != null ? _j : \"\"\n });\n if (((_k = toolCall.function) == null ? void 0 : _k.name) != null && ((_l = toolCall.function) == null ? void 0 : _l.arguments) != null && isParsableJson(toolCall.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_m = toolCall.id) != null ? _m : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n toolCall.hasFinished = true;\n }\n }\n }\n },\n flush(controller) {\n if (isActiveReasoning) {\n controller.enqueue({ type: \"reasoning-end\", id: \"reasoning-0\" });\n }\n if (isActiveText) {\n controller.enqueue({ type: \"text-end\", id: \"txt-0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertGroqUsage(usage),\n ...providerMetadata != null ? { providerMetadata } : {}\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nvar groqChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string().nullish(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n});\nvar groqChatChunkSchema = z3.union([\n z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n index: z3.number(),\n id: z3.string().nullish(),\n type: z3.literal(\"function\").optional(),\n function: z3.object({\n name: z3.string().nullish(),\n arguments: z3.string().nullish()\n })\n })\n ).nullish()\n }).nullish(),\n finish_reason: z3.string().nullable().optional(),\n index: z3.number()\n })\n ),\n x_groq: z3.object({\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n }).nullish()\n }),\n groqErrorDataSchema\n]);\n\n// src/groq-transcription-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertBase64ToUint8Array,\n createJsonResponseHandler as createJsonResponseHandler2,\n mediaTypeToExtension,\n parseProviderOptions as parseProviderOptions2,\n postFormDataToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/groq-transcription-options.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar groqTranscriptionModelOptions = lazySchema(\n () => zodSchema(\n z4.object({\n language: z4.string().nullish(),\n prompt: z4.string().nullish(),\n responseFormat: z4.string().nullish(),\n temperature: z4.number().min(0).max(1).nullish(),\n timestampGranularities: z4.array(z4.string()).nullish()\n })\n )\n);\n\n// src/groq-transcription-model.ts\nvar GroqTranscriptionModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n audio,\n mediaType,\n providerOptions\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const groqOptions = await parseProviderOptions2({\n provider: \"groq\",\n providerOptions,\n schema: groqTranscriptionModelOptions\n });\n const formData = new FormData();\n const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([convertBase64ToUint8Array(audio)]);\n formData.append(\"model\", this.modelId);\n const fileExtension = mediaTypeToExtension(mediaType);\n formData.append(\n \"file\",\n new File([blob], \"audio\", { type: mediaType }),\n `audio.${fileExtension}`\n );\n if (groqOptions) {\n const transcriptionModelOptions = {\n language: (_a = groqOptions.language) != null ? _a : void 0,\n prompt: (_b = groqOptions.prompt) != null ? _b : void 0,\n response_format: (_c = groqOptions.responseFormat) != null ? _c : void 0,\n temperature: (_d = groqOptions.temperature) != null ? _d : void 0,\n timestamp_granularities: (_e = groqOptions.timestampGranularities) != null ? _e : void 0\n };\n for (const key in transcriptionModelOptions) {\n const value = transcriptionModelOptions[key];\n if (value !== void 0) {\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${key}[]`, String(item));\n }\n } else {\n formData.append(key, String(value));\n }\n }\n }\n }\n return {\n formData,\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { formData, warnings } = await this.getArgs(options);\n const {\n value: response,\n responseHeaders,\n rawValue: rawResponse\n } = await postFormDataToApi({\n url: this.config.url({\n path: \"/audio/transcriptions\",\n modelId: this.modelId\n }),\n headers: combineHeaders2(this.config.headers(), options.headers),\n formData,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n groqTranscriptionResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n return {\n text: response.text,\n segments: (_e = (_d = response.segments) == null ? void 0 : _d.map((segment) => ({\n text: segment.text,\n startSecond: segment.start,\n endSecond: segment.end\n }))) != null ? _e : [],\n language: (_f = response.language) != null ? _f : void 0,\n durationInSeconds: (_g = response.duration) != null ? _g : void 0,\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders,\n body: rawResponse\n }\n };\n }\n};\nvar groqTranscriptionResponseSchema = z5.object({\n text: z5.string(),\n x_groq: z5.object({\n id: z5.string()\n }),\n // additional properties are returned when `response_format: 'verbose_json'` is\n task: z5.string().nullish(),\n language: z5.string().nullish(),\n duration: z5.number().nullish(),\n segments: z5.array(\n z5.object({\n id: z5.number(),\n seek: z5.number(),\n start: z5.number(),\n end: z5.number(),\n text: z5.string(),\n tokens: z5.array(z5.number()),\n temperature: z5.number(),\n avg_logprob: z5.number(),\n compression_ratio: z5.number(),\n no_speech_prob: z5.number()\n })\n ).nullish()\n});\n\n// src/tool/browser-search.ts\nimport { createProviderToolFactory } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar browserSearch = createProviderToolFactory({\n id: \"groq.browser_search\",\n inputSchema: z6.object({})\n});\n\n// src/groq-tools.ts\nvar groqTools = {\n browserSearch\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.31\" : \"0.0.0-test\";\n\n// src/groq-provider.ts\nfunction createGroq(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.groq.com/openai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"GROQ_API_KEY\",\n description: \"Groq\"\n })}`,\n ...options.headers\n },\n `ai-sdk/groq/${VERSION}`\n );\n const createChatModel = (modelId) => new GroqChatLanguageModel(modelId, {\n provider: \"groq.chat\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createLanguageModel = (modelId) => {\n if (new.target) {\n throw new Error(\n \"The Groq model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n const createTranscriptionModel = (modelId) => {\n return new GroqTranscriptionModel(modelId, {\n provider: \"groq.transcription\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n };\n const provider = function(modelId) {\n return createLanguageModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n provider.transcription = createTranscriptionModel;\n provider.transcriptionModel = createTranscriptionModel;\n provider.tools = groqTools;\n return provider;\n}\nvar groq = createGroq();\nexport {\n VERSION,\n browserSearch,\n createGroq,\n groq\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qXA0BA,cAAS,MAAgB,MAAC,OAAO,CAC/B,IAAI,EAAI,EAAI,EAAI,EAChB,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,O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/src/database/migration/20260309230000_move_org_to_state.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260309230000_move_org_to_state\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`account_state\\` ADD \\`active_org_id\\` text;`)\n yield* tx.run(\n `UPDATE \\`account_state\\` SET \\`active_org_id\\` = (SELECT \\`selected_org_id\\` FROM \\`account\\` WHERE \\`account\\`.\\`id\\` = \\`account_state\\`.\\`active_account_id\\`);`,\n )\n yield* tx.run(`ALTER TABLE \\`account\\` DROP COLUMN \\`selected_org_id\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,mCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,uDAA2D,EACzE,MAAO,EAAG,IACR,oJACF,EACA,MAAO,EAAG,IAAI,sDAA0D,EACzE,EAEL",
"debugId": "12524F0F00B0C71064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260127222353_familiar_lady_ursula.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260127222353_familiar_lady_ursula\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`project\\` (\n \\`id\\` text PRIMARY KEY,\n \\`worktree\\` text NOT NULL,\n \\`vcs\\` text,\n \\`name\\` text,\n \\`icon_url\\` text,\n \\`icon_color\\` text,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`time_initialized\\` integer,\n \\`sandboxes\\` text NOT NULL\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`message\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_message_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`part\\` (\n \\`id\\` text PRIMARY KEY,\n \\`message_id\\` text NOT NULL,\n \\`session_id\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_part_message_id_message_id_fk\\` FOREIGN KEY (\\`message_id\\`) REFERENCES \\`message\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`permission\\` (\n \\`project_id\\` text PRIMARY KEY,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_permission_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`session\\` (\n \\`id\\` text PRIMARY KEY,\n \\`project_id\\` text NOT NULL,\n \\`parent_id\\` text,\n \\`slug\\` text NOT NULL,\n \\`directory\\` text NOT NULL,\n \\`title\\` text NOT NULL,\n \\`version\\` text NOT NULL,\n \\`share_url\\` text,\n \\`summary_additions\\` integer,\n \\`summary_deletions\\` integer,\n \\`summary_files\\` integer,\n \\`summary_diffs\\` text,\n \\`revert\\` text,\n \\`permission\\` text,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`time_compacting\\` integer,\n \\`time_archived\\` integer,\n CONSTRAINT \\`fk_session_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`todo\\` (\n \\`session_id\\` text NOT NULL,\n \\`content\\` text NOT NULL,\n \\`status\\` text NOT NULL,\n \\`priority\\` text NOT NULL,\n \\`position\\` integer NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`todo_pk\\` PRIMARY KEY(\\`session_id\\`, \\`position\\`),\n CONSTRAINT \\`fk_todo_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`session_share\\` (\n \\`session_id\\` text PRIMARY KEY,\n \\`id\\` text NOT NULL,\n \\`secret\\` text NOT NULL,\n \\`url\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`fk_session_share_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`CREATE INDEX \\`message_session_idx\\` ON \\`message\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`part_message_idx\\` ON \\`part\\` (\\`message_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`part_session_idx\\` ON \\`part\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_project_idx\\` ON \\`session\\` (\\`project_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_parent_idx\\` ON \\`session\\` (\\`parent_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`todo_session_idx\\` ON \\`todo\\` (\\`session_id\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,4YAab,EACD,MAAO,EAAG,IAAI,8XASb,EACD,MAAO,EAAG,IAAI,+ZAUb,EACD,MAAO,EAAG,IAAI,qWAQb,EACD,MAAO,EAAG,IAAI,2zBAsBb,EACD,MAAO,EAAG,IAAI,ghBAYb,EACD,MAAO,EAAG,IAAI,4aAUb,EACD,MAAO,EAAG,IAAI,iEAAuE,EACrF,MAAO,EAAG,IAAI,2DAAiE,EAC/E,MAAO,EAAG,IAAI,2DAAiE,EAC/E,MAAO,EAAG,IAAI,iEAAuE,EACrF,MAAO,EAAG,IAAI,+DAAqE,EACnF,MAAO,EAAG,IAAI,2DAAiE,EAChF,EAEL",
"debugId": "2F55302B03167A1964756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C1FEBBCEC68C97C64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+perplexity@3.0.26+d6123d32214422cb/node_modules/@ai-sdk/perplexity/dist/index.mjs"],
"sourcesContent": [
"// src/perplexity-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/perplexity-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/convert-perplexity-usage.ts\nfunction convertPerplexityUsage(usage) {\n var _a, _b, _c;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_c = usage.reasoning_tokens) != null ? _c : 0;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-perplexity-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertUint8ArrayToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToPerplexityMessages(prompt) {\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\":\n case \"assistant\": {\n const hasMultipartContent = content.some(\n (part) => part.type === \"file\" && part.mediaType.startsWith(\"image/\") || part.type === \"file\" && part.mediaType === \"application/pdf\"\n );\n const messageContent = content.map((part, index) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return {\n type: \"text\",\n text: part.text\n };\n }\n case \"file\": {\n if (part.mediaType === \"application/pdf\") {\n return part.data instanceof URL ? {\n type: \"file_url\",\n file_url: {\n url: part.data.toString()\n },\n file_name: part.filename\n } : {\n type: \"file_url\",\n file_url: {\n url: typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)\n },\n file_name: part.filename || `document-${index}.pdf`\n };\n } else if (part.mediaType.startsWith(\"image/\")) {\n return part.data instanceof URL ? {\n type: \"image_url\",\n image_url: {\n url: part.data.toString()\n }\n } : {\n type: \"image_url\",\n image_url: {\n url: `data:${(_a = part.mediaType) != null ? _a : \"image/jpeg\"};base64,${typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)}`\n }\n };\n }\n }\n }\n }).filter(Boolean);\n messages.push({\n role,\n content: hasMultipartContent ? messageContent : messageContent.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\")\n });\n break;\n }\n case \"tool\": {\n throw new UnsupportedFunctionalityError({\n functionality: \"Tool messages\"\n });\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/map-perplexity-finish-reason.ts\nfunction mapPerplexityFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n case \"length\":\n return finishReason;\n default:\n return \"other\";\n }\n}\n\n// src/perplexity-language-model.ts\nvar PerplexityLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.provider = \"perplexity\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions\n }) {\n var _a;\n const warnings = [];\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n if (seed != null) {\n warnings.push({ type: \"unsupported\", feature: \"seed\" });\n }\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n max_tokens: maxOutputTokens,\n presence_penalty: presencePenalty,\n temperature,\n top_k: topK,\n top_p: topP,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? {\n type: \"json_schema\",\n json_schema: { schema: responseFormat.schema }\n } : void 0,\n // provider extensions\n ...(_a = providerOptions == null ? void 0 : providerOptions.perplexity) != null ? _a : {},\n // messages:\n messages: convertToPerplexityMessages(prompt)\n },\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n const { args: body, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createJsonResponseHandler(\n perplexityResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text.length > 0) {\n content.push({ type: \"text\", text });\n }\n if (response.citations != null) {\n for (const url of response.citations) {\n content.push({\n type: \"source\",\n sourceType: \"url\",\n id: this.config.generateId(),\n url\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertPerplexityUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n providerMetadata: {\n perplexity: {\n images: (_c = (_b = response.images) == null ? void 0 : _b.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }))) != null ? _c : null,\n usage: {\n citationTokens: (_e = (_d = response.usage) == null ? void 0 : _d.citation_tokens) != null ? _e : null,\n numSearchQueries: (_g = (_f = response.usage) == null ? void 0 : _f.num_search_queries) != null ? _g : null\n },\n cost: ((_h = response.usage) == null ? void 0 : _h.cost) ? {\n inputTokensCost: (_i = response.usage.cost.input_tokens_cost) != null ? _i : null,\n outputTokensCost: (_j = response.usage.cost.output_tokens_cost) != null ? _j : null,\n requestCost: (_k = response.usage.cost.request_cost) != null ? _k : null,\n totalCost: (_l = response.usage.cost.total_cost) != null ? _l : null\n } : null\n }\n }\n };\n }\n async doStream(options) {\n const { args, warnings } = this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createEventSourceResponseHandler(\n perplexityChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n const providerMetadata = {\n perplexity: {\n usage: {\n citationTokens: null,\n numSearchQueries: null\n },\n cost: null,\n images: null\n }\n };\n let isFirstChunk = true;\n let isActive = false;\n const self = this;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n (_a = value.citations) == null ? void 0 : _a.forEach((url) => {\n controller.enqueue({\n type: \"source\",\n sourceType: \"url\",\n id: self.config.generateId(),\n url\n });\n });\n isFirstChunk = false;\n }\n if (value.usage != null) {\n usage = value.usage;\n providerMetadata.perplexity.usage = {\n citationTokens: (_b = value.usage.citation_tokens) != null ? _b : null,\n numSearchQueries: (_c = value.usage.num_search_queries) != null ? _c : null\n };\n providerMetadata.perplexity.cost = value.usage.cost ? {\n inputTokensCost: (_d = value.usage.cost.input_tokens_cost) != null ? _d : null,\n outputTokensCost: (_e = value.usage.cost.output_tokens_cost) != null ? _e : null,\n requestCost: (_f = value.usage.cost.request_cost) != null ? _f : null,\n totalCost: (_g = value.usage.cost.total_cost) != null ? _g : null\n } : null;\n }\n if (value.images != null) {\n providerMetadata.perplexity.images = value.images.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }));\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n const textContent = delta.content;\n if (textContent != null) {\n if (!isActive) {\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n isActive = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n },\n flush(controller) {\n if (isActive) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertPerplexityUsage(usage),\n providerMetadata\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id,\n modelId: model,\n timestamp: new Date(created * 1e3)\n };\n}\nvar perplexityCostSchema = z.object({\n input_tokens_cost: z.number().nullish(),\n output_tokens_cost: z.number().nullish(),\n request_cost: z.number().nullish(),\n total_cost: z.number().nullish()\n});\nvar perplexityUsageSchema = z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number().nullish(),\n citation_tokens: z.number().nullish(),\n num_search_queries: z.number().nullish(),\n reasoning_tokens: z.number().nullish(),\n cost: perplexityCostSchema.nullish()\n});\nvar perplexityImageSchema = z.object({\n image_url: z.string(),\n origin_url: z.string(),\n height: z.number(),\n width: z.number()\n});\nvar perplexityResponseSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n message: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityChunkSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n delta: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityErrorSchema = z.object({\n error: z.object({\n code: z.number(),\n message: z.string().nullish(),\n type: z.string().nullish()\n })\n});\nvar errorToMessage = (data) => {\n var _a, _b;\n return (_b = (_a = data.error.message) != null ? _a : data.error.type) != null ? _b : \"unknown error\";\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.26\" : \"0.0.0-test\";\n\n// src/perplexity-provider.ts\nfunction createPerplexity(options = {}) {\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"PERPLEXITY_API_KEY\",\n description: \"Perplexity\"\n })}`,\n ...options.headers\n },\n `ai-sdk/perplexity/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n var _a;\n return new PerplexityLanguageModel(modelId, {\n baseURL: withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.perplexity.ai\"\n ),\n headers: getHeaders,\n generateId,\n fetch: options.fetch\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar perplexity = createPerplexity();\nexport {\n VERSION,\n createPerplexity,\n perplexity\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";sSAsBA,cAAS,MAAsB,MAAC,OAAO,CACrC,IAAI,EAAI,EAAI,EACZ,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK,EACjE,GAAmB,EAAK,EAAM,mBAAqB,KAAO,EAAK,EACrE,MAAO,CACL,YAAa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,CAAC,IAAY,EAAoB,CAAO,EAUzD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAa,EAAiB",
"debugId": "2CF6F40F5AB09D1264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260511000411_data_migration_state.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260511000411_data_migration_state\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`data_migration\\` (\n \\`name\\` text PRIMARY KEY,\n \\`time_completed\\` integer NOT NULL\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gJAKb,EACF,EAEL",
"debugId": "D4E7AFA6305A427E64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/ai-gateway-provider@3.1.2+a6631614dda8d488/node_modules/ai-gateway-provider/dist/providers/unified.mjs"],
"sourcesContent": [
"// src/providers/unified.ts\nimport { createOpenAICompatible } from \"@ai-sdk/openai-compatible\";\nvar createUnified = (arg) => {\n return createOpenAICompatible({\n baseURL: \"https://gateway.ai.cloudflare.com/v1/compat\",\n // intercepted and replaced with actual base URL later\n name: \"Unified\",\n ...arg || {}\n });\n};\nvar unified = createUnified();\nexport {\n createUnified,\n unified\n};\n//# sourceMappingURL=unified.mjs.map"
],
"mappings": ";8NAEA,SAAI,OAAgB,MAAC,SAAQ,MAC3B,OAAO,EAAuB,CAC5B,QAAS,8CAET,KAAM,aACH,GAAO,CAAC,CACb,CAAC,GAEC,EAAU,EAAc",
"debugId": "810C145B03C79C2464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.45/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.45/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.972.46/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isLoginProfile, resolveLoginCredentials } from \"./resolveLoginCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName } from \"@smithy/core/config\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/nested-clients/sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromLoginCredentials } from \"@aws-sdk/credential-provider-login\";\nexport const isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nexport const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const credentials = await fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { LoginCredentialsFetcher } from \"./LoginCredentialsFetcher\";\nexport const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\n const profiles = await parseKnownFiles(init || {});\n const profileName = getProfileName({\n profile: init?.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile?.login_session) {\n throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n",
"import { CredentialsProviderError, readFile } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { createHash, createPrivateKey, createPublicKey, sign } from \"node:crypto\";\nimport { promises as fs } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nexport class LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = await import(\"@aws-sdk/nested-clients/signin\");\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey,\n sessionToken: sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken: refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await fs.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = dirname(tokenFilePath);\n try {\n await fs.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await fs.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => import(\"@aws-sdk/credential-provider-process\").then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})({\n callerClientConfig,\n}).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n"
],
"mappings": ";0MAAA,oBCAA,qBCAA,oBACA,WCDA,eACA,WACa,EAA0B,CAAC,EAAkB,EAAa,IAAW,CAC9E,IAAM,EAAqB,CACvB,aAAc,MAAO,IAAY,CAC7B,IAAQ,YAAa,KAAa,2CAC1B,yBAA0B,KAAa,0CAE/C,OADA,GAAQ,MAAM,sEAAsE,EAC7E,SAAY,QAAM,EAAS,GAAW,CAAC,CAAC,EAAG,EAAsB,CAAO,CAAC,EAAE,EAAE,KAAK,CAAgB,GAE7G,oBAAqB,MAAO,IAAY,CACpC,GAAQ,MAAM,6EAA6E,EAC3F,IAAQ,wBAAyB,KAAa,0CAC9C,MAA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jD,GAAI,GAAqB,CAAI,EACzB,OAAO,GAA8B,EAAM,EAAS,CAAkB,EAE1E,GAAI,EAAiB,CAAI,EACrB,OAAO,EAA0B,EAAS,CAAW,EAEzD,GAAI,EAAa,CAAI,EACjB,OAAO,MAAM,EAAsB,EAAa,EAAM,EAAS,CAAkB,EAErF,GAAI,EAAe,CAAI,EACnB,OAAO,EAAwB,EAAa,EAAS,CAAkB,EAE3E,MAAM,IAAI,4BAAyB,iDAAiD,2CAAsD,CAAE,OAAQ,EAAQ,MAAO,CAAC,GD5BjK,IAAM,GAAU,CAAC,EAAO,CAAC,IAAM,OAAS,sBAAuB,CAAC,IAAM,CACzE,EAAK,QAAQ,MAAM,4CAA4C,EAC/D,IAAM,EAAW,MAAM,kBAAgB,CAAI,EAC3C,OAAO,EAAmB,iBAAe,CACrC,QAAS,EAAK,SAAW,GAAoB,OACjD,CAAC,EAAG,EAAU,EAAM,CAAkB",
"debugId": "264E2DC02799110E64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "22D6A9BB982BA24C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n case \"GetId\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { [m]: \"Region\" }, k = {}, l = [j];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [g, [{ fn: f, argv: [i, \"name\"] }, \"aws\"]],\n [g, [j, \"us-east-1\"]],\n [g, [j, \"us-east-2\"]],\n [g, [j, \"us-west-1\"]],\n [g, [j, \"us-west-2\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://cognito-identity-fips.us-east-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-east-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://cognito-identity.{Region}.amazonaws.com\", k],\n [\"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 17,\n 3,\n 1,\n 4,\n r + 16,\n 2,\n 5,\n r + 16,\n 3,\n 9,\n 6,\n 5,\n 7,\n r + 15,\n 6,\n 8,\n r + 14,\n 7,\n r + 12,\n r + 13,\n 4,\n 11,\n 10,\n 5,\n r + 9,\n r + 11,\n 5,\n 12,\n r + 10,\n 6,\n 13,\n r + 9,\n 8,\n r + 4,\n 14,\n 9,\n r + 5,\n 15,\n 10,\n r + 6,\n 16,\n 11,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 18,\n 5,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass CognitoIdentityServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);\n }\n}\n\nclass ExternalServiceException extends CognitoIdentityServiceException {\n name = \"ExternalServiceException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExternalServiceException.prototype);\n }\n}\nclass InternalErrorException extends CognitoIdentityServiceException {\n name = \"InternalErrorException\";\n $fault = \"server\";\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalErrorException.prototype);\n }\n}\nclass InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);\n }\n}\nclass InvalidParameterException extends CognitoIdentityServiceException {\n name = \"InvalidParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidParameterException.prototype);\n }\n}\nclass NotAuthorizedException extends CognitoIdentityServiceException {\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotAuthorizedException.prototype);\n }\n}\nclass ResourceConflictException extends CognitoIdentityServiceException {\n name = \"ResourceConflictException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceConflictException.prototype);\n }\n}\nclass ResourceNotFoundException extends CognitoIdentityServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends CognitoIdentityServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass LimitExceededException extends CognitoIdentityServiceException {\n name = \"LimitExceededException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LimitExceededException.prototype);\n }\n}\n\nconst _AI = \"AccountId\";\nconst _AKI = \"AccessKeyId\";\nconst _C = \"Credentials\";\nconst _CRA = \"CustomRoleArn\";\nconst _E = \"Expiration\";\nconst _ESE = \"ExternalServiceException\";\nconst _GCFI = \"GetCredentialsForIdentity\";\nconst _GCFII = \"GetCredentialsForIdentityInput\";\nconst _GCFIR = \"GetCredentialsForIdentityResponse\";\nconst _GI = \"GetId\";\nconst _GII = \"GetIdInput\";\nconst _GIR = \"GetIdResponse\";\nconst _IEE = \"InternalErrorException\";\nconst _II = \"IdentityId\";\nconst _IIPCE = \"InvalidIdentityPoolConfigurationException\";\nconst _IPE = \"InvalidParameterException\";\nconst _IPI = \"IdentityPoolId\";\nconst _IPT = \"IdentityProviderToken\";\nconst _L = \"Logins\";\nconst _LEE = \"LimitExceededException\";\nconst _LM = \"LoginsMap\";\nconst _NAE = \"NotAuthorizedException\";\nconst _RCE = \"ResourceConflictException\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SK = \"SecretKey\";\nconst _SKS = \"SecretKeyString\";\nconst _ST = \"SessionToken\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _hE = \"httpError\";\nconst _m = \"message\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity\";\nconst _se = \"server\";\nconst n0 = \"com.amazonaws.cognitoidentity\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar CognitoIdentityServiceException$ = [-3, _s, \"CognitoIdentityServiceException\", 0, [], []];\n_s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar ExternalServiceException$ = [-3, n0, _ESE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(ExternalServiceException$, ExternalServiceException);\nvar InternalErrorException$ = [-3, n0, _IEE, { [_e]: _se }, [_m], [0]];\nn0_registry.registerError(InternalErrorException$, InternalErrorException);\nvar InvalidIdentityPoolConfigurationException$ = [\n -3,\n n0,\n _IIPCE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0],\n];\nn0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);\nvar InvalidParameterException$ = [-3, n0, _IPE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(InvalidParameterException$, InvalidParameterException);\nvar LimitExceededException$ = [-3, n0, _LEE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(LimitExceededException$, LimitExceededException);\nvar NotAuthorizedException$ = [-3, n0, _NAE, { [_e]: _c, [_hE]: 403 }, [_m], [0]];\nn0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);\nvar ResourceConflictException$ = [-3, n0, _RCE, { [_e]: _c, [_hE]: 409 }, [_m], [0]];\nn0_registry.registerError(ResourceConflictException$, ResourceConflictException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar IdentityProviderToken = [0, n0, _IPT, 8, 0];\nvar SecretKeyString = [0, n0, _SKS, 8, 0];\nvar Credentials$ = [\n 3,\n n0,\n _C,\n 0,\n [_AKI, _SK, _ST, _E],\n [0, [() => SecretKeyString, 0], 0, 4],\n];\nvar GetCredentialsForIdentityInput$ = [\n 3,\n n0,\n _GCFII,\n 0,\n [_II, _L, _CRA],\n [0, [() => LoginsMap, 0], 0],\n 1,\n];\nvar GetCredentialsForIdentityResponse$ = [\n 3,\n n0,\n _GCFIR,\n 0,\n [_II, _C],\n [0, [() => Credentials$, 0]],\n];\nvar GetIdInput$ = [3, n0, _GII, 0, [_IPI, _AI, _L], [0, 0, [() => LoginsMap, 0]], 1];\nvar GetIdResponse$ = [3, n0, _GIR, 0, [_II], [0]];\nvar LoginsMap = [2, n0, _LM, 0, [0, 0], [() => IdentityProviderToken, 0]];\nvar GetCredentialsForIdentity$ = [\n 9,\n n0,\n _GCFI,\n 0,\n () => GetCredentialsForIdentityInput$,\n () => GetCredentialsForIdentityResponse$,\n];\nvar GetId$ = [9, n0, _GI, 0, () => GetIdInput$, () => GetIdResponse$];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsJson1_1Protocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.cognitoidentity\",\n errorTypeRegistries,\n xmlNamespace: \"http://cognito-identity.amazonaws.com/doc/2014-06-30/\",\n version: \"2014-06-30\",\n serviceTarget: \"AWSCognitoIdentityService\",\n },\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass CognitoIdentityClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass GetCredentialsForIdentityCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSCognitoIdentityService\", \"GetCredentialsForIdentity\", {})\n .n(\"CognitoIdentityClient\", \"GetCredentialsForIdentityCommand\")\n .sc(GetCredentialsForIdentity$)\n .build() {\n}\n\nclass GetIdCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSCognitoIdentityService\", \"GetId\", {})\n .n(\"CognitoIdentityClient\", \"GetIdCommand\")\n .sc(GetId$)\n .build() {\n}\n\nconst commands = {\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n};\nclass CognitoIdentity extends CognitoIdentityClient {\n}\nclient.createAggregatedClient(commands, CognitoIdentity);\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.CognitoIdentity = CognitoIdentity;\nexports.CognitoIdentityClient = CognitoIdentityClient;\nexports.CognitoIdentityServiceException = CognitoIdentityServiceException;\nexports.CognitoIdentityServiceException$ = CognitoIdentityServiceException$;\nexports.Credentials$ = Credentials$;\nexports.ExternalServiceException = ExternalServiceException;\nexports.ExternalServiceException$ = ExternalServiceException$;\nexports.GetCredentialsForIdentity$ = GetCredentialsForIdentity$;\nexports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand;\nexports.GetCredentialsForIdentityInput$ = GetCredentialsForIdentityInput$;\nexports.GetCredentialsForIdentityResponse$ = GetCredentialsForIdentityResponse$;\nexports.GetId$ = GetId$;\nexports.GetIdCommand = GetIdCommand;\nexports.GetIdInput$ = GetIdInput$;\nexports.GetIdResponse$ = GetIdResponse$;\nexports.InternalErrorException = InternalErrorException;\nexports.InternalErrorException$ = InternalErrorException$;\nexports.InvalidIdentityPoolConfigurationException = InvalidIdentityPoolConfigurationException;\nexports.InvalidIdentityPoolConfigurationException$ = InvalidIdentityPoolConfigurationException$;\nexports.InvalidParameterException = InvalidParameterException;\nexports.InvalidParameterException$ = InvalidParameterException$;\nexports.LimitExceededException = LimitExceededException;\nexports.LimitExceededException$ = LimitExceededException$;\nexports.NotAuthorizedException = NotAuthorizedException;\nexports.NotAuthorizedException$ = NotAuthorizedException$;\nexports.ResourceConflictException = ResourceConflictException;\nexports.ResourceConflictException$ = ResourceConflictException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAyD,MAAO,EAAQ,EAAS,IAAU,CAC7F,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM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CACA,EAAO,uBAAuB,GAAU,EAAe,EAEvD,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EAEnB,IAAQ,GAAwB,EAOhC,IAAQ,GAAmC,EAI3C,IAAQ,GAAe",
"debugId": "87EFD1901F028F2664756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260602182828_add_project_directories.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260602182828_add_project_directories\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`project_directory\\` (\n \\`project_id\\` text NOT NULL,\n \\`directory\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`project_directory_pk\\` PRIMARY KEY(\\`project_id\\`, \\`directory\\`),\n CONSTRAINT \\`fk_project_directory_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+bASb,EACF,EAEL",
"debugId": "CB98E1BA57624F0264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n api_1.diag.debug('could not read machine-id: unsupported platform');\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-unsupported.js.map"
],
"mappings": ";iHAKA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,MACN,eAAe,CAAY,EAAG,CAC1B,EAAM,KAAK,MAAM,iDAAiD,EAClE,OAEI,eAAe",
"debugId": "4A34C4CD3182D90B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260427172553_slow_nightmare.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260427172553_slow_nightmare\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_message\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_session_message_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_entry_session_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_entry_session_type_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_entry_time_created_idx\\`;`)\n yield* tx.run(`CREATE INDEX \\`session_message_session_idx\\` ON \\`session_message\\` (\\`session_id\\`);`)\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_type_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`type\\`);`,\n )\n yield* tx.run(`CREATE INDEX \\`session_message_time_created_idx\\` ON \\`session_message\\` (\\`time_created\\`);`)\n yield* tx.run(`DROP TABLE \\`session_entry\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+aAUb,EACD,MAAO,EAAG,IAAI,mDAAqD,EACnE,MAAO,EAAG,IAAI,wDAA0D,EACxE,MAAO,EAAG,IAAI,wDAA0D,EACxE,MAAO,EAAG,IAAI,iFAAuF,EACrG,MAAO,EAAG,IACR,6FACF,EACA,MAAO,EAAG,IAAI,wFAA8F,EAC5G,MAAO,EAAG,IAAI,6BAA+B,EAC9C,EAEL",
"debugId": "7DB051B1DD29327864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260605042240_add_context_epoch_agent.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260605042240_add_context_epoch_agent\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` ADD \\`agent\\` text DEFAULT 'build' NOT NULL;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gFAAoF,EACnG,EAEL",
"debugId": "C4A92671AD78CBF064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.41/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProcessCredentials } from \"./resolveProcessCredentials\";\nexport const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init.logger);\n};\n",
"import { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { getValidatedProcessCredentials } from \"./getValidatedProcessCredentials\";\nexport const resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n"
],
"mappings": ";kJAAA,oBCAA,oBACA,eAAS,sBACT,oBAAS,aCFT,eACa,EAAiC,CAAC,EAAa,EAAM,IAAa,CAC3E,GAAI,EAAK,UAAY,EACjB,MAAM,MAAM,WAAW,gDAA0D,EAErF,GAAI,EAAK,cAAgB,QAAa,EAAK,kBAAoB,OAC3D,MAAM,MAAM,WAAW,oDAA8D,EAEzF,GAAI,EAAK,WAAY,CACjB,IAAM,EAAc,IAAI,KAExB,GADmB,IAAI,KAAK,EAAK,UAAU,EAC1B,EACb,MAAM,MAAM,WAAW,oDAA8D,EAG7F,IAAI,EAAY,EAAK,UACrB,GAAI,CAAC,GAAa,IAAW,IAAc,eACvC,EAAY,EAAS,GAAa,eAEtC,IAAM,EAAc,CAChB,YAAa,EAAK,YAClB,gBAAiB,EAAK,mBAClB,EAAK,cAAgB,CAAE,aAAc,EAAK,YAAa,KACvD,EAAK,YAAc,CAAE,WAAY,IAAI,KAAK,EAAK,UAAU,CAAE,KAC3D,EAAK,iBAAmB,CAAE,gBAAiB,EAAK,eAAgB,KAChE,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,sBAAuB,GAAG,EACrD,GDxBJ,IAAM,EAA4B,MAAO,EAAa,EAAU,IAAW,CAC9E,IAAM,EAAU,EAAS,GACzB,GAAI,EAAS,GAAc,CACvB,IAAM,EAAoB,EAAQ,mBAClC,GAAI,IAAsB,OAAW,CACjC,IAAM,EAAc,EAAU,2BAAyB,iBAAiB,EAAE,MAAQ,CAAI,EACtF,GAAI,CACA,IAAQ,UAAW,MAAM,EAAY,CAAiB,EAClD,EACJ,GAAI,CACA,EAAO,KAAK,MAAM,EAAO,KAAK,CAAC,EAEnC,KAAM,CACF,MAAM,MAAM,WAAW,6CAAuD,EAElF,OAAO,EAA+B,EAAa,EAAM,CAAQ,EAErE,MAAO,EAAO,CACV,MAAM,IAAI,2BAAyB,EAAM,QAAS,CAAE,QAAO,CAAC,GAIhE,WAAM,IAAI,2BAAyB,WAAW,wCAAmD,CAAE,QAAO,CAAC,EAI/G,WAAM,IAAI,2BAAyB,WAAW,mDAA8D,CACxG,QACJ,CAAC,GD9BF,IAAM,EAAc,CAAC,EAAO,CAAC,IAAM,OAAS,sBAAuB,CAAC,IAAM,CAC7E,EAAK,QAAQ,MAAM,oDAAoD,EACvE,IAAM,EAAW,MAAM,kBAAgB,CAAI,EAC3C,OAAO,EAA0B,iBAAe,CAC5C,QAAS,EAAK,SAAW,GAAoB,OACjD,CAAC,EAAG,EAAU,EAAK,MAAM",
"debugId": "A2FA7541869C1DE664756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+core@3.24.5/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js"],
"sourcesContent": [
"'use strict';\n\nvar crc32 = require('@aws-crypto/crc32');\nvar serde = require('@smithy/core/serde');\nvar node_stream = require('node:stream');\n\nclass Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(serde.toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n\nclass HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(serde.fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${serde.toHex(uuidBytes.subarray(0, 4))}-${serde.toHex(uuidBytes.subarray(4, 6))}-${serde.toHex(uuidBytes.subarray(6, 8))}-${serde.toHex(uuidBytes.subarray(8, 10))}-${serde.toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nfunction splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n\nclass EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new crc32.Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n\nclass MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n\nclass MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n\nclass SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n\nclass SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n\nfunction getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n\nfunction getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nfunction getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n\nlet EventStreamMarshaller$1 = class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n};\nconst eventStreamSerdeProvider$1 = (options) => new EventStreamMarshaller$1(options);\n\nclass EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new EventStreamMarshaller$1({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = typeof body[Symbol.asyncIterator] === \"function\" ? body : readableToIterable(body);\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n return node_stream.Readable.from(this.universalMarshaller.serialize(input, serializer));\n }\n}\nconst eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\nasync function* readableToIterable(readStream) {\n let streamEnded = false;\n let generationEnded = false;\n const records = new Array();\n readStream.on(\"error\", (err) => {\n if (!streamEnded) {\n streamEnded = true;\n }\n if (err) {\n throw err;\n }\n });\n readStream.on(\"data\", (data) => {\n records.push(data);\n });\n readStream.on(\"end\", () => {\n streamEnded = true;\n });\n while (!generationEnded) {\n const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));\n if (value) {\n yield value;\n }\n generationEnded = streamEnded && records.length === 0;\n }\n}\n\nconst readableStreamToIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nconst iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n\nconst resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n\nclass EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? serde.toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const key in firstEvent.value) {\n initialResponseContainer[key] = firstEvent.value[key];\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? serde.fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n\nexports.EventStreamCodec = EventStreamCodec;\nexports.EventStreamMarshaller = EventStreamMarshaller;\nexports.EventStreamSerde = EventStreamSerde;\nexports.HeaderMarshaller = HeaderMarshaller;\nexports.Int64 = Int64;\nexports.MessageDecoderStream = MessageDecoderStream;\nexports.MessageEncoderStream = MessageEncoderStream;\nexports.SmithyMessageDecoderStream = SmithyMessageDecoderStream;\nexports.SmithyMessageEncoderStream = SmithyMessageEncoderStream;\nexports.UniversalEventStreamMarshaller = EventStreamMarshaller$1;\nexports.eventStreamSerdeProvider = eventStreamSerdeProvider;\nexports.getChunkedStream = getChunkedStream;\nexports.getMessageUnmarshaller = getMessageUnmarshaller;\nexports.getUnmarshalledStream = getUnmarshalledStream;\nexports.iterableToReadableStream = iterableToReadableStream;\nexports.readableStreamToIterable = readableStreamToIterable;\nexports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig;\nexports.universalEventStreamSerdeProvider = eventStreamSerdeProvider$1;\n"
],
"mappings": ";0JAMA,WAAM,MAAM,CACR,MACA,WAAW,CAAC,EAAO,CAEf,GADA,KAAK,MAAQ,EACT,EAAM,aAAe,EACrB,MAAU,MAAM,uCAAuC,QAGxD,WAAU,CAAC,EAAQ,CACtB,GAAI,EAAS,qBAA6B,EAAS,qBAC/C,MAAU,MAAM,GAAG,sEAA2E,EAElG,IAAM,EAAQ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7D,EAEM,EAAN,MAAM,CAAqB,CACvB,QACA,WAAW,CAAC,EAAS,CACjB,KAAK,QAAU,GAElB,OAAO,cAAc,EAAG,CACrB,OAAO,KAAK,cAAc,QAEvB,aAAa,EAAG,CACnB,cAAiB,KAAO,KAAK,QAAQ,cAEjC,MADgB,KAAK,QAAQ,QAAQ,OAAO,CAAG,EAGnD,GAAI,KAAK,QAAQ,gBACb,MAAM,IAAI,WAAW,CAAC,EAGlC,EAEM,EAAN,MAAM,CAA2B,CAC7B,QACA,WAAW,CAAC,EAAS,CACjB,KAAK,QAAU,GAElB,OAAO,cAAc,EAAG,CACrB,OAAO,KAAK,cAAc,QAEvB,aAAa,EAAG,CACnB,cAAiB,KAAW,KAAK,QAAQ,cAAe,CACpD,IAAM,EAAe,MAAM,KAAK,QAAQ,aAAa,CAAO,EAC5D,GAAI,IAAiB,OACjB,SACJ,MAAM,GAGlB,EAEM,EAAN,MAAM,CAA2B,CAC7B,QACA,WAAW,CAAC,EAAS,CACjB,KAAK,QAAU,GAElB,OAAO,cAAc,EAAG,CACrB,OAAO,KAAK,cAAc,QAEvB,aAAa,EAAG,CACnB,cAAiB,KAAS,KAAK,QAAQ,YAEnC,MADmB,KAAK,QAAQ,WAAW,CAAK,EAI5D,EAgeQ,GAAmB,EACnB,GAAwB,EACxB,GAAmB,EACnB,GAAmB,EACnB,GAAQ,EACR,GAAuB,EACvB,GAAuB,EACvB,GAA6B,EAC7B,GAA6B,EAC7B,GAAiC,EACjC,GAA2B,GAC3B,GAAmB,EACnB,GAAyB,EACzB,GAAwB,GACxB,GAA2B,GAC3B,GAA2B,GAC3B,GAAgC,GAChC,GAAoC",
"debugId": "787EA5D775AB70ED64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260428004200_add_session_path.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260428004200_add_session_path\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`path\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,wCAA4C,EAC3D,EAEL",
"debugId": "0555BE7EDAEE8DCB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/aws4fetch@1.0.20/node_modules/aws4fetch/dist/aws4fetch.esm.mjs"],
"sourcesContent": [
"/**\n * @license MIT <https://opensource.org/licenses/MIT>\n * @copyright Michael Hart 2024\n */\nconst encoder = new TextEncoder();\nconst HOST_SERVICES = {\n appstream2: 'appstream',\n cloudhsmv2: 'cloudhsm',\n email: 'ses',\n marketplace: 'aws-marketplace',\n mobile: 'AWSMobileHubService',\n pinpoint: 'mobiletargeting',\n queue: 'sqs',\n 'git-codecommit': 'codecommit',\n 'mturk-requester-sandbox': 'mturk-requester',\n 'personalize-runtime': 'personalize',\n};\nconst UNSIGNABLE_HEADERS = new Set([\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n 'presigned-expires',\n 'expect',\n 'x-amzn-trace-id',\n 'range',\n 'connection',\n]);\nclass AwsClient {\n constructor({ accessKeyId, secretAccessKey, sessionToken, service, region, cache, retries, initRetryMs }) {\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n this.service = service;\n this.region = region;\n this.cache = cache || new Map();\n this.retries = retries != null ? retries : 10;\n this.initRetryMs = initRetryMs || 50;\n }\n async sign(input, init) {\n if (input instanceof Request) {\n const { method, url, headers, body } = input;\n init = Object.assign({ method, url, headers }, init);\n if (init.body == null && headers.has('Content-Type')) {\n init.body = body != null && headers.has('X-Amz-Content-Sha256') ? body : await input.clone().arrayBuffer();\n }\n input = url;\n }\n const signer = new AwsV4Signer(Object.assign({ url: input.toString() }, init, this, init && init.aws));\n const signed = Object.assign({}, init, await signer.sign());\n delete signed.aws;\n try {\n return new Request(signed.url.toString(), signed)\n } catch (e) {\n if (e instanceof TypeError) {\n return new Request(signed.url.toString(), Object.assign({ duplex: 'half' }, signed))\n }\n throw e\n }\n }\n async fetch(input, init) {\n for (let i = 0; i <= this.retries; i++) {\n const fetched = fetch(await this.sign(input, init));\n if (i === this.retries) {\n return fetched\n }\n const res = await fetched;\n if (res.status < 500 && res.status !== 429) {\n return res\n }\n await new Promise(resolve => setTimeout(resolve, Math.random() * this.initRetryMs * Math.pow(2, i)));\n }\n throw new Error('An unknown error occurred, ensure retries is not negative')\n }\n}\nclass AwsV4Signer {\n constructor({ method, url, headers, body, accessKeyId, secretAccessKey, sessionToken, service, region, cache, datetime, signQuery, appendSessionToken, allHeaders, singleEncode }) {\n if (url == null) throw new TypeError('url is a required option')\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.method = method || (body ? 'POST' : 'GET');\n this.url = new URL(url);\n this.headers = new Headers(headers || {});\n this.body = body;\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n let guessedService, guessedRegion;\n if (!service || !region) {\n[guessedService, guessedRegion] = guessServiceRegion(this.url, this.headers);\n }\n this.service = service || guessedService || '';\n this.region = region || guessedRegion || 'us-east-1';\n this.cache = cache || new Map();\n this.datetime = datetime || new Date().toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n this.signQuery = signQuery;\n this.appendSessionToken = appendSessionToken || this.service === 'iotdevicegateway';\n this.headers.delete('Host');\n if (this.service === 's3' && !this.signQuery && !this.headers.has('X-Amz-Content-Sha256')) {\n this.headers.set('X-Amz-Content-Sha256', 'UNSIGNED-PAYLOAD');\n }\n const params = this.signQuery ? this.url.searchParams : this.headers;\n params.set('X-Amz-Date', this.datetime);\n if (this.sessionToken && !this.appendSessionToken) {\n params.set('X-Amz-Security-Token', this.sessionToken);\n }\n this.signableHeaders = ['host', ...this.headers.keys()]\n .filter(header => allHeaders || !UNSIGNABLE_HEADERS.has(header))\n .sort();\n this.signedHeaders = this.signableHeaders.join(';');\n this.canonicalHeaders = this.signableHeaders\n .map(header => header + ':' + (header === 'host' ? this.url.host : (this.headers.get(header) || '').replace(/\\s+/g, ' ')))\n .join('\\n');\n this.credentialString = [this.datetime.slice(0, 8), this.region, this.service, 'aws4_request'].join('/');\n if (this.signQuery) {\n if (this.service === 's3' && !params.has('X-Amz-Expires')) {\n params.set('X-Amz-Expires', '86400');\n }\n params.set('X-Amz-Algorithm', 'AWS4-HMAC-SHA256');\n params.set('X-Amz-Credential', this.accessKeyId + '/' + this.credentialString);\n params.set('X-Amz-SignedHeaders', this.signedHeaders);\n }\n if (this.service === 's3') {\n try {\n this.encodedPath = decodeURIComponent(this.url.pathname.replace(/\\+/g, ' '));\n } catch (e) {\n this.encodedPath = this.url.pathname;\n }\n } else {\n this.encodedPath = this.url.pathname.replace(/\\/+/g, '/');\n }\n if (!singleEncode) {\n this.encodedPath = encodeURIComponent(this.encodedPath).replace(/%2F/g, '/');\n }\n this.encodedPath = encodeRfc3986(this.encodedPath);\n const seenKeys = new Set();\n this.encodedSearch = [...this.url.searchParams]\n .filter(([k]) => {\n if (!k) return false\n if (this.service === 's3') {\n if (seenKeys.has(k)) return false\n seenKeys.add(k);\n }\n return true\n })\n .map(pair => pair.map(p => encodeRfc3986(encodeURIComponent(p))))\n .sort(([k1, v1], [k2, v2]) => k1 < k2 ? -1 : k1 > k2 ? 1 : v1 < v2 ? -1 : v1 > v2 ? 1 : 0)\n .map(pair => pair.join('='))\n .join('&');\n }\n async sign() {\n if (this.signQuery) {\n this.url.searchParams.set('X-Amz-Signature', await this.signature());\n if (this.sessionToken && this.appendSessionToken) {\n this.url.searchParams.set('X-Amz-Security-Token', this.sessionToken);\n }\n } else {\n this.headers.set('Authorization', await this.authHeader());\n }\n return {\n method: this.method,\n url: this.url,\n headers: this.headers,\n body: this.body,\n }\n }\n async authHeader() {\n return [\n 'AWS4-HMAC-SHA256 Credential=' + this.accessKeyId + '/' + this.credentialString,\n 'SignedHeaders=' + this.signedHeaders,\n 'Signature=' + (await this.signature()),\n ].join(', ')\n }\n async signature() {\n const date = this.datetime.slice(0, 8);\n const cacheKey = [this.secretAccessKey, date, this.region, this.service].join();\n let kCredentials = this.cache.get(cacheKey);\n if (!kCredentials) {\n const kDate = await hmac('AWS4' + this.secretAccessKey, date);\n const kRegion = await hmac(kDate, this.region);\n const kService = await hmac(kRegion, this.service);\n kCredentials = await hmac(kService, 'aws4_request');\n this.cache.set(cacheKey, kCredentials);\n }\n return buf2hex(await hmac(kCredentials, await this.stringToSign()))\n }\n async stringToSign() {\n return [\n 'AWS4-HMAC-SHA256',\n this.datetime,\n this.credentialString,\n buf2hex(await hash(await this.canonicalString())),\n ].join('\\n')\n }\n async canonicalString() {\n return [\n this.method.toUpperCase(),\n this.encodedPath,\n this.encodedSearch,\n this.canonicalHeaders + '\\n',\n this.signedHeaders,\n await this.hexBodyHash(),\n ].join('\\n')\n }\n async hexBodyHash() {\n let hashHeader = this.headers.get('X-Amz-Content-Sha256') || (this.service === 's3' && this.signQuery ? 'UNSIGNED-PAYLOAD' : null);\n if (hashHeader == null) {\n if (this.body && typeof this.body !== 'string' && !('byteLength' in this.body)) {\n throw new Error('body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header')\n }\n hashHeader = buf2hex(await hash(this.body || ''));\n }\n return hashHeader\n }\n}\nasync function hmac(key, string) {\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n typeof key === 'string' ? encoder.encode(key) : key,\n { name: 'HMAC', hash: { name: 'SHA-256' } },\n false,\n ['sign'],\n );\n return crypto.subtle.sign('HMAC', cryptoKey, encoder.encode(string))\n}\nasync function hash(content) {\n return crypto.subtle.digest('SHA-256', typeof content === 'string' ? encoder.encode(content) : content)\n}\nconst HEX_CHARS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\nfunction buf2hex(arrayBuffer) {\n const buffer = new Uint8Array(arrayBuffer);\n let out = '';\n for (let idx = 0; idx < buffer.length; idx++) {\n const n = buffer[idx];\n out += HEX_CHARS[(n >>> 4) & 0xF];\n out += HEX_CHARS[n & 0xF];\n }\n return out\n}\nfunction encodeRfc3986(urlEncodedStr) {\n return urlEncodedStr.replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase())\n}\nfunction guessServiceRegion(url, headers) {\n const { hostname, pathname } = url;\n if (hostname.endsWith('.on.aws')) {\n const match = hostname.match(/^[^.]{1,63}\\.lambda-url\\.([^.]{1,63})\\.on\\.aws$/);\n return match != null ? ['lambda', match[1] || ''] : ['', '']\n }\n if (hostname.endsWith('.r2.cloudflarestorage.com')) {\n return ['s3', 'auto']\n }\n if (hostname.endsWith('.backblazeb2.com')) {\n const match = hostname.match(/^(?:[^.]{1,63}\\.)?s3\\.([^.]{1,63})\\.backblazeb2\\.com$/);\n return match != null ? ['s3', match[1] || ''] : ['', '']\n }\n const match = hostname.replace('dualstack.', '').match(/([^.]{1,63})\\.(?:([^.]{0,63})\\.)?amazonaws\\.com(?:\\.cn)?$/);\n let service = (match && match[1]) || '';\n let region = match && match[2];\n if (region === 'us-gov') {\n region = 'us-gov-west-1';\n } else if (region === 's3' || region === 's3-accelerate') {\n region = 'us-east-1';\n service = 's3';\n } else if (service === 'iot') {\n if (hostname.startsWith('iot.')) {\n service = 'execute-api';\n } else if (hostname.startsWith('data.jobs.iot.')) {\n service = 'iot-jobs-data';\n } else {\n service = pathname === '/mqtt' ? 'iotdevicegateway' : 'iotdata';\n }\n } else if (service === 'autoscaling') {\n const targetPrefix = (headers.get('X-Amz-Target') || '').split('.')[0];\n if (targetPrefix === 'AnyScaleFrontendService') {\n service = 'application-autoscaling';\n } else if (targetPrefix === 'AnyScaleScalingPlannerFrontendService') {\n service = 'autoscaling-plans';\n }\n } else if (region == null && service.startsWith('s3-')) {\n region = service.slice(3).replace(/^fips-|^external-1/, '');\n service = 's3';\n } else if (service.endsWith('-fips')) {\n service = service.slice(0, -5);\n } else if (region && /-\\d$/.test(service) && !/-\\d$/.test(region)) {\n[service, region] = [region, service];\n }\n return [HOST_SERVICES[service] || service, region || '']\n}\n\nexport { AwsClient, AwsV4Signer };\n"
],
"mappings": ";AAIA,IAAM,EAAU,IAAI,YACd,EAAgB,CACpB,WAAY,YACZ,WAAY,WACZ,MAAO,MACP,YAAa,kBACb,OAAQ,sBACR,SAAU,kBACV,MAAO,MACP,iBAAkB,aAClB,0BAA2B,kBAC3B,sBAAuB,aACzB,EACM,EAAqB,IAAI,IAAI,CACjC,gBACA,eACA,iBACA,aACA,oBACA,SACA,kBACA,QACA,YACF,CAAC,EAkDD,MAAM,CAAY,CAChB,WAAW,EAAG,SAAQ,MAAK,UAAS,OAAM,cAAa,kBAAiB,eAAc,UAAS,SAAQ,QAAO,WAAU,YAAW,qBAAoB,aAAY,gBAAgB,CACjL,GAAI,GAAO,KAAM,MAAU,UAAU,0BAA0B,EAC/D,GAAI,GAAe,KAAM,MAAU,UAAU,kCAAkC,EAC/E,GAAI,GAAmB,KAAM,MAAU,UAAU,sCAAsC,EACvF,KAAK,OAAS,IAAW,EAAO,OAAS,OACzC,KAAK,IAAM,IAAI,IAAI,CAAG,EACtB,KAAK,QAAU,IAAI,QAAQ,GAAW,CAAC,CAAC,EACxC,KAAK,KAAO,EACZ,KAAK,YAAc,EACnB,KAAK,gBAAkB,EACvB,KAAK,aAAe,EACpB,IAAI,EAAgB,EACpB,GAAI,CAAC,GAAW,CAAC,EACrB,CAAC,EAAgB,CAAa,EAAI,EAAmB,KAAK,IAAK,KAAK,OAAO,EASvE,GAPA,KAAK,QAAU,GAAW,GAAkB,GAC5C,KAAK,OAAS,GAAU,GAAiB,YACzC,K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AM,EAAQ,EAAS,QAAQ,aAAc,EAAE,EAAE,MAAM,2DAA2D,EAC9G,EAAW,GAAS,EAAM,IAAO,GACjC,EAAS,GAAS,EAAM,GAC5B,GAAI,IAAW,SACb,EAAS,gBACJ,QAAI,IAAW,MAAQ,IAAW,gBACvC,EAAS,YACT,EAAU,KACL,QAAI,IAAY,MACrB,GAAI,EAAS,WAAW,MAAM,EAC5B,EAAU,cACL,QAAI,EAAS,WAAW,gBAAgB,EAC7C,EAAU,gBAEV,OAAU,IAAa,QAAU,mBAAqB,UAEnD,QAAI,IAAY,cAAe,CACpC,IAAM,GAAgB,EAAQ,IAAI,cAAc,GAAK,IAAI,MAAM,GAAG,EAAE,GACpE,GAAI,IAAiB,0BACnB,EAAU,0BACL,QAAI,IAAiB,wCAC1B,EAAU,oBAEP,QAAI,GAAU,MAAQ,EAAQ,WAAW,KAAK,EACnD,EAAS,EAAQ,MAAM,CAAC,EAAE,QAAQ,qBAAsB,EAAE,EAC1D,EAAU,KACL,QAAI,EAAQ,SAAS,OAAO,EACjC,EAAU,EAAQ,MAAM,EAAG,EAAE,EACxB,QAAI,GAAU,OAAO,KAAK,CAAO,GAAK,CAAC,OAAO,KAAK,CAAM,EAClE,CAAC,EAAS,CAAM,EAAI,CAAC,EAAQ,CAAO,EAElC,MAAO,CAAC,EAAc,IAAY,EAAS,GAAU,EAAE",
"debugId": "8E0648E3C27D920164756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260312043431_session_message_cursor.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260312043431_session_message_cursor\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`message_session_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`part_message_idx\\`;`)\n yield* tx.run(\n `CREATE INDEX \\`message_session_time_created_id_idx\\` ON \\`message\\` (\\`session_id\\`,\\`time_created\\`,\\`id\\`);`,\n )\n yield* tx.run(`CREATE INDEX \\`part_message_id_id_idx\\` ON \\`part\\` (\\`message_id\\`,\\`id\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6CAA+C,EAC7D,MAAO,EAAG,IAAI,0CAA4C,EAC1D,MAAO,EAAG,IACR,qGACF,EACA,MAAO,EAAG,IAAI,sEAA8E,EAC7F,EAEL",
"debugId": "1DA76FCA430F914064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "39701B31C1D8FD1264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://portal.sso.{Region}.amazonaws.com\", i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 13,\n 3,\n 1,\n 4,\n r + 12,\n 2,\n 5,\n r + 12,\n 3,\n 8,\n 6,\n 4,\n 7,\n r + 11,\n 5,\n r + 9,\n r + 10,\n 4,\n 11,\n 9,\n 6,\n 10,\n r + 8,\n 7,\n r + 6,\n r + 7,\n 5,\n 12,\n r + 5,\n 6,\n r + 4,\n r + 5,\n 3,\n r + 1,\n 14,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SSOServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n}\n\nclass InvalidRequestException extends SSOServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n}\nclass ResourceNotFoundException extends SSOServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends SSOServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass UnauthorizedException extends SSOServiceException {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n}\n\nconst _ATT = \"AccessTokenType\";\nconst _GRC = \"GetRoleCredentials\";\nconst _GRCR = \"GetRoleCredentialsRequest\";\nconst _GRCRe = \"GetRoleCredentialsResponse\";\nconst _IRE = \"InvalidRequestException\";\nconst _RC = \"RoleCredentials\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SAKT = \"SecretAccessKeyType\";\nconst _STT = \"SessionTokenType\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _UE = \"UnauthorizedException\";\nconst _aI = \"accountId\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _ex = \"expiration\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hQ = \"httpQuery\";\nconst _m = \"message\";\nconst _rC = \"roleCredentials\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sso\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\nconst n0 = \"com.amazonaws.sso\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SSOServiceException$ = [-3, _s, \"SSOServiceException\", 0, [], []];\n_s_registry.registerError(SSOServiceException$, SSOServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nvar UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];\nn0_registry.registerError(UnauthorizedException$, UnauthorizedException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar AccessTokenType = [0, n0, _ATT, 8, 0];\nvar SecretAccessKeyType = [0, n0, _SAKT, 8, 0];\nvar SessionTokenType = [0, n0, _STT, 8, 0];\nvar GetRoleCredentialsRequest$ = [\n 3,\n n0,\n _GRCR,\n 0,\n [_rN, _aI, _aT],\n [\n [0, { [_hQ]: _rn }],\n [0, { [_hQ]: _ai }],\n [() => AccessTokenType, { [_hH]: _xasbt }],\n ],\n 3,\n];\nvar GetRoleCredentialsResponse$ = [\n 3,\n n0,\n _GRCRe,\n 0,\n [_rC],\n [[() => RoleCredentials$, 0]],\n];\nvar RoleCredentials$ = [\n 3,\n n0,\n _RC,\n 0,\n [_aKI, _sAK, _sT, _ex],\n [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],\n];\nvar GetRoleCredentials$ = [\n 9,\n n0,\n _GRC,\n { [_h]: [\"GET\", \"/federation/credentials\", 200] },\n () => GetRoleCredentialsRequest$,\n () => GetRoleCredentialsResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.sso\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"SWBPortalService\",\n },\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass GetRoleCredentialsCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"GetRoleCredentials\", {})\n .n(\"SSOClient\", \"GetRoleCredentialsCommand\")\n .sc(GetRoleCredentials$)\n .build() {\n}\n\nconst commands = {\n GetRoleCredentialsCommand,\n};\nclass SSO extends SSOClient {\n}\nclient.createAggregatedClient(commands, SSO);\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.GetRoleCredentials$ = GetRoleCredentials$;\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\nexports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;\nexports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.RoleCredentials$ = RoleCredentials$;\nexports.SSO = SSO;\nexports.SSOClient = SSOClient;\nexports.SSOServiceException = SSOServiceException;\nexports.SSOServiceException$ = SSOServiceException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.UnauthorizedException = UnauthorizedException;\nexports.UnauthorizedException$ = UnauthorizedException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,eACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAmC,CAAC,IAAmB,CACzD,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,qBAAsB,CACvB,EAAQ,KAAK,GAAoC,CAAC,EAClD,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEL,GAA8B,CAAC,IAAW,CAC5C,IAAM,EAAW,EAAgB,yBAAyB,CAAM,EAChE,OAAO,OAAO,OAAO,EAAU,CAC3B,qBAAsB,EAAO,kBAAkB,EAAO,sBAAwB,CAAC,CAAC,CACpF,CAAC,GAGC,GAAkC,CAAC,IAAY,CACjD,OAAO,OAAO,OAAO,EAAS,CAC1B,qBAAsB,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,CAAC,EACF,KAAK,gBAAgB,IAAI,EAAK,qBAAqB,KAAK,MAAM,CAAC,EAEnE,OAAO,EAAG,CACN,MAAM,QAAQ,EAEtB,CAEA,MAAM,UAAkC,EAAO,QAC1C,aAAa,EACb,GAAG,EAAY,EACf,EAAE,QAAS,CAAC,EAAS,EAAI,EAAQ,EAAG,CACrC,MAAO,CAAC,EAAU,kBAAkB,EAAQ,EAAQ,iCAAiC,CAAC,CAAC,EAC1F,EACI,EAAE,mBAAoB,qBAAsB,CAAC,CAAC,EAC9C,EAAE,YAAa,2BAA2B,EAC1C,GAAG,EAAmB,EACtB,MAAM,CAAE,CACb,CAEA,IAAM,GAAW,CACb,2BACJ,EACA,MAAM,UAAY,CAAU,CAC5B,CACA,EAAO,uBAAuB,GAAU,CAAG,EAE3C,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EAEnB,IAAQ,EAA4B,EASpC,IAAQ,EAAY",
"debugId": "5FD7D2F779CEE0A464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+node-http-handler@4.7.5/node_modules/@smithy/node-http-handler/dist-cjs/index.js"],
"sourcesContent": [
"'use strict';\n\nvar node_https = require('node:https');\nvar protocols = require('@smithy/core/protocols');\nvar node_stream = require('node:stream');\nvar http2 = require('node:http2');\n\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n\nconst NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\nconst getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name in headers) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\n\nconst timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n};\n\nconst DEFER_EVENT_LISTENER_TIME$2 = 1000;\nconst setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = (offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs - offset);\n const doWithSocket = (socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n }\n else {\n timing.clearTimeout(timeoutId);\n }\n };\n if (request.socket) {\n doWithSocket(request.socket);\n }\n else {\n request.on(\"socket\", doWithSocket);\n }\n };\n if (timeoutInMs < 2000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);\n};\n\nconst setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {\n if (timeoutInMs) {\n return timing.setTimeout(() => {\n let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? \"ERROR\" : \"WARN\"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;\n if (throwOnRequestTimeout) {\n const error = Object.assign(new Error(msg), {\n name: \"TimeoutError\",\n code: \"ETIMEDOUT\",\n });\n req.destroy(error);\n reject(error);\n }\n else {\n msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;\n logger?.warn?.(msg);\n }\n }, timeoutInMs);\n }\n return -1;\n};\n\nconst DEFER_EVENT_LISTENER_TIME$1 = 3000;\nconst setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = () => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n }\n else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n };\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n};\n\nconst DEFER_EVENT_LISTENER_TIME = 3000;\nconst setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n const registerTimeout = (offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = () => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: \"TimeoutError\" }));\n };\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n }\n else {\n request.setTimeout(timeout, onTimeout);\n }\n };\n if (0 < timeoutInMs && timeoutInMs < 6000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n\nconst MIN_WAIT_TIME = 6_000;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {\n const headers = request.headers;\n const expect = headers ? headers.Expect || headers.expect : undefined;\n let timeoutId = -1;\n let sendBody = true;\n if (!externalAgent && expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n }),\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\nfunction writeBody(httpRequest, body) {\n if (body instanceof node_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n const isBuffer = Buffer.isBuffer(body);\n const isString = typeof body === \"string\";\n if (isBuffer || isString) {\n if (isBuffer && body.byteLength === 0) {\n httpRequest.end();\n }\n else {\n httpRequest.end(body);\n }\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" &&\n uint8.buffer &&\n typeof uint8.byteOffset === \"number\" &&\n typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n\nconst DEFAULT_REQUEST_TIMEOUT = 0;\nlet hAgent = undefined;\nlet hRequest = undefined;\nclass NodeHttpHandler {\n config;\n configProvider;\n socketWarningTimestamp = 0;\n externalAgent = false;\n metadata = { handlerProtocol: \"http/1.1\" };\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttpHandler(instanceOrOptions);\n }\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15_000;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n })\n .catch(reject);\n }\n else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const config = this.config;\n const isSSL = request.protocol === \"https:\";\n if (!isSSL && !this.config.httpAgent) {\n this.config.httpAgent = await this.config.httpAgentProvider();\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = undefined;\n let socketWarningTimeoutId = -1;\n let connectionTimeoutId = -1;\n let requestTimeoutId = -1;\n let socketTimeoutId = -1;\n let keepAliveTimeoutId = -1;\n const clearTimeouts = () => {\n timing.clearTimeout(socketWarningTimeoutId);\n timing.clearTimeout(connectionTimeoutId);\n timing.clearTimeout(requestTimeoutId);\n timing.clearTimeout(socketTimeoutId);\n timing.clearTimeout(keepAliveTimeoutId);\n };\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const headers = request.headers;\n const expectContinue = headers ? (headers.Expect ?? headers.expect) === \"100-continue\" : false;\n let agent = isSSL ? config.httpsAgent : config.httpAgent;\n if (expectContinue && !this.externalAgent) {\n agent = new (isSSL ? node_https.Agent : hAgent)({\n keepAlive: false,\n maxSockets: Infinity,\n });\n }\n socketWarningTimeoutId = timing.setTimeout(() => {\n this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);\n }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));\n const queryString = request.query ? protocols.buildQueryString(request.query) : \"\";\n let auth = undefined;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n }\n else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth,\n };\n const requestFunc = isSSL ? node_https.request : hRequest;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new protocols.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = () => {\n req.destroy();\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;\n connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);\n requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);\n socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n keepAliveTimeoutId = setSocketKeepAlive(req, {\n keepAlive: httpAgent.keepAlive,\n keepAliveMsecs: httpAgent.keepAliveMsecs,\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {\n clearTimeouts();\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout,\n socketTimeout,\n socketAcquisitionWarningTimeout,\n throwOnRequestTimeout,\n httpAgentProvider: async () => {\n const { Agent, request } = await import('node:http');\n hRequest = request;\n hAgent = Agent;\n if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpAgent;\n }\n return new hAgent({ keepAlive, maxSockets, ...httpAgent });\n },\n httpsAgent: (() => {\n if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpsAgent;\n }\n return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger,\n };\n }\n}\n\nconst ids = new Uint16Array(1);\nclass ClientHttp2SessionRef {\n id = ids[0]++;\n total = 0;\n max = 0;\n session;\n refs = 0;\n constructor(session) {\n session.unref();\n this.session = session;\n }\n retain() {\n if (this.session.destroyed) {\n throw new Error(\"@smithy/node-http-handler - cannot acquire reference to destroyed session.\");\n }\n this.refs += 1;\n this.total += 1;\n this.max = Math.max(this.refs, this.max);\n this.session.ref();\n }\n free() {\n if (this.session.destroyed) {\n return;\n }\n this.refs -= 1;\n if (this.refs === 0) {\n this.session.unref();\n }\n if (this.refs < 0) {\n throw new Error(\"@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.\");\n }\n }\n deref() {\n return this.session;\n }\n close() {\n if (!this.session.closed) {\n this.session.close();\n }\n }\n destroy() {\n this.refs = 0;\n if (!this.session.destroyed) {\n this.session.destroy();\n }\n }\n useCount() {\n return this.refs;\n }\n}\n\nclass NodeHttp2ConnectionPool {\n sessions = [];\n maxConcurrency = 0;\n constructor(sessions) {\n this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));\n }\n poll() {\n let cleanup = false;\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n cleanup = true;\n continue;\n }\n if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {\n return session;\n }\n }\n if (cleanup) {\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n this.remove(session);\n }\n }\n }\n }\n offerLast(ref) {\n this.sessions.push(ref);\n }\n remove(ref) {\n const ix = this.sessions.indexOf(ref);\n if (ix > -1) {\n this.sessions.splice(ix, 1);\n }\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n setMaxConcurrency(maxConcurrency) {\n this.maxConcurrency = maxConcurrency;\n }\n destroy(ref) {\n this.remove(ref);\n ref.destroy();\n }\n}\n\nclass NodeHttp2ConnectionManager {\n config;\n connectOptions;\n connectionPools = new Map();\n constructor(config) {\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const pool = this.getPool(url);\n if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {\n const available = pool.poll();\n if (available) {\n available.retain();\n return available;\n }\n }\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\"Fail to set maxConcurrentStreams to \" +\n this.config.maxConcurrency +\n \"when creating new session for \" +\n requestContext.destination.toString());\n }\n });\n }\n const graceful = () => {\n this.removeFromPoolAndClose(url, ref);\n };\n const ensureDestroyed = () => {\n this.removeFromPoolAndCheckedDestroy(url, ref);\n };\n session.on(\"goaway\", graceful);\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n pool.offerLast(ref);\n ref.retain();\n return ref;\n }\n release(_requestContext, ref) {\n ref.free();\n }\n createIsolatedSession(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n session.settings({ maxConcurrentStreams: 1 });\n const ensureDestroyed = () => {\n ref.destroy();\n };\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n ref.retain();\n return ref;\n }\n destroy() {\n for (const [url, connectionPool] of this.connectionPools) {\n for (const session of [...connectionPool]) {\n session.destroy();\n }\n this.connectionPools.delete(url);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n for (const pool of this.connectionPools.values()) {\n pool.setMaxConcurrency(maxConcurrentStreams);\n }\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {\n this.connectOptions = nodeHttp2ConnectOptions;\n }\n debug() {\n const pools = {};\n for (const [url, pool] of this.connectionPools) {\n const sessions = [];\n for (const ref of pool) {\n sessions.push({\n id: ref.id,\n active: ref.useCount(),\n maxConcurrent: ref.max,\n totalRequests: ref.total,\n });\n }\n pools[url] = { sessions };\n }\n return pools;\n }\n removeFromPoolAndClose(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.close();\n }\n removeFromPoolAndCheckedDestroy(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.destroy();\n }\n getPool(url) {\n if (!this.connectionPools.has(url)) {\n const pool = new NodeHttp2ConnectionPool();\n if (this.config.maxConcurrency) {\n pool.setMaxConcurrency(this.config.maxConcurrency);\n }\n this.connectionPools.set(url, pool);\n }\n return this.connectionPools.get(url);\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n connect(url) {\n return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions);\n }\n}\n\nclass NodeHttp2Handler {\n config;\n configProvider;\n metadata = { handlerProtocol: \"h2\" };\n connectionManager = new NodeHttp2ConnectionManager({});\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttp2Handler(instanceOrOptions);\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((opts) => {\n resolve(opts || {});\n })\n .catch(reject);\n }\n else {\n resolve(options || {});\n }\n });\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;\n this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);\n if (maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);\n }\n if (nodeHttp2ConnectOptions) {\n this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);\n }\n }\n const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;\n const useIsolatedSession = disableConcurrentStreams || isEventStream;\n const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = undefined;\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const connectConfig = {\n requestTimeout: this.config?.sessionTimeout,\n isEventStream,\n };\n const ref = useIsolatedSession\n ? this.connectionManager.createIsolatedSession(requestContext, connectConfig)\n : this.connectionManager.lease(requestContext, connectConfig);\n const session = ref.deref();\n const rejectWithDestroy = (err) => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n fulfilled = true;\n reject(err);\n };\n const queryString = query ? protocols.buildQueryString(query) : \"\";\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const clientHttp2Stream = session.request({\n ...request.headers,\n [http2.constants.HTTP2_HEADER_PATH]: path,\n [http2.constants.HTTP2_HEADER_METHOD]: method,\n });\n if (effectiveRequestTimeout) {\n clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {\n clientHttp2Stream.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = () => {\n clientHttp2Stream.close();\n const abortError = buildAbortError(abortSignal);\n rejectWithDestroy(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n clientHttp2Stream.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n clientHttp2Stream.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n clientHttp2Stream.on(\"error\", rejectWithDestroy);\n clientHttp2Stream.on(\"aborted\", () => {\n rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));\n });\n clientHttp2Stream.on(\"response\", (headers) => {\n const httpResponse = new protocols.HttpResponse({\n statusCode: headers[\":status\"] ?? -1,\n headers: getTransformedHeaders(headers),\n body: clientHttp2Stream,\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (useIsolatedSession) {\n session.close();\n }\n });\n clientHttp2Stream.on(\"close\", () => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n else {\n this.connectionManager.release(requestContext, ref);\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\n\nclass Collector extends node_stream.Writable {\n bufferedBytes = [];\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n}\n\nconst streamCollector = (stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n};\nconst isReadableStreamInstance = (stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream;\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n\nexports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;\nexports.NodeHttp2Handler = NodeHttp2Handler;\nexports.NodeHttpHandler = NodeHttpHandler;\nexports.streamCollector = streamCollector;\n"
],
"mappings": ";2HAEA,SAAI,aACA,MACA,cACA,aAEJ,SAAS,CAAe,CAAC,EAAa,CAClC,IAAM,EAAS,GAAe,OAAO,IAAgB,UAAY,WAAY,EACvE,EAAY,OACZ,OACN,GAAI,EAAQ,CACR,GAAI,aAAkB,MAAO,CACzB,IAAM,EAAiB,MAAM,iBAAiB,EAG9C,OAFA,EAAW,KAAO,aAClB,EAAW,MAAQ,EACZ,EAEX,IAAM,EAAiB,MAAM,OAAO,CAAM,CAAC,EAE3C,OADA,EAAW,KAAO,aACX,EAEX,IAAM,EAAiB,MAAM,iBAAiB,EAE9C,OADA,EAAW,KAAO,aACX,EAGX,IAAM,GAA6B,CAAC,aAAc,QAAS,WAAW,EAEhE,EAAwB,CAAC,IAAY,CACvC,IAAM,EAAqB,CAAC,EAC5B,QAAW,KAAQ,EAAS,CACxB,IAAM,EAAe,EAAQ,GAC7B,EAAmB,GAAQ,MAAM,QAAQ,CAAY,EAAI,EAAa,KAAK,GAAG,EAAI,EAEtF,OAAO,GAGL,EAAS,CACX,WAAY,CAAC,EAAI,IAAO,WAAW,EAAI,CAAE,EACzC,aAAc,CAAC,IAAc,aA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AkB,eACvG,eAAe,EAAqB,CAAC,EAAQ,CACzC,IAAM,EAAS,CAAC,EACV,EAAS,EAAO,UAAU,EAC5B,EAAS,GACT,EAAS,EACb,MAAO,CAAC,EAAQ,CACZ,IAAQ,OAAM,SAAU,MAAM,EAAO,KAAK,EAC1C,GAAI,EACA,EAAO,KAAK,CAAK,EACjB,GAAU,EAAM,OAEpB,EAAS,EAEb,IAAM,EAAY,IAAI,WAAW,CAAM,EACnC,EAAS,EACb,QAAW,KAAS,EAChB,EAAU,IAAI,EAAO,CAAM,EAC3B,GAAU,EAAM,OAEpB,OAAO,EAGH,2BAA0B,GAC1B,oBAAmB,EACnB,mBAAkB,EAClB,mBAAkB",
"debugId": "D74F6342377D164664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260611192811_lush_chimera.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260611192811_lush_chimera\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`credential_connector_active_idx\\`;`)\n yield* tx.run(`DROP TABLE \\`credential\\`;`)\n yield* tx.run(`\n CREATE TABLE \\`credential\\` (\n \\`id\\` text PRIMARY KEY,\n \\`integration_id\\` text,\n \\`label\\` text NOT NULL,\n \\`value\\` text NOT NULL,\n \\`connector_id\\` text,\n \\`method_id\\` text,\n \\`active\\` integer,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,8BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,yDAA2D,EACzE,MAAO,EAAG,IAAI,0BAA4B,EAC1C,MAAO,EAAG,IAAI,oXAYb,EACF,EAEL",
"debugId": "E7B6AFA1E77CFA7264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.43/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nimport { NodeHttpHandler } from \"@smithy/node-http-handler\";\nimport fs from \"node:fs/promises\";\nimport { checkUrl } from \"./checkUrl\";\nimport { createGetRequest, getCredentials } from \"./requestHelpers\";\nimport { retryWrapper } from \"./retry-wrapper\";\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger?.warn\n ? console.warn\n : options.logger.warn.bind(options.logger);\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });\n const requestTimeout = options.timeout ?? 1000;\n const provider = retryWrapper(async () => {\n const request = createGetRequest(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await fs.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request, { requestTimeout });\n return getCredentials(result.response).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n return async () => {\n try {\n return await provider();\n }\n finally {\n requestHandler.destroy?.();\n }\n };\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nexport const checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { parseRfc3339DateTime } from \"@smithy/core/serde\";\nimport { sdkStreamMixin } from \"@smithy/core/serde\";\nexport function createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexport async function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n",
"export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
],
"mappings": ";wPAAA,oBACA,gBACA,gBACA,gCCHA,eAGA,IAAM,EAAqB,gBACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C,OAGH,KACD,GAAI,EAAI,WAAa,YACjB,OAEJ,IAAM,EAAe,EAAI,SAAS,MAAM,GAAG,EACrC,EAAU,CAAC,IAAc,CAC3B,IAAM,EAAM,SAAS,EAAW,EAAE,EAClC,MAAO,IAAK,GAAO,GAAO,KAE9B,GAAI,EAAa,KAAO,OACpB,EAAQ,EAAa,EAAE,GACvB,EAAQ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eAAiB,MAAM,EAAG,SAAS,CAAS,GAAG,SAAS,EAE5E,GAAI,CACA,IAAM,EAAS,MAAM,EAAe,OAAO,EAAS,CAAE,gBAAe,CAAC,EACtE,OAAO,EAAe,EAAO,QAAQ,EAAE,KAAK,CAAC,IAAU,uBAAqB,EAAO,mBAAoB,GAAG,CAAC,EAE/G,MAAO,EAAG,CACN,MAAM,IAAI,2BAAyB,OAAO,CAAC,EAAG,CAAE,OAAQ,EAAQ,MAAO,CAAC,IAE7E,EAAQ,YAAc,EAAG,EAAQ,SAAW,IAAI,EACnD,MAAO,UAAY,CACf,GAAI,CACA,OAAO,MAAM,EAAS,SAE1B,CACI,EAAe,UAAU",
"debugId": "6F5D13DF00C9ACAB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260213144116_wakeful_the_professor.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260213144116_wakeful_the_professor\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`control_account\\` (\n \\`email\\` text NOT NULL,\n \\`url\\` text NOT NULL,\n \\`access_token\\` text NOT NULL,\n \\`refresh_token\\` text NOT NULL,\n \\`token_expiry\\` integer,\n \\`active\\` integer NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`control_account_pk\\` PRIMARY KEY(\\`email\\`, \\`url\\`)\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6bAYb,EACF,EAEL",
"debugId": "66D8558D3ECA547364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst fs_1 = require(\"fs\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n try {\n const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-bsd.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,UACA,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,OADe,MAAM,EAAK,SAAS,SAAS,cAAe,CAAE,SAAU,MAAO,CAAC,GACjE,KAAK,EAEvB,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,GAAI,CAEA,OADe,MAAO,EAAG,EAAY,WAAW,4BAA4B,GAC9D,OAAO,KAAK,EAE9B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "30E4FB6B6CA3EC9064756E2164756E21",
"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": "7228E0E6BBA9A5C664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "14E3F3C3B7F98B6464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260603001617_session_message_projection_indexes.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603001617_session_message_projection_indexes\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_type_idx\\`;`)\n yield* tx.run(`CREATE INDEX \\`event_aggregate_seq_idx\\` ON \\`event\\` (\\`aggregate_id\\`,\\`seq\\`);`)\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_time_created_id_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`time_created\\`,\\`id\\`);`,\n )\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_type_time_created_id_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`type\\`,\\`time_created\\`,\\`id\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,oDACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,qDAAuD,EACrE,MAAO,EAAG,IAAI,0DAA4D,EAC1E,MAAO,EAAG,IAAI,2EAAmF,EACjG,MAAO,EAAG,IACR,qHACF,EACA,MAAO,EAAG,IACR,iIACF,EACD,EAEL",
"debugId": "5959B31EBAFCEC5264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260622202450_simplify_session_input.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260622202450_simplify_session_input\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DELETE FROM \\`session_context_epoch\\`;`)\n yield* tx.run(`DELETE FROM \\`session_input\\`;`)\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`DELETE FROM \\`event\\`;`)\n yield* tx.run(`DELETE FROM \\`event_sequence\\`;`)\n yield* tx.run(`UPDATE \\`session\\` SET \\`workspace_id\\` = NULL WHERE \\`workspace_id\\` IS NOT NULL;`)\n yield* tx.run(`DELETE FROM \\`workspace\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sCAAwC,EACtD,MAAO,EAAG,IAAI,8BAAgC,EAC9C,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,sBAAwB,EACtC,MAAO,EAAG,IAAI,+BAAiC,EAC/C,MAAO,EAAG,IAAI,8EAAoF,EAClG,MAAO,EAAG,IAAI,0BAA4B,EAC3C,EAEL",
"debugId": "AEF19943A0F4167064756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/is-wsl@3.1.1/node_modules/is-wsl/index.js", "../../node_modules/.bun/is-inside-container@1.0.0/node_modules/is-inside-container/index.js", "../../node_modules/.bun/is-docker@3.0.0/node_modules/is-docker/index.js"],
"sourcesContent": [
"import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n",
"import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n",
"import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n"
],
"mappings": ";AAAA,uBACA,kBACA,kBCFA,kBCAA,kBAEA,IAAI,EAEJ,SAAS,CAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,CAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,EAAa,GAAK,EAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,EAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,EAAG,SAAS,oBAAoB,EACzB,GACN,KAAM,CACP,MAAO,KAIT,SAAwB,CAAiB,EAAG,CAE3C,GAAI,IAAiB,OACpB,EAAe,EAAgB,GAAK,EAAS,EAG9C,OAAO,EDhBR,IAAM,EAAQ,IAAM,CACnB,GAAI,EAAQ,WAAa,QACxB,MAAO,GAGR,GAAI,EAAG,QAAQ,EAAE,YAAY,EAAE,SAAS,WAAW,EAAG,CACrD,GAAI,EAAkB,EACrB,MAAO,GAGR,MAAO,GAGR,GAAI,CACH,GAAI,EAAG,aAAa,gBAAiB,MAAM,EAAE,YAAY,EAAE,SAAS,WAAW,EAC9E,MAAO,CAAC,EAAkB,EAE1B,KAAM,EAGR,GACC,EAAG,WAAW,qCAAqC,GAChD,EAAG,WAAW,UAAU,EAE3B,MAAO,CAAC,EAAkB,EAG3B,MAAO,IAGO,IAAQ,IAAI,gBAAkB,EAAQ,EAAM",
"debugId": "A0BC7F4D4302FCB864756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.45/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.45/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { readFileSync } from \"node:fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n",
"export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACA,uBAAS,WCFF,IAAM,EAAe,CAAC,IAAS,MAAO,IAA0B,CACnE,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,IAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,GAClG,8BAA+B,EACrC,GAAI,CAAC,EAA4B,CAC7B,IAAQ,wCAAyC,KAAa,0CAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,IACb,GAAuB,sBACvB,EAAK,kBACZ,CACJ,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDnBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,MAAO,IAA0B,CACzE,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,IAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,GAAI,CAAC,GAAwB,CAAC,EAC1B,MAAM,IAAI,2BAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,IAAM,EAAc,MAAM,EAAa,IAChC,EACH,iBAAkB,2BAAyB,iBAAiB,EAAE,IAC1D,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC5D,UACA,iBACJ,CAAC,EAAE,CAAqB,EACxB,GAAI,IAAyB,QAAQ,IAAI,GACrC,uBAAqB,EAAa,wCAAyC,GAAG,EAElF,OAAO",
"debugId": "281DC47C6FEF7DBD64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260511173437_session-metadata.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260511173437_session-metadata\",\n up(tx) {\n return Effect.gen(function* () {\n // This column briefly shipped again under 20260530232709_lovely_romulus.\n if (\n (yield* tx.all<{ name: string }>(`PRAGMA table_info(\\`session\\`)`)).some((column) => column.name === \"metadata\")\n )\n return\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`metadata\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAE7B,IACG,MAAO,EAAG,IAAsB,8BAAgC,GAAG,KAAK,CAAC,IAAW,EAAO,OAAS,UAAU,EAE/G,OACF,MAAO,EAAG,IAAI,4CAAgD,EAC/D,EAEL",
"debugId": "6DCFBEFD7C2AA99864756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260303231226_add_workspace_fields.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260303231226_add_workspace_fields\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`type\\` text NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`name\\` text;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`directory\\` text;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`extra\\` text;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` DROP COLUMN \\`config\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,mDAAuD,EACrE,MAAO,EAAG,IAAI,0CAA8C,EAC5D,MAAO,EAAG,IAAI,+CAAmD,EACjE,MAAO,EAAG,IAAI,2CAA+C,EAC7D,MAAO,EAAG,IAAI,+CAAmD,EAClE,EAEL",
"debugId": "88358FCA8A3FBD2F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js", "../../node_modules/.bun/@smithy+is-array-buffer@2.2.0/node_modules/@smithy/is-array-buffer/dist-cjs/index.js", "../../node_modules/.bun/@smithy+util-buffer-from@2.2.0/node_modules/@smithy/util-buffer-from/dist-cjs/index.js", "../../node_modules/.bun/@smithy+util-utf8@2.3.0/node_modules/@smithy/util-utf8/dist-cjs/index.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/convertToBuffer.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/isEmptyData.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/numToUint8.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js", "../../node_modules/.bun/@aws-crypto+util@5.2.0/node_modules/@aws-crypto/util/build/main/index.js", "../../node_modules/.bun/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js", "../../node_modules/.bun/@aws-crypto+crc32@5.2.0/node_modules/@aws-crypto/crc32/build/main/index.js"],
"sourcesContent": [
"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __esDecorate;\r\nvar __runInitializers;\r\nvar __propKey;\r\nvar __setFunctionName;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\nvar __addDisposableResource;\r\nvar __disposeResources;\r\nvar __rewriteRelativeImportExtension;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n };\r\n\r\n __runInitializers = function (thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n };\r\n\r\n __propKey = function (x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n };\r\n\r\n __setFunctionName = function (f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n var ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n __addDisposableResource = function (env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n };\r\n\r\n var _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\r\n\r\n __disposeResources = function (env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n };\r\n\r\n __rewriteRelativeImportExtension = function (path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__esDecorate\", __esDecorate);\r\n exporter(\"__runInitializers\", __runInitializers);\r\n exporter(\"__propKey\", __propKey);\r\n exporter(\"__setFunctionName\", __setFunctionName);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n exporter(\"__addDisposableResource\", __addDisposableResource);\r\n exporter(\"__disposeResources\", __disposeResources);\r\n exporter(\"__rewriteRelativeImportExtension\", __rewriteRelativeImportExtension);\r\n});\r\n\r\n0 && (module.exports = {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __exportStar: __exportStar,\r\n __createBinding: __createBinding,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n});\r\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n",
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToBuffer = void 0;\nvar util_utf8_1 = require(\"@smithy/util-utf8\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : util_utf8_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\nexports.convertToBuffer = convertToBuffer;\n//# sourceMappingURL=convertToBuffer.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=isEmptyData.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\nexports.numToUint8 = numToUint8;\n//# sourceMappingURL=numToUint8.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;\n//# sourceMappingURL=uint32ArrayFrom.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });\n//# sourceMappingURL=index.js.map",
"\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar index_1 = require(\"./index\");\nvar AwsCrc32 = /** @class */ (function () {\n function AwsCrc32() {\n this.crc32 = new index_1.Crc32();\n }\n AwsCrc32.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash))\n return;\n this.crc32.update((0, util_1.convertToBuffer)(toHash));\n };\n AwsCrc32.prototype.digest = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())];\n });\n });\n };\n AwsCrc32.prototype.reset = function () {\n this.crc32 = new index_1.Crc32();\n };\n return AwsCrc32;\n}());\nexports.AwsCrc32 = AwsCrc32;\n//# sourceMappingURL=aws_crc32.js.map",
"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nfunction crc32(data) {\n return new Crc32().update(data).digest();\n}\nexports.crc32 = crc32;\nvar Crc32 = /** @class */ (function () {\n function Crc32() {\n this.checksum = 0xffffffff;\n }\n Crc32.prototype.update = function (data) {\n var e_1, _a;\n try {\n for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var byte = data_1_1.value;\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n Crc32.prototype.digest = function () {\n return (this.checksum ^ 0xffffffff) >>> 0;\n };\n return Crc32;\n}());\nexports.Crc32 = Crc32;\n// prettier-ignore\nvar a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nvar lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);\nvar aws_crc32_1 = require(\"./aws_crc32\");\nObject.defineProperty(exports, \"AwsCrc32\", { enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";8EAeA,IAAI,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,IACH,QAAS,CAAC,EAAS,CAChB,IAAI,EAAO,OAAO,SAAW,SAAW,OAAS,OAAO,OAAS,SAAW,KAAO,OAAO,OAAS,SAAW,KAAO,CAAC,EACtH,GAAI,OAAO,SAAW,YAAc,OAAO,IACvC,OAAO,QAAS,CAAC,SAAS,EAAG,QAAS,CAAC,EAAS,CAAE,EAAQ,EAAe,EAAM,EAAe,CAAO,CAAC,CAAC,EAAI,EAE1G,QAAI,OAAO,IAAW,UAAY,OAAc,KAAY,SAC7D,EAAQ,EAAe,EAAM,EAAsB,EAAO,CAAC,CAAC,EAG5D,OAAQ,EAAe,CAAI,CAAC,EAEhC,SAAS,CAAc,CAAC,EAAS,EAAU,CACvC,GAAI,IAAY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AAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,WAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,UAAY,WAAY,WACpC,WAAY,WAAY,SAAY,WACpC,WAAY,WAAY,SAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,WAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,UAAY,WACpC,WAAY,WAAY,WAAY,SACpC,WAAY,WAAY,WAAY,SACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,WACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,UACpC,WAAY,WAAY,WAAY,SACxC,EACI,IAAe,EAAG,GAAO,iBAAiB,EAAa,EACvD,QACJ,OAAO,eAAe,EAAS,WAAY,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,GAAY,SAAY,CAAC",
"debugId": "472D7672E902499B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.execAsync = void 0;\nconst child_process = require(\"child_process\");\nconst util = require(\"util\");\nexports.execAsync = util.promisify(child_process.exec);\n//# sourceMappingURL=execAsync.js.map"
],
"mappings": ";0EAKA,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,YAAiB,OACzB,IAAM,qBACA,YACE,YAAY,EAAK,UAAU,EAAc,IAAI",
"debugId": "CF8679D91C82D8FB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentui+core-linux-arm64@0.4.5/node_modules/@opentui/core-linux-arm64/index.bun.js"],
"sourcesContent": [
"const module = await import(\"./libopentui.so\", { with: { type: \"file\" } })\n\nexport default module.default\n"
],
"mappings": ";oDAAA,IAAM,EAAS,KAAa,yCAAmB,CAAE,KAAM,CAAE,KAAM,MAAO,CAAE,GAEzD,IAAO",
"debugId": "78310BC1B5F68B7F64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.13/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js"],
"sourcesContent": [
"'use strict';\n\nvar client$1 = require('@aws-sdk/core/client');\nvar core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\n\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.12\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://oidc.{Region}.amazonaws.com\", i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 13,\n 3,\n 1,\n 4,\n r + 12,\n 2,\n 5,\n r + 12,\n 3,\n 8,\n 6,\n 4,\n 7,\n r + 11,\n 5,\n r + 9,\n r + 10,\n 4,\n 11,\n 9,\n 6,\n 10,\n r + 8,\n 7,\n r + 6,\n r + 7,\n 5,\n 12,\n r + 5,\n 6,\n r + 4,\n r + 5,\n 3,\n r + 1,\n 14,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = client$1.awsEndpointFunctions;\n\nclass SSOOIDCServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SSOOIDCServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass AuthorizationPendingException extends SSOOIDCServiceException {\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass ExpiredTokenException extends SSOOIDCServiceException {\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InternalServerException extends SSOOIDCServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidClientException extends SSOOIDCServiceException {\n name = \"InvalidClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidGrantException extends SSOOIDCServiceException {\n name = \"InvalidGrantException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidRequestException extends SSOOIDCServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidScopeException extends SSOOIDCServiceException {\n name = \"InvalidScopeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass SlowDownException extends SSOOIDCServiceException {\n name = \"SlowDownException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnauthorizedClientException extends SSOOIDCServiceException {\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnsupportedGrantTypeException extends SSOOIDCServiceException {\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _APE = \"AuthorizationPendingException\";\nconst _AT = \"AccessToken\";\nconst _CS = \"ClientSecret\";\nconst _CT = \"CreateToken\";\nconst _CTR = \"CreateTokenRequest\";\nconst _CTRr = \"CreateTokenResponse\";\nconst _CV = \"CodeVerifier\";\nconst _ETE = \"ExpiredTokenException\";\nconst _ICE = \"InvalidClientException\";\nconst _IGE = \"InvalidGrantException\";\nconst _IRE = \"InvalidRequestException\";\nconst _ISE = \"InternalServerException\";\nconst _ISEn = \"InvalidScopeException\";\nconst _IT = \"IdToken\";\nconst _RT = \"RefreshToken\";\nconst _SDE = \"SlowDownException\";\nconst _UCE = \"UnauthorizedClientException\";\nconst _UGTE = \"UnsupportedGrantTypeException\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cS = \"clientSecret\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _dC = \"deviceCode\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ed = \"error_description\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _r = \"reason\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.ssooidc\";\nconst _sc = \"scope\";\nconst _se = \"server\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.ssooidc\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SSOOIDCServiceException$ = [-3, _s, \"SSOOIDCServiceException\", 0, [], []];\n_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [\n -3,\n n0,\n _ADE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0],\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar AuthorizationPendingException$ = [\n -3,\n n0,\n _APE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);\nvar ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidClientException$, InvalidClientException);\nvar InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidGrantException$, InvalidGrantException);\nvar InvalidRequestException$ = [\n -3,\n n0,\n _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0],\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(InvalidScopeException$, InvalidScopeException);\nvar SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];\nn0_registry.registerError(SlowDownException$, SlowDownException);\nvar UnauthorizedClientException$ = [\n -3,\n n0,\n _UCE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);\nvar UnsupportedGrantTypeException$ = [\n -3,\n n0,\n _UGTE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0],\n];\nn0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar AccessToken = [0, n0, _AT, 8, 0];\nvar ClientSecret = [0, n0, _CS, 8, 0];\nvar CodeVerifier = [0, n0, _CV, 8, 0];\nvar IdToken = [0, n0, _IT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar CreateTokenRequest$ = [\n 3,\n n0,\n _CTR,\n 0,\n [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],\n [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],\n 3,\n];\nvar CreateTokenResponse$ = [\n 3,\n n0,\n _CTRr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],\n];\nvar CreateToken$ = [\n 9,\n n0,\n _CT,\n { [_h]: [\"POST\", \"/token\", 200] },\n () => CreateTokenRequest$,\n () => CreateTokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.ssooidc\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"AWSSSOOIDCService\",\n },\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n client$1.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(client$1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOOIDCClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = client$1.resolveUserAgentConfig(_config_1);\n const _config_3 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = client$1.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));\n this.middlewareStack.use(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));\n this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(client$1.getLoggerPlugin(this.config));\n this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nclass CreateTokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSSOOIDCService\", \"CreateToken\", {})\n .n(\"SSOOIDCClient\", \"CreateTokenCommand\")\n .sc(CreateToken$)\n .build() {\n}\n\nconst commands = {\n CreateTokenCommand,\n};\nclass SSOOIDC extends SSOOIDCClient {\n}\nclient.createAggregatedClient(commands, SSOOIDC);\n\nconst AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nconst InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;\nexports.AuthorizationPendingException = AuthorizationPendingException;\nexports.AuthorizationPendingException$ = AuthorizationPendingException$;\nexports.CreateToken$ = CreateToken$;\nexports.CreateTokenCommand = CreateTokenCommand;\nexports.CreateTokenRequest$ = CreateTokenRequest$;\nexports.CreateTokenResponse$ = CreateTokenResponse$;\nexports.ExpiredTokenException = ExpiredTokenException;\nexports.ExpiredTokenException$ = ExpiredTokenException$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.InvalidClientException = InvalidClientException;\nexports.InvalidClientException$ = InvalidClientException$;\nexports.InvalidGrantException = InvalidGrantException;\nexports.InvalidGrantException$ = InvalidGrantException$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;\nexports.InvalidScopeException = InvalidScopeException;\nexports.InvalidScopeException$ = InvalidScopeException$;\nexports.SSOOIDC = SSOOIDC;\nexports.SSOOIDCClient = SSOOIDCClient;\nexports.SSOOIDCServiceException = SSOOIDCServiceException;\nexports.SSOOIDCServiceException$ = SSOOIDCServiceException$;\nexports.SlowDownException = SlowDownException;\nexports.SlowDownException$ = SlowDownException$;\nexports.UnauthorizedClientException = UnauthorizedClientException;\nexports.UnauthorizedClientException$ = UnauthorizedClientException$;\nexports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;\nexports.UnsupportedGrantTypeException$ = UnsupportedGrantTypeException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";sVAEA,SAAI,YACA,YACA,YACA,YACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QAEE,GAAiD,MAAO,EAAQ,EAAS,IAAU,CACrF,MAAO,CACH,UAAW,EAAO,iBAAiB,CAAO,EAAE,UAC5C,OAAS,MAAM,EAAO,kBAAkB,EAAO,MAAM,EAAE,IAClD,IAAM,CACH,MAAU,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,YACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ,KAAa,CACvC,kBAAmB,CACf,SACA,SACJ,CACJ,EACJ,EAEJ,SAAS,EAAmC,CAAC,EAAgB,CACzD,MAAO,CACH,SAAU,mBACd,EAEJ,IAAM,GAAuC,CAAC,IAAmB,CAC7D,IAAM,EAAU,CAAC,EACjB,OAAQ,EAAe,eACd,cAAe,CAChB,EAAQ,KAAK,GAAoC,CAAC,EAClD,KACJ,SAEI,EAAQ,KAAK,GAAiC,CAAc,CAAC,EAGrE,OAAO,GAEL,GAA8B,CAAC,IAAW,CAC5C,IAAM,EAAW,EAAgB,yBAAyB,CAAM,EAChE,OAAO,OAAO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EAC1F,EACI,EAAE,oBAAqB,cAAe,CAAC,CAAC,EACxC,EAAE,gBAAiB,oBAAoB,EACvC,GAAG,EAAY,EACf,MAAM,CAAE,CACb,CAEA,IAAM,GAAW,CACb,oBACJ,EACA,MAAM,UAAgB,CAAc,CACpC,CACA,EAAO,uBAAuB,GAAU,CAAO,EAE/C,IAAM,GAA8B,CAChC,kBAAmB,2BACvB,EACM,GAAgC,CAClC,iBAAkB,wBAClB,sBAAuB,+BACvB,kBAAmB,4BACnB,kBAAmB,uBACvB,EAEA,IAA0B,QAAlB,GACkB,OAAlB,IAAW,EACX,GAAwB,EACxB,GAAyB,GACzB,GAA8B,GAC9B,GAAgC,EAChC,GAAiC,GACjC,GAAe,GACf,GAAqB,EACrB,GAAsB,GACtB,GAAuB,GACvB,GAAwB,EACxB,GAAyB,GACzB,GAA0B,EAC1B,GAA2B,GAC3B,GAAyB,EACzB,GAA0B,GAC1B,GAAwB,EACxB,GAAyB,GACzB,GAA0B,EAC1B,GAA2B,GAC3B,GAAgC,GAChC,GAAwB,EACxB,GAAyB,GACzB,GAAU,EACV,GAAgB,EAChB,GAA0B,EAC1B,GAA2B,GAC3B,GAAoB,EACpB,GAAqB,GACrB,GAA8B,EAC9B,GAA+B,GAC/B,GAAgC,EAChC,GAAiC,GACjC,GAAsB",
"debugId": "8868F7D3AF0A755864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/bun-pty@0.4.8/node_modules/bun-pty/src/terminal.ts", "../../node_modules/.bun/bun-pty@0.4.8/node_modules/bun-pty/src/interfaces.ts", "../../node_modules/.bun/bun-pty@0.4.8/node_modules/bun-pty/src/index.ts", "../core/src/pty/pty.bun.ts"],
"sourcesContent": [
"// terminal.ts — JS/TS front-end (final fixed version)\n\nimport { dlopen, FFIType, ptr } from \"bun:ffi\";\nimport { Buffer } from \"node:buffer\";\nimport { EventEmitter } from \"./interfaces\";\nimport type { IPty, IPtyForkOptions, IExitEvent } from \"./interfaces\";\nimport { join, dirname, basename } from \"node:path\";\nimport { existsSync } from \"node:fs\";\n\nexport const DEFAULT_COLS = 80;\nexport const DEFAULT_ROWS = 24;\nexport const DEFAULT_FILE = \"sh\";\nexport const DEFAULT_NAME = \"xterm\";\n\n/**\n * Quote a string for shell-words compatible splitting on the Rust side.\n * We are not invoking a shell; quoting is only to preserve token boundaries\n * when Rust parses the command line with shell_words::split.\n * \n * @param s - The string to quote\n * @returns The quoted string\n */\nfunction shQuote(s: string): string {\n\tif (s.length === 0) return \"''\";\n\t// Replace ' with '\\'' (close-quote, escaped ', reopen)\n\treturn `'${s.replace(/'/g, `'\\\\''`)}'`;\n}\n\n// terminal.ts – loader fragment only\n\nfunction resolveLibPath(): string {\n\tconst env = process.env.BUN_PTY_LIB;\n\tif (env && existsSync(env)) return env;\n\n\t// For bun compile: use statically analyzable require with inline ternary.\n\t// Bun evaluates process.platform and process.arch at compile time and only\n\t// bundles the file for the target platform. The ternary MUST be inline\n\t// in the template literal for Bun's static analysis to work.\n\t// See: https://github.com/sursaone/bun-pty/issues/19\n\ttry {\n\t\t// @ts-ignore - require returns path for binary files in Bun\n\t\tconst embeddedPath = require(`../rust-pty/target/release/${process.platform === \"win32\" ? \"rust_pty.dll\" : process.platform === \"darwin\" ? (process.arch === \"arm64\" ? \"librust_pty_arm64.dylib\" : \"librust_pty.dylib\") : process.arch === \"arm64\" ? \"librust_pty_arm64.so\" : \"librust_pty.so\"}`);\n\t\tif (embeddedPath) return embeddedPath;\n\t} catch {\n\t\t// Not running as compiled binary, fall through to dynamic resolution\n\t}\n\n\t// Fallback: dynamic resolution for development scenarios\n\tconst platform = process.platform;\n\tconst arch = process.arch;\n\n\t// Try both architecture-specific and generic filenames\n\tconst filenames =\n\t\tplatform === \"darwin\"\n\t\t\t? arch === \"arm64\"\n\t\t\t\t? [\"librust_pty_arm64.dylib\", \"librust_pty.dylib\"]\n\t\t\t\t: [\"librust_pty.dylib\"]\n\t\t\t: platform === \"win32\"\n\t\t\t? [\"rust_pty.dll\"]\n\t\t\t: arch === \"arm64\"\n\t\t\t? [\"librust_pty_arm64.so\", \"librust_pty.so\"]\n\t\t\t: [\"librust_pty.so\"];\n\n\t// Start from the current module's location\n\tconst base = Bun.fileURLToPath(import.meta.url);\n\tconst fileDir = dirname(base);\n\tconst dirName = basename(fileDir);\n\t\n\t// Handle both development (src/terminal.ts) and production (dist/terminal.js) cases\n\t// If we're in src/ or dist/, go up one level to get the project root\n\tconst here = (dirName === \"src\" || dirName === \"dist\")\n\t\t? dirname(fileDir) // Go up one level from src/ or dist/\n\t\t: fileDir; // Otherwise use the directory as-is\n\n\tconst basePaths = [\n\t\tjoin(here, \"rust-pty\", \"target\", \"release\"), // Direct path from project root\n\t\tjoin(here, \"..\", \"bun-pty\", \"rust-pty\", \"target\", \"release\"), // monorepo setups\n\t\tjoin(process.cwd(), \"node_modules\", \"bun-pty\", \"rust-pty\", \"target\", \"release\"),\n\t];\n\n\tconst fallbackPaths = [];\n\tfor (const basePath of basePaths) {\n\t\tfor (const filename of filenames) {\n\t\t\tfallbackPaths.push(join(basePath, filename));\n\t\t}\n\t}\n\n\tfor (const path of fallbackPaths) {\n\t\tif (existsSync(path)) return path;\n\t}\n\n\tthrow new Error(\n\t\t`librust_pty shared library not found.\\nChecked:\\n - BUN_PTY_LIB=${env ?? \"<unset>\"}\\n - ${fallbackPaths.join(\"\\n - \")}\\n\\nSet BUN_PTY_LIB or ensure one of these paths contains the file.`\n\t);\n}\n\nconst libPath = resolveLibPath();\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\nlet lib: any;\n\n// try to load the lib, if it fails log the error\ntry {\n\tlib = dlopen(libPath, {\n\t\tbun_pty_spawn: {\n\t\t\targs: [FFIType.cstring, FFIType.cstring, FFIType.cstring, FFIType.i32, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_write: {\n\t\t\targs: [FFIType.i32, FFIType.pointer, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_read: {\n\t\t\targs: [FFIType.i32, FFIType.pointer, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_resize: {\n\t\t\targs: [FFIType.i32, FFIType.i32, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_kill: { args: [FFIType.i32], returns: FFIType.i32 },\n\t\tbun_pty_get_pid: { args: [FFIType.i32], returns: FFIType.i32 },\n\t\tbun_pty_get_exit_code: { args: [FFIType.i32], returns: FFIType.i32 },\n\t\tbun_pty_close: { args: [FFIType.i32], returns: FFIType.void },\n\t});\n} catch (error) {\n\tconsole.error(\"Failed to load lib\", error);\n}\n\nexport class Terminal implements IPty {\n\tprivate handle = -1;\n\tprivate _pid = -1;\n\tprivate _cols = DEFAULT_COLS;\n\tprivate _rows = DEFAULT_ROWS;\n\tprivate readonly _name = DEFAULT_NAME;\n\n\tprivate _readLoop = false;\n\tprivate _closing = false;\n\n\t// TextDecoder with streaming mode to properly handle UTF-8 across chunk boundaries\n\t// Without this, multi-byte characters (like box-drawing ─) that span chunks become �\n\tprivate readonly _decoder = new TextDecoder(\"utf-8\");\n\n\tprivate readonly _onData = new EventEmitter<string>();\n\tprivate readonly _onExit = new EventEmitter<IExitEvent>();\n\n\tconstructor(\n\t\tfile = DEFAULT_FILE,\n\t\targs: string[] = [],\n\t\topts: IPtyForkOptions = { name: DEFAULT_NAME },\n\t) {\n\t\tthis._cols = opts.cols ?? DEFAULT_COLS;\n\t\tthis._rows = opts.rows ?? DEFAULT_ROWS;\n\t\tconst cwd = opts.cwd ?? process.cwd();\n\t\t// Properly quote file and arguments to preserve spaces and special characters\n\t\tconst cmdline = [shQuote(file), ...args.map(shQuote)].join(\" \");\n\n\t\t// Format environment variables as null-terminated string\n\t\tlet envStr = \"\";\n\t\tif (opts.env) {\n\t\t\tconst envPairs = Object.entries(opts.env).map(([k, v]) => `${k}=${v}`);\n\t\t\tenvStr = envPairs.join(\"\\0\") + \"\\0\";\n\t\t}\n\n\t\tthis.handle = lib.symbols.bun_pty_spawn(\n\t\t\tBuffer.from(`${cmdline}\\0`, \"utf8\"),\n\t\t\tBuffer.from(`${cwd}\\0`, \"utf8\"),\n\t\t\tBuffer.from(`${envStr}\\0`, \"utf8\"),\n\t\t\tthis._cols,\n\t\t\tthis._rows,\n\t\t);\n\t\tif (this.handle < 0) throw new Error(\"PTY spawn failed\");\n\n\t\tthis._pid = lib.symbols.bun_pty_get_pid(this.handle);\n\t\tthis._startReadLoop();\n\t}\n\n\t/* ------------- accessors ------------- */\n\n\tget pid() {\n\t\treturn this._pid;\n\t}\n\tget cols() {\n\t\treturn this._cols;\n\t}\n\tget rows() {\n\t\treturn this._rows;\n\t}\n\tget process() {\n\t\treturn \"shell\";\n\t}\n\n\tget onData() {\n\t\treturn this._onData.event;\n\t}\n\tget onExit() {\n\t\treturn this._onExit.event;\n\t}\n\n\t/* ------------- IO methods ------------- */\n\n\twrite(data: string) {\n\t\tif (this._closing) return;\n\t\tconst buf = Buffer.from(data, \"utf8\");\n\t\tlib.symbols.bun_pty_write(this.handle, ptr(buf), buf.length);\n\t}\n\n\tresize(cols: number, rows: number) {\n\t\tif (this._closing) return;\n\t\tthis._cols = cols;\n\t\tthis._rows = rows;\n\t\tlib.symbols.bun_pty_resize(this.handle, cols, rows);\n\t}\n\n\tkill(signal = \"SIGTERM\") {\n\t\tif (this._closing) return;\n\t\tthis._closing = true;\n\t\tlib.symbols.bun_pty_kill(this.handle);\n\t\tlib.symbols.bun_pty_close(this.handle);\n\t\tthis._onExit.fire({ exitCode: 0, signal });\n\t}\n\n\t/* ------------- read-loop ------------- */\n\n\tprivate async _startReadLoop() {\n\t\tif (this._readLoop) return;\n\t\tthis._readLoop = true;\n\n\t\tconst buf = Buffer.allocUnsafe(4096);\n\n\t\twhile (this._readLoop && !this._closing) {\n\t\t\tconst n = lib.symbols.bun_pty_read(this.handle, ptr(buf), buf.length);\n\t\t\tif (n > 0) {\n\t\t\t\t// Use streaming mode to buffer incomplete UTF-8 sequences across chunks\n\t\t\t\t// This prevents corruption when multi-byte chars span chunk boundaries\n\t\t\t\tconst decoded = this._decoder.decode(buf.subarray(0, n), { stream: true });\n\t\t\t\tif (decoded) {\n\t\t\t\t\tthis._onData.fire(decoded);\n\t\t\t\t}\n\t\t\t} else if (n === -2) {\n\t\t\t\t// CHILD_EXITED - flush any remaining bytes in the decoder\n\t\t\t\tconst remaining = this._decoder.decode();\n\t\t\t\tif (remaining) {\n\t\t\t\t\tthis._onData.fire(remaining);\n\t\t\t\t}\n\t\t\t\tconst exitCode = lib.symbols.bun_pty_get_exit_code(this.handle);\n\t\t\t\tthis._onExit.fire({ exitCode });\n\t\t\t\tbreak;\n\t\t\t} else if (n < 0) {\n\t\t\t\t// error - flush decoder before breaking\n\t\t\t\tconst remaining = this._decoder.decode();\n\t\t\t\tif (remaining) {\n\t\t\t\t\tthis._onData.fire(remaining);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// 0 bytes: wait\n\t\t\t\tawait new Promise((r) => setTimeout(r, 8));\n\t\t\t}\n\t\t}\n\t}\n}\n",
"import { Buffer } from \"node:buffer\";\n\n/**\n * Interface for disposable resources.\n */\nexport interface IDisposable {\n /**\n * Disposes the resource, performing any necessary cleanup.\n */\n dispose(): void;\n}\n\n/**\n * Event implementation for the terminal.\n */\nexport class EventEmitter<T> {\n private listeners: ((data: T) => void)[] = [];\n\n public event = (listener: (e: T) => void): IDisposable => {\n this.listeners.push(listener);\n return {\n dispose: () => {\n const i = this.listeners.indexOf(listener);\n if (i !== -1) {\n this.listeners.splice(i, 1);\n }\n }\n };\n };\n\n public fire(data: T): void {\n for (const listener of this.listeners) {\n listener(data);\n }\n }\n}\n\n/**\n * Options for spawning a new PTY process.\n */\nexport interface IPtyForkOptions {\n /**\n * The name of the terminal to be set in environment variables.\n */\n name: string;\n\n /**\n * The number of columns in the PTY.\n */\n cols?: number;\n\n /**\n * The number of rows in the PTY.\n */\n rows?: number;\n\n /**\n * The current working directory of the process.\n * Defaults to the current working directory of the parent process.\n */\n cwd?: string;\n\n /**\n * Environment variables to set for the process.\n */\n env?: Record<string, string>;\n}\n\n/**\n * Exit data for PTY process.\n */\nexport interface IExitEvent {\n /**\n * The process exit code.\n */\n exitCode: number;\n\n /**\n * The signal that caused the process to exit, if any.\n */\n signal?: number | string;\n}\n\n/**\n * Interface for interacting with a pseudo-terminal (PTY) instance.\n */\nexport interface IPty {\n /**\n * The PID of the process running in the PTY.\n */\n readonly pid: number;\n\n /**\n * The column size in characters.\n */\n readonly cols: number;\n\n /**\n * The row size in characters.\n */\n readonly rows: number;\n\n /**\n * The title of the active process.\n */\n readonly process: string;\n\n /**\n * Set a callback for when data is received from the PTY.\n */\n readonly onData: (listener: (data: string) => void) => IDisposable;\n\n /**\n * Event emitted when the PTY process exits.\n */\n readonly onExit: (listener: (event: IExitEvent) => void) => IDisposable;\n\n /**\n * Write data to the PTY.\n *\n * @param data - The data to write.\n */\n write(data: string): void;\n\n /**\n * Resize the PTY.\n *\n * @param columns - Number of columns (character width).\n * @param rows - Number of rows (character height).\n */\n resize(columns: number, rows: number): void;\n\n /**\n * Kill the process running in the PTY.\n *\n * @param signal - The signal to send to the process.\n * Defaults to \"SIGTERM\".\n */\n kill(signal?: string): void;\n} ",
"/**\n * The main export module for bun-pty.\n * Provides a cross-platform PTY interface for Bun runtime.\n */\n\nimport { Terminal } from './terminal';\nimport type { IPty, IPtyForkOptions, IExitEvent, IDisposable } from './interfaces';\n\n/**\n * Creates and spawns a new PTY with the given command and arguments.\n * \n * @param file - Path to the executable to run.\n * @param args - Arguments for the executable.\n * @param options - Options for the PTY.\n * @returns A new PTY instance.\n */\nexport function spawn(file: string, args: string[], options: IPtyForkOptions): IPty {\n return new Terminal(file, args, options);\n}\n\n// Export interfaces and implementations\nexport type { IPty, IPtyForkOptions, IExitEvent, IDisposable };\nexport { Terminal } from './terminal'; ",
"import { spawn as create } from \"bun-pty\"\nimport type { Opts, Proc } from \"./pty\"\n\nexport type { Disp, Exit, Opts, Proc } from \"./pty\"\n\nexport function spawn(file: string, args: string[], opts: Opts): Proc {\n const pty = create(file, args, opts)\n return {\n pid: pty.pid,\n onData(listener) {\n return pty.onData(listener)\n },\n onExit(listener) {\n return pty.onExit(listener)\n },\n write(data) {\n pty.write(data)\n },\n resize(cols, rows) {\n pty.resize(cols, rows)\n },\n kill(signal) {\n pty.kill(signal)\n },\n }\n}\n"
],
"mappings": ";4GAEA,kCAAS,aAAQ,SAAS,gBAC1B,iBAAS,eCYF,MAAM,CAAgB,CACnB,UAAmC,CAAC,EAErC,MAAQ,CAAC,IAA0C,CAExD,OADA,KAAK,UAAU,KAAK,CAAQ,EACrB,CACL,QAAS,IAAM,CACb,IAAM,EAAI,KAAK,UAAU,QAAQ,CAAQ,EACzC,GAAI,IAAM,GACR,KAAK,UAAU,OAAO,EAAG,CAAC,EAGhC,GAGK,IAAI,CAAC,EAAe,CACzB,QAAW,KAAY,KAAK,UAC1B,EAAS,CAAI,EAGnB,CD7BA,eAAS,aAAM,cAAS,aACxB,qBAAS,WAEF,IAAM,EAAe,GACf,EAAe,GACf,EAAe,KACf,EAAe,QAU5B,SAAS,CAAO,CAAC,EAAmB,CACnC,GAAI,EAAE,SAAW,EAAG,MAAO,KAE3B,MAAO,IAAI,EAAE,QAAQ,KAAM,OAAO,KAKnC,SAAS,CAAc,EAAW,CACjC,IAAM,EAAM,QAAQ,IAAI,YACxB,GAAI,GAAO,EAAW,CAAG,EAAG,OAAO,EAOnC,GAAI,CAEH,IAAM,MACN,GAAI,EAAc,OAAO,EACxB,KAAM,EAKR,IAAM,EAAW,QACX,EAAO,QAGP,EACL,IAAa,SACV,IAAS,QACR,CAAC,0BAA2B,mBAAmB,EAC/C,CAAC,mBAAmB,EACrB,IAAa,QACb,CAAC,cAAc,EACf,IAAS,QACT,CAAC,uBAAwB,gBAAgB,EACzC,CAAC,gBAAgB,EAGf,EAAO,IAAI,cAAc,YAAY,GAAG,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AAC,CAAC,GAI7C,CErPO,SAAS,CAAK,CAAC,EAAc,EAAgB,EAAgC,CAChF,OAAO,IAAI,EAAS,EAAM,EAAM,CAAO,ECZpC,SAAS,CAAK,CAAC,EAAc,EAAgB,EAAkB,CACpE,IAAM,EAAM,EAAO,EAAM,EAAM,CAAI,EACnC,MAAO,CACL,IAAK,EAAI,IACT,MAAM,CAAC,EAAU,CACf,OAAO,EAAI,OAAO,CAAQ,GAE5B,MAAM,CAAC,EAAU,CACf,OAAO,EAAI,OAAO,CAAQ,GAE5B,KAAK,CAAC,EAAM,CACV,EAAI,MAAM,CAAI,GAEhB,MAAM,CAAC,EAAM,EAAM,CACjB,EAAI,OAAO,EAAM,CAAI,GAEvB,IAAI,CAAC,EAAQ,CACX,EAAI,KAAK,CAAM,EAEnB",
"debugId": "B51D3BC15AC7DE5B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260413175956_chief_energizer.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260413175956_chief_energizer\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_entry\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_session_entry_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`CREATE INDEX \\`session_entry_session_idx\\` ON \\`session_entry\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_entry_session_type_idx\\` ON \\`session_entry\\` (\\`session_id\\`,\\`type\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_entry_time_created_idx\\` ON \\`session_entry\\` (\\`time_created\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,iCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2aAUb,EACD,MAAO,EAAG,IAAI,6EAAmF,EACjG,MAAO,EAAG,IAAI,yFAAiG,EAC/G,MAAO,EAAG,IAAI,oFAA0F,EACzG,EAEL",
"debugId": "607E57A23EB06E8264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "166826E58781C99064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+mistral@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/mistral/dist/index.mjs"],
"sourcesContent": [
"// src/mistral-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/mistral-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n injectJsonInstructionIntoMessages,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-mistral-usage.ts\nfunction convertMistralUsage(usage) {\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = usage.prompt_tokens;\n const completionTokens = usage.completion_tokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens,\n reasoning: void 0\n },\n raw: usage\n };\n}\n\n// src/convert-to-mistral-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction formatFileUrl({\n data,\n mediaType\n}) {\n return data instanceof URL ? data.toString() : `data:${mediaType};base64,${convertToBase64(data)}`;\n}\nfunction convertToMistralChatMessages(prompt) {\n var _a;\n const messages = [];\n for (let i = 0; i < prompt.length; i++) {\n const { role, content } = prompt[i];\n const isLastMessage = i === prompt.length - 1;\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (part.mediaType.startsWith(\"image/\")) {\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: formatFileUrl({ data: part.data, mediaType })\n };\n } else if (part.mediaType === \"application/pdf\") {\n return {\n type: \"document_url\",\n document_url: formatFileUrl({\n data: part.data,\n mediaType: \"application/pdf\"\n })\n };\n } else {\n throw new UnsupportedFunctionalityError({\n functionality: \"Only images and PDF file parts are supported\"\n });\n }\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n case \"reasoning\": {\n text += part.text;\n break;\n }\n default: {\n throw new Error(\n `Unsupported content type in assistant message: ${part.type}`\n );\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n prefix: isLastMessage ? true : void 0,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n name: toolResponse.toolName,\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/map-mistral-finish-reason.ts\nfunction mapMistralFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n case \"model_length\":\n return \"length\";\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/mistral-chat-options.ts\nimport { z } from \"zod/v4\";\nvar mistralLanguageModelOptions = z.object({\n /**\n * Whether to inject a safety prompt before all conversations.\n *\n * Defaults to `false`.\n */\n safePrompt: z.boolean().optional(),\n documentImageLimit: z.number().optional(),\n documentPageLimit: z.number().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n *\n * @default false\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Whether to enable parallel function calling during tool use.\n * When set to false, the model will use at most one tool per response.\n *\n * @default true\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * Controls the reasoning effort for models that support adjustable reasoning.\n *\n * - `'high'`: Enable reasoning\n * - `'none'`: Disable reasoning\n */\n reasoningEffort: z.enum([\"high\", \"none\"]).optional()\n});\n\n// src/mistral-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar mistralErrorDataSchema = z2.object({\n object: z2.literal(\"error\"),\n message: z2.string(),\n type: z2.string(),\n param: z2.string().nullable(),\n code: z2.string().nullable()\n});\nvar mistralFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: mistralErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/mistral-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const mistralTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n mistralTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: mistralTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n return { tools: mistralTools, toolChoice: type, toolWarnings };\n case \"required\":\n return { tools: mistralTools, toolChoice: \"any\", toolWarnings };\n // mistral does not support tool mode directly,\n // so we filter the tools and force the tool choice through 'any'\n case \"tool\":\n return {\n tools: mistralTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"any\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/mistral-chat-language-model.ts\nvar MistralChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"application/pdf\": [/^https:\\/\\/.*$/]\n };\n var _a;\n this.modelId = modelId;\n this.config = config;\n this.generateId = (_a = config.generateId) != null ? _a : generateId;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions,\n tools,\n toolChoice\n }) {\n var _a, _b, _c, _d;\n const warnings = [];\n const options = (_a = await parseProviderOptions({\n provider: \"mistral\",\n providerOptions,\n schema: mistralLanguageModelOptions\n })) != null ? _a : {};\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (frequencyPenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n }\n if (presencePenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"presencePenalty\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n const structuredOutputs = (_b = options.structuredOutputs) != null ? _b : true;\n const strictJsonSchema = (_c = options.strictJsonSchema) != null ? _c : false;\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && !(responseFormat == null ? void 0 : responseFormat.schema)) {\n prompt = injectJsonInstructionIntoMessages({\n messages: prompt,\n schema: responseFormat.schema\n });\n }\n const baseArgs = {\n // model id:\n model: this.modelId,\n // model specific settings:\n safe_prompt: options.safePrompt,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n random_seed: seed,\n reasoning_effort: options.reasoningEffort,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && (responseFormat == null ? void 0 : responseFormat.schema) != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_d = responseFormat.name) != null ? _d : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // mistral-specific provider options:\n document_image_limit: options.documentImageLimit,\n document_page_limit: options.documentPageLimit,\n // messages:\n messages: convertToMistralChatMessages(prompt)\n };\n const {\n tools: mistralTools,\n toolChoice: mistralToolChoice,\n toolWarnings\n } = prepareTools({\n tools,\n toolChoice\n });\n return {\n args: {\n ...baseArgs,\n tools: mistralTools,\n tool_choice: mistralToolChoice,\n ...mistralTools != null && options.parallelToolCalls !== void 0 ? { parallel_tool_calls: options.parallelToolCalls } : {}\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a;\n const { args: body, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n mistralChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n if (choice.message.content != null && Array.isArray(choice.message.content)) {\n for (const part of choice.message.content) {\n if (part.type === \"thinking\") {\n const reasoningText = extractReasoningContent(part.thinking);\n if (reasoningText.length > 0) {\n content.push({ type: \"reasoning\", text: reasoningText });\n }\n } else if (part.type === \"text\") {\n if (part.text.length > 0) {\n content.push({ type: \"text\", text: part.text });\n }\n }\n }\n } else {\n const text = extractTextContent(choice.message.content);\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertMistralUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n mistralChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let activeText = false;\n let activeReasoningId = null;\n const generateId2 = this.generateId;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (value.usage != null) {\n usage = value.usage;\n }\n const choice = value.choices[0];\n const delta = choice.delta;\n const textContent = extractTextContent(delta.content);\n if (delta.content != null && Array.isArray(delta.content)) {\n for (const part of delta.content) {\n if (part.type === \"thinking\") {\n const reasoningDelta = extractReasoningContent(part.thinking);\n if (reasoningDelta.length > 0) {\n if (activeReasoningId == null) {\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n activeText = false;\n }\n activeReasoningId = generateId2();\n controller.enqueue({\n type: \"reasoning-start\",\n id: activeReasoningId\n });\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: activeReasoningId,\n delta: reasoningDelta\n });\n }\n }\n }\n }\n if (textContent != null && textContent.length > 0) {\n if (!activeText) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n activeReasoningId = null;\n }\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n activeText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n if ((delta == null ? void 0 : delta.tool_calls) != null) {\n for (const toolCall of delta.tool_calls) {\n const toolCallId = toolCall.id;\n const toolName = toolCall.function.name;\n const input = toolCall.function.arguments;\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallId,\n toolName\n });\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCallId,\n delta: input\n });\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCallId\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId,\n toolName,\n input\n });\n }\n }\n if (choice.finish_reason != null) {\n finishReason = {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n },\n flush(controller) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n }\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertMistralUsage(usage)\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction extractReasoningContent(thinking) {\n return thinking.filter((chunk) => chunk.type === \"text\").map((chunk) => chunk.text).join(\"\");\n}\nfunction extractTextContent(content) {\n if (typeof content === \"string\") {\n return content;\n }\n if (content == null) {\n return void 0;\n }\n const textContent = [];\n for (const chunk of content) {\n const { type } = chunk;\n switch (type) {\n case \"text\":\n textContent.push(chunk.text);\n break;\n case \"thinking\":\n case \"image_url\":\n case \"reference\":\n break;\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n return textContent.length ? textContent.join(\"\") : void 0;\n}\nvar mistralContentSchema = z3.union([\n z3.string(),\n z3.array(\n z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"image_url\"),\n image_url: z3.union([\n z3.string(),\n z3.object({\n url: z3.string(),\n detail: z3.string().nullable()\n })\n ])\n }),\n z3.object({\n type: z3.literal(\"reference\"),\n reference_ids: z3.array(z3.union([z3.string(), z3.number()]))\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.array(\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n })\n )\n })\n ])\n )\n]).nullish();\nvar mistralUsageSchema = z3.object({\n prompt_tokens: z3.number(),\n completion_tokens: z3.number(),\n total_tokens: z3.number()\n});\nvar mistralChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n role: z3.literal(\"assistant\"),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n object: z3.literal(\"chat.completion\"),\n usage: mistralUsageSchema\n});\nvar mistralChatChunkSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n role: z3.enum([\"assistant\"]).optional(),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n finish_reason: z3.string().nullish(),\n index: z3.number()\n })\n ),\n usage: mistralUsageSchema.nullish()\n});\n\n// src/mistral-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar MistralEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 32;\n this.supportsParallelCalls = false;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n abortSignal,\n headers\n }) {\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embeddings`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n input: values,\n encoding_format: \"float\"\n },\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n MistralTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.data.map((item) => item.embedding),\n usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar MistralTextEmbeddingResponseSchema = z4.object({\n data: z4.array(z4.object({ embedding: z4.array(z4.number()) })),\n usage: z4.object({ prompt_tokens: z4.number() }).nullish()\n});\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/mistral-provider.ts\nfunction createMistral(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.mistral.ai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"MISTRAL_API_KEY\",\n description: \"Mistral\"\n })}`,\n ...options.headers\n },\n `ai-sdk/mistral/${VERSION}`\n );\n const createChatModel = (modelId) => new MistralChatLanguageModel(modelId, {\n provider: \"mistral.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: options.generateId\n });\n const createEmbeddingModel = (modelId) => new MistralEmbeddingModel(modelId, {\n provider: \"mistral.embedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Mistral model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.chat = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar mistral = createMistral();\nexport {\n VERSION,\n createMistral,\n mistral\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAuBA,cAAS,MAAmB,MAAC,OAAO,CAClC,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAA2B,cAArB,EACyB,kBAAzB,GAAmB,EACzB,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EACT,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EACN,UAAgB,MAClB,EACA,IAAK,CACP,EAQF,SAAS,CAAa,EACpB,OACA,aACC,CACD,OAAO,aAAgB,IAAM,EAAK,SAAS,EAAI,QAAQ,YAAoB,EAAgB,CAAI,IAEjG,SAAS,CAA4B,CAAC,EAAQ,CAC5C,IAAI,EACJ,IAAM,EAAW,CAAC,EAClB,QAAS,EAAI,EAAG,EAAI,EAAO,OAAQ,IAAK,CACtC,IAAQ,OAAM,WAAY,EAAO,GAC3B,EAAgB,IAAM,EAAO,OAAS,EAC5C,OAAQ,OACD,SAAU,CACb,EAAS,KAAK,CAAE,KAAM,SAAU,SAAQ,CAAC,EACzC,KACF,KACK,OAAQ,CACX,EAAS,KAAK,CACZ,KAAM,OACN,QAAS,EAAQ,IAAI,CAAC,IAAS,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OACE,EAAQ,OACb,EACA,kBAAkB,IACpB,EACM,EAAkB,CAAC,IAAY,IAAI,GAAyB,EAAS,CACzE,SAAU,eACV,UACA,QAAS,EACT,MAAO,EAAQ,MACf,WAAY,EAAQ,UACtB,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,GAAsB,EAAS,CAC3E,SAAU,oBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAW,QAAQ,CAAC,EAAS,CACjC,GAAI,WACF,MAAU,MACR,mEACF,EAEF,OAAO,EAAgB,CAAO,GAYhC,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAU,GAAc",
"debugId": "CBD730BC109EC1F964756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260605003541_add_session_context_snapshot.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260605003541_add_session_context_snapshot\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_context_epoch\\` (\n \\`session_id\\` text PRIMARY KEY,\n \\`baseline\\` text NOT NULL,\n \\`snapshot\\` text NOT NULL,\n \\`baseline_seq\\` integer NOT NULL,\n \\`replacement_seq\\` integer,\n \\`revision\\` integer DEFAULT 0 NOT NULL,\n CONSTRAINT \\`fk_session_context_epoch_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,8CACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gdAUb,EACF,EAEL",
"debugId": "5095000A461A905164756E2164756E21",
"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": "A1FD3506EA3F6FC064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260510033149_session_usage.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260510033149_session_usage\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`cost\\` real DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_input\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_output\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_reasoning\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_cache_read\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_cache_write\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`\n UPDATE session\n SET\n cost = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.cost'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_input = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.input'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_output = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.output'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_reasoning = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.reasoning'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_cache_read = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.cache.read'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_cache_write = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.cache.write'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0)\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,+BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2DAA+D,EAC7E,MAAO,EAAG,IAAI,sEAA0E,EACxF,MAAO,EAAG,IAAI,uEAA2E,EACzF,MAAO,EAAG,IAAI,0EAA8E,EAC5F,MAAO,EAAG,IAAI,2EAA+E,EAC7F,MAAO,EAAG,IAAI,4EAAgF,EAC9F,MAAO,EAAG,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAuCb,EACF,EAEL",
"debugId": "741D1D4DB6E95ECF64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260622142730_simplify_session_context_epoch.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260622142730_simplify_session_context_epoch\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` DROP COLUMN \\`agent\\`;`)\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` DROP COLUMN \\`replacement_seq\\`;`)\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` DROP COLUMN \\`revision\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gDACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0DAA8D,EAC5E,MAAO,EAAG,IAAI,oEAAwE,EACtF,MAAO,EAAG,IAAI,6DAAiE,EAChF,EAEL",
"debugId": "9C3E9A0E48C66C5764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js"],
"sourcesContent": [
"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nconst fs_1 = require(\"fs\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n for (const path of paths) {\n try {\n const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-linux.js.map"
],
"mappings": ";yHACA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAK5B,IAAM,UACA,MACN,eAAe,CAAY,EAAG,CAC1B,IAAM,EAAQ,CAAC,kBAAmB,0BAA0B,EAC5D,QAAW,KAAQ,EACf,GAAI,CAEA,OADe,MAAM,EAAK,SAAS,SAAS,EAAM,CAAE,SAAU,MAAO,CAAC,GACxD,KAAK,EAEvB,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAGzD,OAEI,eAAe",
"debugId": "309CC066DABB63E964756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260603141458_session_input_inbox.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603141458_session_input_inbox\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_input\\` (\n \\`seq\\` integer PRIMARY KEY AUTOINCREMENT,\n \\`id\\` text NOT NULL UNIQUE,\n \\`session_id\\` text NOT NULL,\n \\`prompt\\` text NOT NULL,\n \\`delivery\\` text NOT NULL,\n \\`promoted_seq\\` integer,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`fk_session_input_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `CREATE INDEX \\`session_input_session_pending_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`,\\`seq\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,qCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,geAWb,EACD,MAAO,EAAG,IACR,8GACF,EACD,EAEL",
"debugId": "0A46F2393A970BB664756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260504145000_add_sync_owner.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260504145000_add_sync_owner\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`event_sequence\\` ADD \\`owner_id\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,mDAAuD,EACtE,EAEL",
"debugId": "C0A2B4D18DB002CF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "A43E39744A2E699A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "13AB8FD47C27689F64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260603040000_session_message_projection_order.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603040000_session_message_projection_order\",\n up(tx) {\n return Effect.gen(function* () {\n // Pre-launch Session projections were written before durable event persistence\n // became unconditional, so they cannot be assigned truthful aggregate order.\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`ALTER TABLE \\`session_message\\` ADD COLUMN \\`seq\\` integer NOT NULL;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_type_time_created_id_idx\\`;`)\n yield* tx.run(`CREATE INDEX \\`session_message_session_seq_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`seq\\`);`)\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_type_seq_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`type\\`,\\`seq\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kDACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAG7B,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,kEAAsE,EACpF,MAAO,EAAG,IAAI,0EAA4E,EAC1F,MAAO,EAAG,IAAI,2FAAmG,EACjH,MAAO,EAAG,IACR,uGACF,EACD,EAEL",
"debugId": "B270C9F4FCE354C764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/ai-gateway-provider@3.1.2+a6631614dda8d488/node_modules/ai-gateway-provider/dist/index.mjs"],
"sourcesContent": [
"var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/auth.ts\nvar CF_TEMP_TOKEN = \"CF_TEMP_TOKEN\";\n\n// src/providers.ts\nvar providers = [\n {\n name: \"openai\",\n regex: /^https:\\/\\/api\\.openai\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.openai\\.com\\//, \"\")\n },\n {\n name: \"deepseek\",\n regex: /^https:\\/\\/api\\.deepseek\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.deepseek\\.com\\//, \"\")\n },\n {\n name: \"anthropic\",\n regex: /^https:\\/\\/api\\.anthropic\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.anthropic\\.com\\//, \"\"),\n headerKey: \"x-api-key\"\n },\n {\n name: \"google-ai-studio\",\n regex: /^https:\\/\\/generativelanguage\\.googleapis\\.com\\//,\n headerKey: \"x-goog-api-key\",\n transformEndpoint: (url) => url.replace(/^https:\\/\\/generativelanguage\\.googleapis\\.com\\//, \"\")\n },\n {\n name: \"google-vertex-ai\",\n regex: /aiplatform\\.googleapis\\.com/,\n transformEndpoint: (url) => url.replace(/https:\\/\\/(.*)[-]?aiplatform\\.googleapis\\.com\\//, \"\")\n },\n {\n name: \"grok\",\n regex: /^https:\\/\\/api\\.x\\.ai\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.x\\.ai\\//, \"\")\n },\n {\n name: \"mistral\",\n regex: /^https:\\/\\/api\\.mistral\\.ai\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.mistral\\.ai\\//, \"\")\n },\n {\n name: \"perplexity-ai\",\n regex: /^https:\\/\\/api\\.perplexity\\.ai\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.perplexity\\.ai\\//, \"\")\n },\n {\n name: \"replicate\",\n regex: /^https:\\/\\/api\\.replicate\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.replicate\\.com\\//, \"\")\n },\n {\n name: \"groq\",\n regex: /^https:\\/\\/api\\.groq\\.com\\/openai\\/v1\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.groq\\.com\\/openai\\/v1\\//, \"\")\n },\n {\n name: \"google-vertex-ai\",\n regex: /^https:\\/\\/(?:[a-z0-9]+-)*aiplatform\\.googleapis\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/(?:[a-z0-9]+-)*aiplatform\\.googleapis\\.com\\//, \"\"),\n headerKey: \"authorization\"\n },\n {\n name: \"azure-openai\",\n regex: /^https:\\/\\/(?<resource>[^.]+)\\.openai\\.azure\\.com\\/openai\\/deployments\\/(?<deployment>[^/]+)\\/(?<rest>.*)$/,\n transformEndpoint: (url) => {\n const match = url.match(\n /^https:\\/\\/(?<resource>[^.]+)\\.openai\\.azure\\.com\\/openai\\/deployments\\/(?<deployment>[^/]+)\\/(?<rest>.*)$/\n );\n if (!match || !match.groups) return url;\n const { resource, deployment, rest } = match.groups;\n if (!resource || !deployment || !rest) {\n throw new Error(\"Failed to parse Azure OpenAI endpoint URL.\");\n }\n return `${resource}/${deployment}/${rest}`;\n },\n headerKey: \"api-key\"\n },\n {\n name: \"openrouter\",\n regex: /^https:\\/\\/openrouter\\.ai\\/api\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/openrouter\\.ai\\/api\\//, \"\")\n },\n {\n name: \"compat\",\n regex: /^https:\\/\\/gateway\\.ai\\.cloudflare\\.com\\/v1\\/compat\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/gateway\\.ai\\.cloudflare\\.com\\/v1\\/compat\\//, \"\")\n }\n];\n\n// src/index.ts\nvar AiGatewayInternalFetchError = class extends Error {\n};\nvar AiGatewayDoesNotExist = class extends Error {\n};\nvar AiGatewayUnauthorizedError = class extends Error {\n};\nasync function streamToObject(stream) {\n const response = new Response(stream);\n return await response.json();\n}\nvar AiGatewayChatLanguageModel = class {\n constructor(models, config) {\n __publicField(this, \"specificationVersion\", \"v3\");\n __publicField(this, \"defaultObjectGenerationMode\", \"json\");\n __publicField(this, \"supportedUrls\", {\n // No URLS are supported for this language model\n });\n __publicField(this, \"models\");\n __publicField(this, \"config\");\n this.models = models;\n this.config = config;\n }\n get modelId() {\n if (!this.models[0]) {\n throw new Error(\"models cannot be empty array\");\n }\n return this.models[0].modelId;\n }\n get provider() {\n if (!this.models[0]) {\n throw new Error(\"models cannot be empty array\");\n }\n return this.models[0].provider;\n }\n async processModelRequest(options, modelMethod) {\n const requests = [];\n for (const model of this.models) {\n if (!model.config || !Object.keys(model.config).includes(\"fetch\")) {\n throw new Error(\n `Sorry, but provider \"${model.provider}\" is currently not supported, please open a issue in the github repo!`\n );\n }\n model.config.fetch = (url, request) => {\n requests.push({\n modelProvider: model.provider,\n request,\n url\n });\n throw new AiGatewayInternalFetchError(\"Stopping provider execution...\");\n };\n try {\n await model[modelMethod](options);\n } catch (e) {\n if (!(e instanceof AiGatewayInternalFetchError)) {\n throw e;\n }\n }\n }\n const body = await Promise.all(\n requests.map(async (req) => {\n let providerConfig = null;\n for (const provider of providers) {\n if (provider.regex.test(req.url)) {\n providerConfig = provider;\n }\n }\n if (!providerConfig) {\n throw new Error(\n `Sorry, but provider \"${req.modelProvider}\" is currently not supported, please open a issue in the github repo!`\n );\n }\n if (!req.request.body) {\n throw new Error(\"Ai Gateway provider received an unexpected empty body\");\n }\n const authHeader = providerConfig.headerKey ?? \"authorization\";\n const authValue = \"get\" in req.request.headers ? req.request.headers.get(authHeader) : req.request.headers[authHeader];\n if (authValue?.indexOf(CF_TEMP_TOKEN) !== -1) {\n if (\"delete\" in req.request.headers) {\n req.request.headers.delete(authHeader);\n } else {\n delete req.request.headers[authHeader];\n }\n }\n return {\n endpoint: providerConfig.transformEndpoint(req.url),\n headers: req.request.headers,\n provider: providerConfig.name,\n query: await streamToObject(req.request.body)\n };\n })\n );\n const headers = parseAiGatewayOptions(this.config.options ?? {});\n let resp;\n if (\"binding\" in this.config) {\n const updatedBody = body.map((obj) => ({\n ...obj,\n headers: {\n ...obj.headers ?? {},\n ...Object.fromEntries(headers.entries())\n }\n }));\n resp = await this.config.binding.run(updatedBody, {\n signal: options.abortSignal\n });\n } else {\n headers.set(\"Content-Type\", \"application/json\");\n headers.set(\"cf-aig-authorization\", `Bearer ${this.config.apiKey}`);\n resp = await fetch(\n `https://gateway.ai.cloudflare.com/v1/${this.config.accountId}/${this.config.gateway}`,\n {\n body: JSON.stringify(body),\n headers,\n method: \"POST\",\n signal: options.abortSignal\n }\n );\n }\n if (resp.status === 400) {\n const cloneResp = resp.clone();\n const result = await cloneResp.json();\n if (result.success === false && result.error && result.error.length > 0 && result.error[0]?.code === 2001) {\n throw new AiGatewayDoesNotExist(\"This AI gateway does not exist\");\n }\n } else if (resp.status === 401) {\n const cloneResp = resp.clone();\n const result = await cloneResp.json();\n if (result.success === false && result.error && result.error.length > 0 && result.error[0]?.code === 2009) {\n throw new AiGatewayUnauthorizedError(\n \"Your AI Gateway has authentication active, but you didn't provide a valid apiKey\"\n );\n }\n }\n const step = Number.parseInt(resp.headers.get(\"cf-aig-step\") ?? \"0\", 10);\n if (!this.models[step]) {\n throw new Error(\"Unexpected AI Gateway Error\");\n }\n this.models[step].config = {\n ...this.models[step].config,\n fetch: (_url, _req) => resp\n };\n return this.models[step][modelMethod](options);\n }\n async doStream(options) {\n return this.processModelRequest(options, \"doStream\");\n }\n async doGenerate(options) {\n return this.processModelRequest(options, \"doGenerate\");\n }\n};\nfunction createAiGateway(options) {\n const createChatModel = (models) => {\n return new AiGatewayChatLanguageModel(Array.isArray(models) ? models : [models], options);\n };\n const provider = (models) => createChatModel(models);\n provider.chat = createChatModel;\n return provider;\n}\nfunction parseAiGatewayOptions(options) {\n const headers = new Headers();\n if (options.skipCache === true) {\n headers.set(\"cf-skip-cache\", \"true\");\n }\n if (options.cacheTtl) {\n headers.set(\"cf-cache-ttl\", options.cacheTtl.toString());\n }\n if (options.metadata) {\n headers.set(\"cf-aig-metadata\", JSON.stringify(options.metadata));\n }\n if (options.cacheKey) {\n headers.set(\"cf-aig-cache-key\", options.cacheKey);\n }\n if (options.collectLog !== void 0) {\n headers.set(\"cf-aig-collect-log\", options.collectLog === true ? \"true\" : \"false\");\n }\n if (options.eventId !== void 0) {\n headers.set(\"cf-aig-event-id\", options.eventId);\n }\n if (options.requestTimeoutMs !== void 0) {\n headers.set(\"cf-aig-request-timeout\", options.requestTimeoutMs.toString());\n }\n if (options.retries !== void 0) {\n if (options.retries.maxAttempts !== void 0) {\n headers.set(\"cf-aig-max-attempts\", options.retries.maxAttempts.toString());\n }\n if (options.retries.retryDelayMs !== void 0) {\n headers.set(\"cf-aig-retry-delay\", options.retries.retryDelayMs.toString());\n }\n if (options.retries.backoff !== void 0) {\n headers.set(\"cf-aig-backoff\", options.retries.backoff);\n }\n }\n return headers;\n}\nexport {\n AiGatewayChatLanguageModel,\n AiGatewayDoesNotExist,\n AiGatewayInternalFetchError,\n AiGatewayUnauthorizedError,\n createAiGate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ACA,SAAS,CAAe,CAAC,EAAS,CAChC,IAAM,EAAkB,CAAC,IAAW,CAClC,OAAO,IAAI,EAA2B,MAAM,QAAQ,CAAM,EAAI,EAAS,CAAC,CAAM,EAAG,CAAO,GAEpF,EAAW,CAAC,IAAW,EAAgB,CAAM,EAEnD,OADA,EAAS,KAAO,EACT,EAET,SAAS,CAAqB,CAAC,EAAS,CACtC,IAAM,EAAU,IAAI,QACpB,GAAI,EAAQ,YAAc,GACxB,EAAQ,IAAI,gBAAiB,MAAM,EAErC,GAAI,EAAQ,SACV,EAAQ,IAAI,eAAgB,EAAQ,SAAS,SAAS,CAAC,EAEzD,GAAI,EAAQ,SACV,EAAQ,IAAI,kBAAmB,KAAK,UAAU,EAAQ,QAAQ,CAAC,EAEjE,GAAI,EAAQ,SACV,EAAQ,IAAI,mBAAoB,EAAQ,QAAQ,EAElD,GAAI,EAAQ,aAAoB,OAC9B,EAAQ,IAAI,qBAAsB,EAAQ,aAAe,GAAO,OAAS,OAAO,EAElF,GAAI,EAAQ,UAAiB,OAC3B,EAAQ,IAAI,kBAAmB,EAAQ,OAAO,EAEhD,GAAI,EAAQ,mBAA0B,OACpC,EAAQ,IAAI,yBAA0B,EAAQ,iBAAiB,SAAS,CAAC,EAE3E,GAAI,EAAQ,UAAiB,OAAG,CAC9B,GAAI,EAAQ,QAAQ,cAAqB,OACvC,EAAQ,IAAI,sBAAuB,EAAQ,QAAQ,YAAY,SAAS,CAAC,EAE3E,GAAI,EAAQ,QAAQ,eAAsB,OACxC,EAAQ,IAAI,qBAAsB,EAAQ,QAAQ,aAAa,SAAS,CAAC,EAE3E,GAAI,EAAQ,QAAQ,UAAiB,OACnC,EAAQ,IAAI,iBAAkB,EAAQ,QAAQ,OAAO,EAGzD,OAAO",
"debugId": "4A92B768FEBA117B64756E2164756E21",
"names": []
}

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

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

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": ["../../node_modules/.bun/@ai-sdk+provider@3.0.8/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM,UAAqB,EAAK,MAAO,EAAK,GAAQ,EAAI,CASvE,WAAW,EACT,KAAM,EACN,UACA,SACC,CACD,MAAM,CAAO,EACb,KAAK,GAAM,GACX,KAAK,KAAO,EACZ,KAAK,MAAQ,QAOR,WAAU,CAAC,EAAO,CACvB,OAAO,EAAY,UAAU,EAAO,CAAM,QAErC,UAAS,CAAC,EAAO,EAAU,CAChC,IAAM,EAAe,OAAO,IAAI,CAAQ,EACxC,OAAO,GAAS,MAAQ,OAAO,IAAU,UAAY,KAAgB,GAAS,OAAO,EAAM,KAAkB,WAAa,EAAM,KAAkB,GAEtJ,EAGI,EAAO,kBACP,EAAU,mBAAmB,IAC7B,GAAU,OAAO,IAAI,CAAO,EAC5B,EAAK,EACL,GAAe,cAAe,EAAM,EAAY,EAAM,GAAS,EAAK,CACtE,WAAW,EACT,UACA,MACA,oBACA,aACA,kBACA,eACA,QACA,eAAc,GAAc,OAAS,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GAAW,mBAAmB,KAC9B,GAAW,OAAO,IAAI,EAAQ,EAC9B,EAAM,EACN,GAAgC,cAAe,EAAO,EAAY,EAAO,GAAU,EAAM,CAC3F,WAAW,EACT,gBACA,UAAU,IAAI,mCACb,CACD,MAAM,CAAE,KAAM,GAAQ,SAAQ,CAAC,EAC/B,KAAK,GAAQ,GACb,KAAK,cAAgB,QAEhB,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,EAAQ,EAE/C",
"debugId": "7ED066FEFCB8EC0D64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260611035744_credential.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260611035744_credential\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`credential\\` (\n \\`id\\` text PRIMARY KEY,\n \\`connector_id\\` text NOT NULL,\n \\`method_id\\` text NOT NULL,\n \\`label\\` text NOT NULL,\n \\`value\\` text NOT NULL,\n \\`active\\` integer DEFAULT false NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL\n );\n `)\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`credential_connector_active_idx\\` ON \\`credential\\` (\\`connector_id\\`) WHERE \"credential\".\"active\" = 1;`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,4BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2XAWb,EACD,MAAO,EAAG,IACR,yHACF,EACD,EAEL",
"debugId": "29C4A3A147402D0B64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1056.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.972.45/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js"],
"sourcesContent": [
"import { CredentialsProviderError, getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/core/config\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n",
"export const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromSso as getSsoTokenProvider } from \"@aws-sdk/token-providers\";\nimport { CredentialsProviderError, getSSOTokenFromFile } from \"@smithy/core/config\";\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nexport const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await getSsoTokenProvider({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await import(\"./loadSso.js\");\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n",
"import { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, TokenProviderError, } from \"@smithy/core/config\";\nimport { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from \"./constants\";\nimport { getNewSsoOidcToken } from \"./getNewSsoOidcToken\";\nimport { validateTokenExpiry } from \"./validateTokenExpiry\";\nimport { validateTokenKey } from \"./validateTokenKey\";\nimport { writeSSOTokenToFile } from \"./writeSSOTokenToFile\";\nconst lastRefreshAttemptTime = new Date(0);\nexport const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n",
"export const EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nexport const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n",
"export const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {\n const { SSOOIDCClient } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n",
"import { getSsoOidcClient } from \"./getSsoOidcClient\";\nexport const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {\n const { CreateTokenCommand } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { getSSOTokenFilepath } from \"@smithy/core/config\";\nimport { promises as fsPromises } from \"node:fs\";\nconst { writeFile } = fsPromises;\nexport const writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n"
],
"mappings": ";4JAAA,oBCAO,SAAM,EAAe,CAAC,IAAQ,IAChC,OAAO,EAAI,gBAAkB,UAC1B,OAAO,EAAI,iBAAmB,UAC9B,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,aAAe,UAC1B,OAAO,EAAI,gBAAkB,UCLrC,gBCAA,eCAO,IAAM,EAAmB,OACnB,EAAkB,kFCDxB,IAAM,EAAmB,MAAO,EAAW,EAAO,CAAC,EAAG,IAAuB,CAChF,IAAQ,iBAAkB,KAAa,0CACjC,EAAW,CAAC,IAAS,EAAK,eAA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AAM,IAAI,2BAAyB,WAAW,4CAAuD,CACjG,OAAQ,EAAK,MACjB,CAAC,EAEL,GAAI,GAAS,YAAa,CAEtB,IAAM,GADc,MAAM,qBAAmB,CAAI,GACrB,EAAQ,aAC9B,EAAc,8BAA8B,qBAA+B,EAAQ,cACzF,GAAI,GAAa,IAAc,EAAQ,WACnC,MAAM,IAAI,2BAAyB,yBAA2B,EAAa,CACvE,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,GAAI,GAAe,IAAgB,EAAQ,cACvC,MAAM,IAAI,2BAAyB,4BAA8B,EAAa,CAC1E,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EAEL,EAAQ,WAAa,EAAQ,WAC7B,EAAQ,cAAgB,EAAQ,cAEpC,IAAQ,gBAAe,iBAAgB,aAAY,gBAAe,eAAgB,EAAmB,EAAS,EAAK,MAAM,EACzH,OAAO,EAAsB,CACzB,YAAa,EACb,WAAY,EACZ,aAAc,EACd,UAAW,EACX,YAAa,EACb,UAAW,EACX,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC,EAEA,QAAI,CAAC,GAAe,CAAC,GAAgB,CAAC,GAAa,CAAC,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,EAG5G,YAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC",
"debugId": "7BCE735D5E36A5A364756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260410174513_workspace-name.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260410174513_workspace-name\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_workspace\\` (\n \\`id\\` text PRIMARY KEY,\n \\`type\\` text NOT NULL,\n \\`name\\` text DEFAULT '' NOT NULL,\n \\`branch\\` text,\n \\`directory\\` text,\n \\`extra\\` text,\n \\`project_id\\` text NOT NULL,\n CONSTRAINT \\`fk_workspace_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `INSERT INTO \\`__new_workspace\\`(\\`id\\`, \\`type\\`, \\`branch\\`, \\`name\\`, \\`directory\\`, \\`extra\\`, \\`project_id\\`) SELECT \\`id\\`, \\`type\\`, \\`branch\\`, \\`name\\`, \\`directory\\`, \\`extra\\`, \\`project_id\\` FROM \\`workspace\\`;`,\n )\n yield* tx.run(`DROP TABLE \\`workspace\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_workspace\\` RENAME TO \\`workspace\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,4aAWb,EACD,MAAO,EAAG,IACR,+LACF,EACA,MAAO,EAAG,IAAI,yBAA2B,EACzC,MAAO,EAAG,IAAI,sDAA0D,EACxE,MAAO,EAAG,IAAI,yBAAyB,EACxC,EAEL",
"debugId": "BE8755C6DC49BF8264756E2164756E21",
"names": []
}

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

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

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

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

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

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": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "19EFAF2CE770095564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+deepinfra@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/deepinfra/dist/index.mjs"],
"sourcesContent": [
"// src/deepinfra-provider.ts\nimport {\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/deepinfra-image-model.ts\nimport {\n combineHeaders,\n convertBase64ToUint8Array,\n convertToFormData,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n downloadBlob,\n postFormDataToApi,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar DeepInfraImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n aspectRatio,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n if (files != null && files.length > 0) {\n const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({\n url: this.getEditUrl(),\n headers: combineHeaders(this.config.headers(), headers),\n formData: convertToFormData(\n {\n model: this.modelId,\n prompt,\n image: await Promise.all(files.map((file) => fileToBlob(file))),\n mask: mask != null ? await fileToBlob(mask) : void 0,\n n,\n size,\n ...(_d = providerOptions.deepinfra) != null ? _d : {}\n },\n { useArrayBrackets: false }\n ),\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraEditErrorSchema,\n errorToMessage: (error) => {\n var _a2, _b2;\n return (_b2 = (_a2 = error.error) == null ? void 0 : _a2.message) != null ? _b2 : \"Unknown error\";\n }\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraEditResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response2.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders2\n }\n };\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi({\n url: `${this.config.baseURL}/${this.modelId}`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n prompt,\n num_images: n,\n ...aspectRatio && { aspect_ratio: aspectRatio },\n ...splitSize && { width: splitSize[0], height: splitSize[1] },\n ...seed != null && { seed },\n ...(_e = providerOptions.deepinfra) != null ? _e : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraErrorSchema,\n errorToMessage: (error) => error.detail.error\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.images.map(\n (image) => image.replace(/^data:image\\/\\w+;base64,/, \"\")\n ),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n getEditUrl() {\n const baseUrl = this.config.baseURL.replace(\"/inference\", \"/openai\");\n return `${baseUrl}/images/edits`;\n }\n};\nvar deepInfraErrorSchema = z.object({\n detail: z.object({\n error: z.string()\n })\n});\nvar deepInfraImageResponseSchema = z.object({\n images: z.array(z.string())\n});\nvar deepInfraEditErrorSchema = z.object({\n error: z.object({\n message: z.string()\n }).optional()\n});\nvar deepInfraEditResponseSchema = z.object({\n data: z.array(z.object({ b64_json: z.string() }))\n});\nasync function fileToBlob(file) {\n if (file.type === \"url\") {\n return downloadBlob(file.url);\n }\n const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);\n return new Blob([data], { type: file.mediaType });\n}\n\n// src/deepinfra-chat-language-model.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nvar DeepInfraChatLanguageModel = class extends OpenAICompatibleChatLanguageModel {\n constructor(modelId, config) {\n super(modelId, config);\n }\n /**\n * Fixes incorrect token usage for Gemini/Gemma models from DeepInfra.\n *\n * DeepInfra's API returns completion_tokens that don't include reasoning_tokens\n * for Gemini/Gemma models, which violates the OpenAI-compatible spec.\n * According to the spec, completion_tokens should include reasoning_tokens.\n *\n * Example of incorrect data from DeepInfra:\n * {\n * \"completion_tokens\": 84, // text-only tokens\n * \"completion_tokens_details\": {\n * \"reasoning_tokens\": 1081 // reasoning tokens not included above\n * }\n * }\n *\n * This would result in negative text tokens: 84 - 1081 = -997\n *\n * The fix: If reasoning_tokens > completion_tokens, add reasoning_tokens\n * to completion_tokens: 84 + 1081 = 1165\n */\n fixUsageForGeminiModels(usage) {\n var _a, _b;\n if (!usage || !((_a = usage.completion_tokens_details) == null ? void 0 : _a.reasoning_tokens)) {\n return usage;\n }\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = usage.completion_tokens_details.reasoning_tokens;\n if (reasoningTokens > completionTokens) {\n const correctedCompletionTokens = completionTokens + reasoningTokens;\n return {\n ...usage,\n // Add reasoning_tokens to completion_tokens to get the correct total\n completion_tokens: correctedCompletionTokens,\n // Update total_tokens if present\n total_tokens: usage.total_tokens != null ? usage.total_tokens + reasoningTokens : void 0\n };\n }\n return usage;\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const result = await super.doGenerate(options);\n if ((_a = result.usage) == null ? void 0 : _a.raw) {\n const fixedRawUsage = this.fixUsageForGeminiModels(result.usage.raw);\n if (fixedRawUsage !== result.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n return {\n ...result,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n };\n }\n }\n return result;\n }\n async doStream(options) {\n const result = await super.doStream(options);\n const originalStream = result.stream;\n const fixUsage = this.fixUsageForGeminiModels.bind(this);\n const transformedStream = new ReadableStream({\n async start(controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n const reader = originalStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value.type === \"finish\" && ((_a = value.usage) == null ? void 0 : _a.raw)) {\n const fixedRawUsage = fixUsage(value.usage.raw);\n if (fixedRawUsage !== value.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n controller.enqueue({\n ...value,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n });\n } else {\n controller.enqueue(value);\n }\n } else {\n controller.enqueue(value);\n }\n }\n controller.close();\n } catch (error) {\n controller.error(error);\n }\n }\n });\n return {\n ...result,\n stream: transformedStream\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/deepinfra-provider.ts\nfunction createDeepInfra(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.deepinfra.com/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"DEEPINFRA_API_KEY\",\n description: \"DeepInfra's API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/deepinfra/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `deepinfra.${modelType}`,\n url: ({ path }) => `${baseURL}/openai${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new DeepInfraChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new DeepInfraImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL ? `${baseURL}/inference` : \"https://api.deepinfra.com/v1/inference\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.chatModel = createChatModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.languageModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n return provider;\n}\nvar deepinfra = createDeepInfra();\nexport {\n VERSION,\n createDeepInfra,\n deepinfra\n};\n//# sourceMappingURL=index.mjs.map"
],
"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AG,CACrC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,8BACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,oBACzB,YAAa,qBACf,CAAC,OACE,EAAQ,OACb,EACA,oBAAoB,GACtB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,aAAa,IACvB,IAAK,EAAG,UAAW,GAAG,WAAiB,IACvC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAoB,EAAS,IAClE,EAAqB,OAAO,EAC/B,QAAS,EAAU,GAAG,cAAsB,wCAC9C,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EASrD,OARA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,UAAY,EACrB,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,cAAgB,EACzB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EACvB,EAET,IAAI,GAAY,EAAgB",
"debugId": "CA4BB620C8DF7F6864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "381362BD37C303EF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260323234822_events.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260323234822_events\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`event_sequence\\` (\n \\`aggregate_id\\` text PRIMARY KEY,\n \\`seq\\` integer NOT NULL\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`event\\` (\n \\`id\\` text PRIMARY KEY,\n \\`aggregate_id\\` text NOT NULL,\n \\`seq\\` integer NOT NULL,\n \\`type\\` text NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_event_aggregate_id_event_sequence_aggregate_id_fk\\` FOREIGN KEY (\\`aggregate_id\\`) REFERENCES \\`event_sequence\\`(\\`aggregate_id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wBACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6IAKb,EACD,MAAO,EAAG,IAAI,8YASb,EACF,EAEL",
"debugId": "D03FA375D510DA2264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "CE12D768985069CD64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "90D9404431CE635F64756E2164756E21",
"names": []
}
{
"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": "1453509DFCA3D93B64756E2164756E21",
"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": "0C774BA179C8814D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.3.6/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js"],
"sourcesContent": [
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nexport const ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexport const ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexport const ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = new Set([\"localhost\", \"127.0.0.1\"]);\nconst GREENGRASS_PROTOCOLS = new Set([\"http:\", \"https:\"]);\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n let parsed;\n try {\n parsed = new URL(process.env[ENV_CMDS_FULL_URI]);\n }\n catch {\n throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });\n }\n if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n protocol: parsed.protocol,\n hostname: parsed.hostname,\n path: parsed.pathname + parsed.search,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n",
"export const isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexport const fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n",
"export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
"import { request } from \"node:http\";\nimport { ProviderError } from \"@smithy/core/config\";\nexport function httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n",
"export const retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n",
"import { CredentialsProviderError, loadConfig } from \"@smithy/core/config\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport class InstanceMetadataV1FallbackError extends CredentialsProviderError {\n tryNextLink;\n name = \"InstanceMetadataV1FallbackError\";\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n",
"import { loadConfig } from \"@smithy/core/config\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { Endpoint as InstanceMetadataEndpoint } from \"../config/Endpoint\";\nimport { ENDPOINT_CONFIG_OPTIONS } from \"../config/EndpointConfigOptions\";\nimport { EndpointMode } from \"../config/EndpointMode\";\nimport { ENDPOINT_MODE_CONFIG_OPTIONS, } from \"../config/EndpointModeConfigOptions\";\nexport const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return InstanceMetadataEndpoint.IPv4;\n case EndpointMode.IPv6:\n return InstanceMetadataEndpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n",
"export var Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n",
"export const ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexport const CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexport const ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n",
"export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
"import { EndpointMode } from \"./EndpointMode\";\nexport const ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexport const CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexport const ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n",
"const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nexport const getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n",
"import { getExtendedInstanceMetadataCredentials } from \"./getExtendedInstanceMetadataCredentials\";\nexport const staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n"
],
"mappings": ";kJAAA,oBCAO,SAAM,EAAoB,CAAC,IAAQ,QAAQ,CAAG,GACjD,OAAO,IAAQ,UACf,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,kBAAoB,UAC/B,OAAO,EAAI,QAAU,UACrB,OAAO,EAAI,aAAe,SACjB,EAAsB,CAAC,KAAW,CAC3C,YAAa,EAAM,YACnB,gBAAiB,EAAM,gBACvB,aAAc,EAAM,MACpB,WAAY,IAAI,KAAK,EAAM,UAAU,KACjC,EAAM,WAAa,CAAE,UAAW,EAAM,SAAU,CACxD,GCZO,IAAM,GAAkB,KAClB,GAAsB,EACtB,EAAyB,EAAG,aADN,EACwC,UAF5C,SAE8E,CAAE,aAAY,SAAQ,GCDnI,eADA,kBAAS,aAEF,SAAS,CAAW,CAAC,EAAS,CACjC,OAAO,IAAI,QAAQ,CAAC,EAAS,IAAW,CACpC,IAAM,EAAM,EAAQ,CAChB,OAAQ,SACL,EACH,SAAU,EAAQ,UAAU,QAAQ,aAAc,IAAI,CAC1D,CAAC,EACD,EAAI,GAAG,QAAS,CAAC,IAAQ,CACrB,EAAO,OAAO,OAAO,IAAI,gBAAc,gDAAgD,EAAG,CAAG,CAAC,EAC9F,EAAI,QAAQ,EACf,EACD,EAAI,GAAG,UAAW,IAAM,CACpB,EAAO,IAAI,gBAAc,6CAA6C,CAAC,EACvE,EAAI,QAAQ,EACf,EACD,EAAI,GAAG,WAAY,CAAC,IAAQ,CACxB,IAAQ,aAAa,KA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,EAAa,EAAS,CAAI,EAEtE,MAAO,EAAK,CACR,GAAI,EAAI,aAAe,IACnB,EAAoB,GAExB,MAAM,EAEV,OAAO,GACR,CAAU,GAEjB,MAAO,UAAY,CACf,IAAM,EAAW,MAAM,EAA4B,EACnD,GAAI,EAEA,OADA,GAAQ,MAAM,4BAA6B,oCAAoC,EACxE,EAAe,EAAY,IAAK,EAAU,SAAQ,CAAC,EAEzD,KACD,IAAI,EACJ,GAAI,CACA,GAAS,MAAM,GAAiB,IAAK,EAAU,SAAQ,CAAC,GAAG,SAAS,EAExE,MAAO,EAAO,CACV,GAAI,GAAO,aAAe,IACtB,MAAM,OAAO,OAAO,EAAO,CACvB,QAAS,2CACb,CAAC,EAEA,QAAI,EAAM,UAAY,gBAAkB,CAAC,IAAK,IAAK,GAAG,EAAE,SAAS,EAAM,UAAU,EAClF,EAAoB,GAGxB,OADA,GAAQ,MAAM,4BAA6B,6BAA6B,EACjE,EAAe,EAAY,IAAK,EAAU,SAAQ,CAAC,EAE9D,OAAO,EAAe,EAAY,IAC3B,EACH,QAAS,EACJ,GAA2B,CAChC,EACA,SACJ,CAAC,KAIP,GAAmB,MAAO,IAAY,EAAY,IACjD,EACH,KAAM,GACN,OAAQ,MACR,QAAS,CACL,uCAAwC,OAC5C,CACJ,CAAC,EACK,GAAa,MAAO,KAAa,MAAM,EAAY,IAAK,EAAS,KAAM,CAAU,CAAC,GAAG,SAAS,EAC9F,GAA4B,MAAO,EAAS,EAAS,IAAS,CAChE,IAAM,EAAsB,KAAK,OAAO,MAAM,EAAY,IACnD,EACH,KAAM,EAAY,CACtB,CAAC,GAAG,SAAS,CAAC,EACd,GAAI,CAAC,EAAkB,CAAmB,EACtC,MAAM,IAAI,2BAAyB,4DAA6D,CAC5F,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAoB,CAAmB",
"debugId": "5B22FB13A7395CA064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260227213759_add_session_workspace_id.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260227213759_add_session_workspace_id\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`workspace_id\\` text;`)\n yield* tx.run(`CREATE INDEX \\`session_workspace_idx\\` ON \\`session\\` (\\`workspace_id\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,0CACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gDAAoD,EAClE,MAAO,EAAG,IAAI,qEAA2E,EAC1F,EAEL",
"debugId": "DE364F2FE830B99C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst process = require(\"process\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const args = 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n try {\n const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-win.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,eACA,MACA,MACN,eAAe,CAAY,EAAG,CAE1B,IAAI,EAAU,8BACd,GAAI,EAAQ,OAAS,QAAU,2BAA4B,EAAQ,IAC/D,EAAU,mCAAqC,EAEnD,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,GAAG,8EAAiB,GAC/C,OAAO,MAAM,QAAQ,EAC1C,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,KAAK,EAG7B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "58814DE9DD0F694364756E2164756E21",
"names": []
}

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

+2
-2
{
"version": 3,
"sources": ["../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.83+43902b222b0d7d3e/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.83+a24bace3c2de5c7d/node_modules/@effect/platform-node/dist/NodeRuntime.js", "src/index.ts"],
"sources": ["../../node_modules/.bun/@effect+platform-node-shared@4.0.0-beta.83+43902b222b0d7d3e/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js", "../../node_modules/.bun/@effect+platform-node@4.0.0-beta.83+4eb9af1649c03d06/node_modules/@effect/platform-node/dist/NodeRuntime.js", "src/index.ts"],
"sourcesContent": [

@@ -10,4 +10,4 @@ "import * as Runtime from \"effect/Runtime\";\n/**\n * Runs an Effect as the Node process main program, interrupting the fiber on\n * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the\n * process exit code.\n *\n * @category running\n * @since 4.0.0\n */\nexport const runMain = /*#__PURE__*/Runtime.makeRunMain(({\n fiber,\n teardown\n}) => {\n let receivedSignal = false;\n fiber.addObserver(exit => {\n process.removeListener(\"SIGINT\", onSigint);\n process.removeListener(\"SIGTERM\", onSigint);\n teardown(exit, code => {\n if (receivedSignal || code !== 0) {\n process.exit(code);\n }\n });\n });\n function onSigint() {\n receivedSignal = true;\n fiber.interruptUnsafe(fiber.id);\n }\n process.on(\"SIGINT\", onSigint);\n process.on(\"SIGTERM\", onSigint);\n});\n//# sourceMappingURL=NodeRuntime.js.map",

"mappings": ";;yWASO,SAAM,OAA+B,OAAY,OACtD,aACA,mBACI,MACJ,IAAI,EAAiB,GACrB,EAAM,YAAY,KAAQ,CACxB,QAAQ,eAAe,SAAU,CAAQ,EACzC,QAAQ,eAAe,UAAW,CAAQ,EAC1C,EAAS,EAAM,KAAQ,CACrB,GAAI,GAAkB,IAAS,EAC7B,QAAQ,KAAK,CAAI,EAEpB,EACF,EACD,SAAS,CAAQ,EAAG,CAClB,EAAiB,GACjB,EAAM,gBAAgB,EAAM,EAAE,EAEhC,QAAQ,GAAG,SAAU,CAAQ,EAC7B,QAAQ,GAAG,UAAW,CAAQ,EAC/B,ECMM,IAAM,EAAsB,EC1BnC,IAAM,EAAW,EAAQ,SAAS,EAAU,CAC1C,EAAG,IAAa,yCAChB,IAAK,IAAa,yCAClB,MAAO,CACL,OAAQ,IAAa,wCACvB,EACA,QAAS,IAAa,yCACtB,QAAS,CACP,MAAO,IAAa,yCACpB,QAAS,IAAa,yCACtB,OAAQ,IAAa,yCACrB,KAAM,IAAa,yCACnB,SAAU,IAAa,wCACzB,EACA,MAAO,IAAa,wCACtB,CAAC,EAED,EAAQ,IAAI,EAAU,EAAU,CAAE,QAAS,OAAQ,CAAC,EAAE,KAC7C,EAAQ,EAAO,KAAK,EACpB,EAAqB,CAAK,EAC1B,EACK,CACd",
"debugId": "3DFB4D9522D51E0D64756E2164756E21",
"debugId": "5CB6CEA345FFB9E964756E2164756E21",
"names": []
}
{
"name": "@opencode-ai/cli-linux-arm64",
"version": "0.0.0-beta-202607220034",
"version": "0.0.0-beta-202607220143",
"license": "MIT",

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

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

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": ["../../node_modules/.bun/@ai-sdk+deepinfra@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/deepinfra/dist/index.mjs"],
"sourcesContent": [
"// src/deepinfra-provider.ts\nimport {\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/deepinfra-image-model.ts\nimport {\n combineHeaders,\n convertBase64ToUint8Array,\n convertToFormData,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n downloadBlob,\n postFormDataToApi,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar DeepInfraImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n aspectRatio,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n if (files != null && files.length > 0) {\n const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({\n url: this.getEditUrl(),\n headers: combineHeaders(this.config.headers(), headers),\n formData: convertToFormData(\n {\n model: this.modelId,\n prompt,\n image: await Promise.all(files.map((file) => fileToBlob(file))),\n mask: mask != null ? await fileToBlob(mask) : void 0,\n n,\n size,\n ...(_d = providerOptions.deepinfra) != null ? _d : {}\n },\n { useArrayBrackets: false }\n ),\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraEditErrorSchema,\n errorToMessage: (error) => {\n var _a2, _b2;\n return (_b2 = (_a2 = error.error) == null ? void 0 : _a2.message) != null ? _b2 : \"Unknown error\";\n }\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraEditResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response2.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders2\n }\n };\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi({\n url: `${this.config.baseURL}/${this.modelId}`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n prompt,\n num_images: n,\n ...aspectRatio && { aspect_ratio: aspectRatio },\n ...splitSize && { width: splitSize[0], height: splitSize[1] },\n ...seed != null && { seed },\n ...(_e = providerOptions.deepinfra) != null ? _e : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: deepInfraErrorSchema,\n errorToMessage: (error) => error.detail.error\n }),\n successfulResponseHandler: createJsonResponseHandler(\n deepInfraImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.images.map(\n (image) => image.replace(/^data:image\\/\\w+;base64,/, \"\")\n ),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n getEditUrl() {\n const baseUrl = this.config.baseURL.replace(\"/inference\", \"/openai\");\n return `${baseUrl}/images/edits`;\n }\n};\nvar deepInfraErrorSchema = z.object({\n detail: z.object({\n error: z.string()\n })\n});\nvar deepInfraImageResponseSchema = z.object({\n images: z.array(z.string())\n});\nvar deepInfraEditErrorSchema = z.object({\n error: z.object({\n message: z.string()\n }).optional()\n});\nvar deepInfraEditResponseSchema = z.object({\n data: z.array(z.object({ b64_json: z.string() }))\n});\nasync function fileToBlob(file) {\n if (file.type === \"url\") {\n return downloadBlob(file.url);\n }\n const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);\n return new Blob([data], { type: file.mediaType });\n}\n\n// src/deepinfra-chat-language-model.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nvar DeepInfraChatLanguageModel = class extends OpenAICompatibleChatLanguageModel {\n constructor(modelId, config) {\n super(modelId, config);\n }\n /**\n * Fixes incorrect token usage for Gemini/Gemma models from DeepInfra.\n *\n * DeepInfra's API returns completion_tokens that don't include reasoning_tokens\n * for Gemini/Gemma models, which violates the OpenAI-compatible spec.\n * According to the spec, completion_tokens should include reasoning_tokens.\n *\n * Example of incorrect data from DeepInfra:\n * {\n * \"completion_tokens\": 84, // text-only tokens\n * \"completion_tokens_details\": {\n * \"reasoning_tokens\": 1081 // reasoning tokens not included above\n * }\n * }\n *\n * This would result in negative text tokens: 84 - 1081 = -997\n *\n * The fix: If reasoning_tokens > completion_tokens, add reasoning_tokens\n * to completion_tokens: 84 + 1081 = 1165\n */\n fixUsageForGeminiModels(usage) {\n var _a, _b;\n if (!usage || !((_a = usage.completion_tokens_details) == null ? void 0 : _a.reasoning_tokens)) {\n return usage;\n }\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = usage.completion_tokens_details.reasoning_tokens;\n if (reasoningTokens > completionTokens) {\n const correctedCompletionTokens = completionTokens + reasoningTokens;\n return {\n ...usage,\n // Add reasoning_tokens to completion_tokens to get the correct total\n completion_tokens: correctedCompletionTokens,\n // Update total_tokens if present\n total_tokens: usage.total_tokens != null ? usage.total_tokens + reasoningTokens : void 0\n };\n }\n return usage;\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const result = await super.doGenerate(options);\n if ((_a = result.usage) == null ? void 0 : _a.raw) {\n const fixedRawUsage = this.fixUsageForGeminiModels(result.usage.raw);\n if (fixedRawUsage !== result.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n return {\n ...result,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n };\n }\n }\n return result;\n }\n async doStream(options) {\n const result = await super.doStream(options);\n const originalStream = result.stream;\n const fixUsage = this.fixUsageForGeminiModels.bind(this);\n const transformedStream = new ReadableStream({\n async start(controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n const reader = originalStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value.type === \"finish\" && ((_a = value.usage) == null ? void 0 : _a.raw)) {\n const fixedRawUsage = fixUsage(value.usage.raw);\n if (fixedRawUsage !== value.usage.raw) {\n const promptTokens = (_b = fixedRawUsage.prompt_tokens) != null ? _b : 0;\n const completionTokens = (_c = fixedRawUsage.completion_tokens) != null ? _c : 0;\n const cacheReadTokens = (_e = (_d = fixedRawUsage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0;\n const reasoningTokens = (_g = (_f = fixedRawUsage.completion_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : 0;\n controller.enqueue({\n ...value,\n usage: {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: fixedRawUsage\n }\n });\n } else {\n controller.enqueue(value);\n }\n } else {\n controller.enqueue(value);\n }\n }\n controller.close();\n } catch (error) {\n controller.error(error);\n }\n }\n });\n return {\n ...result,\n stream: transformedStream\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/deepinfra-provider.ts\nfunction createDeepInfra(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.deepinfra.com/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"DEEPINFRA_API_KEY\",\n description: \"DeepInfra's API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/deepinfra/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `deepinfra.${modelType}`,\n url: ({ path }) => `${baseURL}/openai${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new DeepInfraChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new DeepInfraImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL ? `${baseURL}/inference` : \"https://api.deepinfra.com/v1/inference\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.chatModel = createChatModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.languageModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n return provider;\n}\nvar deepinfra = createDeepInfra();\nexport {\n VERSION,\n createDeepInfra,\n deepinfra\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wVAuBA,SAAI,OAAsB,UAAM,MAC9B,gBAAW,CAAC,EAAS,EAAQ,CAC3B,KAAK,QAAU,EACf,KAAK,OAAS,E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AAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,oBACzB,YAAa,qBACf,CAAC,OACE,EAAQ,OACb,EACA,oBAAoB,GACtB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,aAAa,IACvB,IAAK,EAAG,UAAW,GAAG,WAAiB,IACvC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAoB,EAAS,IAClE,EAAqB,OAAO,EAC/B,QAAS,EAAU,GAAG,cAAsB,wCAC9C,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EASrD,OARA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,UAAY,EACrB,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,cAAgB,EACzB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EACvB,EAET,IAAI,GAAY,EAAgB",
"debugId": "7C67104BB3238EB464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/util/which.ts"],
"sourcesContent": [
"import whichPkg from \"which\"\nimport path from \"path\"\nimport { Global } from \"../global\"\n\nexport function which(cmd: string, env?: NodeJS.ProcessEnv) {\n const base = env?.PATH ?? env?.Path ?? process.env.PATH ?? process.env.Path ?? \"\"\n const full = base ? base + path.delimiter + Global.Path.bin : Global.Path.bin\n const result = whichPkg.sync(cmd, {\n nothrow: true,\n path: full,\n pathExt: env?.PATHEXT ?? env?.PathExt ?? process.env.PATHEXT ?? process.env.PathExt,\n })\n return typeof result === \"string\" ? result : null\n}\n"
],
"mappings": ";kJAAA,oBACA,yBAGO,SAAS,CAAK,CAAC,EAAa,EAAyB,CAC1D,IAAM,EAAO,GAAK,MAAQ,GAAK,MAAQ,QAAQ,IAAI,MAAQ,QAAQ,IAAI,MAAQ,GACzE,EAAO,EAAO,EAAO,EAAK,UAAY,EAAO,KAAK,IAAM,EAAO,KAAK,IACpE,EAAS,UAAS,KAAK,EAAK,CAChC,QAAS,GACT,KAAM,EACN,QAAS,GAAK,SAAW,GAAK,SAAW,QAAQ,IAAI,SAAW,QAAQ,IAAI,OAC9E,CAAC,EACD,OAAO,OAAO,IAAW,SAAW,EAAS",
"debugId": "FC504917C2CA897364756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260603160727_jittery_ezekiel_stane.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603160727_jittery_ezekiel_stane\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_input_session_pending_seq_idx\\`;`)\n yield* tx.run(\n `CREATE INDEX IF NOT EXISTS \\`event_aggregate_type_seq_idx\\` ON \\`event\\` (\\`aggregate_id\\`,\\`type\\`,\\`seq\\`);`,\n )\n yield* tx.run(\n `CREATE INDEX IF NOT EXISTS \\`session_input_session_pending_delivery_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`,\\`delivery\\`,\\`seq\\`);`,\n )\n yield* tx.run(\n `CREATE INDEX IF NOT EXISTS \\`session_message_session_time_created_id_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`time_created\\`,\\`id\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+DAAiE,EAC/E,MAAO,EAAG,IACR,qGACF,EACA,MAAO,EAAG,IACR,gJACF,EACA,MAAO,EAAG,IACR,mIACF,EACD,EAEL",
"debugId": "D6F44D47C7C3A8CC64756E2164756E21",
"names": []
}
{
"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": "B1F1D6E650256D2C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "4158B12667F2E0F564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js", "../../node_modules/.bun/@opentelemetry+context-async-hooks@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/context-async-hooks/build/src/index.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractAsyncHooksContextManager = void 0;\nconst events_1 = require(\"events\");\nconst ADD_LISTENER_METHODS = [\n 'addListener',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n];\nclass AbstractAsyncHooksContextManager {\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n if (target instanceof events_1.EventEmitter) {\n return this._bindEventEmitter(context, target);\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n }\n _bindFunction(context, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n /**\n * It isn't possible to tell Typescript that contextWrapper is the same as T\n * so we forced to cast as any here.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return contextWrapper;\n }\n /**\n * By default, EventEmitter call their callback with their context, which we do\n * not want, instead we will bind a specific context to all callbacks that\n * go through it.\n * @param context the context we want to bind\n * @param ee EventEmitter an instance of EventEmitter to patch\n */\n _bindEventEmitter(context, ee) {\n const map = this._getPatchMap(ee);\n if (map !== undefined)\n return ee;\n this._createPatchMap(ee);\n // patch methods that add a listener to propagate context\n ADD_LISTENER_METHODS.forEach(methodName => {\n if (ee[methodName] === undefined)\n return;\n ee[methodName] = this._patchAddListener(ee, ee[methodName], context);\n });\n // patch methods that remove a listener\n if (typeof ee.removeListener === 'function') {\n ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);\n }\n if (typeof ee.off === 'function') {\n ee.off = this._patchRemoveListener(ee, ee.off);\n }\n // patch method that remove all listeners\n if (typeof ee.removeAllListeners === 'function') {\n ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners);\n }\n return ee;\n }\n /**\n * Patch methods that remove a given listener so that we match the \"patched\"\n * version of that listener (the one that propagate context).\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveListener(ee, original) {\n const contextManager = this;\n return function (event, listener) {\n const events = contextManager._getPatchMap(ee)?.[event];\n if (events === undefined) {\n return original.call(this, event, listener);\n }\n const patchedListener = events.get(listener);\n return original.call(this, event, patchedListener || listener);\n };\n }\n /**\n * Patch methods that remove all listeners so we remove our\n * internal references for a given event.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveAllListeners(ee, original) {\n const contextManager = this;\n return function (event) {\n const map = contextManager._getPatchMap(ee);\n if (map !== undefined) {\n if (arguments.length === 0) {\n contextManager._createPatchMap(ee);\n }\n else if (map[event] !== undefined) {\n delete map[event];\n }\n }\n return original.apply(this, arguments);\n };\n }\n /**\n * Patch methods on an event emitter instance that can add listeners so we\n * can force them to propagate a given context.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n * @param [context] context to propagate when calling listeners\n */\n _patchAddListener(ee, original, context) {\n const contextManager = this;\n return function (event, listener) {\n /**\n * This check is required to prevent double-wrapping the listener.\n * The implementation for ee.once wraps the listener and calls ee.on.\n * Without this check, we would wrap that wrapped listener.\n * This causes an issue because ee.removeListener depends on the onceWrapper\n * to properly remove the listener. If we wrap their wrapper, we break\n * that detection.\n */\n if (contextManager._wrapped) {\n return original.call(this, event, listener);\n }\n let map = contextManager._getPatchMap(ee);\n if (map === undefined) {\n map = contextManager._createPatchMap(ee);\n }\n let listeners = map[event];\n if (listeners === undefined) {\n listeners = new WeakMap();\n map[event] = listeners;\n }\n const patchedListener = contextManager.bind(context, listener);\n // store a weak reference of the user listener to ours\n listeners.set(listener, patchedListener);\n /**\n * See comment at the start of this function for the explanation of this property.\n */\n contextManager._wrapped = true;\n try {\n return original.call(this, event, patchedListener);\n }\n finally {\n contextManager._wrapped = false;\n }\n };\n }\n _createPatchMap(ee) {\n const map = Object.create(null);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ee[this._kOtListeners] = map;\n return map;\n }\n _getPatchMap(ee) {\n return ee[this._kOtListeners];\n }\n _kOtListeners = Symbol('OtListeners');\n _wrapped = false;\n}\nexports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager;\n//# sourceMappingURL=AbstractAsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncHooksContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst asyncHooks = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\n/**\n * @deprecated Use AsyncLocalStorageContextManager instead.\n */\nclass AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncHook;\n _contexts = new Map();\n _stack = [];\n constructor() {\n super();\n this._asyncHook = asyncHooks.createHook({\n init: this._init.bind(this),\n before: this._before.bind(this),\n after: this._after.bind(this),\n destroy: this._destroy.bind(this),\n promiseResolve: this._destroy.bind(this),\n });\n }\n active() {\n return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n this._enterContext(context);\n try {\n return fn.call(thisArg, ...args);\n }\n finally {\n this._exitContext();\n }\n }\n enable() {\n this._asyncHook.enable();\n return this;\n }\n disable() {\n this._asyncHook.disable();\n this._contexts.clear();\n this._stack = [];\n return this;\n }\n /**\n * Init hook will be called when userland create a async context, setting the\n * context as the current one if it exist.\n * @param uid id of the async context\n * @param type the resource type\n */\n _init(uid, type) {\n // ignore TIMERWRAP as they combine timers with same timeout which can lead to\n // false context propagation. TIMERWRAP has been removed in node 11\n // every timer has it's own `Timeout` resource anyway which is used to propagate\n // context.\n if (type === 'TIMERWRAP')\n return;\n const context = this._stack[this._stack.length - 1];\n if (context !== undefined) {\n this._contexts.set(uid, context);\n }\n }\n /**\n * Destroy hook will be called when a given context is no longer used so we can\n * remove its attached context.\n * @param uid uid of the async context\n */\n _destroy(uid) {\n this._contexts.delete(uid);\n }\n /**\n * Before hook is called just before executing a async context.\n * @param uid uid of the async context\n */\n _before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }\n /**\n * After hook is called just after completing the execution of a async context.\n */\n _after() {\n this._exitContext();\n }\n /**\n * Set the given context as active\n */\n _enterContext(context) {\n this._stack.push(context);\n }\n /**\n * Remove the context at the root of the stack\n */\n _exitContext() {\n this._stack.pop();\n }\n}\nexports.AsyncHooksContextManager = AsyncHooksContextManager;\n//# sourceMappingURL=AsyncHooksContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst async_hooks_1 = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\nclass AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n _asyncLocalStorage;\n constructor() {\n super();\n this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();\n }\n active() {\n return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n const cb = thisArg == null ? fn : fn.bind(thisArg);\n return this._asyncLocalStorage.run(context, cb, ...args);\n }\n enable() {\n return this;\n }\n disable() {\n this._asyncLocalStorage.disable();\n return this;\n }\n}\nexports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager;\n//# sourceMappingURL=AsyncLocalStorageContextManager.js.map",
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;\nvar AsyncHooksContextManager_1 = require(\"./AsyncHooksContextManager\");\nObject.defineProperty(exports, \"AsyncHooksContextManager\", { enumerable: true, get: function () { return AsyncHooksContextManager_1.AsyncHooksContextManager; } });\nvar AsyncLocalStorageContextManager_1 = require(\"./AsyncLocalStorageContextManager\");\nObject.defineProperty(exports, \"AsyncLocalStorageContextManager\", { enumerable: true, get: function () { return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager; } });\n//# sourceMappingURL=index.js.map"
],
"mappings": ";yHAKA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,mCAAwC,OAChD,IAAM,cACA,EAAuB,CACzB,cACA,KACA,OACA,kBACA,qBACJ,EACA,MAAM,CAAiC,CAOnC,IAAI,CAAC,EAAS,EAAQ,CAClB,GAAI,aAAkB,EAAS,aAC3B,OAAO,KAAK,kBAAkB,EAAS,CAAM,EAEjD,GAAI,OAAO,IAAW,WAClB,OAAO,KAAK,cAAc,EAAS,CAAM,EAE7C,OAAO,EAEX,aAAa,CAAC,EAAS,EAAQ,CAC3B,IAAM,EAAU,KACV,EAAiB,QAAS,IAAI,EAAM,CACtC,OAAO,EAAQ,KAAK,EAAS,IAAM,EAAO,MAAM,KAAM,CAAI,CAAC,GAa/D,OAXA,OAAO,eAAe,EAAgB,SAAU,CAC5C,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,EAAO,MAClB,CAAC,EAMM,EASX,iBAAiB,CAAC,EAAS,EAAI,CAE3B,GADY,KAAK,aAAa,CAAE,IACpB,OACR,OAAO,EASX,GARA,KAAK,gBAAgB,CAAE,EAEvB,EAAqB,QAAQ,KAAc,CACvC,GAAI,EAAG,KAAgB,OACnB,OACJ,EAAG,GAAc,KAAK,kBAAkB,EAAI,EAAG,GAAa,CAAO,EACtE,EAEG,OAAO,EAAG,iBAAmB,WAC7B,EAAG,eAAiB,KAAK,qBAAqB,EAAI,EAAG,cAAc,EAEvE,GAAI,OAAO,EAAG,MAAQ,WAClB,EAAG,IAAM,KAAK,qBAAqB,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,OACZ,KAAK,cAAc,CAAO,EAMlC,MAAM,EAAG,CACL,KAAK,aAAa,EAKtB,aAAa,CAAC,EAAS,CACnB,KAAK,OAAO,KAAK,CAAO,EAK5B,YAAY,EAAG,CACX,KAAK,OAAO,IAAI,EAExB,CACQ,2BAA2B,kBCnGnC,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,kCAAuC,OAC/C,IAAM,MACA,mBACA,MACN,MAAM,UAAwC,EAAmC,gCAAiC,CAC9G,mBACA,WAAW,EAAG,CACV,MAAM,EACN,KAAK,mBAAqB,IAAI,EAAc,kBAEhD,MAAM,EAAG,CACL,OAAO,KAAK,mBAAmB,SAAS,GAAK,EAAM,aAEvD,IAAI,CAAC,EAAS,EAAI,KAAY,EAAM,CAChC,IAAM,EAAK,GAAW,KAAO,EAAK,EAAG,KAAK,CAAO,EACjD,OAAO,KAAK,mBAAmB,IAAI,EAAS,EAAI,GAAG,CAAI,EAE3D,MAAM,EAAG,CACL,OAAO,KAEX,OAAO,EAAG,CAEN,OADA,KAAK,mBAAmB,QAAQ,EACzB,KAEf,CACQ,kCAAkC,kBC1B1C,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,kCAA0C,2BAAgC,OAClF,IAAI,MACJ,OAAO,eAAe,EAAS,2BAA4B,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,EAA2B,yBAA4B,CAAC,EACjK,IAAI,MACJ,OAAO,eAAe,EAAS,kCAAmC,CAAE,WAAY,GAAM,IAAK,QAAS,EAAG,CAAE,OAAO,EAAkC,gCAAmC,CAAC",
"debugId": "BE0D29D789F6441464756E2164756E21",
"names": []
}

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

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": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "CB96873C4C36AF8F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/is-wsl@3.1.1/node_modules/is-wsl/index.js", "../../node_modules/.bun/is-inside-container@1.0.0/node_modules/is-inside-container/index.js", "../../node_modules/.bun/is-docker@3.0.0/node_modules/is-docker/index.js"],
"sourcesContent": [
"import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n",
"import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n",
"import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n"
],
"mappings": ";AAAA,uBACA,kBACA,kBCFA,kBCAA,kBAEA,IAAI,EAEJ,SAAS,CAAY,EAAG,CACvB,GAAI,CAEH,OADA,EAAG,SAAS,aAAa,EAClB,GACN,KAAM,CACP,MAAO,IAIT,SAAS,CAAe,EAAG,CAC1B,GAAI,CACH,OAAO,EAAG,aAAa,oBAAqB,MAAM,EAAE,SAAS,QAAQ,EACpE,KAAM,CACP,MAAO,IAIT,SAAwB,CAAQ,EAAG,CAElC,GAAI,IAAmB,OACtB,EAAiB,EAAa,GAAK,EAAgB,EAGpD,OAAO,EDxBR,IAAI,EAGE,EAAkB,IAAM,CAC7B,GAAI,CAEH,OADA,EAAG,SAAS,oBAAoB,EACzB,GACN,KAAM,CACP,MAAO,KAIT,SAAwB,CAAiB,EAAG,CAE3C,GAAI,IAAiB,OACpB,EAAe,EAAgB,GAAK,EAAS,EAG9C,OAAO,EDhBR,IAAM,EAAQ,IAAM,CACnB,GAAI,EAAQ,WAAa,QACxB,MAAO,GAGR,GAAI,EAAG,QAAQ,EAAE,YAAY,EAAE,SAAS,WAAW,EAAG,CACrD,GAAI,EAAkB,EACrB,MAAO,GAGR,MAAO,GAGR,GAAI,CACH,GAAI,EAAG,aAAa,gBAAiB,MAAM,EAAE,YAAY,EAAE,SAAS,WAAW,EAC9E,MAAO,CAAC,EAAkB,EAE1B,KAAM,EAGR,GACC,EAAG,WAAW,qCAAqC,GAChD,EAAG,WAAW,UAAU,EAE3B,MAAO,CAAC,EAAkB,EAG3B,MAAO,IAGO,IAAQ,IAAI,gBAAkB,EAAQ,EAAM",
"debugId": "061DE45F8F827D5464756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "90D9404431CE635F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260507164347_add_workspace_time.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260507164347_add_workspace_time\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`time_used\\` integer NOT NULL DEFAULT 0;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,oCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,qEAAyE,EACxF,EAEL",
"debugId": "6FC7C2111FD1682464756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "39701B31C1D8FD1264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260413175956_chief_energizer.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260413175956_chief_energizer\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_entry\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_session_entry_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`CREATE INDEX \\`session_entry_session_idx\\` ON \\`session_entry\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_entry_session_type_idx\\` ON \\`session_entry\\` (\\`session_id\\`,\\`type\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_entry_time_created_idx\\` ON \\`session_entry\\` (\\`time_created\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,iCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2aAUb,EACD,MAAO,EAAG,IAAI,6EAAmF,EACjG,MAAO,EAAG,IAAI,yFAAiG,EAC/G,MAAO,EAAG,IAAI,oFAA0F,EACzG,EAEL",
"debugId": "B2DF9260D7F140AE64756E2164756E21",
"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": "89E4E8D5CE6D679364756E2164756E21",
"names": []
}

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

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": ["../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.61/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.61/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.61/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js", "../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.61/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nimport { NodeHttpHandler } from \"@smithy/node-http-handler\";\nimport fs from \"node:fs/promises\";\nimport { checkUrl } from \"./checkUrl\";\nimport { createGetRequest, getCredentials } from \"./requestHelpers\";\nimport { retryWrapper } from \"./retry-wrapper\";\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger?.warn\n ? console.warn\n : options.logger.warn.bind(options.logger);\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsRelativeUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationTokenFile will take precedence.\");\n }\n if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else if (full) {\n host = full;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });\n const requestTimeout = options.timeout ?? 1000;\n const provider = retryWrapper(async () => {\n const request = createGetRequest(url);\n if (tokenFile) {\n request.headers.Authorization = validateToken((await fs.readFile(tokenFile)).toString());\n }\n else if (token) {\n request.headers.Authorization = validateToken(token);\n }\n try {\n const result = await requestHandler.handle(request, { requestTimeout });\n return getCredentials(result.response).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n return async () => {\n try {\n return await provider();\n }\n finally {\n requestHandler.destroy?.();\n }\n };\n};\nconst validateToken = (token) => {\n if (token.includes(\"\\r\\n\")) {\n throw new CredentialsProviderError(\"Authorization token contains invalid \\\\r\\\\n sequence.\");\n }\n return token;\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nexport const checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { parseRfc3339DateTime } from \"@smithy/core/serde\";\nimport { sdkStreamMixin } from \"@smithy/core/serde\";\nexport function createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexport async function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n",
"export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
],
"mappings": ";wPAAA,oBACA,gBACA,gBACA,gCCHA,eAGA,IAAM,EAAqB,gBACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C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AAM,EAC5B,IAAM,EAAiB,kBAAgB,OAAO,CAAE,kBAAmB,EAAQ,SAAW,IAAK,CAAC,EACtF,EAAiB,EAAQ,SAAW,KACpC,EAAW,EAAa,SAAY,CACtC,IAAM,EAAU,EAAiB,CAAG,EACpC,GAAI,EACA,EAAQ,QAAQ,cAAgB,GAAe,MAAM,EAAG,SAAS,CAAS,GAAG,SAAS,CAAC,EAEtF,QAAI,EACL,EAAQ,QAAQ,cAAgB,EAAc,CAAK,EAEvD,GAAI,CACA,IAAM,EAAS,MAAM,EAAe,OAAO,EAAS,CAAE,gBAAe,CAAC,EACtE,OAAO,EAAe,EAAO,QAAQ,EAAE,KAAK,CAAC,IAAU,uBAAqB,EAAO,mBAAoB,GAAG,CAAC,EAE/G,MAAO,EAAG,CACN,MAAM,IAAI,2BAAyB,OAAO,CAAC,EAAG,CAAE,OAAQ,EAAQ,MAAO,CAAC,IAE7E,EAAQ,YAAc,EAAG,EAAQ,SAAW,IAAI,EACnD,MAAO,UAAY,CACf,GAAI,CACA,OAAO,MAAM,EAAS,SAE1B,CACI,EAAe,UAAU,KAI/B,EAAgB,CAAC,IAAU,CAC7B,GAAI,EAAM,SAAS;AAAA,CAAM,EACrB,MAAM,IAAI,2BAAyB,uDAAuD,EAE9F,OAAO",
"debugId": "BE44255880E4083364756E2164756E21",
"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": "F0E4279C3BBC2CA664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.33/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js"],
"sourcesContent": [
"const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require(\"@aws-sdk/core/client\");\nconst { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require(\"@smithy/core\");\nconst { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require(\"@smithy/core/client\");\nconst { Command: $Command } = require(\"@smithy/core/client\");\nexports.$Command = $Command;\nexports.__Client = Client;\nconst { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require(\"@smithy/core/config\");\nconst { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require(\"@smithy/core/endpoints\");\nconst { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require(\"@smithy/core/protocols\");\nconst { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require(\"@smithy/core/retry\");\nconst { TypeRegistry, getSchemaSerdePlugin } = require(\"@smithy/core/schema\");\nconst { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require(\"@smithy/core/serde\");\nconst { streamCollector, NodeHttpHandler } = require(\"@smithy/node-http-handler\");\nconst { AwsRestJsonProtocol } = require(\"@aws-sdk/core/protocols\");\nconst { Sha256 } = require(\"@smithy/core/checksum\");\n\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.32\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://portal.sso.{Region}.amazonaws.com\", i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 13, 3,\n 1, 4, r + 12,\n 2, 5, r + 12,\n 3, 8, 6,\n 4, 7, r + 11,\n 5, r + 9, r + 10,\n 4, 11, 9,\n 6, 10, r + 8,\n 7, r + 6, r + 7,\n 5, 12, r + 5,\n 6, r + 4, r + 5,\n 3, r + 1, 14,\n 4, r + 2, r + 3,\n]);\nconst bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n\nclass SSOServiceException extends ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n}\n\nclass InvalidRequestException extends SSOServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n}\nclass ResourceNotFoundException extends SSOServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends SSOServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass UnauthorizedException extends SSOServiceException {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n}\n\nconst _ATT = \"AccessTokenType\";\nconst _GRC = \"GetRoleCredentials\";\nconst _GRCR = \"GetRoleCredentialsRequest\";\nconst _GRCRe = \"GetRoleCredentialsResponse\";\nconst _IRE = \"InvalidRequestException\";\nconst _RC = \"RoleCredentials\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SAKT = \"SecretAccessKeyType\";\nconst _STT = \"SessionTokenType\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _UE = \"UnauthorizedException\";\nconst _aI = \"accountId\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _ex = \"expiration\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hQ = \"httpQuery\";\nconst _m = \"message\";\nconst _rC = \"roleCredentials\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sso\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\nconst n0 = \"com.amazonaws.sso\";\nconst _s_registry = TypeRegistry.for(_s);\nvar SSOServiceException$ = [-3, _s, \"SSOServiceException\", 0, [], []];\n_s_registry.registerError(SSOServiceException$, SSOServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nvar InvalidRequestException$ = [-3, n0, _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE,\n { [_e]: _c, [_hE]: 404 },\n [_m],\n [0]\n];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE,\n { [_e]: _c, [_hE]: 429 },\n [_m],\n [0]\n];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nvar UnauthorizedException$ = [-3, n0, _UE,\n { [_e]: _c, [_hE]: 401 },\n [_m],\n [0]\n];\nn0_registry.registerError(UnauthorizedException$, UnauthorizedException);\nconst errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar AccessTokenType = [0, n0, _ATT, 8, 0];\nvar SecretAccessKeyType = [0, n0, _SAKT, 8, 0];\nvar SessionTokenType = [0, n0, _STT, 8, 0];\nvar GetRoleCredentialsRequest$ = [3, n0, _GRCR,\n 0,\n [_rN, _aI, _aT],\n [[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3\n];\nvar GetRoleCredentialsResponse$ = [3, n0, _GRCRe,\n 0,\n [_rC],\n [[() => RoleCredentials$, 0]]\n];\nvar RoleCredentials$ = [3, n0, _RC,\n 0,\n [_aKI, _sAK, _sT, _ex],\n [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]\n];\nvar GetRoleCredentials$ = [9, n0, _GRC,\n { [_h]: [\"GET\", \"/federation/credentials\", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.sso\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"SWBPortalService\",\n },\n serviceId: config?.serviceId ?? \"SSO\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config);\n emitWarningIfUnsupportedVersion$1(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOClient extends Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nconst command = makeBuilder(commonParams, \"SWBPortalService\", \"SSOClient\", getEndpointPlugin);\nconst _ep0 = {};\nconst _mw0 = (Command, cs, config, o) => [];\n\nclass GetRoleCredentialsCommand extends command(_ep0, _mw0, \"GetRoleCredentials\", GetRoleCredentials$) {\n}\n\nconst commands = {\n GetRoleCredentialsCommand,\n};\nclass SSO extends SSOClient {\n}\ncreateAggregatedClient(commands, SSO);\n\nexports.GetRoleCredentials$ = GetRoleCredentials$;\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\nexports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;\nexports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.RoleCredentials$ = RoleCredentials$;\nexports.SSO = SSO;\nexports.SSOClient = SSOClient;\nexports.SSOServiceException = SSOServiceException;\nexports.SSOServiceException$ = SSOServiceException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.UnauthorizedException = UnauthorizedException;\nexports.UnauthorizedException$ = UnauthorizedException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";uVAAA,SAAQ,6BAAsB,qCAAiC,QAAmC,uCAAgC,8BAA4B,sCAAoC,0CAAwC,0BAAwB,2BAAyB,sBAAoB,uBAAqB,mBAAiB,sCAC7U,gBAAc,0CAAwC,iCAA+B,+BACrF,oBAAmB,oBAAkB,oBAAkB,cAAY,mCAAiC,6BAA2B,oCAAkC,+BAA6B,UAAQ,eAAa,gCACnN,QAAS,QAGjB,IAAQ,6BAA2B,aAAY,yCAAuC,8CAA4C,8BAA4B,mCAAiC,6BACvL,yBAAuB,iBAAe,kBAAgB,2BAAyB,yBAAuB,2BACtG,YAAU,wCAAsC,mCAAiC,gCACjF,sBAAoB,kCAAgC,mCAAiC,sBAAoB,wBACzG,eAAc,8BACd,4BAA0B,qBAAmB,8CAC7C,UAAQ,YAAU,YAAU,cAAY,6BACxC,mBAAiB,0BACjB,8BACA,eAEF,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,MAAO,CACH,UAAW,GAAiB,CAAO,EAAE,UACrC,OAAQ,MAAM,EAAkB,EAAO,MAAM,E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IAAI,GAAoB,KAAK,MAAM,CAAC,EACzD,KAAK,gBAAgB,IAAI,GAAgB,KAAK,MAAM,CAAC,EACrD,KAAK,gBAAgB,IAAI,GAA4B,KAAK,MAAM,CAAC,EACjE,KAAK,gBAAgB,IAAI,GAAuC,KAAK,OAAQ,CACzE,iCAAkC,GAClC,+BAAgC,MAAO,IAAW,IAAI,GAA8B,CAChF,iBAAkB,EAAO,WAC7B,CAAC,CACL,CAAC,CAAC,EACF,KAAK,gBAAgB,IAAI,GAAqB,KAAK,MAAM,CAAC,EAE9D,OAAO,EAAG,CACN,MAAM,QAAQ,EAEtB,CAEA,IAAM,GAAU,GAAY,GAAc,mBAAoB,YAAa,EAAiB,EACtF,GAAO,CAAC,EACR,GAAO,CAAC,EAAS,EAAI,EAAQ,IAAM,CAAC,EAE1C,MAAM,UAAkC,GAAQ,GAAM,GAAM,qBAAsB,EAAmB,CAAE,CACvG,CAEA,IAAM,GAAW,CACb,2BACJ,EACA,MAAM,UAAY,CAAU,CAC5B,CACA,GAAuB,GAAU,CAAG,EAGpC,IAAQ,EAA4B,EASpC,IAAQ,EAAY",
"debugId": "BA2B520DA9FCAB9764756E2164756E21",
"names": []
}
{
"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,MAAM,EAGrB,EAA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M",
"debugId": "7EB630634152B9A564756E2164756E21",
"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/database/migration/20260410174513_workspace-name.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260410174513_workspace-name\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_workspace\\` (\n \\`id\\` text PRIMARY KEY,\n \\`type\\` text NOT NULL,\n \\`name\\` text DEFAULT '' NOT NULL,\n \\`branch\\` text,\n \\`directory\\` text,\n \\`extra\\` text,\n \\`project_id\\` text NOT NULL,\n CONSTRAINT \\`fk_workspace_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `INSERT INTO \\`__new_workspace\\`(\\`id\\`, \\`type\\`, \\`branch\\`, \\`name\\`, \\`directory\\`, \\`extra\\`, \\`project_id\\`) SELECT \\`id\\`, \\`type\\`, \\`branch\\`, \\`name\\`, \\`directory\\`, \\`extra\\`, \\`project_id\\` FROM \\`workspace\\`;`,\n )\n yield* tx.run(`DROP TABLE \\`workspace\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_workspace\\` RENAME TO \\`workspace\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,4aAWb,EACD,MAAO,EAAG,IACR,+LACF,EACA,MAAO,EAAG,IAAI,yBAA2B,EACzC,MAAO,EAAG,IAAI,sDAA0D,EACxE,MAAO,EAAG,IAAI,yBAAyB,EACxC,EAEL",
"debugId": "E9C8A873C089490864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260323234822_events.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260323234822_events\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`event_sequence\\` (\n \\`aggregate_id\\` text PRIMARY KEY,\n \\`seq\\` integer NOT NULL\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`event\\` (\n \\`id\\` text PRIMARY KEY,\n \\`aggregate_id\\` text NOT NULL,\n \\`seq\\` integer NOT NULL,\n \\`type\\` text NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_event_aggregate_id_event_sequence_aggregate_id_fk\\` FOREIGN KEY (\\`aggregate_id\\`) REFERENCES \\`event_sequence\\`(\\`aggregate_id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wBACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6IAKb,EACD,MAAO,EAAG,IAAI,8YASb,EACF,EAEL",
"debugId": "05ADCF5D4A324CE764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "819C6E39D3A7D96A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "AC10D55951EA753D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "A43E39744A2E699A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "E89F225060B7356264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1D053DB7BAE20F8264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260303231226_add_workspace_fields.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260303231226_add_workspace_fields\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`type\\` text NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`name\\` text;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`directory\\` text;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` ADD \\`extra\\` text;`)\n yield* tx.run(`ALTER TABLE \\`workspace\\` DROP COLUMN \\`config\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,mDAAuD,EACrE,MAAO,EAAG,IAAI,0CAA8C,EAC5D,MAAO,EAAG,IAAI,+CAAmD,EACjE,MAAO,EAAG,IAAI,2CAA+C,EAC7D,MAAO,EAAG,IAAI,+CAAmD,EAClE,EAEL",
"debugId": "DC2D3C9B72C5D6E764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-error.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-io.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-config.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/oauth.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/auth-errors.js", "../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-util.js"],
"sourcesContent": [
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_error_exports = {};\n__export(token_error_exports, {\n VercelOidcTokenError: () => VercelOidcTokenError\n});\nmodule.exports = __toCommonJS(token_error_exports);\nclass VercelOidcTokenError extends Error {\n constructor(message, cause) {\n super(message);\n this.name = \"VercelOidcTokenError\";\n this.cause = cause;\n }\n toString() {\n if (this.cause) {\n return `${this.name}: ${this.message}: ${this.cause}`;\n }\n return `${this.name}: ${this.message}`;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n VercelOidcTokenError\n});\n",
"\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_io_exports = {};\n__export(token_io_exports, {\n findRootDir: () => findRootDir,\n getUserDataDir: () => getUserDataDir\n});\nmodule.exports = __toCommonJS(token_io_exports);\nvar import_path = __toESM(require(\"path\"));\nvar import_fs = __toESM(require(\"fs\"));\nvar import_os = __toESM(require(\"os\"));\nvar import_token_error = require(\"./token-error\");\nfunction findRootDir() {\n try {\n let dir = process.cwd();\n while (dir !== import_path.default.dirname(dir)) {\n const pkgPath = import_path.default.join(dir, \".vercel\");\n if (import_fs.default.existsSync(pkgPath)) {\n return dir;\n }\n dir = import_path.default.dirname(dir);\n }\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(\n \"Token refresh only supported in node server environments\"\n );\n }\n return null;\n}\nfunction getUserDataDir() {\n if (process.env.XDG_DATA_HOME) {\n return process.env.XDG_DATA_HOME;\n }\n switch (import_os.default.platform()) {\n case \"darwin\":\n return import_path.default.join(import_os.default.homedir(), \"Library/Application Support\");\n case \"linux\":\n return import_path.default.join(import_os.default.homedir(), \".local/share\");\n case \"win32\":\n if (process.env.LOCALAPPDATA) {\n return process.env.LOCALAPPDATA;\n }\n return null;\n default:\n return null;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n findRootDir,\n getUserDataDir\n});\n",
"\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_config_exports = {};\n__export(auth_config_exports, {\n isValidAccessToken: () => isValidAccessToken,\n readAuthConfig: () => readAuthConfig,\n writeAuthConfig: () => writeAuthConfig\n});\nmodule.exports = __toCommonJS(auth_config_exports);\nvar fs = __toESM(require(\"fs\"));\nvar path = __toESM(require(\"path\"));\nvar import_token_util = require(\"./token-util\");\nfunction getAuthConfigPath() {\n const dataDir = (0, import_token_util.getVercelDataDir)();\n if (!dataDir) {\n throw new Error(\n `Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`\n );\n }\n return path.join(dataDir, \"auth.json\");\n}\nfunction readAuthConfig() {\n try {\n const authPath = getAuthConfigPath();\n if (!fs.existsSync(authPath)) {\n return null;\n }\n const content = fs.readFileSync(authPath, \"utf8\");\n if (!content) {\n return null;\n }\n return JSON.parse(content);\n } catch (error) {\n return null;\n }\n}\nfunction writeAuthConfig(config) {\n const authPath = getAuthConfigPath();\n const authDir = path.dirname(authPath);\n if (!fs.existsSync(authDir)) {\n fs.mkdirSync(authDir, { mode: 504, recursive: true });\n }\n fs.writeFileSync(authPath, JSON.stringify(config, null, 2), { mode: 384 });\n}\nfunction isValidAccessToken(authConfig, expirationBufferMs = 0) {\n if (!authConfig.token)\n return false;\n if (typeof authConfig.expiresAt !== \"number\")\n return true;\n const nowInSeconds = Math.floor(Date.now() / 1e3);\n const bufferInSeconds = expirationBufferMs / 1e3;\n return authConfig.expiresAt >= nowInSeconds + bufferInSeconds;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n isValidAccessToken,\n readAuthConfig,\n writeAuthConfig\n});\n",
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar oauth_exports = {};\n__export(oauth_exports, {\n processTokenResponse: () => processTokenResponse,\n refreshTokenRequest: () => refreshTokenRequest\n});\nmodule.exports = __toCommonJS(oauth_exports);\nvar import_os = require(\"os\");\nconst VERCEL_ISSUER = \"https://vercel.com\";\nconst VERCEL_CLI_CLIENT_ID = \"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp\";\nconst userAgent = `@vercel/oidc node-${process.version} ${(0, import_os.platform)()} (${(0, import_os.arch)()}) ${(0, import_os.hostname)()}`;\nlet _tokenEndpoint = null;\nasync function getTokenEndpoint() {\n if (_tokenEndpoint) {\n return _tokenEndpoint;\n }\n const discoveryUrl = `${VERCEL_ISSUER}/.well-known/openid-configuration`;\n const response = await fetch(discoveryUrl, {\n headers: { \"user-agent\": userAgent }\n });\n if (!response.ok) {\n throw new Error(\"Failed to discover OAuth endpoints\");\n }\n const metadata = await response.json();\n if (!metadata || typeof metadata.token_endpoint !== \"string\") {\n throw new Error(\"Invalid OAuth discovery response\");\n }\n const endpoint = metadata.token_endpoint;\n _tokenEndpoint = endpoint;\n return endpoint;\n}\nasync function refreshTokenRequest(options) {\n const tokenEndpoint = await getTokenEndpoint();\n return await fetch(tokenEndpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"user-agent\": userAgent\n },\n body: new URLSearchParams({\n client_id: VERCEL_CLI_CLIENT_ID,\n grant_type: \"refresh_token\",\n ...options\n })\n });\n}\nasync function processTokenResponse(response) {\n const json = await response.json();\n if (!response.ok) {\n const errorMsg = typeof json === \"object\" && json && \"error\" in json ? String(json.error) : \"Token refresh failed\";\n return [new Error(errorMsg)];\n }\n if (typeof json !== \"object\" || json === null) {\n return [new Error(\"Invalid token response\")];\n }\n if (typeof json.access_token !== \"string\") {\n return [new Error(\"Missing access_token in response\")];\n }\n if (json.token_type !== \"Bearer\") {\n return [new Error(\"Invalid token_type in response\")];\n }\n if (typeof json.expires_in !== \"number\") {\n return [new Error(\"Missing expires_in in response\")];\n }\n return [null, json];\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n processTokenResponse,\n refreshTokenRequest\n});\n",
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_errors_exports = {};\n__export(auth_errors_exports, {\n AccessTokenMissingError: () => AccessTokenMissingError,\n RefreshAccessTokenFailedError: () => RefreshAccessTokenFailedError\n});\nmodule.exports = __toCommonJS(auth_errors_exports);\nclass AccessTokenMissingError extends Error {\n constructor() {\n super(\n \"No authentication found. Please log in with the Vercel CLI (vercel login).\"\n );\n this.name = \"AccessTokenMissingError\";\n }\n}\nclass RefreshAccessTokenFailedError extends Error {\n constructor(cause) {\n super(\"Failed to refresh authentication token.\", { cause });\n this.name = \"RefreshAccessTokenFailedError\";\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AccessTokenMissingError,\n RefreshAccessTokenFailedError\n});\n",
"\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_util_exports = {};\n__export(token_util_exports, {\n assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,\n findProjectInfo: () => findProjectInfo,\n getTokenPayload: () => getTokenPayload,\n getVercelDataDir: () => getVercelDataDir,\n getVercelOidcToken: () => getVercelOidcToken,\n getVercelToken: () => getVercelToken,\n isExpired: () => isExpired,\n loadToken: () => loadToken,\n saveToken: () => saveToken\n});\nmodule.exports = __toCommonJS(token_util_exports);\nvar path = __toESM(require(\"path\"));\nvar fs = __toESM(require(\"fs\"));\nvar import_token_error = require(\"./token-error\");\nvar import_token_io = require(\"./token-io\");\nvar import_auth_config = require(\"./auth-config\");\nvar import_oauth = require(\"./oauth\");\nvar import_auth_errors = require(\"./auth-errors\");\nfunction getVercelDataDir() {\n const vercelFolder = \"com.vercel.cli\";\n const dataDir = (0, import_token_io.getUserDataDir)();\n if (!dataDir) {\n return null;\n }\n return path.join(dataDir, vercelFolder);\n}\nasync function getVercelToken(options) {\n const authConfig = (0, import_auth_config.readAuthConfig)();\n if (!authConfig?.token) {\n throw new import_auth_errors.AccessTokenMissingError();\n }\n if ((0, import_auth_config.isValidAccessToken)(authConfig, options?.expirationBufferMs)) {\n return authConfig.token;\n }\n if (!authConfig.refreshToken) {\n (0, import_auth_config.writeAuthConfig)({});\n throw new import_auth_errors.RefreshAccessTokenFailedError(\"No refresh token available\");\n }\n try {\n const tokenResponse = await (0, import_oauth.refreshTokenRequest)({\n refresh_token: authConfig.refreshToken\n });\n const [tokensError, tokens] = await (0, import_oauth.processTokenResponse)(tokenResponse);\n if (tokensError || !tokens) {\n (0, import_auth_config.writeAuthConfig)({});\n throw new import_auth_errors.RefreshAccessTokenFailedError(tokensError);\n }\n const updatedConfig = {\n token: tokens.access_token,\n expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in\n };\n if (tokens.refresh_token) {\n updatedConfig.refreshToken = tokens.refresh_token;\n }\n (0, import_auth_config.writeAuthConfig)(updatedConfig);\n return updatedConfig.token;\n } catch (error) {\n (0, import_auth_config.writeAuthConfig)({});\n if (error instanceof import_auth_errors.AccessTokenMissingError || error instanceof import_auth_errors.RefreshAccessTokenFailedError) {\n throw error;\n }\n throw new import_auth_errors.RefreshAccessTokenFailedError(error);\n }\n}\nasync function getVercelOidcToken(authToken, projectId, teamId) {\n const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : \"\"}`;\n const res = await fetch(url, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${authToken}`\n }\n });\n if (!res.ok) {\n throw new import_token_error.VercelOidcTokenError(\n `Failed to refresh OIDC token: ${res.statusText}`\n );\n }\n const tokenRes = await res.json();\n assertVercelOidcTokenResponse(tokenRes);\n return tokenRes;\n}\nfunction assertVercelOidcTokenResponse(res) {\n if (!res || typeof res !== \"object\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again\"\n );\n }\n if (!(\"token\" in res) || typeof res.token !== \"string\") {\n throw new TypeError(\n \"Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again\"\n );\n }\n}\nfunction findProjectInfo() {\n const dir = (0, import_token_io.findRootDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find project root directory. Have you linked your project with `vc link?`\"\n );\n }\n const prjPath = path.join(dir, \".vercel\", \"project.json\");\n if (!fs.existsSync(prjPath)) {\n throw new import_token_error.VercelOidcTokenError(\n \"project.json not found, have you linked your project with `vc link?`\"\n );\n }\n const prj = JSON.parse(fs.readFileSync(prjPath, \"utf8\"));\n if (typeof prj.projectId !== \"string\" && typeof prj.orgId !== \"string\") {\n throw new TypeError(\n \"Expected a string-valued projectId property. Try running `vc link` to re-link your project.\"\n );\n }\n return { projectId: prj.projectId, teamId: prj.orgId };\n}\nfunction saveToken(token, projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n const tokenJson = JSON.stringify(token);\n fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });\n fs.writeFileSync(tokenPath, tokenJson);\n fs.chmodSync(tokenPath, 432);\n return;\n}\nfunction loadToken(projectId) {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\n \"Unable to find user data directory. Please reach out to Vercel support.\"\n );\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n if (!fs.existsSync(tokenPath)) {\n return null;\n }\n const token = JSON.parse(fs.readFileSync(tokenPath, \"utf8\"));\n assertVercelOidcTokenResponse(token);\n return token;\n}\nfunction getTokenPayload(token) {\n const tokenParts = token.split(\".\");\n if (tokenParts.length !== 3) {\n throw new import_token_error.VercelOidcTokenError(\n \"Invalid token. Please run `vc env pull` and try again\"\n );\n }\n const base64 = tokenParts[1].replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64.padEnd(\n base64.length + (4 - base64.length % 4) % 4,\n \"=\"\n );\n return JSON.parse(Buffer.from(padded, \"base64\").toString(\"utf8\"));\n}\nfunction isExpired(token, bufferMs = 0) {\n return token.exp * 1e3 < Date.now() + bufferMs;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n assertVercelOidcTokenResponse,\n findProjectInfo,\n getTokenPayload,\n getVercelDataDir,\n getVercelOidcToken,\n getVercelToken,\n isExpired,\n loadToken,\n saveToken\n});\n"
],
"mappings": ";6EACA,IAAuB,eAAnB,EAC0B,yBAA1B,GAC2B,oBAA3B,IADmB,OAEnB,GAAe,OAAO,UAAU,eAChC,GAAW,CAAC,EAAQ,IAAQ,CAC9B,QAAS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AET,IAAM,EAAQ,KAAK,MAAM,EAAG,aAAa,EAAW,MAAM,CAAC,EAE3D,OADA,EAA8B,CAAK,EAC5B,EAET,SAAS,EAAe,CAAC,EAAO,CAC9B,IAAM,EAAa,EAAM,MAAM,GAAG,EAClC,GAAI,EAAW,SAAW,EACxB,MAAM,IAAI,EAAmB,qBAC3B,uDACF,EAEF,IAAM,EAAS,EAAW,GAAG,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAC3D,EAAS,EAAO,OACpB,EAAO,QAAU,EAAI,EAAO,OAAS,GAAK,EAC1C,GACF,EACA,OAAO,KAAK,MAAM,OAAO,KAAK,EAAQ,QAAQ,EAAE,SAAS,MAAM,CAAC,EAElE,SAAS,EAAS,CAAC,EAAO,EAAW,EAAG,CACtC,OAAO,EAAM,IAAM,KAAM,KAAK,IAAI,EAAI",
"debugId": "8EDE55484742A90264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.59/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
"debugId": "E7DD7399139E839964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260511000411_data_migration_state.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260511000411_data_migration_state\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`data_migration\\` (\n \\`name\\` text PRIMARY KEY,\n \\`time_completed\\` integer NOT NULL\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gJAKb,EACF,EAEL",
"debugId": "9F78764382697C9664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260605003541_add_session_context_snapshot.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260605003541_add_session_context_snapshot\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_context_epoch\\` (\n \\`session_id\\` text PRIMARY KEY,\n \\`baseline\\` text NOT NULL,\n \\`snapshot\\` text NOT NULL,\n \\`baseline_seq\\` integer NOT NULL,\n \\`replacement_seq\\` integer,\n \\`revision\\` integer DEFAULT 0 NOT NULL,\n CONSTRAINT \\`fk_session_context_epoch_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,8CACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gdAUb,EACF,EAEL",
"debugId": "7CF0595630FD427164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js"],
"sourcesContent": [
"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nconst fs_1 = require(\"fs\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n for (const path of paths) {\n try {\n const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-linux.js.map"
],
"mappings": ";yHACA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAK5B,IAAM,UACA,MACN,eAAe,CAAY,EAAG,CAC1B,IAAM,EAAQ,CAAC,kBAAmB,0BAA0B,EAC5D,QAAW,KAAQ,EACf,GAAI,CAEA,OADe,MAAM,EAAK,SAAS,SAAS,EAAM,CAAE,SAAU,MAAO,CAAC,GACxD,KAAK,EAEvB,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAGzD,OAEI,eAAe",
"debugId": "AC84B844B9F45D1664756E2164756E21",
"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": ["../../node_modules/.bun/@ai-sdk+groq@3.0.31+d6123d32214422cb/node_modules/@ai-sdk/groq/dist/index.mjs"],
"sourcesContent": [
"// src/groq-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/groq-chat-language-model.ts\nimport {\n InvalidResponseDataError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n isParsableJson,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-groq-usage.ts\nfunction convertGroqUsage(usage) {\n var _a, _b, _c, _d;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_d = (_c = usage.completion_tokens_details) == null ? void 0 : _c.reasoning_tokens) != null ? _d : void 0;\n const textTokens = reasoningTokens != null ? completionTokens - reasoningTokens : completionTokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: textTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-groq-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToGroqChatMessages(prompt) {\n var _a;\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n if (content.length === 1 && content[0].type === \"text\") {\n messages.push({ role: \"user\", content: content[0].text });\n break;\n }\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (!part.mediaType.startsWith(\"image/\")) {\n throw new UnsupportedFunctionalityError({\n functionality: \"Non-image file content parts\"\n });\n }\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: {\n url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`\n }\n };\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n let reasoning = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n // groq supports reasoning for tool-calls in multi-turn conversations\n // https://github.com/vercel/ai/issues/7860\n case \"reasoning\": {\n reasoning += part.text;\n break;\n }\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n ...reasoning.length > 0 ? { reasoning } : null,\n ...toolCalls.length > 0 ? { tool_calls: toolCalls } : null\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/groq-chat-options.ts\nimport { z } from \"zod/v4\";\nvar groqLanguageModelOptions = z.object({\n reasoningFormat: z.enum([\"parsed\", \"raw\", \"hidden\"]).optional(),\n /**\n * Specifies the reasoning effort level for model inference.\n * @see https://console.groq.com/docs/reasoning#reasoning-effort\n */\n reasoningEffort: z.enum([\"none\", \"default\", \"low\", \"medium\", \"high\"]).optional(),\n /**\n * Whether to enable parallel function calling during tool use. Default to true.\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * A unique identifier representing your end-user, which can help OpenAI to\n * monitor and detect abuse. Learn more.\n */\n user: z.string().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n * When true, the model uses constrained decoding to guarantee schema compliance.\n * Only used when structured outputs are enabled and a schema is provided.\n *\n * @default true\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Service tier for the request.\n * - 'on_demand': Default tier with consistent performance and fairness\n * - 'flex': Higher throughput tier optimized for workloads that can handle occasional request failures\n * - 'auto': Uses on_demand rate limits, then falls back to flex tier if exceeded\n *\n * @default 'on_demand'\n */\n serviceTier: z.enum([\"on_demand\", \"flex\", \"auto\"]).optional()\n});\n\n// src/groq-error.ts\nimport { z as z2 } from \"zod/v4\";\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nvar groqErrorDataSchema = z2.object({\n error: z2.object({\n message: z2.string(),\n type: z2.string()\n })\n});\nvar groqFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: groqErrorDataSchema,\n errorToMessage: (data) => data.error.message\n});\n\n// src/groq-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\n\n// src/groq-browser-search-models.ts\nvar BROWSER_SEARCH_SUPPORTED_MODELS = [\n \"openai/gpt-oss-20b\",\n \"openai/gpt-oss-120b\"\n];\nfunction isBrowserSearchSupportedModel(modelId) {\n return BROWSER_SEARCH_SUPPORTED_MODELS.includes(modelId);\n}\nfunction getSupportedModelsString() {\n return BROWSER_SEARCH_SUPPORTED_MODELS.join(\", \");\n}\n\n// src/groq-prepare-tools.ts\nfunction prepareTools({\n tools,\n toolChoice,\n modelId\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const groqTools2 = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n if (tool.id === \"groq.browser_search\") {\n if (!isBrowserSearchSupportedModel(modelId)) {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`,\n details: `Browser search is only supported on the following models: ${getSupportedModelsString()}. Current model: ${modelId}`\n });\n } else {\n groqTools2.push({\n type: \"browser_search\"\n });\n }\n } else {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n }\n } else {\n groqTools2.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: groqTools2, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n case \"required\":\n return { tools: groqTools2, toolChoice: type, toolWarnings };\n case \"tool\":\n return {\n tools: groqTools2,\n toolChoice: {\n type: \"function\",\n function: {\n name: toolChoice.toolName\n }\n },\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/map-groq-finish-reason.ts\nfunction mapGroqFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n return \"length\";\n case \"content_filter\":\n return \"content-filter\";\n case \"function_call\":\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/groq-chat-language-model.ts\nvar GroqChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"image/*\": [/^https?:\\/\\/.*$/]\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n stream,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b, _c;\n const warnings = [];\n const groqOptions = await parseProviderOptions({\n provider: \"groq\",\n providerOptions,\n schema: groqLanguageModelOptions\n });\n const structuredOutputs = (_a = groqOptions == null ? void 0 : groqOptions.structuredOutputs) != null ? _a : true;\n const strictJsonSchema = (_b = groqOptions == null ? void 0 : groqOptions.strictJsonSchema) != null ? _b : true;\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && !structuredOutputs) {\n warnings.push({\n type: \"unsupported\",\n feature: \"responseFormat\",\n details: \"JSON response format schema is only supported with structuredOutputs\"\n });\n }\n const {\n tools: groqTools2,\n toolChoice: groqToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice, modelId: this.modelId });\n return {\n args: {\n // model id:\n model: this.modelId,\n // model specific settings:\n user: groqOptions == null ? void 0 : groqOptions.user,\n parallel_tool_calls: groqOptions == null ? void 0 : groqOptions.parallelToolCalls,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n stop: stopSequences,\n seed,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && responseFormat.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_c = responseFormat.name) != null ? _c : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // provider options:\n reasoning_format: groqOptions == null ? void 0 : groqOptions.reasoningFormat,\n reasoning_effort: groqOptions == null ? void 0 : groqOptions.reasoningEffort,\n service_tier: groqOptions == null ? void 0 : groqOptions.serviceTier,\n // messages:\n messages: convertToGroqChatMessages(prompt),\n // tools:\n tools: groqTools2,\n tool_choice: groqToolChoice\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b;\n const { args, warnings } = await this.getArgs({\n ...options,\n stream: false\n });\n const body = JSON.stringify(args);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n groqChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n const reasoning = choice.message.reasoning;\n if (reasoning != null && reasoning.length > 0) {\n content.push({\n type: \"reasoning\",\n text: reasoning\n });\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: (_a = toolCall.id) != null ? _a : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: (_b = choice.finish_reason) != null ? _b : void 0\n },\n usage: convertGroqUsage(response.usage),\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n request: { body }\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs({ ...options, stream: true });\n const body = JSON.stringify({ ...args, stream: true });\n const { responseHeaders, value: response } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body: {\n ...args,\n stream: true\n },\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(groqChatChunkSchema),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const toolCalls = [];\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let isActiveText = false;\n let isActiveReasoning = false;\n let providerMetadata;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (\"error\" in value) {\n finishReason = {\n unified: \"error\",\n raw: void 0\n };\n controller.enqueue({ type: \"error\", error: value.error });\n return;\n }\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (((_a = value.x_groq) == null ? void 0 : _a.usage) != null) {\n usage = value.x_groq.usage;\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapGroqFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n if (delta.reasoning != null && delta.reasoning.length > 0) {\n if (!isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-start\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = true;\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: \"reasoning-0\",\n delta: delta.reasoning\n });\n }\n if (delta.content != null && delta.content.length > 0) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n if (!isActiveText) {\n controller.enqueue({ type: \"text-start\", id: \"txt-0\" });\n isActiveText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"txt-0\",\n delta: delta.content\n });\n }\n if (delta.tool_calls != null) {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: \"reasoning-0\"\n });\n isActiveReasoning = false;\n }\n for (const toolCallDelta of delta.tool_calls) {\n const index = toolCallDelta.index;\n if (toolCalls[index] == null) {\n if (toolCallDelta.type !== \"function\") {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function' type.`\n });\n }\n if (toolCallDelta.id == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'id' to be a string.`\n });\n }\n if (((_b = toolCallDelta.function) == null ? void 0 : _b.name) == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function.name' to be a string.`\n });\n }\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallDelta.id,\n toolName: toolCallDelta.function.name\n });\n toolCalls[index] = {\n id: toolCallDelta.id,\n type: \"function\",\n function: {\n name: toolCallDelta.function.name,\n arguments: (_c = toolCallDelta.function.arguments) != null ? _c : \"\"\n },\n hasFinished: false\n };\n const toolCall2 = toolCalls[index];\n if (((_d = toolCall2.function) == null ? void 0 : _d.name) != null && ((_e = toolCall2.function) == null ? void 0 : _e.arguments) != null) {\n if (toolCall2.function.arguments.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall2.id,\n delta: toolCall2.function.arguments\n });\n }\n if (isParsableJson(toolCall2.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall2.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_f = toolCall2.id) != null ? _f : generateId(),\n toolName: toolCall2.function.name,\n input: toolCall2.function.arguments\n });\n toolCall2.hasFinished = true;\n }\n }\n continue;\n }\n const toolCall = toolCalls[index];\n if (toolCall.hasFinished) {\n continue;\n }\n if (((_g = toolCallDelta.function) == null ? void 0 : _g.arguments) != null) {\n toolCall.function.arguments += (_i = (_h = toolCallDelta.function) == null ? void 0 : _h.arguments) != null ? _i : \"\";\n }\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall.id,\n delta: (_j = toolCallDelta.function.arguments) != null ? _j : \"\"\n });\n if (((_k = toolCall.function) == null ? void 0 : _k.name) != null && ((_l = toolCall.function) == null ? void 0 : _l.arguments) != null && isParsableJson(toolCall.function.arguments)) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: (_m = toolCall.id) != null ? _m : generateId(),\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n toolCall.hasFinished = true;\n }\n }\n }\n },\n flush(controller) {\n if (isActiveReasoning) {\n controller.enqueue({ type: \"reasoning-end\", id: \"reasoning-0\" });\n }\n if (isActiveText) {\n controller.enqueue({ type: \"text-end\", id: \"txt-0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertGroqUsage(usage),\n ...providerMetadata != null ? { providerMetadata } : {}\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nvar groqChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string().nullish(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n});\nvar groqChatChunkSchema = z3.union([\n z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n content: z3.string().nullish(),\n reasoning: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n index: z3.number(),\n id: z3.string().nullish(),\n type: z3.literal(\"function\").optional(),\n function: z3.object({\n name: z3.string().nullish(),\n arguments: z3.string().nullish()\n })\n })\n ).nullish()\n }).nullish(),\n finish_reason: z3.string().nullable().optional(),\n index: z3.number()\n })\n ),\n x_groq: z3.object({\n usage: z3.object({\n prompt_tokens: z3.number().nullish(),\n completion_tokens: z3.number().nullish(),\n total_tokens: z3.number().nullish(),\n prompt_tokens_details: z3.object({\n cached_tokens: z3.number().nullish()\n }).nullish(),\n completion_tokens_details: z3.object({\n reasoning_tokens: z3.number().nullish()\n }).nullish()\n }).nullish()\n }).nullish()\n }),\n groqErrorDataSchema\n]);\n\n// src/groq-transcription-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertBase64ToUint8Array,\n createJsonResponseHandler as createJsonResponseHandler2,\n mediaTypeToExtension,\n parseProviderOptions as parseProviderOptions2,\n postFormDataToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/groq-transcription-options.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar groqTranscriptionModelOptions = lazySchema(\n () => zodSchema(\n z4.object({\n language: z4.string().nullish(),\n prompt: z4.string().nullish(),\n responseFormat: z4.string().nullish(),\n temperature: z4.number().min(0).max(1).nullish(),\n timestampGranularities: z4.array(z4.string()).nullish()\n })\n )\n);\n\n// src/groq-transcription-model.ts\nvar GroqTranscriptionModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n audio,\n mediaType,\n providerOptions\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const groqOptions = await parseProviderOptions2({\n provider: \"groq\",\n providerOptions,\n schema: groqTranscriptionModelOptions\n });\n const formData = new FormData();\n const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([convertBase64ToUint8Array(audio)]);\n formData.append(\"model\", this.modelId);\n const fileExtension = mediaTypeToExtension(mediaType);\n formData.append(\n \"file\",\n new File([blob], \"audio\", { type: mediaType }),\n `audio.${fileExtension}`\n );\n if (groqOptions) {\n const transcriptionModelOptions = {\n language: (_a = groqOptions.language) != null ? _a : void 0,\n prompt: (_b = groqOptions.prompt) != null ? _b : void 0,\n response_format: (_c = groqOptions.responseFormat) != null ? _c : void 0,\n temperature: (_d = groqOptions.temperature) != null ? _d : void 0,\n timestamp_granularities: (_e = groqOptions.timestampGranularities) != null ? _e : void 0\n };\n for (const key in transcriptionModelOptions) {\n const value = transcriptionModelOptions[key];\n if (value !== void 0) {\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${key}[]`, String(item));\n }\n } else {\n formData.append(key, String(value));\n }\n }\n }\n }\n return {\n formData,\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { formData, warnings } = await this.getArgs(options);\n const {\n value: response,\n responseHeaders,\n rawValue: rawResponse\n } = await postFormDataToApi({\n url: this.config.url({\n path: \"/audio/transcriptions\",\n modelId: this.modelId\n }),\n headers: combineHeaders2(this.config.headers(), options.headers),\n formData,\n failedResponseHandler: groqFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n groqTranscriptionResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n return {\n text: response.text,\n segments: (_e = (_d = response.segments) == null ? void 0 : _d.map((segment) => ({\n text: segment.text,\n startSecond: segment.start,\n endSecond: segment.end\n }))) != null ? _e : [],\n language: (_f = response.language) != null ? _f : void 0,\n durationInSeconds: (_g = response.duration) != null ? _g : void 0,\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders,\n body: rawResponse\n }\n };\n }\n};\nvar groqTranscriptionResponseSchema = z5.object({\n text: z5.string(),\n x_groq: z5.object({\n id: z5.string()\n }),\n // additional properties are returned when `response_format: 'verbose_json'` is\n task: z5.string().nullish(),\n language: z5.string().nullish(),\n duration: z5.number().nullish(),\n segments: z5.array(\n z5.object({\n id: z5.number(),\n seek: z5.number(),\n start: z5.number(),\n end: z5.number(),\n text: z5.string(),\n tokens: z5.array(z5.number()),\n temperature: z5.number(),\n avg_logprob: z5.number(),\n compression_ratio: z5.number(),\n no_speech_prob: z5.number()\n })\n ).nullish()\n});\n\n// src/tool/browser-search.ts\nimport { createProviderToolFactory } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar browserSearch = createProviderToolFactory({\n id: \"groq.browser_search\",\n inputSchema: z6.object({})\n});\n\n// src/groq-tools.ts\nvar groqTools = {\n browserSearch\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.31\" : \"0.0.0-test\";\n\n// src/groq-provider.ts\nfunction createGroq(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.groq.com/openai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"GROQ_API_KEY\",\n description: \"Groq\"\n })}`,\n ...options.headers\n },\n `ai-sdk/groq/${VERSION}`\n );\n const createChatModel = (modelId) => new GroqChatLanguageModel(modelId, {\n provider: \"groq.chat\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createLanguageModel = (modelId) => {\n if (new.target) {\n throw new Error(\n \"The Groq model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n const createTranscriptionModel = (modelId) => {\n return new GroqTranscriptionModel(modelId, {\n provider: \"groq.transcription\",\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n };\n const provider = function(modelId) {\n return createLanguageModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n provider.transcription = createTranscriptionModel;\n provider.transcriptionModel = createTranscriptionModel;\n provider.tools = groqTools;\n return provider;\n}\nvar groq = createGroq();\nexport {\n VERSION,\n browserSearch,\n createGroq,\n groq\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qXA0BA,cAAS,MAAgB,MAAC,OAAO,CAC/B,IAAI,EAAI,EAAI,EAAI,EAChB,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK,EACjE,GAAmB,GAAM,EAAK,EAAM,4BAA8B,KAAY,OAAI,EAAG,mBAAqB,KAAO,EAAU,OAC3H,EAAa,GAAmB,KAAO,EAAmB,EAAkB,EAClF,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EACT,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EACN,UAAW,CACb,EACA,IAAK,CACP,EAQF,SAAS,EAAyB,CAAC,EAAQ,CACzC,IAAI,EACJ,IAAM,EAAW,CAAC,EAClB,QAAa,OAAM,aAAa,EAC9B,OAAQ,OACD,SAAU,CACb,EAAS,KAAK,CAAE,KAAM,SAAU,SAAQ,CAAC,EACzC,KACF,KACK,OAAQ,CACX,GAAI,EAAQ,SAAW,GAAK,EAAQ,GAAG,OAAS,OAAQ,CACtD,EAAS,KAAK,CAAE,KAAM,OAAQ,QAAS,EAAQ,GAAG,IAAK,CAAC,EACxD,MAEF,EAAS,KAAK,CACZ,KAAM,OACN,QAAS,EAAQ,IAAI,CAAC,IAAS,C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KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAEjE,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,GACV,EAET,IAAI,GAAO,GAAW",
"debugId": "E51192AF86AB7F4664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js", "../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js"],
"sourcesContent": [
"class ParseError extends Error {\n constructor(message, options) {\n super(message), this.name = \"ParseError\", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;\n }\n}\nconst LF = 10, CR = 13, SPACE = 32;\nfunction noop(_arg) {\n}\nfunction createParser(config) {\n if (typeof config == \"function\")\n throw new TypeError(\n \"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?\"\n );\n const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];\n let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = \"\", dataLines = 0, eventType, terminated = !1;\n function feed(chunk) {\n if (terminated)\n throw new Error(\n \"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.\"\n );\n if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {\n const trailing2 = processLines(chunk);\n trailing2 !== \"\" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();\n return;\n }\n if (chunk.indexOf(`\n`) === -1 && chunk.indexOf(\"\\r\") === -1) {\n pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();\n return;\n }\n pendingFragments.push(chunk);\n const input = pendingFragments.join(\"\");\n pendingFragments.length = 0, pendingFragmentsLength = 0;\n const trailing = processLines(input);\n trailing !== \"\" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();\n }\n function checkBufferSize() {\n maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, onError(\n new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {\n type: \"max-buffer-size-exceeded\"\n })\n )));\n }\n function processLines(chunk) {\n let searchIndex = 0;\n if (chunk.indexOf(\"\\r\") === -1) {\n let lfIndex = chunk.indexOf(`\n`, searchIndex);\n for (; lfIndex !== -1; ) {\n if (searchIndex === lfIndex) {\n dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = \"\", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n const firstCharCode = chunk.charCodeAt(searchIndex);\n if (isDataPrefix(chunk, searchIndex, firstCharCode)) {\n const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);\n if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {\n onEvent({ id, event: eventType, data: value }), id = void 0, data = \"\", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`\n`, searchIndex);\n continue;\n }\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n } else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(\n chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,\n lfIndex\n ) || void 0 : parseLine(chunk, searchIndex, lfIndex);\n searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`\n`, searchIndex);\n }\n return chunk.slice(searchIndex);\n }\n for (; searchIndex < chunk.length; ) {\n const crIndex = chunk.indexOf(\"\\r\", searchIndex), lfIndex = chunk.indexOf(`\n`, searchIndex);\n let lineEnd = -1;\n if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)\n break;\n parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;\n }\n return chunk.slice(searchIndex);\n }\n function parseLine(chunk, start, end) {\n if (start === end) {\n dispatchEvent();\n return;\n }\n const firstCharCode = chunk.charCodeAt(start);\n if (isDataPrefix(chunk, start, firstCharCode)) {\n const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);\n data = dataLines === 0 ? value2 : `${data}\n${value2}`, dataLines++;\n return;\n }\n if (isEventPrefix(chunk, start, firstCharCode)) {\n eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;\n return;\n }\n if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {\n const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);\n id = value2.includes(\"\\0\") ? void 0 : value2;\n return;\n }\n if (firstCharCode === 58) {\n if (onComment) {\n const line2 = chunk.slice(start, end);\n onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));\n }\n return;\n }\n const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(\":\");\n if (fieldSeparatorIndex === -1) {\n processField(line, \"\", line);\n return;\n }\n const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);\n processField(field, value, line);\n }\n function processField(field, value, line) {\n switch (field) {\n case \"event\":\n eventType = value || void 0;\n break;\n case \"data\":\n data = dataLines === 0 ? value : `${data}\n${value}`, dataLines++;\n break;\n case \"id\":\n id = value.includes(\"\\0\") ? void 0 : value;\n break;\n case \"retry\":\n /^\\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: \"invalid-retry\",\n value,\n line\n })\n );\n break;\n default:\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}\\u2026` : field}\"`,\n { type: \"unknown-field\", field, value, line }\n )\n );\n break;\n }\n }\n function dispatchEvent() {\n dataLines > 0 && onEvent({\n id,\n event: eventType,\n data\n }), id = void 0, data = \"\", dataLines = 0, eventType = void 0;\n }\n function reset(options = {}) {\n if (options.consume && pendingFragments.length > 0) {\n const incompleteLine = pendingFragments.join(\"\");\n parseLine(incompleteLine, 0, incompleteLine.length);\n }\n isFirstChunk = !0, id = void 0, data = \"\", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;\n }\n return { feed, reset };\n}\nfunction isDataPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;\n}\nfunction isEventPrefix(chunk, i, firstCharCode) {\n return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;\n}\nexport {\n ParseError,\n createParser\n};\n//# sourceMappingURL=index.js.map\n",
"import { createParser } from \"./index.js\";\nimport { ParseError } from \"./index.js\";\nclass EventSourceParserStream extends TransformStream {\n constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {\n let parser;\n super({\n start(controller) {\n parser = createParser({\n onEvent: (event) => {\n controller.enqueue(event);\n },\n onError(error) {\n typeof onError == \"function\" && onError(error), (onError === \"terminate\" || error.type === \"max-buffer-size-exceeded\") && controller.error(error);\n },\n onRetry,\n onComment,\n maxBufferSize\n });\n },\n transform(chunk) {\n parser.feed(chunk);\n }\n });\n }\n}\nexport {\n EventSourceParserStream,\n ParseError\n};\n//# sourceMappingURL=stream.js.map\n"
],
"mappings": ";AAAA,MAAM,UAAmB,KAAM,CAC7B,WAAW,CAAC,EAAS,EAAS,CAC5B,MAAM,CAAO,EAAG,KAAK,KAAO,aAAc,KAAK,KAAO,EAAQ,KAAM,KAAK,MAAQ,EAAQ,MAAO,KAAK,MAAQ,EAAQ,MAAO,KAAK,KAAO,EAAQ,KAEpJ,CACA,IAAM,EAAK,GAAI,EAAK,GAAI,EAAQ,GAChC,SAAS,CAAI,CAAC,EAAM,EAEpB,SAAS,CAAY,CAAC,EAAQ,CAC5B,GAAI,OAAO,GAAU,WACnB,MAAU,UACR,iGACF,EACF,IAAQ,UAAU,EAAM,UAAU,EAAM,UAAU,EAAM,YAAW,iBAAkB,EAAQ,EAAmB,CAAC,EAC7G,EAAyB,EAAG,EAAe,GAAI,EAAI,EAAO,GAAI,EAAY,EAAG,EAAW,EAAa,GACzG,SAAS,CAAI,CAAC,EAAO,CACnB,GAAI,EACF,MAAU,MACR,yHACF,EACF,GAAI,IAAiB,EAAe,GAAI,EAAM,WAAW,CAAC,IAAM,KAAO,EAAM,WAAW,CAAC,IAAM,KAAO,EAAM,WAAW,CAAC,IAAM,MAAQ,EAAQ,EAAM,MAAM,CAAC,IAAK,EAAiB,SAAW,EAAG,CAC7L,IAAM,EAAY,EAAa,CAAK,EACpC,IAAc,KAAO,EAAiB,KAAK,CAAS,EAAG,EAAyB,EAAU,QAAS,EAAgB,EACnH,OAEF,GAAI,EAAM,QAAQ;AAAA,C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,EAAQ,CAAK,GAAI,IAAY,aAAe,EAAM,OAAS,6BAA+B,EAAW,MAAM,CAAK,GAElJ,UACA,YACA,eACF,CAAC,GAEH,SAAS,CAAC,EAAO,CACf,EAAO,KAAK,CAAK,EAErB,CAAC,EAEL",
"debugId": "17BC902692E38DC864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1C467B1A6C11733864756E2164756E21",
"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": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst fs_1 = require(\"fs\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n try {\n const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-bsd.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,UACA,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,OADe,MAAM,EAAK,SAAS,SAAS,cAAe,CAAE,SAAU,MAAO,CAAC,GACjE,KAAK,EAEvB,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,GAAI,CAEA,OADe,MAAO,EAAG,EAAY,WAAW,4BAA4B,GAC9D,OAAO,KAAK,EAE9B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "594D11AD98F684BD64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+provider@3.0.8/node_modules/@ai-sdk/provider/dist/index.mjs"],
"sourcesContent": [
"// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n constructor({\n value,\n cause,\n context\n }) {\n let contextPrefix = \"Type validation failed\";\n if (context == null ? void 0 : context.field) {\n contextPrefix += ` for ${context.field}`;\n }\n if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n contextPrefix += \" (\";\n const parts = [];\n if (context.entityName) {\n parts.push(context.entityName);\n }\n if (context.entityId) {\n parts.push(`id: \"${context.entityId}\"`);\n }\n contextPrefix += parts.join(\", \");\n contextPrefix += \")\";\n }\n super({\n name: name12,\n message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n this.context = context;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause,\n context\n }) {\n var _a15, _b15, _c;\n if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n return cause;\n }\n return new _TypeValidationError({ value, cause, context });\n }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";AACA,IAAI,EAAS,kBACT,GAAS,OAAO,IAAI,CAAM,EAC1B,EAAI,EACJ,EAAa,MAAM,UAAqB,EAAK,MAAO,EAAK,GAAQ,EAAI,CASvE,WAAW,EACT,KAAM,EACN,UACA,SACC,CACD,MAAM,CAAO,EACb,KAAK,GAAM,GACX,KAAK,KAAO,EACZ,KAAK,MAAQ,QAOR,WAAU,CAAC,EAAO,CACvB,OAAO,EAAY,UAAU,EAAO,CAAM,QAErC,UAAS,CAAC,EAAO,EAAU,CAChC,IAAM,EAAe,OAAO,IAAI,CAAQ,EACxC,OAAO,GAAS,MAAQ,OAAO,IAAU,UAAY,KAAgB,GAAS,OAAO,EAAM,KAAkB,WAAa,EAAM,K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I,EAAK,eAAiB,GAAW,KAAY,OAAI,EAAQ,eAAiB,EAAK,EAAM,UAAY,KAAY,OAAI,EAAG,aAAe,GAAW,KAAY,OAAI,EAAQ,UAC/X,OAAO,EAET,OAAO,IAAI,EAAqB,CAAE,QAAO,QAAO,SAAQ,CAAC,EAE7D,EAGI,GAAS,mCACT,GAAW,mBAAmB,KAC9B,GAAW,OAAO,IAAI,EAAQ,EAC9B,EAAM,EACN,GAAgC,cAAe,EAAO,EAAY,EAAO,GAAU,EAAM,CAC3F,WAAW,EACT,gBACA,UAAU,IAAI,mCACb,CACD,MAAM,CAAE,KAAM,GAAQ,SAAQ,CAAC,EAC/B,KAAK,GAAQ,GACb,KAAK,cAAgB,QAEhB,WAAU,CAAC,EAAO,CACvB,OAAO,EAAW,UAAU,EAAO,EAAQ,EAE/C",
"debugId": "08ABC297623B68AF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "CB0275EA4122362164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260213144116_wakeful_the_professor.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260213144116_wakeful_the_professor\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`control_account\\` (\n \\`email\\` text NOT NULL,\n \\`url\\` text NOT NULL,\n \\`access_token\\` text NOT NULL,\n \\`refresh_token\\` text NOT NULL,\n \\`token_expiry\\` integer,\n \\`active\\` integer NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`control_account_pk\\` PRIMARY KEY(\\`email\\`, \\`url\\`)\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6bAYb,EACF,EAEL",
"debugId": "408FF8454AC2831764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260504145000_add_sync_owner.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260504145000_add_sync_owner\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`event_sequence\\` ADD \\`owner_id\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,mDAAuD,EACtE,EAEL",
"debugId": "3BCC49D42EA5380C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+togetherai@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/togetherai/dist/index.mjs"],
"sourcesContent": [
"// src/togetherai-provider.ts\nimport {\n OpenAICompatibleChatLanguageModel,\n OpenAICompatibleCompletionLanguageModel,\n OpenAICompatibleEmbeddingModel\n} from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-model.ts\nimport {\n combineHeaders,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/togetherai-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar togetheraiErrorSchema = lazySchema(\n () => zodSchema(\n z.object({\n error: z.object({\n message: z.string()\n })\n })\n )\n);\nvar togetheraiRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z.object({\n id: z.string().nullish(),\n model: z.string().nullish(),\n results: z.array(\n z.object({\n index: z.number(),\n relevance_score: z.number()\n })\n ),\n usage: z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number()\n })\n })\n )\n);\n\n// src/reranking/togetherai-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar togetheraiRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z2.object({\n rankFields: z2.array(z2.string()).optional()\n })\n )\n);\n\n// src/reranking/togetherai-reranking-model.ts\nvar TogetherAIRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // see https://docs.together.ai/reference/rerank-1\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a, _b;\n const rerankingOptions = await parseProviderOptions({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiRerankingModelOptionsSchema\n });\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders(this.config.headers(), headers),\n body: {\n model: this.modelId,\n documents: documents.values,\n query,\n top_n: topN,\n rank_fields: rerankingOptions == null ? void 0 : rerankingOptions.rankFields,\n return_documents: false\n // reduce response size\n },\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: togetheraiErrorSchema,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler(\n togetheraiRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n modelId: (_b = response.model) != null ? _b : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/togetherai-image-model.ts\nimport {\n combineHeaders as combineHeaders2,\n convertImageModelFileToDataUri,\n createJsonResponseHandler as createJsonResponseHandler2,\n createJsonErrorResponseHandler as createJsonErrorResponseHandler2,\n lazySchema as lazySchema3,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2,\n zodSchema as zodSchema3\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\nvar TogetherAIImageModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxImagesPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n seed,\n providerOptions,\n headers,\n abortSignal,\n files,\n mask\n }) {\n var _a, _b, _c;\n const warnings = [];\n if (mask != null) {\n throw new Error(\n \"Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.\"\n );\n }\n if (size != null) {\n warnings.push({\n type: \"unsupported\",\n feature: \"aspectRatio\",\n details: \"This model does not support the `aspectRatio` option. Use `size` instead.\"\n });\n }\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const togetheraiOptions = await parseProviderOptions2({\n provider: \"togetherai\",\n providerOptions,\n schema: togetheraiImageModelOptionsSchema\n });\n let imageUrl;\n if (files != null && files.length > 0) {\n imageUrl = convertImageModelFileToDataUri(files[0]);\n if (files.length > 1) {\n warnings.push({\n type: \"other\",\n message: \"Together AI only supports a single input image. Additional images are ignored.\"\n });\n }\n }\n const splitSize = size == null ? void 0 : size.split(\"x\");\n const { value: response, responseHeaders } = await postJsonToApi2({\n url: `${this.config.baseURL}/images/generations`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n prompt,\n seed,\n ...n > 1 ? { n } : {},\n ...splitSize && {\n width: parseInt(splitSize[0]),\n height: parseInt(splitSize[1])\n },\n ...imageUrl != null ? { image_url: imageUrl } : {},\n response_format: \"base64\",\n ...togetheraiOptions != null ? togetheraiOptions : {}\n },\n failedResponseHandler: createJsonErrorResponseHandler2({\n errorSchema: togetheraiErrorSchema2,\n errorToMessage: (data) => data.error.message\n }),\n successfulResponseHandler: createJsonResponseHandler2(\n togetheraiImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n};\nvar togetheraiImageResponseSchema = z3.object({\n data: z3.array(\n z3.object({\n b64_json: z3.string()\n })\n )\n});\nvar togetheraiErrorSchema2 = z3.object({\n error: z3.object({\n message: z3.string()\n })\n});\nvar togetheraiImageModelOptionsSchema = lazySchema3(\n () => zodSchema3(\n z3.object({\n /**\n * Number of generation steps. Higher values can improve quality.\n */\n steps: z3.number().nullish(),\n /**\n * Guidance scale for image generation.\n */\n guidance: z3.number().nullish(),\n /**\n * Negative prompt to guide what to avoid.\n */\n negative_prompt: z3.string().nullish(),\n /**\n * Disable the safety checker for image generation.\n * When true, the API will not reject images flagged as potentially NSFW.\n * Not available for Flux Schnell Free and Flux Pro models.\n */\n disable_safety_checker: z3.boolean().nullish()\n }).passthrough()\n )\n);\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/togetherai-provider.ts\nfunction loadDeprecatedApiKey() {\n if (typeof process === \"undefined\") {\n return void 0;\n }\n if (typeof process.env.TOGETHER_API_KEY === \"string\") {\n return void 0;\n }\n const key = process.env.TOGETHER_AI_API_KEY;\n if (typeof key === \"string\") {\n console.warn(\n \"TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.\"\n );\n }\n return key;\n}\nfunction createTogetherAI(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.together.xyz/v1/\"\n );\n const getHeaders = () => {\n var _a2;\n return withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: (_a2 = options.apiKey) != null ? _a2 : loadDeprecatedApiKey(),\n environmentVariableName: \"TOGETHER_API_KEY\",\n description: \"TogetherAI\"\n })}`,\n ...options.headers\n },\n `ai-sdk/togetherai/${VERSION}`\n );\n };\n const getCommonModelConfig = (modelType) => ({\n provider: `togetherai.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(\n modelId,\n getCommonModelConfig(\"chat\")\n );\n };\n const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(\n modelId,\n getCommonModelConfig(\"completion\")\n );\n const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(\n modelId,\n getCommonModelConfig(\"embedding\")\n );\n const createImageModel = (modelId) => new TogetherAIImageModel(modelId, {\n ...getCommonModelConfig(\"image\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const createRerankingModel = (modelId) => new TogetherAIRerankingModel(modelId, {\n ...getCommonModelConfig(\"reranking\"),\n baseURL: baseURL != null ? baseURL : \"https://api.together.xyz/v1/\"\n });\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.completionModel = createCompletionModel;\n provider.languageModel = createChatModel;\n provider.chatModel = createChatModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n return provider;\n}\nvar togetherai = createTogetherAI();\nexport {\n VERSION,\n createTogetherAI,\n togetherai\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wVAwBA,SAAI,OAAwB,OAC1B,SAAM,OACJ,EAAE,OAAO,CACP,MAAO,EAAE,OAAO,CACd,QAAS,EAAE,OAAO,CACpB,CAAC,CACH,CAAC,CACH,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EAAW,CAClC,QAAS,EAAM,EAAQ,SAAW,KAAO,EAAM,EAAqB,EACpE,wBAAyB,mBACzB,YAAa,YACf,CAAC,OACE,EAAQ,OACb,EACA,qBAAqB,GACvB,GAEI,EAAuB,CAAC,KAAe,CAC3C,SAAU,cAAc,IACxB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EACT,EACA,EAAqB,MAAM,CAC7B,GAEI,EAAwB,CAAC,IAAY,IAAI,EAC7C,EACA,EAAqB,YAAY,CACnC,EACM,EAAuB,CAAC,IAAY,IAAI,EAC5C,EACA,EAAqB,WAAW,CAClC,EACM,EAAmB,CAAC,IAAY,IAAI,EAAqB,EAAS,IACnE,EAAqB,OAAO,EAC/B,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAyB,EAAS,IAC3E,EAAqB,WAAW,EACnC,QAAS,GAAW,KAAO,EAAU,8BACvC,CAAC,EACK,EAAW,CAAC,IAAY,EAAgB,CAAO,EAWrD,OAVA,EAAS,qBAAuB,KAChC,EAAS,gBAAkB,EAC3B,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,mBAAqB,EAC9B,EAAS,MAAQ,EACjB,EAAS,WAAa,EACtB,EAAS,UAAY,EACrB,EAAS,eAAiB,EACnB,EAET,IAAI,GAAa,EAAiB",
"debugId": "AD68392D8ABC95E664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.33/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js"],
"sourcesContent": [
"const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require(\"@aws-sdk/core/client\");\nconst { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require(\"@smithy/core\");\nconst { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require(\"@smithy/core/client\");\nconst { Command: $Command } = require(\"@smithy/core/client\");\nexports.$Command = $Command;\nexports.__Client = Client;\nconst { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require(\"@smithy/core/config\");\nconst { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require(\"@smithy/core/endpoints\");\nconst { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require(\"@smithy/core/protocols\");\nconst { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require(\"@smithy/core/retry\");\nconst { TypeRegistry, getSchemaSerdePlugin } = require(\"@smithy/core/schema\");\nconst { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require(\"@smithy/core/serde\");\nconst { streamCollector, NodeHttpHandler } = require(\"@smithy/node-http-handler\");\nconst { AwsRestJsonProtocol } = require(\"@aws-sdk/core/protocols\");\nconst { Sha256 } = require(\"@smithy/core/checksum\");\n\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.32\";\nvar packageInfo = {\n\tversion: version};\n\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://oidc.{Region}.amazonaws.com\", i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 13, 3,\n 1, 4, r + 12,\n 2, 5, r + 12,\n 3, 8, 6,\n 4, 7, r + 11,\n 5, r + 9, r + 10,\n 4, 11, 9,\n 6, 10, r + 8,\n 7, r + 6, r + 7,\n 5, 12, r + 5,\n 6, r + 4, r + 5,\n 3, r + 1, 14,\n 4, r + 2, r + 3,\n]);\nconst bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n\nclass SSOOIDCServiceException extends ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SSOOIDCServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass AuthorizationPendingException extends SSOOIDCServiceException {\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass ExpiredTokenException extends SSOOIDCServiceException {\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InternalServerException extends SSOOIDCServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidClientException extends SSOOIDCServiceException {\n name = \"InvalidClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidGrantException extends SSOOIDCServiceException {\n name = \"InvalidGrantException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidRequestException extends SSOOIDCServiceException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nclass InvalidScopeException extends SSOOIDCServiceException {\n name = \"InvalidScopeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass SlowDownException extends SSOOIDCServiceException {\n name = \"SlowDownException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnauthorizedClientException extends SSOOIDCServiceException {\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nclass UnsupportedGrantTypeException extends SSOOIDCServiceException {\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _APE = \"AuthorizationPendingException\";\nconst _AT = \"AccessToken\";\nconst _CS = \"ClientSecret\";\nconst _CT = \"CreateToken\";\nconst _CTR = \"CreateTokenRequest\";\nconst _CTRr = \"CreateTokenResponse\";\nconst _CV = \"CodeVerifier\";\nconst _ETE = \"ExpiredTokenException\";\nconst _ICE = \"InvalidClientException\";\nconst _IGE = \"InvalidGrantException\";\nconst _IRE = \"InvalidRequestException\";\nconst _ISE = \"InternalServerException\";\nconst _ISEn = \"InvalidScopeException\";\nconst _IT = \"IdToken\";\nconst _RT = \"RefreshToken\";\nconst _SDE = \"SlowDownException\";\nconst _UCE = \"UnauthorizedClientException\";\nconst _UGTE = \"UnsupportedGrantTypeException\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cS = \"clientSecret\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _dC = \"deviceCode\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ed = \"error_description\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _r = \"reason\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.ssooidc\";\nconst _sc = \"scope\";\nconst _se = \"server\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.ssooidc\";\nconst _s_registry = TypeRegistry.for(_s);\nvar SSOOIDCServiceException$ = [-3, _s, \"SSOOIDCServiceException\", 0, [], []];\n_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nvar AccessDeniedException$ = [-3, n0, _ADE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0]\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar AuthorizationPendingException$ = [-3, n0, _APE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);\nvar ExpiredTokenException$ = [-3, n0, _ETE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);\nvar InternalServerException$ = [-3, n0, _ISE,\n { [_e]: _se, [_hE]: 500 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar InvalidClientException$ = [-3, n0, _ICE,\n { [_e]: _c, [_hE]: 401 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InvalidClientException$, InvalidClientException);\nvar InvalidGrantException$ = [-3, n0, _IGE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InvalidGrantException$, InvalidGrantException);\nvar InvalidRequestException$ = [-3, n0, _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0]\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nvar InvalidScopeException$ = [-3, n0, _ISEn,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InvalidScopeException$, InvalidScopeException);\nvar SlowDownException$ = [-3, n0, _SDE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(SlowDownException$, SlowDownException);\nvar UnauthorizedClientException$ = [-3, n0, _UCE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);\nvar UnsupportedGrantTypeException$ = [-3, n0, _UGTE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);\nconst errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar AccessToken = [0, n0, _AT, 8, 0];\nvar ClientSecret = [0, n0, _CS, 8, 0];\nvar CodeVerifier = [0, n0, _CV, 8, 0];\nvar IdToken = [0, n0, _IT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar CreateTokenRequest$ = [3, n0, _CTR,\n 0,\n [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],\n [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]], 3\n];\nvar CreateTokenResponse$ = [3, n0, _CTRr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]]\n];\nvar CreateToken$ = [9, n0, _CT,\n { [_h]: [\"POST\", \"/token\", 200] }, () => CreateTokenRequest$, () => CreateTokenResponse$\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.ssooidc\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"AWSSSOOIDCService\",\n },\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config);\n emitWarningIfUnsupportedVersion$1(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOOIDCClient extends Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nconst command = makeBuilder(commonParams, \"AWSSSOOIDCService\", \"SSOOIDCClient\", getEndpointPlugin);\nconst _ep0 = {};\nconst _mw0 = (Command, cs, config, o) => [];\n\nclass CreateTokenCommand extends command(_ep0, _mw0, \"CreateToken\", CreateToken$) {\n}\n\nconst commands = {\n CreateTokenCommand,\n};\nclass SSOOIDC extends SSOOIDCClient {\n}\ncreateAggregatedClient(commands, SSOOIDC);\n\nconst AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nconst InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;\nexports.AuthorizationPendingException = AuthorizationPendingException;\nexports.AuthorizationPendingException$ = AuthorizationPendingException$;\nexports.CreateToken$ = CreateToken$;\nexports.CreateTokenCommand = CreateTokenCommand;\nexports.CreateTokenRequest$ = CreateTokenRequest$;\nexports.CreateTokenResponse$ = CreateTokenResponse$;\nexports.ExpiredTokenException = ExpiredTokenException;\nexports.ExpiredTokenException$ = ExpiredTokenException$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.InvalidClientException = InvalidClientException;\nexports.InvalidClientException$ = InvalidClientException$;\nexports.InvalidGrantException = InvalidGrantException;\nexports.InvalidGrantException$ = InvalidGrantException$;\nexports.InvalidRequestException = InvalidRequestException;\nexports.InvalidRequestException$ = InvalidRequestException$;\nexports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;\nexports.InvalidScopeException = InvalidScopeException;\nexports.InvalidScopeException$ = InvalidScopeException$;\nexports.SSOOIDC = SSOOIDC;\nexports.SSOOIDCClient = SSOOIDCClient;\nexports.SSOOIDCServiceException = SSOOIDCServiceException;\nexports.SSOOIDCServiceException$ = SSOOIDCServiceException$;\nexports.SlowDownException = SlowDownException;\nexports.SlowDownException$ = SlowDownException$;\nexports.UnauthorizedClientException = UnauthorizedClientException;\nexports.UnauthorizedClientException$ = UnauthorizedClientException$;\nexports.UnsupportedGrantTypeException = UnsupportedGrantTypeException;\nexports.UnsupportedGrantTypeException$ = UnsupportedGrantTypeException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"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B,GAA0B,GAC1B,GAAwB,EACxB,GAAyB,GACzB,GAA0B,EAC1B,GAA2B,GAC3B,GAAgC,GAChC,GAAwB,EACxB,GAAyB,GACzB,GAAU,EACV,GAAgB,EAChB,GAA0B,EAC1B,GAA2B,EAC3B,GAAoB,EACpB,GAAqB,GACrB,GAA8B,EAC9B,GAA+B,GAC/B,GAAgC,EAChC,GAAiC,GACjC,GAAsB",
"debugId": "690A993CAAD578CC64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260423070820_add_icon_url_override.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260423070820_add_icon_url_override\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n ALTER TABLE \\`project\\` ADD \\`icon_url_override\\` text;\n UPDATE \\`project\\` SET \\`icon_url_override\\` = \\`icon_url\\` WHERE \\`icon_url\\` IS NOT NULL;\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,oKAGb,EACF,EAEL",
"debugId": "B7F3B5A48C6E507564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260601010001_normalize_storage_paths.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260601010001_normalize_storage_paths\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(\n `UPDATE project SET worktree = REPLACE(worktree, char(92), '/') WHERE worktree GLOB '[A-Za-z]:' || char(92) || '*' OR worktree LIKE char(92) || char(92) || '%';`,\n )\n yield* tx.run(\n `UPDATE project SET sandboxes = REPLACE(sandboxes, char(92) || char(92), '/') WHERE instr(sandboxes, char(92)) > 0 AND (worktree GLOB '[A-Za-z]:*' OR worktree LIKE '//%');`,\n )\n yield* tx.run(\n `UPDATE session SET directory = REPLACE(directory, char(92), '/') WHERE directory GLOB '[A-Za-z]:' || char(92) || '*' OR directory LIKE char(92) || char(92) || '%';`,\n )\n yield* tx.run(\n `UPDATE session SET path = REPLACE(path, char(92), '/') WHERE path IS NOT NULL AND instr(path, char(92)) > 0 AND (directory GLOB '[A-Za-z]:*' OR directory LIKE '//%');`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IACR,iKACF,EACA,MAAO,EAAG,IACR,4KACF,EACA,MAAO,EAAG,IACR,qKACF,EACA,MAAO,EAAG,IACR,wKACF,EACD,EAEL",
"debugId": "6AC12F06CC00F81664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "381362BD37C303EF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js"],
"sourcesContent": [
"\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken(options) {\n let projectId = options?.project;\n let teamId = options?.team;\n if (!projectId && !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectInfo.projectId;\n teamId = projectInfo.teamId;\n } else if (!projectId || !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectId ?? projectInfo.projectId;\n teamId = teamId ?? projectInfo.teamId;\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`\"\n );\n }\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {\n const authToken = await (0, import_token_util.getVercelToken)({\n expirationBufferMs: options?.expirationBufferMs\n });\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"
],
"mappings": ";2HACA,SAAuB,eAAnB,EAC0B,yBAA1B,EAC2B,oBAA3B,GADmB,OAEnB,EAAe,OAAO,UAAU,eAChC,EAAW,CAAC,EAAQ,IAAQ,CAC9B,QAAS,KAAQ,EACf,EAAU,EAAQ,EAAM,CAAE,IAAK,EAAI,GAAO,WAAY,EAAK,CAAC,GAE5D,EAAc,CAAC,EAAI,EAAM,EAAQ,IAAS,CAC5C,GAAI,GAAQ,OAAO,IAAS,UAAY,OAAO,IAAS,YACtD,QAAS,KAAO,EAAkB,CAAI,EACpC,GAAI,CAAC,EAAa,KAAK,EAAI,CAAG,GAAK,IAAQ,EACzC,EAAU,EAAI,EAAK,CAAE,IAAK,IAAM,EAAK,GAAM,WAAY,EAAE,EAAO,EAAiB,EAAM,CAAG,IAAM,EAAK,UAAW,CAAC,EAEvH,OAAO,GAEL,EAAe,CAAC,IAAQ,EAAY,EAAU,CAAC,EAAG,aAAc,CAAE,MAAO,EAAK,CAAC,EAAG,CAAG,EACrF,EAAgB,CAAC,EACrB,EAAS,EAAe,CACtB,aAAc,IAAM,CACtB,CAAC,EACD,EAAO,QAAU,EAAa,CAAa,EAC3C,IAAI,MACA,MACJ,eAAe,CAAY,CAAC,EAAS,CACnC,IAAI,EAAY,GAAS,QACrB,EAAS,GAAS,KACtB,GAAI,CAAC,GAAa,CAAC,EAAQ,CACzB,IAAM,GAAe,EAAG,EAAkB,iBAAiB,EAC3D,EAAY,EAAY,UACxB,EAAS,EAAY,OAChB,QAAI,CAAC,GAAa,CAAC,EAAQ,CAChC,IAAM,GAAe,EAAG,EAAkB,iBAAiB,EAC3D,EAAY,GAAa,EAAY,UACrC,EAAS,GAAU,EAAY,OAEjC,GAAI,CAAC,EACH,MAAM,IAAI,EAAmB,qBAC3B,gGACF,EAEF,IAAI,GAAc,EAAG,EAAkB,WAAW,CAAS,EAC3D,GAAI,CAAC,IAAe,EAAG,EAAkB,YAAY,EAAG,EAAkB,iBAAiB,EAAW,KAAK,EAAG,GAAS,kBAAkB,EAAG,CAC1I,IAAM,EAAY,MAAO,EAAG,EAAkB,gBAAgB,CAC5D,mBAAoB,GAAS,kBAC/B,CAAC,EAED,GADA,EAAa,MAAO,EAAG,EAAkB,oBAAoB,EAAW,EAAW,CAAM,EACrF,CAAC,EACH,MAAM,IAAI,EAAmB,qBAAqB,8BAA8B,GAEjF,EAAG,EAAkB,WAAW,EAAY,CAAS,EAExD,QAAQ,IAAI,kBAAoB,EAAW,MAC3C",
"debugId": "D01CE2D3B3E0381164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260501142318_next_venus.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260501142318_next_venus\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`agent\\` text;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`model\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,4BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,yCAA6C,EAC3D,MAAO,EAAG,IAAI,yCAA6C,EAC5D,EAEL",
"debugId": "659845E364B7A9B564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "F2ACEC1F2E95AB5F64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "537C48C8A8D7D05664756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.js", "../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.js", "../../node_modules/.bun/which@2.0.2/node_modules/which/which.js", "../../node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js", "../../node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.js", "../../node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js", "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"],
"sourcesContent": [
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n",
"module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n",
"var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n",
"const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n",
"'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n",
"'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n",
"'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input\n // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(?=(\\\\+?)?)\\1\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(?=(\\\\+?)?)\\1$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n",
"'use strict';\nmodule.exports = /^#!(.*)/;\n",
"'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n",
"'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n",
"'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n",
"'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n",
"'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n"
],
"mappings": ";6EAAA,EAAO,QAAU,EACjB,EAAM,KAAO,GAEb,IAAI,UAEJ,SAAS,EAAa,CAAC,EAAM,EAAS,CACpC,IAAI,EAAU,EAAQ,UAAY,OAChC,EAAQ,QAAU,QAAQ,IAAI,QAEhC,GAAI,CAAC,EACH,MAAO,GAIT,GADA,EAAU,EAAQ,MAAM,GAAG,EACvB,EAAQ,QAAQ,EAAE,IAAM,GAC1B,MAAO,GAET,QAAS,EAAI,EAAG,EAAI,EAAQ,OAAQ,IAAK,CACvC,IAAI,EAAI,EAAQ,GAAG,YAAY,EAC/B,GAAI,GAAK,EAAK,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,IAAM,EAChD,MAAO,GAGX,MAAO,GAGT,SAAS,CAAU,CAAC,EAAM,EAAM,EAAS,CACvC,GAAI,CAAC,EAAK,eAAe,GAAK,CAAC,EAAK,OAAO,EACzC,MAAO,GAET,OAAO,GAAa,EAAM,CAAO,EAGnC,SAAS,CAAM,CAAC,EAAM,EAAS,EAAI,CACjC,EAAG,KAAK,EAAM,QAAS,CAAC,EAAI,EAAM,CAChC,EAAG,EAAI,EAAK,GAAQ,EAAU,EAAM,EAAM,CAAO,CAAC,EACnD,EAGH,SAAS,EAAK,CAAC,EAAM,EAAS,CAC5B,OAAO,EAAU,EAAG,SAAS,CAAI,EAAG,EAAM,CAAO,sBCxCnD,EAAO,QAAU,EACjB,EAAM,KAAO,GAEb,IAAI,UAEJ,SAAS,CAAM,CAAC,EAAM,EAAS,EAAI,CACjC,EAAG,KAAK,EAAM,QAAS,CA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EAAS,GAAG,UAAU,EAAO,QAAS,EAAO,KAAM,EAAO,OAAO,EAKvE,OAFA,EAAO,MAAQ,EAAO,OAAS,EAAO,iBAAiB,EAAO,OAAQ,CAAM,EAErE,EAGX,EAAO,QAAU,GACjB,EAAO,QAAQ,MAAQ,GACvB,EAAO,QAAQ,KAAO,GAEtB,EAAO,QAAQ,OAAS,EACxB,EAAO,QAAQ,QAAU",
"debugId": "3DFE540D61DE925E64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260510033149_session_usage.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260510033149_session_usage\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`cost\\` real DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_input\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_output\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_reasoning\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_cache_read\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`tokens_cache_write\\` integer DEFAULT 0 NOT NULL;`)\n yield* tx.run(`\n UPDATE session\n SET\n cost = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.cost'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_input = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.input'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_output = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.output'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_reasoning = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.reasoning'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_cache_read = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.cache.read'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0),\n tokens_cache_write = coalesce((\n SELECT sum(coalesce(json_extract(message.data, '$.tokens.cache.write'), 0))\n FROM message\n WHERE message.session_id = session.id\n AND json_extract(message.data, '$.role') = 'assistant'\n ), 0)\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,+BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2DAA+D,EAC7E,MAAO,EAAG,IAAI,sEAA0E,EACxF,MAAO,EAAG,IAAI,uEAA2E,EACzF,MAAO,EAAG,IAAI,0EAA8E,EAC5F,MAAO,EAAG,IAAI,2EAA+E,EAC7F,MAAO,EAAG,IAAI,4EAAgF,EAC9F,MAAO,EAAG,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAuCb,EACF,EAEL",
"debugId": "82F8B89D1898DBD664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "88AC4D20675CC78064756E2164756E21",
"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": "A5C7BA7BC43232FE64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.3/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.3/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.3/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js", "../../node_modules/.bun/@aws-sdk+token-providers@3.1088.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.3/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js"],
"sourcesContent": [
"import { CredentialsProviderError, getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/core/config\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n",
"export const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromSso as getSsoTokenProvider } from \"@aws-sdk/token-providers\";\nimport { CredentialsProviderError, getSSOTokenFromFile } from \"@smithy/core/config\";\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nexport const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await getSsoTokenProvider({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n clientConfig,\n parentClientConfig,\n logger,\n })({ callerClientConfig });\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await import(\"./loadSso.js\");\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n",
"import { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, TokenProviderError, } from \"@smithy/core/config\";\nimport { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from \"./constants\";\nimport { getNewSsoOidcToken } from \"./getNewSsoOidcToken\";\nimport { validateTokenExpiry } from \"./validateTokenExpiry\";\nimport { validateTokenKey } from \"./validateTokenKey\";\nimport { writeSSOTokenToFile } from \"./writeSSOTokenToFile\";\nconst lastRefreshAttemptTime = new Date(0);\nexport const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n",
"export const EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nexport const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n",
"export const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {\n const { SSOOIDCClient } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n",
"import { getSsoOidcClient } from \"./getSsoOidcClient\";\nexport const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {\n const { CreateTokenCommand } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
"import { getSSOTokenFilepath } from \"@smithy/core/config\";\nimport { promises as fsPromises } from \"node:fs\";\nconst { writeFile } = fsPromises;\nexport const writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https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,EAAK,MACjB,CAAC,EAEA,QAAI,CAAC,GAAe,CAAC,GAAgB,CAAC,GAAa,CAAC,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,EAG5G,YAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,mBAAoB,EAAK,mBACzB,QAAS,EACT,SAAU,EAAK,SACf,eAAgB,EAAK,eACrB,YAAa,EAAK,YAClB,OAAQ,EAAK,MACjB,CAAC",
"debugId": "CCF67AB8ECF9053864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/node-http.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js", "../../node_modules/.bun/@smithy+credential-provider-imds@4.4.10/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js"],
"sourcesContent": [
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nexport const ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexport const ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexport const ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = new Set([\"localhost\", \"127.0.0.1\"]);\nconst GREENGRASS_PROTOCOLS = new Set([\"http:\", \"https:\"]);\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n let parsed;\n try {\n parsed = new URL(process.env[ENV_CMDS_FULL_URI]);\n }\n catch {\n throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });\n }\n if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n protocol: parsed.protocol,\n hostname: parsed.hostname,\n path: parsed.pathname + parsed.search,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n",
"export const isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexport const fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n",
"export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
"import { ProviderError } from \"@smithy/core/config\";\nimport { node_http } from \"./node-http\";\nexport function httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = node_http.request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n",
"import node_http from \"node:http\";\nexport { node_http };\n",
"export const retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n",
"import { CredentialsProviderError, loadConfig } from \"@smithy/core/config\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nexport class InstanceMetadataV1FallbackError extends CredentialsProviderError {\n tryNextLink;\n name = \"InstanceMetadataV1FallbackError\";\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n",
"import { loadConfig } from \"@smithy/core/config\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { Endpoint as InstanceMetadataEndpoint } from \"../config/Endpoint\";\nimport { ENDPOINT_CONFIG_OPTIONS } from \"../config/EndpointConfigOptions\";\nimport { EndpointMode } from \"../config/EndpointMode\";\nimport { ENDPOINT_MODE_CONFIG_OPTIONS, } from \"../config/EndpointModeConfigOptions\";\nexport const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return InstanceMetadataEndpoint.IPv4;\n case EndpointMode.IPv6:\n return InstanceMetadataEndpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n",
"export var Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n",
"export const ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexport const CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexport const ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n",
"export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
"import { EndpointMode } from \"./EndpointMode\";\nexport const ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexport const CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexport const ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n",
"const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nexport const getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n",
"import { getExtendedInstanceMetadataCredentials } from \"./getExtendedInstanceMetadataCredentials\";\nexport const staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n"
],
"mappings": ";mJAAA,oBCAO,SAAM,EAAoB,CAAC,IAAQ,QAAQ,CAAG,GACjD,OAAO,IAAQ,UACf,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,kBAAoB,UAC/B,OAAO,EAAI,QAAU,UACrB,OAAO,EAAI,aAAe,SACjB,EAAsB,CAAC,KAAW,CAC3C,YAAa,EAAM,YACnB,gBAAiB,EAAM,gBACvB,aAAc,EAAM,MACpB,WAAY,IAAI,KAAK,EAAM,UAAU,KACjC,EAAM,WAAa,CAAE,UAAW,EAAM,SAAU,CACxD,GCZO,IAAM,EAAkB,KAClB,EAAsB,EACtB,EAAyB,EAAG,aADN,EACwC,UAF5C,SAE8E,CAAE,aAAY,SAAQ,GCFnI,eCAA,oBDEO,SAAS,CAAW,CAAC,EAAS,CACjC,OAAO,IAAI,QAAQ,CAAC,EAAS,IAAW,CACpC,IAAM,EAAM,EAAU,QAAQ,CAC1B,OAAQ,SACL,EACH,SAAU,EAAQ,UAAU,QAAQ,aAAc,IAAI,CAC1D,CAAC,EACD,EAAI,GAAG,QAAS,CAAC,IAAQ,CACrB,EAAO,OAAO,OAAO,IAAI,gBAAc,gDAAgD,EAAG,CAAG,CAAC,EAC9F,EAAI,QAAQ,EACf,EACD,EAAI,GAAG,UAAW,IAAM,CACpB,EAAO,IAAI,gBAAc,6CAA6C,CAAC,EACvE,EAAI,QAAQ,EACf,EACD,EAAI,GAAG,WAAY,CAAC,IAAQ,CACxB,IAAQ,aAAa,KAAQ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Aa,EAAS,CAAI,EAEtE,MAAO,EAAK,CACR,GAAI,EAAI,aAAe,IACnB,EAAoB,GAExB,MAAM,EAEV,OAAO,GACR,CAAU,GAEjB,MAAO,UAAY,CACf,IAAM,EAAW,MAAM,EAA4B,EACnD,GAAI,EAEA,OADA,GAAQ,MAAM,4BAA6B,oCAAoC,EACxE,EAAe,EAAY,IAAK,EAAU,SAAQ,CAAC,EAEzD,KACD,IAAI,EACJ,GAAI,CACA,GAAS,MAAM,GAAiB,IAAK,EAAU,SAAQ,CAAC,GAAG,SAAS,EAExE,MAAO,EAAO,CACV,GAAI,GAAO,aAAe,IACtB,MAAM,OAAO,OAAO,EAAO,CACvB,QAAS,2CACb,CAAC,EAEA,QAAI,EAAM,UAAY,gBAAkB,CAAC,IAAK,IAAK,GAAG,EAAE,SAAS,EAAM,UAAU,EAClF,EAAoB,GAGxB,OADA,GAAQ,MAAM,4BAA6B,6BAA6B,EACjE,EAAe,EAAY,IAAK,EAAU,SAAQ,CAAC,EAE9D,OAAO,EAAe,EAAY,IAC3B,EACH,QAAS,EACJ,GAA2B,CAChC,EACA,SACJ,CAAC,KAIP,GAAmB,MAAO,IAAY,EAAY,IACjD,EACH,KAAM,GACN,OAAQ,MACR,QAAS,CACL,uCAAwC,OAC5C,CACJ,CAAC,EACK,GAAa,MAAO,KAAa,MAAM,EAAY,IAAK,EAAS,KAAM,CAAU,CAAC,GAAG,SAAS,EAC9F,GAA4B,MAAO,EAAS,EAAS,IAAS,CAChE,IAAM,EAAsB,KAAK,OAAO,MAAM,EAAY,IACnD,EACH,KAAM,EAAY,CACtB,CAAC,GAAG,SAAS,CAAC,EACd,GAAI,CAAC,EAAkB,CAAmB,EACtC,MAAM,IAAI,2BAAyB,4DAA6D,CAC5F,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAoB,CAAmB",
"debugId": "B65ECE677ACA58A564756E2164756E21",
"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": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "A0BDE61185879D7464756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.execAsync = void 0;\nconst child_process = require(\"child_process\");\nconst util = require(\"util\");\nexports.execAsync = util.promisify(child_process.exec);\n//# sourceMappingURL=execAsync.js.map"
],
"mappings": ";0EAKA,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,YAAiB,OACzB,IAAM,qBACA,YACE,YAAY,EAAK,UAAU,EAAc,IAAI",
"debugId": "A6A2E4122B5EE97664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260428004200_add_session_path.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260428004200_add_session_path\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`path\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,wCAA4C,EAC3D,EAEL",
"debugId": "DF9E42B0CE749B1964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260312043431_session_message_cursor.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260312043431_session_message_cursor\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`message_session_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`part_message_idx\\`;`)\n yield* tx.run(\n `CREATE INDEX \\`message_session_time_created_id_idx\\` ON \\`message\\` (\\`session_id\\`,\\`time_created\\`,\\`id\\`);`,\n )\n yield* tx.run(`CREATE INDEX \\`part_message_id_id_idx\\` ON \\`part\\` (\\`message_id\\`,\\`id\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6CAA+C,EAC7D,MAAO,EAAG,IAAI,0CAA4C,EAC1D,MAAO,EAAG,IACR,qGACF,EACA,MAAO,EAAG,IAAI,sEAA8E,EAC7F,EAEL",
"debugId": "9106A13345FB17EB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260622142730_simplify_session_context_epoch.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260622142730_simplify_session_context_epoch\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` DROP COLUMN \\`agent\\`;`)\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` DROP COLUMN \\`replacement_seq\\`;`)\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` DROP COLUMN \\`revision\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gDACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0DAA8D,EAC5E,MAAO,EAAG,IAAI,oEAAwE,EACtF,MAAO,EAAG,IAAI,6DAAiE,EAChF,EAEL",
"debugId": "B2C0CF09683B79F664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260605042240_add_context_epoch_agent.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260605042240_add_context_epoch_agent\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session_context_epoch\\` ADD \\`agent\\` text DEFAULT 'build' NOT NULL;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gFAAoF,EACnG,EAEL",
"debugId": "5C2382162ADA329A64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/bun-pty@0.4.8/node_modules/bun-pty/src/terminal.ts", "../../node_modules/.bun/bun-pty@0.4.8/node_modules/bun-pty/src/interfaces.ts", "../../node_modules/.bun/bun-pty@0.4.8/node_modules/bun-pty/src/index.ts", "../core/src/pty/pty.bun.ts"],
"sourcesContent": [
"// terminal.ts — JS/TS front-end (final fixed version)\n\nimport { dlopen, FFIType, ptr } from \"bun:ffi\";\nimport { Buffer } from \"node:buffer\";\nimport { EventEmitter } from \"./interfaces\";\nimport type { IPty, IPtyForkOptions, IExitEvent } from \"./interfaces\";\nimport { join, dirname, basename } from \"node:path\";\nimport { existsSync } from \"node:fs\";\n\nexport const DEFAULT_COLS = 80;\nexport const DEFAULT_ROWS = 24;\nexport const DEFAULT_FILE = \"sh\";\nexport const DEFAULT_NAME = \"xterm\";\n\n/**\n * Quote a string for shell-words compatible splitting on the Rust side.\n * We are not invoking a shell; quoting is only to preserve token boundaries\n * when Rust parses the command line with shell_words::split.\n * \n * @param s - The string to quote\n * @returns The quoted string\n */\nfunction shQuote(s: string): string {\n\tif (s.length === 0) return \"''\";\n\t// Replace ' with '\\'' (close-quote, escaped ', reopen)\n\treturn `'${s.replace(/'/g, `'\\\\''`)}'`;\n}\n\n// terminal.ts – loader fragment only\n\nfunction resolveLibPath(): string {\n\tconst env = process.env.BUN_PTY_LIB;\n\tif (env && existsSync(env)) return env;\n\n\t// For bun compile: use statically analyzable require with inline ternary.\n\t// Bun evaluates process.platform and process.arch at compile time and only\n\t// bundles the file for the target platform. The ternary MUST be inline\n\t// in the template literal for Bun's static analysis to work.\n\t// See: https://github.com/sursaone/bun-pty/issues/19\n\ttry {\n\t\t// @ts-ignore - require returns path for binary files in Bun\n\t\tconst embeddedPath = require(`../rust-pty/target/release/${process.platform === \"win32\" ? \"rust_pty.dll\" : process.platform === \"darwin\" ? (process.arch === \"arm64\" ? \"librust_pty_arm64.dylib\" : \"librust_pty.dylib\") : process.arch === \"arm64\" ? \"librust_pty_arm64.so\" : \"librust_pty.so\"}`);\n\t\tif (embeddedPath) return embeddedPath;\n\t} catch {\n\t\t// Not running as compiled binary, fall through to dynamic resolution\n\t}\n\n\t// Fallback: dynamic resolution for development scenarios\n\tconst platform = process.platform;\n\tconst arch = process.arch;\n\n\t// Try both architecture-specific and generic filenames\n\tconst filenames =\n\t\tplatform === \"darwin\"\n\t\t\t? arch === \"arm64\"\n\t\t\t\t? [\"librust_pty_arm64.dylib\", \"librust_pty.dylib\"]\n\t\t\t\t: [\"librust_pty.dylib\"]\n\t\t\t: platform === \"win32\"\n\t\t\t? [\"rust_pty.dll\"]\n\t\t\t: arch === \"arm64\"\n\t\t\t? [\"librust_pty_arm64.so\", \"librust_pty.so\"]\n\t\t\t: [\"librust_pty.so\"];\n\n\t// Start from the current module's location\n\tconst base = Bun.fileURLToPath(import.meta.url);\n\tconst fileDir = dirname(base);\n\tconst dirName = basename(fileDir);\n\t\n\t// Handle both development (src/terminal.ts) and production (dist/terminal.js) cases\n\t// If we're in src/ or dist/, go up one level to get the project root\n\tconst here = (dirName === \"src\" || dirName === \"dist\")\n\t\t? dirname(fileDir) // Go up one level from src/ or dist/\n\t\t: fileDir; // Otherwise use the directory as-is\n\n\tconst basePaths = [\n\t\tjoin(here, \"rust-pty\", \"target\", \"release\"), // Direct path from project root\n\t\tjoin(here, \"..\", \"bun-pty\", \"rust-pty\", \"target\", \"release\"), // monorepo setups\n\t\tjoin(process.cwd(), \"node_modules\", \"bun-pty\", \"rust-pty\", \"target\", \"release\"),\n\t];\n\n\tconst fallbackPaths = [];\n\tfor (const basePath of basePaths) {\n\t\tfor (const filename of filenames) {\n\t\t\tfallbackPaths.push(join(basePath, filename));\n\t\t}\n\t}\n\n\tfor (const path of fallbackPaths) {\n\t\tif (existsSync(path)) return path;\n\t}\n\n\tthrow new Error(\n\t\t`librust_pty shared library not found.\\nChecked:\\n - BUN_PTY_LIB=${env ?? \"<unset>\"}\\n - ${fallbackPaths.join(\"\\n - \")}\\n\\nSet BUN_PTY_LIB or ensure one of these paths contains the file.`\n\t);\n}\n\nconst libPath = resolveLibPath();\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\nlet lib: any;\n\n// try to load the lib, if it fails log the error\ntry {\n\tlib = dlopen(libPath, {\n\t\tbun_pty_spawn: {\n\t\t\targs: [FFIType.cstring, FFIType.cstring, FFIType.cstring, FFIType.i32, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_write: {\n\t\t\targs: [FFIType.i32, FFIType.pointer, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_read: {\n\t\t\targs: [FFIType.i32, FFIType.pointer, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_resize: {\n\t\t\targs: [FFIType.i32, FFIType.i32, FFIType.i32],\n\t\t\treturns: FFIType.i32,\n\t\t},\n\t\tbun_pty_kill: { args: [FFIType.i32], returns: FFIType.i32 },\n\t\tbun_pty_get_pid: { args: [FFIType.i32], returns: FFIType.i32 },\n\t\tbun_pty_get_exit_code: { args: [FFIType.i32], returns: FFIType.i32 },\n\t\tbun_pty_close: { args: [FFIType.i32], returns: FFIType.void },\n\t});\n} catch (error) {\n\tconsole.error(\"Failed to load lib\", error);\n}\n\nexport class Terminal implements IPty {\n\tprivate handle = -1;\n\tprivate _pid = -1;\n\tprivate _cols = DEFAULT_COLS;\n\tprivate _rows = DEFAULT_ROWS;\n\tprivate readonly _name = DEFAULT_NAME;\n\n\tprivate _readLoop = false;\n\tprivate _closing = false;\n\n\t// TextDecoder with streaming mode to properly handle UTF-8 across chunk boundaries\n\t// Without this, multi-byte characters (like box-drawing ─) that span chunks become �\n\tprivate readonly _decoder = new TextDecoder(\"utf-8\");\n\n\tprivate readonly _onData = new EventEmitter<string>();\n\tprivate readonly _onExit = new EventEmitter<IExitEvent>();\n\n\tconstructor(\n\t\tfile = DEFAULT_FILE,\n\t\targs: string[] = [],\n\t\topts: IPtyForkOptions = { name: DEFAULT_NAME },\n\t) {\n\t\tthis._cols = opts.cols ?? DEFAULT_COLS;\n\t\tthis._rows = opts.rows ?? DEFAULT_ROWS;\n\t\tconst cwd = opts.cwd ?? process.cwd();\n\t\t// Properly quote file and arguments to preserve spaces and special characters\n\t\tconst cmdline = [shQuote(file), ...args.map(shQuote)].join(\" \");\n\n\t\t// Format environment variables as null-terminated string\n\t\tlet envStr = \"\";\n\t\tif (opts.env) {\n\t\t\tconst envPairs = Object.entries(opts.env).map(([k, v]) => `${k}=${v}`);\n\t\t\tenvStr = envPairs.join(\"\\0\") + \"\\0\";\n\t\t}\n\n\t\tthis.handle = lib.symbols.bun_pty_spawn(\n\t\t\tBuffer.from(`${cmdline}\\0`, \"utf8\"),\n\t\t\tBuffer.from(`${cwd}\\0`, \"utf8\"),\n\t\t\tBuffer.from(`${envStr}\\0`, \"utf8\"),\n\t\t\tthis._cols,\n\t\t\tthis._rows,\n\t\t);\n\t\tif (this.handle < 0) throw new Error(\"PTY spawn failed\");\n\n\t\tthis._pid = lib.symbols.bun_pty_get_pid(this.handle);\n\t\tthis._startReadLoop();\n\t}\n\n\t/* ------------- accessors ------------- */\n\n\tget pid() {\n\t\treturn this._pid;\n\t}\n\tget cols() {\n\t\treturn this._cols;\n\t}\n\tget rows() {\n\t\treturn this._rows;\n\t}\n\tget process() {\n\t\treturn \"shell\";\n\t}\n\n\tget onData() {\n\t\treturn this._onData.event;\n\t}\n\tget onExit() {\n\t\treturn this._onExit.event;\n\t}\n\n\t/* ------------- IO methods ------------- */\n\n\twrite(data: string) {\n\t\tif (this._closing) return;\n\t\tconst buf = Buffer.from(data, \"utf8\");\n\t\tlib.symbols.bun_pty_write(this.handle, ptr(buf), buf.length);\n\t}\n\n\tresize(cols: number, rows: number) {\n\t\tif (this._closing) return;\n\t\tthis._cols = cols;\n\t\tthis._rows = rows;\n\t\tlib.symbols.bun_pty_resize(this.handle, cols, rows);\n\t}\n\n\tkill(signal = \"SIGTERM\") {\n\t\tif (this._closing) return;\n\t\tthis._closing = true;\n\t\tlib.symbols.bun_pty_kill(this.handle);\n\t\tlib.symbols.bun_pty_close(this.handle);\n\t\tthis._onExit.fire({ exitCode: 0, signal });\n\t}\n\n\t/* ------------- read-loop ------------- */\n\n\tprivate async _startReadLoop() {\n\t\tif (this._readLoop) return;\n\t\tthis._readLoop = true;\n\n\t\tconst buf = Buffer.allocUnsafe(4096);\n\n\t\twhile (this._readLoop && !this._closing) {\n\t\t\tconst n = lib.symbols.bun_pty_read(this.handle, ptr(buf), buf.length);\n\t\t\tif (n > 0) {\n\t\t\t\t// Use streaming mode to buffer incomplete UTF-8 sequences across chunks\n\t\t\t\t// This prevents corruption when multi-byte chars span chunk boundaries\n\t\t\t\tconst decoded = this._decoder.decode(buf.subarray(0, n), { stream: true });\n\t\t\t\tif (decoded) {\n\t\t\t\t\tthis._onData.fire(decoded);\n\t\t\t\t}\n\t\t\t} else if (n === -2) {\n\t\t\t\t// CHILD_EXITED - flush any remaining bytes in the decoder\n\t\t\t\tconst remaining = this._decoder.decode();\n\t\t\t\tif (remaining) {\n\t\t\t\t\tthis._onData.fire(remaining);\n\t\t\t\t}\n\t\t\t\tconst exitCode = lib.symbols.bun_pty_get_exit_code(this.handle);\n\t\t\t\tthis._onExit.fire({ exitCode });\n\t\t\t\tbreak;\n\t\t\t} else if (n < 0) {\n\t\t\t\t// error - flush decoder before breaking\n\t\t\t\tconst remaining = this._decoder.decode();\n\t\t\t\tif (remaining) {\n\t\t\t\t\tthis._onData.fire(remaining);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// 0 bytes: wait\n\t\t\t\tawait new Promise((r) => setTimeout(r, 8));\n\t\t\t}\n\t\t}\n\t}\n}\n",
"import { Buffer } from \"node:buffer\";\n\n/**\n * Interface for disposable resources.\n */\nexport interface IDisposable {\n /**\n * Disposes the resource, performing any necessary cleanup.\n */\n dispose(): void;\n}\n\n/**\n * Event implementation for the terminal.\n */\nexport class EventEmitter<T> {\n private listeners: ((data: T) => void)[] = [];\n\n public event = (listener: (e: T) => void): IDisposable => {\n this.listeners.push(listener);\n return {\n dispose: () => {\n const i = this.listeners.indexOf(listener);\n if (i !== -1) {\n this.listeners.splice(i, 1);\n }\n }\n };\n };\n\n public fire(data: T): void {\n for (const listener of this.listeners) {\n listener(data);\n }\n }\n}\n\n/**\n * Options for spawning a new PTY process.\n */\nexport interface IPtyForkOptions {\n /**\n * The name of the terminal to be set in environment variables.\n */\n name: string;\n\n /**\n * The number of columns in the PTY.\n */\n cols?: number;\n\n /**\n * The number of rows in the PTY.\n */\n rows?: number;\n\n /**\n * The current working directory of the process.\n * Defaults to the current working directory of the parent process.\n */\n cwd?: string;\n\n /**\n * Environment variables to set for the process.\n */\n env?: Record<string, string>;\n}\n\n/**\n * Exit data for PTY process.\n */\nexport interface IExitEvent {\n /**\n * The process exit code.\n */\n exitCode: number;\n\n /**\n * The signal that caused the process to exit, if any.\n */\n signal?: number | string;\n}\n\n/**\n * Interface for interacting with a pseudo-terminal (PTY) instance.\n */\nexport interface IPty {\n /**\n * The PID of the process running in the PTY.\n */\n readonly pid: number;\n\n /**\n * The column size in characters.\n */\n readonly cols: number;\n\n /**\n * The row size in characters.\n */\n readonly rows: number;\n\n /**\n * The title of the active process.\n */\n readonly process: string;\n\n /**\n * Set a callback for when data is received from the PTY.\n */\n readonly onData: (listener: (data: string) => void) => IDisposable;\n\n /**\n * Event emitted when the PTY process exits.\n */\n readonly onExit: (listener: (event: IExitEvent) => void) => IDisposable;\n\n /**\n * Write data to the PTY.\n *\n * @param data - The data to write.\n */\n write(data: string): void;\n\n /**\n * Resize the PTY.\n *\n * @param columns - Number of columns (character width).\n * @param rows - Number of rows (character height).\n */\n resize(columns: number, rows: number): void;\n\n /**\n * Kill the process running in the PTY.\n *\n * @param signal - The signal to send to the process.\n * Defaults to \"SIGTERM\".\n */\n kill(signal?: string): void;\n} ",
"/**\n * The main export module for bun-pty.\n * Provides a cross-platform PTY interface for Bun runtime.\n */\n\nimport { Terminal } from './terminal';\nimport type { IPty, IPtyForkOptions, IExitEvent, IDisposable } from './interfaces';\n\n/**\n * Creates and spawns a new PTY with the given command and arguments.\n * \n * @param file - Path to the executable to run.\n * @param args - Arguments for the executable.\n * @param options - Options for the PTY.\n * @returns A new PTY instance.\n */\nexport function spawn(file: string, args: string[], options: IPtyForkOptions): IPty {\n return new Terminal(file, args, options);\n}\n\n// Export interfaces and implementations\nexport type { IPty, IPtyForkOptions, IExitEvent, IDisposable };\nexport { Terminal } from './terminal'; ",
"import { spawn as create } from \"bun-pty\"\nimport type { Opts, Proc } from \"./pty\"\n\nexport type { Disp, Exit, Opts, Proc } from \"./pty\"\n\nexport function spawn(file: string, args: string[], opts: Opts): Proc {\n const pty = create(file, args, opts)\n return {\n pid: pty.pid,\n onData(listener) {\n return pty.onData(listener)\n },\n onExit(listener) {\n return pty.onExit(listener)\n },\n write(data) {\n pty.write(data)\n },\n resize(cols, rows) {\n pty.resize(cols, rows)\n },\n kill(signal) {\n pty.kill(signal)\n },\n }\n}\n"
],
"mappings": ";4GAEA,kCAAS,aAAQ,SAAS,gBAC1B,iBAAS,eCYF,MAAM,CAAgB,CACnB,UAAmC,CAAC,EAErC,MAAQ,CAAC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,EAAM,EAAM,CACjB,EAAI,OAAO,EAAM,CAAI,GAEvB,IAAI,CAAC,EAAQ,CACX,EAAI,KAAK,CAAM,EAEnB",
"debugId": "3EDA0F2428AB650C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260603040000_session_message_projection_order.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603040000_session_message_projection_order\",\n up(tx) {\n return Effect.gen(function* () {\n // Pre-launch Session projections were written before durable event persistence\n // became unconditional, so they cannot be assigned truthful aggregate order.\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`ALTER TABLE \\`session_message\\` ADD COLUMN \\`seq\\` integer NOT NULL;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_type_time_created_id_idx\\`;`)\n yield* tx.run(`CREATE INDEX \\`session_message_session_seq_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`seq\\`);`)\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_type_seq_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`type\\`,\\`seq\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kDACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAG7B,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,kEAAsE,EACpF,MAAO,EAAG,IAAI,0EAA4E,EAC1F,MAAO,EAAG,IAAI,2FAAmG,EACjH,MAAO,EAAG,IACR,uGACF,EACD,EAEL",
"debugId": "FC7E86BAC4563F0C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "F45469C145EAE24564756E2164756E21",
"names": []
}

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

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": ["../../node_modules/.bun/@ai-sdk+mistral@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/mistral/dist/index.mjs"],
"sourcesContent": [
"// src/mistral-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/mistral-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n injectJsonInstructionIntoMessages,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/convert-mistral-usage.ts\nfunction convertMistralUsage(usage) {\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = usage.prompt_tokens;\n const completionTokens = usage.completion_tokens;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens,\n reasoning: void 0\n },\n raw: usage\n };\n}\n\n// src/convert-to-mistral-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction formatFileUrl({\n data,\n mediaType\n}) {\n return data instanceof URL ? data.toString() : `data:${mediaType};base64,${convertToBase64(data)}`;\n}\nfunction convertToMistralChatMessages(prompt) {\n var _a;\n const messages = [];\n for (let i = 0; i < prompt.length; i++) {\n const { role, content } = prompt[i];\n const isLastMessage = i === prompt.length - 1;\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"file\": {\n if (part.mediaType.startsWith(\"image/\")) {\n const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n return {\n type: \"image_url\",\n image_url: formatFileUrl({ data: part.data, mediaType })\n };\n } else if (part.mediaType === \"application/pdf\") {\n return {\n type: \"document_url\",\n document_url: formatFileUrl({\n data: part.data,\n mediaType: \"application/pdf\"\n })\n };\n } else {\n throw new UnsupportedFunctionalityError({\n functionality: \"Only images and PDF file parts are supported\"\n });\n }\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n case \"reasoning\": {\n text += part.text;\n break;\n }\n default: {\n throw new Error(\n `Unsupported content type in assistant message: ${part.type}`\n );\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n prefix: isLastMessage ? true : void 0,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n });\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (toolResponse.type === \"tool-approval-response\") {\n continue;\n }\n const output = toolResponse.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n messages.push({\n role: \"tool\",\n name: toolResponse.toolName,\n tool_call_id: toolResponse.toolCallId,\n content: contentValue\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/map-mistral-finish-reason.ts\nfunction mapMistralFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n case \"model_length\":\n return \"length\";\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/mistral-chat-options.ts\nimport { z } from \"zod/v4\";\nvar mistralLanguageModelOptions = z.object({\n /**\n * Whether to inject a safety prompt before all conversations.\n *\n * Defaults to `false`.\n */\n safePrompt: z.boolean().optional(),\n documentImageLimit: z.number().optional(),\n documentPageLimit: z.number().optional(),\n /**\n * Whether to use structured outputs.\n *\n * @default true\n */\n structuredOutputs: z.boolean().optional(),\n /**\n * Whether to use strict JSON schema validation.\n *\n * @default false\n */\n strictJsonSchema: z.boolean().optional(),\n /**\n * Whether to enable parallel function calling during tool use.\n * When set to false, the model will use at most one tool per response.\n *\n * @default true\n */\n parallelToolCalls: z.boolean().optional(),\n /**\n * Controls the reasoning effort for models that support adjustable reasoning.\n *\n * - `'high'`: Enable reasoning\n * - `'none'`: Disable reasoning\n */\n reasoningEffort: z.enum([\"high\", \"none\"]).optional()\n});\n\n// src/mistral-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar mistralErrorDataSchema = z2.object({\n object: z2.literal(\"error\"),\n message: z2.string(),\n type: z2.string(),\n param: z2.string().nullable(),\n code: z2.string().nullable()\n});\nvar mistralFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: mistralErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/mistral-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const mistralTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n mistralTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema,\n ...tool.strict != null ? { strict: tool.strict } : {}\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: mistralTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n return { tools: mistralTools, toolChoice: type, toolWarnings };\n case \"required\":\n return { tools: mistralTools, toolChoice: \"any\", toolWarnings };\n // mistral does not support tool mode directly,\n // so we filter the tools and force the tool choice through 'any'\n case \"tool\":\n return {\n tools: mistralTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"any\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/mistral-chat-language-model.ts\nvar MistralChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n \"application/pdf\": [/^https:\\/\\/.*$/]\n };\n var _a;\n this.modelId = modelId;\n this.config = config;\n this.generateId = (_a = config.generateId) != null ? _a : generateId;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions,\n tools,\n toolChoice\n }) {\n var _a, _b, _c, _d;\n const warnings = [];\n const options = (_a = await parseProviderOptions({\n provider: \"mistral\",\n providerOptions,\n schema: mistralLanguageModelOptions\n })) != null ? _a : {};\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (frequencyPenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n }\n if (presencePenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"presencePenalty\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n const structuredOutputs = (_b = options.structuredOutputs) != null ? _b : true;\n const strictJsonSchema = (_c = options.strictJsonSchema) != null ? _c : false;\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && !(responseFormat == null ? void 0 : responseFormat.schema)) {\n prompt = injectJsonInstructionIntoMessages({\n messages: prompt,\n schema: responseFormat.schema\n });\n }\n const baseArgs = {\n // model id:\n model: this.modelId,\n // model specific settings:\n safe_prompt: options.safePrompt,\n // standardized settings:\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n random_seed: seed,\n reasoning_effort: options.reasoningEffort,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? structuredOutputs && (responseFormat == null ? void 0 : responseFormat.schema) != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: strictJsonSchema,\n name: (_d = responseFormat.name) != null ? _d : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // mistral-specific provider options:\n document_image_limit: options.documentImageLimit,\n document_page_limit: options.documentPageLimit,\n // messages:\n messages: convertToMistralChatMessages(prompt)\n };\n const {\n tools: mistralTools,\n toolChoice: mistralToolChoice,\n toolWarnings\n } = prepareTools({\n tools,\n toolChoice\n });\n return {\n args: {\n ...baseArgs,\n tools: mistralTools,\n tool_choice: mistralToolChoice,\n ...mistralTools != null && options.parallelToolCalls !== void 0 ? { parallel_tool_calls: options.parallelToolCalls } : {}\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a;\n const { args: body, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n mistralChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n if (choice.message.content != null && Array.isArray(choice.message.content)) {\n for (const part of choice.message.content) {\n if (part.type === \"thinking\") {\n const reasoningText = extractReasoningContent(part.thinking);\n if (reasoningText.length > 0) {\n content.push({ type: \"reasoning\", text: reasoningText });\n }\n } else if (part.type === \"text\") {\n if (part.text.length > 0) {\n content.push({ type: \"text\", text: part.text });\n }\n }\n }\n } else {\n const text = extractTextContent(choice.message.content);\n if (text != null && text.length > 0) {\n content.push({ type: \"text\", text });\n }\n }\n if (choice.message.tool_calls != null) {\n for (const toolCall of choice.message.tool_calls) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertMistralUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n mistralChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let isFirstChunk = true;\n let activeText = false;\n let activeReasoningId = null;\n const generateId2 = this.generateId;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (value.usage != null) {\n usage = value.usage;\n }\n const choice = value.choices[0];\n const delta = choice.delta;\n const textContent = extractTextContent(delta.content);\n if (delta.content != null && Array.isArray(delta.content)) {\n for (const part of delta.content) {\n if (part.type === \"thinking\") {\n const reasoningDelta = extractReasoningContent(part.thinking);\n if (reasoningDelta.length > 0) {\n if (activeReasoningId == null) {\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n activeText = false;\n }\n activeReasoningId = generateId2();\n controller.enqueue({\n type: \"reasoning-start\",\n id: activeReasoningId\n });\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: activeReasoningId,\n delta: reasoningDelta\n });\n }\n }\n }\n }\n if (textContent != null && textContent.length > 0) {\n if (!activeText) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n activeReasoningId = null;\n }\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n activeText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n if ((delta == null ? void 0 : delta.tool_calls) != null) {\n for (const toolCall of delta.tool_calls) {\n const toolCallId = toolCall.id;\n const toolName = toolCall.function.name;\n const input = toolCall.function.arguments;\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolCallId,\n toolName\n });\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCallId,\n delta: input\n });\n controller.enqueue({\n type: \"tool-input-end\",\n id: toolCallId\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId,\n toolName,\n input\n });\n }\n }\n if (choice.finish_reason != null) {\n finishReason = {\n unified: mapMistralFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n },\n flush(controller) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n }\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertMistralUsage(usage)\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction extractReasoningContent(thinking) {\n return thinking.filter((chunk) => chunk.type === \"text\").map((chunk) => chunk.text).join(\"\");\n}\nfunction extractTextContent(content) {\n if (typeof content === \"string\") {\n return content;\n }\n if (content == null) {\n return void 0;\n }\n const textContent = [];\n for (const chunk of content) {\n const { type } = chunk;\n switch (type) {\n case \"text\":\n textContent.push(chunk.text);\n break;\n case \"thinking\":\n case \"image_url\":\n case \"reference\":\n break;\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n return textContent.length ? textContent.join(\"\") : void 0;\n}\nvar mistralContentSchema = z3.union([\n z3.string(),\n z3.array(\n z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"image_url\"),\n image_url: z3.union([\n z3.string(),\n z3.object({\n url: z3.string(),\n detail: z3.string().nullable()\n })\n ])\n }),\n z3.object({\n type: z3.literal(\"reference\"),\n reference_ids: z3.array(z3.union([z3.string(), z3.number()]))\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.array(\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n })\n )\n })\n ])\n )\n]).nullish();\nvar mistralUsageSchema = z3.object({\n prompt_tokens: z3.number(),\n completion_tokens: z3.number(),\n total_tokens: z3.number()\n});\nvar mistralChatResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n message: z3.object({\n role: z3.literal(\"assistant\"),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n index: z3.number(),\n finish_reason: z3.string().nullish()\n })\n ),\n object: z3.literal(\"chat.completion\"),\n usage: mistralUsageSchema\n});\nvar mistralChatChunkSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n delta: z3.object({\n role: z3.enum([\"assistant\"]).optional(),\n content: mistralContentSchema,\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n function: z3.object({ name: z3.string(), arguments: z3.string() })\n })\n ).nullish()\n }),\n finish_reason: z3.string().nullish(),\n index: z3.number()\n })\n ),\n usage: mistralUsageSchema.nullish()\n});\n\n// src/mistral-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar MistralEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 32;\n this.supportsParallelCalls = false;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n abortSignal,\n headers\n }) {\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embeddings`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n input: values,\n encoding_format: \"float\"\n },\n failedResponseHandler: mistralFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n MistralTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.data.map((item) => item.embedding),\n usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar MistralTextEmbeddingResponseSchema = z4.object({\n data: z4.array(z4.object({ embedding: z4.array(z4.number()) })),\n usage: z4.object({ prompt_tokens: z4.number() }).nullish()\n});\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/mistral-provider.ts\nfunction createMistral(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.mistral.ai/v1\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"MISTRAL_API_KEY\",\n description: \"Mistral\"\n })}`,\n ...options.headers\n },\n `ai-sdk/mistral/${VERSION}`\n );\n const createChatModel = (modelId) => new MistralChatLanguageModel(modelId, {\n provider: \"mistral.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: options.generateId\n });\n const createEmbeddingModel = (modelId) => new MistralEmbeddingModel(modelId, {\n provider: \"mistral.embedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Mistral model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.chat = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar mistral = createMistral();\nexport {\n VERSION,\n createMistral,\n mistral\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAu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KAAO,EAChB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAU,GAAc",
"debugId": "B727F1A9A5B345C764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260602182828_add_project_directories.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260602182828_add_project_directories\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`project_directory\\` (\n \\`project_id\\` text NOT NULL,\n \\`directory\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`project_directory_pk\\` PRIMARY KEY(\\`project_id\\`, \\`directory\\`),\n CONSTRAINT \\`fk_project_directory_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+bASb,EACF,EAEL",
"debugId": "7648244E9D3B62A564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.33/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js"],
"sourcesContent": [
"const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require(\"@aws-sdk/core/client\");\nconst { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require(\"@smithy/core\");\nconst { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require(\"@smithy/core/client\");\nconst { Command: $Command } = require(\"@smithy/core/client\");\nexports.$Command = $Command;\nexports.__Client = Client;\nconst { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require(\"@smithy/core/config\");\nconst { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require(\"@smithy/core/endpoints\");\nconst { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require(\"@smithy/core/protocols\");\nconst { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require(\"@smithy/core/retry\");\nconst { TypeRegistry, getSchemaSerdePlugin } = require(\"@smithy/core/schema\");\nconst { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require(\"@smithy/core/serde\");\nconst { streamCollector, NodeHttpHandler } = require(\"@smithy/node-http-handler\");\nconst { AwsJson1_1Protocol } = require(\"@aws-sdk/core/protocols\");\nconst { Sha256 } = require(\"@smithy/core/checksum\");\n\nconst defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n case \"GetId\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.32\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { [m]: \"Region\" }, k = {}, l = [j];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [g, [{ fn: f, argv: [i, \"name\"] }, \"aws\"]],\n [g, [j, \"us-east-1\"]],\n [g, [j, \"us-east-2\"]],\n [g, [j, \"us-west-1\"]],\n [g, [j, \"us-west-2\"]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://cognito-identity-fips.us-east-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-east-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://cognito-identity.{Region}.amazonaws.com\", k],\n [\"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 17, 3,\n 1, 4, r + 16,\n 2, 5, r + 16,\n 3, 9, 6,\n 5, 7, r + 15,\n 6, 8, r + 14,\n 7, r + 12, r + 13,\n 4, 11, 10,\n 5, r + 9, r + 11,\n 5, 12, r + 10,\n 6, 13, r + 9,\n 8, r + 4, 14,\n 9, r + 5, 15,\n 10, r + 6, 16,\n 11, r + 7, r + 8,\n 3, r + 1, 18,\n 5, r + 2, r + 3,\n]);\nconst bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n\nclass CognitoIdentityServiceException extends ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);\n }\n}\n\nclass ExternalServiceException extends CognitoIdentityServiceException {\n name = \"ExternalServiceException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExternalServiceException.prototype);\n }\n}\nclass InternalErrorException extends CognitoIdentityServiceException {\n name = \"InternalErrorException\";\n $fault = \"server\";\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalErrorException.prototype);\n }\n}\nclass InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);\n }\n}\nclass InvalidParameterException extends CognitoIdentityServiceException {\n name = \"InvalidParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidParameterException.prototype);\n }\n}\nclass NotAuthorizedException extends CognitoIdentityServiceException {\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotAuthorizedException.prototype);\n }\n}\nclass ResourceConflictException extends CognitoIdentityServiceException {\n name = \"ResourceConflictException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceConflictException.prototype);\n }\n}\nclass ResourceNotFoundException extends CognitoIdentityServiceException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nclass TooManyRequestsException extends CognitoIdentityServiceException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nclass LimitExceededException extends CognitoIdentityServiceException {\n name = \"LimitExceededException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LimitExceededException.prototype);\n }\n}\n\nconst _AI = \"AccountId\";\nconst _AKI = \"AccessKeyId\";\nconst _C = \"Credentials\";\nconst _CRA = \"CustomRoleArn\";\nconst _E = \"Expiration\";\nconst _ESE = \"ExternalServiceException\";\nconst _GCFI = \"GetCredentialsForIdentity\";\nconst _GCFII = \"GetCredentialsForIdentityInput\";\nconst _GCFIR = \"GetCredentialsForIdentityResponse\";\nconst _GI = \"GetId\";\nconst _GII = \"GetIdInput\";\nconst _GIR = \"GetIdResponse\";\nconst _IEE = \"InternalErrorException\";\nconst _II = \"IdentityId\";\nconst _IIPCE = \"InvalidIdentityPoolConfigurationException\";\nconst _IPE = \"InvalidParameterException\";\nconst _IPI = \"IdentityPoolId\";\nconst _IPT = \"IdentityProviderToken\";\nconst _L = \"Logins\";\nconst _LEE = \"LimitExceededException\";\nconst _LM = \"LoginsMap\";\nconst _NAE = \"NotAuthorizedException\";\nconst _RCE = \"ResourceConflictException\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SK = \"SecretKey\";\nconst _SKS = \"SecretKeyString\";\nconst _ST = \"SessionToken\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _hE = \"httpError\";\nconst _m = \"message\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity\";\nconst _se = \"server\";\nconst n0 = \"com.amazonaws.cognitoidentity\";\nconst _s_registry = TypeRegistry.for(_s);\nvar CognitoIdentityServiceException$ = [-3, _s, \"CognitoIdentityServiceException\", 0, [], []];\n_s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nvar ExternalServiceException$ = [-3, n0, _ESE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(ExternalServiceException$, ExternalServiceException);\nvar InternalErrorException$ = [-3, n0, _IEE,\n { [_e]: _se },\n [_m],\n [0]\n];\nn0_registry.registerError(InternalErrorException$, InternalErrorException);\nvar InvalidIdentityPoolConfigurationException$ = [-3, n0, _IIPCE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);\nvar InvalidParameterException$ = [-3, n0, _IPE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidParameterException$, InvalidParameterException);\nvar LimitExceededException$ = [-3, n0, _LEE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(LimitExceededException$, LimitExceededException);\nvar NotAuthorizedException$ = [-3, n0, _NAE,\n { [_e]: _c, [_hE]: 403 },\n [_m],\n [0]\n];\nn0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);\nvar ResourceConflictException$ = [-3, n0, _RCE,\n { [_e]: _c, [_hE]: 409 },\n [_m],\n [0]\n];\nn0_registry.registerError(ResourceConflictException$, ResourceConflictException);\nvar ResourceNotFoundException$ = [-3, n0, _RNFE,\n { [_e]: _c, [_hE]: 404 },\n [_m],\n [0]\n];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nvar TooManyRequestsException$ = [-3, n0, _TMRE,\n { [_e]: _c, [_hE]: 429 },\n [_m],\n [0]\n];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nconst errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar IdentityProviderToken = [0, n0, _IPT, 8, 0];\nvar SecretKeyString = [0, n0, _SKS, 8, 0];\nvar Credentials$ = [3, n0, _C,\n 0,\n [_AKI, _SK, _ST, _E],\n [0, [() => SecretKeyString, 0], 0, 4]\n];\nvar GetCredentialsForIdentityInput$ = [3, n0, _GCFII,\n 0,\n [_II, _L, _CRA],\n [0, [() => LoginsMap, 0], 0], 1\n];\nvar GetCredentialsForIdentityResponse$ = [3, n0, _GCFIR,\n 0,\n [_II, _C],\n [0, [() => Credentials$, 0]]\n];\nvar GetIdInput$ = [3, n0, _GII,\n 0,\n [_IPI, _AI, _L],\n [0, 0, [() => LoginsMap, 0]], 1\n];\nvar GetIdResponse$ = [3, n0, _GIR,\n 0,\n [_II],\n [0]\n];\nvar LoginsMap = [2, n0, _LM,\n 0, [0,\n 0],\n [() => IdentityProviderToken,\n 0]\n];\nvar GetCredentialsForIdentity$ = [9, n0, _GCFI,\n 0, () => GetCredentialsForIdentityInput$, () => GetCredentialsForIdentityResponse$\n];\nvar GetId$ = [9, n0, _GI,\n 0, () => GetIdInput$, () => GetIdResponse$\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsJson1_1Protocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.cognitoidentity\",\n errorTypeRegistries,\n xmlNamespace: \"http://cognito-identity.amazonaws.com/doc/2014-06-30/\",\n version: \"2014-06-30\",\n serviceTarget: \"AWSCognitoIdentityService\",\n },\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config);\n emitWarningIfUnsupportedVersion$1(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass CognitoIdentityClient extends Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nconst command = makeBuilder(commonParams, \"AWSCognitoIdentityService\", \"CognitoIdentityClient\", getEndpointPlugin);\nconst _ep0 = {};\nconst _mw0 = (Command, cs, config, o) => [];\n\nclass GetCredentialsForIdentityCommand extends command(_ep0, _mw0, \"GetCredentialsForIdentity\", GetCredentialsForIdentity$) {\n}\n\nclass GetIdCommand extends command(_ep0, _mw0, \"GetId\", GetId$) {\n}\n\nconst commands = {\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n};\nclass CognitoIdentity extends CognitoIdentityClient {\n}\ncreateAggregatedClient(commands, CognitoIdentity);\n\nexports.CognitoIdentity = CognitoIdentity;\nexports.CognitoIdentityClient = CognitoIdentityClient;\nexports.CognitoIdentityServiceException = CognitoIdentityServiceException;\nexports.CognitoIdentityServiceException$ = CognitoIdentityServiceException$;\nexports.Credentials$ = Credentials$;\nexports.ExternalServiceException = ExternalServiceException;\nexports.ExternalServiceException$ = ExternalServiceException$;\nexports.GetCredentialsForIdentity$ = GetCredentialsForIdentity$;\nexports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand;\nexports.GetCredentialsForIdentityInput$ = GetCredentialsForIdentityInput$;\nexports.GetCredentialsForIdentityResponse$ = GetCredentialsForIdentityResponse$;\nexports.GetId$ = GetId$;\nexports.GetIdCommand = GetIdCommand;\nexports.GetIdInput$ = GetIdInput$;\nexports.GetIdResponse$ = GetIdResponse$;\nexports.InternalErrorException = InternalErrorException;\nexports.InternalErrorException$ = InternalErrorException$;\nexports.InvalidIdentityPoolConfigurationException = InvalidIdentityPoolConfigurationException;\nexports.InvalidIdentityPoolConfigurationException$ = InvalidIdentityPoolConfigurationException$;\nexports.InvalidParameterException = InvalidParameterException;\nexports.InvalidParameterException$ = InvalidParameterException$;\nexports.LimitExceededException = LimitExceededException;\nexports.LimitExceededException$ = LimitExceededException$;\nexports.NotAuthorizedException = NotAuthorizedException;\nexports.NotAuthorizedException$ = NotAuthorizedException$;\nexports.ResourceConflictException = ResourceConflictException;\nexports.ResourceConflictException$ = ResourceConflictException$;\nexports.ResourceNotFoundException = ResourceNotFoundException;\nexports.ResourceNotFoundException$ = ResourceNotFoundException$;\nexports.TooManyRequestsException = TooManyRequestsException;\nexports.TooManyRequestsException$ = TooManyRequestsException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";8VAAA,SAAQ,6BAAsB,qCAAiC,QAAmC,uCAAgC,8BAA4B,sCAAoC,0CAAwC,0BAAwB,2BAAyB,sBAAoB,uBAAqB,mBAAiB,sCAC7U,gBAAc,0CAAwC,iCAA+B,+BACrF,oBAAmB,oBAAkB,oBAAkB,cAAY,mCAAiC,6BAA2B,oCAAkC,+BAA6B,UAAQ,eAAa,gCACnN,QAAS,QAGjB,IAAQ,6BAA2B,aAAY,yCAAuC,8CAA4C,8BAA4B,mCAAiC,8BACvL,yBAAuB,iBAAe,kBAAgB,2BAAyB,yBAAuB,4BACtG,YAAU,wCAAsC,mCAAiC,iCACjF,sBAAoB,kCAAgC,mCAAiC,sBAAoB,yBACzG,eAAc,+BACd,4BAA0B,qBAAmB,8CAC7C,UAAQ,YAAU,YAAU,cAAY,8BACxC,mBAAiB,0BACjB,6BACA,gBAEF,GAAyD,MAAO,EAAQ,EAAS,IAAU,CAC7F,MAAO,CACH,UAAW,GAAiB,CAAO,EAAE,UACrC,OAAQ,MAAM,EAAkB,EAAO,MAAM,EAAE,IAAM,IAAM,CACvD,MAAU,MAAM,yDAAyD,IAC1E,CACP,GAEJ,SAAS,EAAgC,CAAC,EA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EAE9D,OAAO,EAAG,CACN,MAAM,QAAQ,EAEtB,CAEA,IAAM,EAAU,GAAY,GAAc,4BAA6B,wBAAyB,EAAiB,EAC3G,EAAO,CAAC,EACR,GAAO,CAAC,EAAS,EAAI,EAAQ,IAAM,CAAC,EAE1C,MAAM,UAAyC,EAAQ,EAAM,GAAM,4BAA6B,EAA0B,CAAE,CAC5H,CAEA,MAAM,UAAqB,EAAQ,EAAM,GAAM,QAAS,EAAM,CAAE,CAChE,CAEA,IAAM,GAAW,CACb,mCACA,cACJ,EACA,MAAM,WAAwB,CAAsB,CACpD,CACA,GAAuB,GAAU,EAAe,EAGhD,IAAQ,GAAwB,EAOhC,IAAQ,GAAmC,EAI3C,IAAQ,GAAe",
"debugId": "D0F7FC0032457BC364756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260228203230_blue_harpoon.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260228203230_blue_harpoon\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`account\\` (\n \\`id\\` text PRIMARY KEY,\n \\`email\\` text NOT NULL,\n \\`url\\` text NOT NULL,\n \\`access_token\\` text NOT NULL,\n \\`refresh_token\\` text NOT NULL,\n \\`token_expiry\\` integer,\n \\`selected_org_id\\` text,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`account_state\\` (\n \\`id\\` integer PRIMARY KEY NOT NULL,\n \\`active_account_id\\` text,\n FOREIGN KEY (\\`active_account_id\\`) REFERENCES \\`account\\`(\\`id\\`) ON UPDATE no action ON DELETE set null\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,8BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,4YAYb,EACD,MAAO,EAAG,IAAI,gQAMb,EACF,EAEL",
"debugId": "28F986F700FD48B564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260127222353_familiar_lady_ursula.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260127222353_familiar_lady_ursula\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`project\\` (\n \\`id\\` text PRIMARY KEY,\n \\`worktree\\` text NOT NULL,\n \\`vcs\\` text,\n \\`name\\` text,\n \\`icon_url\\` text,\n \\`icon_color\\` text,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`time_initialized\\` integer,\n \\`sandboxes\\` text NOT NULL\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`message\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_message_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`part\\` (\n \\`id\\` text PRIMARY KEY,\n \\`message_id\\` text NOT NULL,\n \\`session_id\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_part_message_id_message_id_fk\\` FOREIGN KEY (\\`message_id\\`) REFERENCES \\`message\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`permission\\` (\n \\`project_id\\` text PRIMARY KEY,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_permission_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`session\\` (\n \\`id\\` text PRIMARY KEY,\n \\`project_id\\` text NOT NULL,\n \\`parent_id\\` text,\n \\`slug\\` text NOT NULL,\n \\`directory\\` text NOT NULL,\n \\`title\\` text NOT NULL,\n \\`version\\` text NOT NULL,\n \\`share_url\\` text,\n \\`summary_additions\\` integer,\n \\`summary_deletions\\` integer,\n \\`summary_files\\` integer,\n \\`summary_diffs\\` text,\n \\`revert\\` text,\n \\`permission\\` text,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`time_compacting\\` integer,\n \\`time_archived\\` integer,\n CONSTRAINT \\`fk_session_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`todo\\` (\n \\`session_id\\` text NOT NULL,\n \\`content\\` text NOT NULL,\n \\`status\\` text NOT NULL,\n \\`priority\\` text NOT NULL,\n \\`position\\` integer NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`todo_pk\\` PRIMARY KEY(\\`session_id\\`, \\`position\\`),\n CONSTRAINT \\`fk_todo_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`\n CREATE TABLE \\`session_share\\` (\n \\`session_id\\` text PRIMARY KEY,\n \\`id\\` text NOT NULL,\n \\`secret\\` text NOT NULL,\n \\`url\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`fk_session_share_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`CREATE INDEX \\`message_session_idx\\` ON \\`message\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`part_message_idx\\` ON \\`part\\` (\\`message_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`part_session_idx\\` ON \\`part\\` (\\`session_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_project_idx\\` ON \\`session\\` (\\`project_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`session_parent_idx\\` ON \\`session\\` (\\`parent_id\\`);`)\n yield* tx.run(`CREATE INDEX \\`todo_session_idx\\` ON \\`todo\\` (\\`session_id\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,4YAab,EACD,MAAO,EAAG,IAAI,8XASb,EACD,MAAO,EAAG,IAAI,+ZAUb,EACD,MAAO,EAAG,IAAI,qWAQb,EACD,MAAO,EAAG,IAAI,2zBAsBb,EACD,MAAO,EAAG,IAAI,ghBAYb,EACD,MAAO,EAAG,IAAI,4aAUb,EACD,MAAO,EAAG,IAAI,iEAAuE,EACrF,MAAO,EAAG,IAAI,2DAAiE,EAC/E,MAAO,EAAG,IAAI,2DAAiE,EAC/E,MAAO,EAAG,IAAI,iEAAuE,EACrF,MAAO,EAAG,IAAI,+DAAqE,EACnF,MAAO,EAAG,IAAI,2DAAiE,EAChF,EAEL",
"debugId": "8E9BC89DC4B5B02364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/isexe@4.0.0/node_modules/isexe/dist/commonjs/index.min.js", "../../node_modules/.bun/which@6.0.1/node_modules/which/lib/index.js"],
"sourcesContent": [
"\"use strict\";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});i.sync=i.isexe=void 0;var M=require(\"node:fs\"),x=require(\"node:fs/promises\"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error(\"cannot get uid or gid\");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt(\"100\",8),l=parseInt(\"010\",8),j=parseInt(\"001\",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});o.sync=o.isexe=void 0;var T=require(\"node:fs\"),I=require(\"node:fs/promises\"),D=require(\"node:path\"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code===\"EACCES\")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||\"\"}=e,s=r.split(D.delimiter);if(s.indexOf(\"\")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{\"use strict\";Object.defineProperty(h,\"__esModule\",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||(\"get\"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!==\"default\"&&v(r,e,s[n]);return G(r,e),r}})(),X=exports&&exports.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&v(e,t,r)};Object.defineProperty(exports,\"__esModule\",{value:!0});exports.sync=exports.isexe=exports.posix=exports.win32=void 0;var E=w(_());exports.posix=E;var O=w(g());exports.win32=O;X(p(),exports);var H=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=H===\"win32\"?O:E;exports.isexe=b.isexe;exports.sync=b.sync;\n//# sourceMappingURL=index.min.js.map\n",
"const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\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,EAEzD,OADe,CAAC,GAAY,EAAK,KAAK,CAAG,EAAI,EAAI,MAAM,EAAG,CAAC,EAAI,IAC/C,EAAK,EAAU,CAAG,GAG9B,EAAQ,MAAO,EAAK,EAAM,CAAC,IAAM,CACrC,IAAQ,UAAS,UAAS,cAAe,EAAY,EAAK,CAAG,EACvD,EAAQ,CAAC,EAEf,QAAW,KAAW,EAAS,CAC7B,IAAM,EAAI,EAAY,EAAS,CAAG,EAElC,QAAW,KAAO,EAAS,CACzB,IAAM,EAAU,EAAI,EAEpB,GADW,MAAM,EAAM,EAAS,CAAE,QAAS,EAAY,aAAc,EAAK,CAAC,EACnE,CACN,GAAI,CAAC,EAAI,IACP,OAAO,EAET,EAAM,KAAK,CAAO,IAKxB,GAAI,EAAI,KAAO,EAAM,OACnB,OAAO,EAGT,GAAI,EAAI,QACN,OAAO,KAGT,MAAM,EAAiB,CAAG,GAGtB,EAAY,CAAC,EAAK,EAAM,CAAC,IAAM,CACnC,IAAQ,UAAS,UAAS,cAAe,EAAY,EAAK,CAAG,EACvD,EAAQ,CAAC,EAEf,QAAW,KAAe,EAAS,CACjC,IAAM,EAAI,EAAY,EAAa,CAAG,EAEtC,QAAW,KAAO,EAAS,CACzB,IAAM,EAAU,EAAI,EAEpB,GADW,EAAU,EAAS,CAAE,QAAS,EAAY,aAAc,EAAK,CAAC,EACjE,CACN,GAAI,CAAC,EAAI,IACP,OAAO,EAET,EAAM,KAAK,CAAO,IAKxB,GAAI,EAAI,KAAO,EAAM,OACnB,OAAO,EAGT,GAAI,EAAI,QACN,OAAO,KAGT,MAAM,EAAiB,CAAG,GAG5B,EAAO,QAAU,EACjB,EAAM,KAAO",
"debugId": "2116B99FA6ED958764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260211171708_add_project_commands.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260211171708_add_project_commands\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`project\\` ADD \\`commands\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,4CAAgD,EAC/D,EAEL",
"debugId": "5F058D953A5927A764756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/createCredentialChain.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.58/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.58/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/resolveLogins.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.58/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.58/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/IndexedDbStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.58/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/InMemoryStorage.js", "../../node_modules/.bun/@aws-sdk+credential-provider-cognito-identity@3.972.58/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/localStorage.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentity.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromCognitoIdentityPool.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromContainerMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromEnv.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromInstanceMetadata.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.70/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.70/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js", "../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.70/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromNodeProviderChain.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromSSO.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTemporaryCredentials.base.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-providers@3.1057.0/node_modules/@aws-sdk/credential-providers/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { ProviderError } from \"@smithy/core/config\";\nexport const createCredentialChain = (...credentialProviders) => {\n let expireAfter = -1;\n const baseFunction = async (awsIdentityProperties) => {\n const credentials = await propertyProviderChain(...credentialProviders)(awsIdentityProperties);\n if (!credentials.expiration && expireAfter !== -1) {\n credentials.expiration = new Date(Date.now() + expireAfter);\n }\n return credentials;\n };\n const withOptions = Object.assign(baseFunction, {\n expireAfter(milliseconds) {\n if (milliseconds < 5 * 60_000) {\n throw new Error(\"@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.\");\n }\n expireAfter = milliseconds;\n return withOptions;\n },\n });\n return withOptions;\n};\nexport const propertyProviderChain = (...providers) => async (awsIdentityProperties) => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\", { tryNextLink: false });\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentity(parameters) {\n return async (awsIdentityProperties) => {\n parameters.logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const { GetCredentialsForIdentityCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => parameters.clientConfig?.[property] ??\n parameters.parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters.logger), SessionToken, } = throwOnMissingCredentials(parameters.logger), } = await (parameters.client ??\n new CognitoIdentityClient(Object.assign({}, parameters.clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }))).send(new GetCredentialsForIdentityCommand({\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId,\n Logins: parameters.logins ? await resolveLogins(parameters.logins) : undefined,\n }));\n return {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration,\n };\n };\n}\nfunction throwOnMissingAccessKeyId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no access key ID\", { logger });\n}\nfunction throwOnMissingCredentials(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no credentials\", { logger });\n}\nfunction throwOnMissingSecretKey(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no secret key\", { logger });\n}\n",
"export function resolveLogins(logins) {\n return Promise.all(Object.keys(logins).reduce((arr, name) => {\n const tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n }\n else {\n arr.push(tokenOrProvider().then((token) => [name, token]));\n }\n return arr;\n }, [])).then((resolvedPairs) => resolvedPairs.reduce((logins, [key, value]) => {\n logins[key] = value;\n return logins;\n }, {}));\n}\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { fromCognitoIdentity } from \"./fromCognitoIdentity\";\nimport { localStorage } from \"./localStorage\";\nimport { resolveLogins } from \"./resolveLogins\";\nexport function fromCognitoIdentityPool({ accountId, cache = localStorage(), client, clientConfig, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : undefined, logger, parentClientConfig, }) {\n logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const cacheKey = userIdentifier\n ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}`\n : undefined;\n let provider = async (awsIdentityProperties) => {\n const { GetIdCommand, CognitoIdentityClient } = await import(\"./loadCognitoIdentity.js\");\n const fromConfigs = (property) => clientConfig?.[property] ??\n parentClientConfig?.[property] ??\n awsIdentityProperties?.callerClientConfig?.[property];\n const _client = client ??\n new CognitoIdentityClient(Object.assign({}, clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\"),\n userAgentAppId: fromConfigs(\"userAgentAppId\"),\n }));\n let identityId = (cacheKey && (await cache.getItem(cacheKey)));\n if (!identityId) {\n const { IdentityId = throwOnMissingId(logger) } = await _client.send(new GetIdCommand({\n AccountId: accountId,\n IdentityPoolId: identityPoolId,\n Logins: logins ? await resolveLogins(logins) : undefined,\n }));\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => { });\n }\n }\n provider = fromCognitoIdentity({\n client: _client,\n customRoleArn,\n logins,\n identityId,\n });\n return provider(awsIdentityProperties);\n };\n return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(() => { });\n }\n throw err;\n });\n}\nfunction throwOnMissingId(logger) {\n throw new CredentialsProviderError(\"Response from Amazon Cognito contained no identity ID\", { logger });\n}\n",
"const STORE_NAME = \"IdentityIds\";\nexport class IndexedDbStorage {\n dbName;\n constructor(dbName = \"aws:cognito-identity-ids\") {\n this.dbName = dbName;\n }\n getItem(key) {\n return this.withObjectStore(\"readonly\", (store) => {\n const req = store.get(key);\n return new Promise((resolve) => {\n req.onerror = () => resolve(null);\n req.onsuccess = () => resolve(req.result ? req.result.value : null);\n });\n }).catch(() => null);\n }\n removeItem(key) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.delete(key);\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n setItem(id, value) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.put({ id, value });\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n getDb() {\n const openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise((resolve, reject) => {\n openDbRequest.onsuccess = () => {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = () => {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = () => {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = () => {\n const db = openDbRequest.result;\n db.onerror = () => {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n }\n withObjectStore(mode, action) {\n return this.getDb().then((db) => {\n const tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = () => db.close();\n return new Promise((resolve, reject) => {\n tx.onerror = () => reject(tx.error);\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch((err) => {\n db.close();\n throw err;\n });\n });\n }\n}\n",
"export class InMemoryStorage {\n store;\n constructor(store = {}) {\n this.store = store;\n }\n getItem(key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n }\n removeItem(key) {\n delete this.store[key];\n }\n setItem(key, value) {\n this.store[key] = value;\n }\n}\n",
"import { IndexedDbStorage } from \"./IndexedDbStorage\";\nimport { InMemoryStorage } from \"./InMemoryStorage\";\nconst inMemoryStorage = new InMemoryStorage();\nexport function localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n",
"import { fromCognitoIdentity as _fromCognitoIdentity } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentity = (options) => _fromCognitoIdentity({\n ...options,\n});\n",
"import { fromCognitoIdentityPool as _fromCognitoIdentityPool } from \"@aws-sdk/credential-provider-cognito-identity\";\nexport const fromCognitoIdentityPool = (options) => _fromCognitoIdentityPool({\n ...options,\n});\n",
"import { fromContainerMetadata as _fromContainerMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromContainerMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromContainerMetadata\");\n return _fromContainerMetadata(init);\n};\n",
"import { fromEnv as _fromEnv } from \"@aws-sdk/credential-provider-env\";\nexport const fromEnv = (init) => _fromEnv(init);\n",
"import { fromIni as _fromIni } from \"@aws-sdk/credential-provider-ini\";\nexport const fromIni = (init = {}) => _fromIni({\n ...init,\n});\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromInstanceMetadata as _fromInstanceMetadata } from \"@smithy/credential-provider-imds\";\nexport const fromInstanceMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromInstanceMetadata\");\n return async () => _fromInstanceMetadata(init)().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_IMDS\", \"0\"));\n};\n",
"import { fromLoginCredentials as _fromLoginCredentials, } from \"@aws-sdk/credential-provider-login\";\nexport const fromLoginCredentials = (init) => _fromLoginCredentials({\n ...init,\n});\n",
"import { ENV_KEY, ENV_SECRET, fromEnv } from \"@aws-sdk/credential-provider-env\";\nimport { CredentialsProviderError, ENV_PROFILE } from \"@smithy/core/config\";\nimport { remoteProvider } from \"./remoteProvider\";\nimport { memoizeChain } from \"./runtime/memoize-chain\";\nlet multipleCredentialSourceWarningEmitted = false;\nexport const defaultProvider = (init = {}) => memoizeChain([\n async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\"\n ? init.logger.warn.bind(init.logger)\n : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await import(\"@aws-sdk/credential-provider-ini\");\n return fromIni(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n return fromProcess(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n return fromTokenFile(init)(awsIdentityProperties);\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n },\n], credentialsTreatedAsExpired);\nexport const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nexport const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n",
"import { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n};\n",
"export function memoizeChain(providers, treatAsExpired) {\n const chain = internalCreateChain(providers);\n let activeLock;\n let passiveLock;\n let credentials;\n let forceRefreshLock;\n const provider = async (options) => {\n if (options?.forceRefresh) {\n if (!forceRefreshLock) {\n forceRefreshLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n forceRefreshLock = undefined;\n });\n }\n await forceRefreshLock;\n return credentials;\n }\n if (credentials?.expiration) {\n if (credentials?.expiration?.getTime() < Date.now()) {\n credentials = undefined;\n }\n }\n if (activeLock) {\n await activeLock;\n }\n else if (!credentials || treatAsExpired?.(credentials)) {\n if (credentials) {\n if (!passiveLock) {\n passiveLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n passiveLock = undefined;\n });\n }\n }\n else {\n activeLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n activeLock = undefined;\n });\n return provider(options);\n }\n }\n return credentials;\n };\n return provider;\n}\nexport const internalCreateChain = (providers) => async (awsIdentityProperties) => {\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
"import { defaultProvider } from \"@aws-sdk/credential-provider-node\";\nexport const fromNodeProviderChain = (init = {}) => defaultProvider({\n ...init,\n});\n",
"import { fromProcess as _fromProcess } from \"@aws-sdk/credential-provider-process\";\nexport const fromProcess = (init) => _fromProcess(init);\n",
"import { fromSSO as _fromSSO } from \"@aws-sdk/credential-provider-sso\";\nexport const fromSSO = (init = {}) => {\n return _fromSSO({ ...init });\n};\n",
"import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS } from \"@smithy/core/config\";\nimport { fromNodeProviderChain } from \"./fromNodeProviderChain\";\nimport { fromTemporaryCredentials as fromTemporaryCredentialsBase } from \"./fromTemporaryCredentials.base\";\nexport const fromTemporaryCredentials = (options) => {\n return fromTemporaryCredentialsBase(options, fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => loadConfig({\n environmentVariableSelector: (env) => env.AWS_REGION,\n configFileSelector: (profileData) => {\n return profileData.region;\n },\n default: () => undefined,\n }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, profile })());\n};\n",
"import { normalizeProvider } from \"@smithy/core\";\nimport { CredentialsProviderError } from \"@smithy/core/config\";\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nexport const fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {\n let stsClient;\n return async (awsIdentityProperties = {}) => {\n const { callerClientConfig } = awsIdentityProperties;\n const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;\n const logger = options.logger ?? callerClientConfig?.logger;\n logger?.debug(\"@aws-sdk/credential-providers - fromTemporaryCredentials (STS)\");\n const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? \"aws-sdk-js-\" + Date.now() };\n if (params?.SerialNumber) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {\n tryNextLink: false,\n logger,\n });\n }\n params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);\n }\n const { AssumeRoleCommand, STSClient } = await import(\"./loadSts.js\");\n if (!stsClient) {\n const defaultCredentialsOrError = typeof credentialDefaultProvider === \"function\" ? credentialDefaultProvider() : undefined;\n const credentialSources = [\n options.masterCredentials,\n options.clientConfig?.credentials,\n void callerClientConfig?.credentials,\n callerClientConfig?.credentialDefaultProvider?.(),\n defaultCredentialsOrError,\n ];\n let credentialSource = \"STS client default credentials\";\n if (credentialSources[0]) {\n credentialSource = \"options.masterCredentials\";\n }\n else if (credentialSources[1]) {\n credentialSource = \"options.clientConfig.credentials\";\n }\n else if (credentialSources[2]) {\n credentialSource = \"caller client's credentials\";\n throw new Error(\"fromTemporaryCredentials recursion in callerClientConfig.credentials\");\n }\n else if (credentialSources[3]) {\n credentialSource = \"caller client's credentialDefaultProvider\";\n }\n else if (credentialSources[4]) {\n credentialSource = \"AWS SDK default credentials\";\n }\n const regionSources = [\n options.clientConfig?.region,\n callerClientConfig?.region,\n await regionProvider?.({\n profile,\n }),\n ASSUME_ROLE_DEFAULT_REGION,\n ];\n let regionSource = \"default partition's default region\";\n if (regionSources[0]) {\n regionSource = \"options.clientConfig.region\";\n }\n else if (regionSources[1]) {\n regionSource = \"caller client's region\";\n }\n else if (regionSources[2]) {\n regionSource = \"file or env region\";\n }\n const requestHandlerSources = [\n filterRequestHandler(options.clientConfig?.requestHandler),\n filterRequestHandler(callerClientConfig?.requestHandler),\n ];\n let requestHandlerSource = \"STS default requestHandler\";\n if (requestHandlerSources[0]) {\n requestHandlerSource = \"options.clientConfig.requestHandler\";\n }\n else if (requestHandlerSources[1]) {\n requestHandlerSource = \"caller client's requestHandler\";\n }\n logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +\n `${regionSource}=${await normalizeProvider(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);\n stsClient = new STSClient({\n userAgentAppId: callerClientConfig?.userAgentAppId,\n ...options.clientConfig,\n credentials: coalesce(credentialSources),\n logger,\n profile,\n region: coalesce(regionSources),\n requestHandler: coalesce(requestHandlerSources),\n });\n }\n if (options.clientPlugins) {\n for (const plugin of options.clientPlugins) {\n stsClient.middlewareStack.use(plugin);\n }\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {\n logger,\n });\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n credentialScope: Credentials.CredentialScope,\n };\n };\n};\nconst filterRequestHandler = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\" ? undefined : requestHandler;\n};\nconst coalesce = (args) => {\n for (const item of args) {\n if (item !== undefined) {\n return item;\n }\n }\n};\n",
"import { fromTokenFile as _fromTokenFile } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromTokenFile = (init = {}) => _fromTokenFile({\n ...init,\n});\n",
"import { fromWebToken as _fromWebToken } from \"@aws-sdk/credential-provider-web-identity\";\nexport const fromWebToken = (init) => _fromWebToken({\n ...init,\n});\n"
],
"mappings": ";moBAAA,oBACa,QAAwB,SAAI,SAAwB,MAC7D,SAAI,OAAc,QAQZ,OAAc,YAAO,YAPN,WAAO,IAA0B,CAClD,IAAM,EAAc,MAAM,GAAsB,GAAG,CAAmB,EAAE,CAAqB,EAC7F,GAAI,CAAC,EAAY,YAAc,IAAgB,GAC3C,EAAY,WAAa,IAAI,KAAK,KAAK,IAAI,EAAI,CAAW,EAE9D,OAAO,GAEqC,CAC5C,WAAW,CAAC,EAAc,CACtB,GAAI,EAAe,OACf,MAAU,MAAM,uIAAuI,EAG3J,OADA,EAAc,EACP,EAEf,CAAC,EACD,OA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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": ";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,EAAY,YAAY,GAAG,CAAC,EAC/F,IAAM,EAAa,MAAO,EAAO,OAC/B,EAAO,WAAW,CAChB,IAAK,IAAa,yCAClB,MAAO,IAAM,IAAI,CACnB,CAAC,CACH,EACA,OAAO,EAAO,GAAG,wBAAwB,EAAE,SAAU,CACnD,EACA,EACA,EAMA,CACA,IAAM,EAAS,MAAO,EAChB,EAAU,MAAO,EAAO,IAAI,CAChC,IAAK,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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": "EA9E5EF0372CE0E964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C941F7E76EF587F64756E2164756E21",
"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": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "1CF0E0CF6F8E5DBA64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260603141458_session_input_inbox.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603141458_session_input_inbox\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_input\\` (\n \\`seq\\` integer PRIMARY KEY AUTOINCREMENT,\n \\`id\\` text NOT NULL UNIQUE,\n \\`session_id\\` text NOT NULL,\n \\`prompt\\` text NOT NULL,\n \\`delivery\\` text NOT NULL,\n \\`promoted_seq\\` integer,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`fk_session_input_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `CREATE INDEX \\`session_input_session_pending_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`,\\`seq\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,qCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,geAWb,EACD,MAAO,EAAG,IACR,8GACF,EACD,EAEL",
"debugId": "9D427548CFE767A364756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cohere@3.0.27+d6123d32214422cb/node_modules/@ai-sdk/cohere/dist/index.mjs"],
"sourcesContent": [
"// src/cohere-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/cohere-chat-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n parseProviderOptions,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\n\n// src/cohere-chat-options.ts\nimport { z } from \"zod/v4\";\nvar cohereLanguageModelOptions = z.object({\n /**\n * Configuration for reasoning features (optional)\n *\n * Can be set to an object with the two properties `type` and `tokenBudget`. `type` can be set to `'enabled'` or `'disabled'` (defaults to `'enabled'`).\n * `tokenBudget` is the maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response\n *\n * @see https://docs.cohere.com/reference/chat#request.body.thinking\n */\n thinking: z.object({\n type: z.enum([\"enabled\", \"disabled\"]).optional(),\n tokenBudget: z.number().optional()\n }).optional()\n});\n\n// src/cohere-error.ts\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar cohereErrorDataSchema = z2.object({\n message: z2.string()\n});\nvar cohereFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: cohereErrorDataSchema,\n errorToMessage: (data) => data.message\n});\n\n// src/cohere-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n tools,\n toolChoice\n}) {\n tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, toolChoice: void 0, toolWarnings };\n }\n const cohereTools = [];\n for (const tool of tools) {\n if (tool.type === \"provider\") {\n toolWarnings.push({\n type: \"unsupported\",\n feature: `provider-defined tool ${tool.id}`\n });\n } else {\n cohereTools.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.inputSchema\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n return { tools: cohereTools, toolChoice: void 0, toolWarnings };\n case \"none\":\n return { tools: cohereTools, toolChoice: \"NONE\", toolWarnings };\n case \"required\":\n return { tools: cohereTools, toolChoice: \"REQUIRED\", toolWarnings };\n case \"tool\":\n return {\n tools: cohereTools.filter(\n (tool) => tool.function.name === toolChoice.toolName\n ),\n toolChoice: \"REQUIRED\",\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/convert-cohere-usage.ts\nfunction convertCohereUsage(tokens) {\n if (tokens == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const inputTokens = tokens.input_tokens;\n const outputTokens = tokens.output_tokens;\n return {\n inputTokens: {\n total: inputTokens,\n noCache: inputTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: outputTokens,\n text: outputTokens,\n reasoning: void 0\n },\n raw: tokens\n };\n}\n\n// src/convert-to-cohere-chat-prompt.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction convertToCohereChatPrompt(prompt) {\n const messages = [];\n const documents = [];\n const warnings = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return part.text;\n }\n case \"file\": {\n let textContent;\n if (typeof part.data === \"string\") {\n textContent = part.data;\n } else if (part.data instanceof Uint8Array) {\n if (!(((_a = part.mediaType) == null ? void 0 : _a.startsWith(\"text/\")) || part.mediaType === \"application/json\")) {\n throw new UnsupportedFunctionalityError2({\n functionality: `document media type: ${part.mediaType}`,\n message: `Media type '${part.mediaType}' is not supported. Supported media types are: text/* and application/json.`\n });\n }\n textContent = new TextDecoder().decode(part.data);\n } else {\n throw new UnsupportedFunctionalityError2({\n functionality: \"File URL data\",\n message: \"URLs should be downloaded by the AI SDK and not reach this point. This indicates a configuration issue.\"\n });\n }\n documents.push({\n data: {\n text: textContent,\n title: part.filename\n }\n });\n return \"\";\n }\n }\n }).join(\"\")\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n }\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: toolCalls.length > 0 ? void 0 : text,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0,\n tool_plan: void 0\n });\n break;\n }\n case \"tool\": {\n messages.push(\n ...content.filter((toolResult) => toolResult.type !== \"tool-approval-response\").map((toolResult) => {\n var _a;\n const output = toolResult.output;\n let contentValue;\n switch (output.type) {\n case \"text\":\n case \"error-text\":\n contentValue = output.value;\n break;\n case \"execution-denied\":\n contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n break;\n case \"content\":\n case \"json\":\n case \"error-json\":\n contentValue = JSON.stringify(output.value);\n break;\n }\n return {\n role: \"tool\",\n content: contentValue,\n tool_call_id: toolResult.toolCallId\n };\n })\n );\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return { messages, documents, warnings };\n}\n\n// src/map-cohere-finish-reason.ts\nfunction mapCohereFinishReason(finishReason) {\n switch (finishReason) {\n case \"COMPLETE\":\n case \"STOP_SEQUENCE\":\n return \"stop\";\n case \"MAX_TOKENS\":\n return \"length\";\n case \"ERROR\":\n return \"error\";\n case \"TOOL_CALL\":\n return \"tool-calls\";\n default:\n return \"other\";\n }\n}\n\n// src/cohere-chat-language-model.ts\nvar CohereChatLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n tools,\n toolChoice,\n providerOptions\n }) {\n var _a, _b;\n const cohereOptions = (_a = await parseProviderOptions({\n provider: \"cohere\",\n providerOptions,\n schema: cohereLanguageModelOptions\n })) != null ? _a : {};\n const {\n messages: chatPrompt,\n documents: cohereDocuments,\n warnings: promptWarnings\n } = convertToCohereChatPrompt(prompt);\n const {\n tools: cohereTools,\n toolChoice: cohereToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice });\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n max_tokens: maxOutputTokens,\n temperature,\n p: topP,\n k: topK,\n seed,\n stop_sequences: stopSequences,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? { type: \"json_object\", json_schema: responseFormat.schema } : void 0,\n // messages:\n messages: chatPrompt,\n // tools:\n tools: cohereTools,\n tool_choice: cohereToolChoice,\n // documents for RAG:\n ...cohereDocuments.length > 0 && { documents: cohereDocuments },\n // reasoning\n ...cohereOptions.thinking && {\n thinking: {\n type: (_b = cohereOptions.thinking.type) != null ? _b : \"enabled\",\n token_budget: cohereOptions.thinking.tokenBudget\n }\n }\n },\n warnings: [...toolWarnings, ...promptWarnings]\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const { args, warnings } = await this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n cohereChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const content = [];\n for (const item of (_a = response.message.content) != null ? _a : []) {\n if (item.type === \"text\" && item.text.length > 0) {\n content.push({ type: \"text\", text: item.text });\n continue;\n }\n if (item.type === \"thinking\" && item.thinking.length > 0) {\n content.push({ type: \"reasoning\", text: item.thinking });\n continue;\n }\n }\n for (const citation of (_b = response.message.citations) != null ? _b : []) {\n content.push({\n type: \"source\",\n sourceType: \"document\",\n id: this.config.generateId(),\n mediaType: \"text/plain\",\n title: ((_d = (_c = citation.sources[0]) == null ? void 0 : _c.document) == null ? void 0 : _d.title) || \"Document\",\n providerMetadata: {\n cohere: {\n start: citation.start,\n end: citation.end,\n text: citation.text,\n sources: citation.sources,\n ...citation.type && { citationType: citation.type }\n }\n }\n });\n }\n for (const toolCall of (_e = response.message.tool_calls) != null ? _e : []) {\n content.push({\n type: \"tool-call\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n // Cohere sometimes returns `null` for tool call arguments for tools\n // defined as having no arguments.\n input: toolCall.function.arguments.replace(/^null$/, \"{}\")\n });\n }\n return {\n content,\n finishReason: {\n unified: mapCohereFinishReason(response.finish_reason),\n raw: (_f = response.finish_reason) != null ? _f : void 0\n },\n usage: convertCohereUsage(response.usage.tokens),\n request: { body: args },\n response: {\n // TODO timestamp, model id\n id: (_g = response.generation_id) != null ? _g : void 0,\n headers: responseHeaders,\n body: rawResponse\n },\n warnings\n };\n }\n async doStream(options) {\n const { args, warnings } = await this.getArgs(options);\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: { ...args, stream: true },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n cohereChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n let pendingToolCall = null;\n let isActiveReasoning = false;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n finishReason = { unified: \"error\", raw: void 0 };\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n const type = value.type;\n switch (type) {\n case \"content-start\": {\n if (value.delta.message.content.type === \"thinking\") {\n controller.enqueue({\n type: \"reasoning-start\",\n id: String(value.index)\n });\n isActiveReasoning = true;\n return;\n }\n controller.enqueue({\n type: \"text-start\",\n id: String(value.index)\n });\n return;\n }\n case \"content-delta\": {\n if (\"thinking\" in value.delta.message.content) {\n controller.enqueue({\n type: \"reasoning-delta\",\n id: String(value.index),\n delta: value.delta.message.content.thinking\n });\n return;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: String(value.index),\n delta: value.delta.message.content.text\n });\n return;\n }\n case \"content-end\": {\n if (isActiveReasoning) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: String(value.index)\n });\n isActiveReasoning = false;\n return;\n }\n controller.enqueue({\n type: \"text-end\",\n id: String(value.index)\n });\n return;\n }\n case \"tool-call-start\": {\n const toolId = value.delta.message.tool_calls.id;\n const toolName = value.delta.message.tool_calls.function.name;\n const initialArgs = value.delta.message.tool_calls.function.arguments;\n pendingToolCall = {\n id: toolId,\n name: toolName,\n arguments: initialArgs,\n hasFinished: false\n };\n controller.enqueue({\n type: \"tool-input-start\",\n id: toolId,\n toolName\n });\n if (initialArgs.length > 0) {\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolId,\n delta: initialArgs\n });\n }\n return;\n }\n case \"tool-call-delta\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n const argsDelta = value.delta.message.tool_calls.function.arguments;\n pendingToolCall.arguments += argsDelta;\n controller.enqueue({\n type: \"tool-input-delta\",\n id: pendingToolCall.id,\n delta: argsDelta\n });\n }\n return;\n }\n case \"tool-call-end\": {\n if (pendingToolCall && !pendingToolCall.hasFinished) {\n controller.enqueue({\n type: \"tool-input-end\",\n id: pendingToolCall.id\n });\n controller.enqueue({\n type: \"tool-call\",\n toolCallId: pendingToolCall.id,\n toolName: pendingToolCall.name,\n input: JSON.stringify(\n JSON.parse(((_a = pendingToolCall.arguments) == null ? void 0 : _a.trim()) || \"{}\")\n )\n });\n pendingToolCall.hasFinished = true;\n pendingToolCall = null;\n }\n return;\n }\n case \"message-start\": {\n controller.enqueue({\n type: \"response-metadata\",\n id: (_b = value.id) != null ? _b : void 0\n });\n return;\n }\n case \"message-end\": {\n finishReason = {\n unified: mapCohereFinishReason(value.delta.finish_reason),\n raw: value.delta.finish_reason\n };\n usage = value.delta.usage.tokens;\n return;\n }\n default: {\n return;\n }\n }\n },\n flush(controller) {\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertCohereUsage(usage)\n });\n }\n })\n ),\n request: { body: { ...args, stream: true } },\n response: { headers: responseHeaders }\n };\n }\n};\nvar cohereChatResponseSchema = z3.object({\n generation_id: z3.string().nullish(),\n message: z3.object({\n role: z3.string(),\n content: z3.array(\n z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n ).nullish(),\n tool_plan: z3.string().nullish(),\n tool_calls: z3.array(\n z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n ).nullish(),\n citations: z3.array(\n z3.object({\n start: z3.number(),\n end: z3.number(),\n text: z3.string(),\n sources: z3.array(\n z3.object({\n type: z3.string().optional(),\n id: z3.string().optional(),\n document: z3.object({\n id: z3.string().optional(),\n text: z3.string(),\n title: z3.string()\n })\n })\n ),\n type: z3.string().optional()\n })\n ).nullish()\n }),\n finish_reason: z3.string(),\n usage: z3.object({\n billed_units: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n }),\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n});\nvar cohereChatChunkSchema = z3.discriminatedUnion(\"type\", [\n z3.object({\n type: z3.literal(\"citation-start\")\n }),\n z3.object({\n type: z3.literal(\"citation-end\")\n }),\n z3.object({\n type: z3.literal(\"content-start\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n type: z3.literal(\"text\"),\n text: z3.string()\n }),\n z3.object({\n type: z3.literal(\"thinking\"),\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-delta\"),\n index: z3.number(),\n delta: z3.object({\n message: z3.object({\n content: z3.union([\n z3.object({\n text: z3.string()\n }),\n z3.object({\n thinking: z3.string()\n })\n ])\n })\n })\n }),\n z3.object({\n type: z3.literal(\"content-end\"),\n index: z3.number()\n }),\n z3.object({\n type: z3.literal(\"message-start\"),\n id: z3.string().nullish()\n }),\n z3.object({\n type: z3.literal(\"message-end\"),\n delta: z3.object({\n finish_reason: z3.string(),\n usage: z3.object({\n tokens: z3.object({\n input_tokens: z3.number(),\n output_tokens: z3.number()\n })\n })\n })\n }),\n // https://docs.cohere.com/v2/docs/streaming#tool-use-stream-events-for-tool-calling\n z3.object({\n type: z3.literal(\"tool-plan-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_plan: z3.string()\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-start\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n id: z3.string(),\n type: z3.literal(\"function\"),\n function: z3.object({\n name: z3.string(),\n arguments: z3.string()\n })\n })\n })\n })\n }),\n // A single tool call's `arguments` stream in chunks and must be accumulated\n // in a string and so the full tool object info can only be parsed once we see\n // `tool-call-end`.\n z3.object({\n type: z3.literal(\"tool-call-delta\"),\n delta: z3.object({\n message: z3.object({\n tool_calls: z3.object({\n function: z3.object({\n arguments: z3.string()\n })\n })\n })\n })\n }),\n z3.object({\n type: z3.literal(\"tool-call-end\")\n })\n]);\n\n// src/cohere-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createJsonResponseHandler as createJsonResponseHandler2,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\n\n// src/cohere-embedding-options.ts\nimport { z as z4 } from \"zod/v4\";\nvar cohereEmbeddingModelOptions = z4.object({\n /**\n * Specifies the type of input passed to the model. Default is `search_query`.\n *\n * - \"search_document\": Used for embeddings stored in a vector database for search use-cases.\n * - \"search_query\": Used for embeddings of search queries run against a vector DB to find relevant documents.\n * - \"classification\": Used for embeddings passed through a text classifier.\n * - \"clustering\": Used for embeddings run through a clustering algorithm.\n */\n inputType: z4.enum([\"search_document\", \"search_query\", \"classification\", \"clustering\"]).optional(),\n /**\n * Specifies how the API will handle inputs longer than the maximum token length.\n * Default is `END`.\n *\n * - \"NONE\": If selected, when the input exceeds the maximum input token length will return an error.\n * - \"START\": Will discard the start of the input until the remaining input is exactly the maximum input token length for the model.\n * - \"END\": Will discard the end of the input until the remaining input is exactly the maximum input token length for the model.\n */\n truncate: z4.enum([\"NONE\", \"START\", \"END\"]).optional(),\n /**\n * The number of dimensions of the output embedding.\n * Only available for `embed-v4.0` and newer models.\n *\n * Possible values are `256`, `512`, `1024`, and `1536`.\n * The default is `1536`.\n */\n outputDimension: z4.union([z4.literal(256), z4.literal(512), z4.literal(1024), z4.literal(1536)]).optional()\n});\n\n// src/cohere-embedding-model.ts\nvar CohereEmbeddingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.maxEmbeddingsPerCall = 96;\n this.supportsParallelCalls = true;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n async doEmbed({\n values,\n headers,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const embeddingOptions = await parseProviderOptions2({\n provider: \"cohere\",\n providerOptions,\n schema: cohereEmbeddingModelOptions\n });\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi2({\n url: `${this.config.baseURL}/embed`,\n headers: combineHeaders2(this.config.headers(), headers),\n body: {\n model: this.modelId,\n // The AI SDK only supports 'float' embeddings. Note that the Cohere API\n // supports other embedding types, but they are not currently supported by the AI SDK.\n // https://docs.cohere.com/v2/reference/embed#request.body.embedding_types\n embedding_types: [\"float\"],\n texts: values,\n input_type: (_a = embeddingOptions == null ? void 0 : embeddingOptions.inputType) != null ? _a : \"search_query\",\n truncate: embeddingOptions == null ? void 0 : embeddingOptions.truncate,\n output_dimension: embeddingOptions == null ? void 0 : embeddingOptions.outputDimension\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n cohereTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n warnings: [],\n embeddings: response.embeddings.float,\n usage: { tokens: response.meta.billed_units.input_tokens },\n response: { headers: responseHeaders, body: rawValue }\n };\n }\n};\nvar cohereTextEmbeddingResponseSchema = z5.object({\n embeddings: z5.object({\n float: z5.array(z5.array(z5.number()))\n }),\n meta: z5.object({\n billed_units: z5.object({\n input_tokens: z5.number()\n })\n })\n});\n\n// src/reranking/cohere-reranking-model.ts\nimport {\n combineHeaders as combineHeaders3,\n createJsonResponseHandler as createJsonResponseHandler3,\n parseProviderOptions as parseProviderOptions3,\n postJsonToApi as postJsonToApi3\n} from \"@ai-sdk/provider-utils\";\n\n// src/reranking/cohere-reranking-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar cohereRerankingResponseSchema = lazySchema(\n () => zodSchema(\n z6.object({\n id: z6.string().nullish(),\n results: z6.array(\n z6.object({\n index: z6.number(),\n relevance_score: z6.number()\n })\n ),\n meta: z6.any()\n })\n )\n);\n\n// src/reranking/cohere-reranking-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar cohereRerankingModelOptionsSchema = lazySchema2(\n () => zodSchema2(\n z7.object({\n maxTokensPerDoc: z7.number().optional(),\n priority: z7.number().optional()\n })\n )\n);\n\n// src/reranking/cohere-reranking-model.ts\nvar CohereRerankingModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n // current implementation is based on v2 of the API: https://docs.cohere.com/v2/reference/rerank\n async doRerank({\n documents,\n headers,\n query,\n topN,\n abortSignal,\n providerOptions\n }) {\n var _a;\n const rerankingOptions = await parseProviderOptions3({\n provider: \"cohere\",\n providerOptions,\n schema: cohereRerankingModelOptionsSchema\n });\n const warnings = [];\n if (documents.type === \"object\") {\n warnings.push({\n type: \"compatibility\",\n feature: \"object documents\",\n details: \"Object documents are converted to strings.\"\n });\n }\n const {\n responseHeaders,\n value: response,\n rawValue\n } = await postJsonToApi3({\n url: `${this.config.baseURL}/rerank`,\n headers: combineHeaders3(this.config.headers(), headers),\n body: {\n model: this.modelId,\n query,\n documents: documents.type === \"text\" ? documents.values : documents.values.map((value) => JSON.stringify(value)),\n top_n: topN,\n max_tokens_per_doc: rerankingOptions == null ? void 0 : rerankingOptions.maxTokensPerDoc,\n priority: rerankingOptions == null ? void 0 : rerankingOptions.priority\n },\n failedResponseHandler: cohereFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler3(\n cohereRerankingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n ranking: response.results.map((result) => ({\n index: result.index,\n relevanceScore: result.relevance_score\n })),\n warnings,\n response: {\n id: (_a = response.id) != null ? _a : void 0,\n headers: responseHeaders,\n body: rawValue\n }\n };\n }\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.27\" : \"0.0.0-test\";\n\n// src/cohere-provider.ts\nfunction createCohere(options = {}) {\n var _a;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.cohere.com/v2\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"COHERE_API_KEY\",\n description: \"Cohere\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cohere/${VERSION}`\n );\n const createChatModel = (modelId) => {\n var _a2;\n return new CohereChatLanguageModel(modelId, {\n provider: \"cohere.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n generateId: (_a2 = options.generateId) != null ? _a2 : generateId\n });\n };\n const createEmbeddingModel = (modelId) => new CohereEmbeddingModel(modelId, {\n provider: \"cohere.textEmbedding\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createRerankingModel = (modelId) => new CohereRerankingModel(modelId, {\n provider: \"cohere.reranking\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Cohere model function cannot be called with the new keyword.\"\n );\n }\n return createChatModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embedding = createEmbeddingModel;\n provider.embeddingModel = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.reranking = createRerankingModel;\n provider.rerankingModel = createRerankingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cohere = createCohere();\nexport {\n VERSION,\n cohere,\n createCohere\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";8TAuBA,SAAI,OAA6B,OAAE,YAAO,CASxC,SAAU,EAAE,OAAO,CACjB,KAAM,EAAE,KAAK,CAAC,UAAW,UAAU,CAAC,EAAE,SAAS,EAC/C,YAAa,EAAE,OAAO,EAAE,SAAS,CACnC,CAAC,EAAE,SAAS,CACd,CAAC,EAKG,EAAwB,EAAG,OAAO,CACpC,QAAS,EAAG,OAAO,CACrB,CAAC,EACG,EAA8B,EAA+B,CAC/D,YAAa,EACb,eAAgB,CAAC,IAAS,EAAK,OACjC,CAAC,EAMD,SAAS,CAAY,EACnB,QACA,cACC,CACD,GAAS,GAAS,KAAY,OAAI,EAAM,QAAU,EAAa,OAC/D,IAAM,EAAe,CAAC,EACtB,GAAI,GAAS,KACX,MAAO,CAAE,MAAY,OAAG,WAAiB,OAAG,cAAa,EAE3D,IAAM,EAAc,CAAC,EACrB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QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,IACnB,EACM,EAAkB,CAAC,IAAY,CACnC,IAAI,EACJ,OAAO,IAAI,EAAwB,EAAS,CAC1C,SAAU,cACV,UACA,QAAS,EACT,MAAO,EAAQ,MACf,YAAa,EAAM,EAAQ,aAAe,KAAO,EAAM,CACzD,CAAC,GAEG,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,uBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAuB,CAAC,IAAY,IAAI,EAAqB,EAAS,CAC1E,SAAU,mBACV,UACA,QAAS,EACT,MAAO,EAAQ,KACjB,CAAC,EACK,EAAW,QAAQ,CAAC,EAAS,CACjC,GAAI,WACF,MAAU,MACR,kEACF,EAEF,OAAO,EAAgB,CAAO,GAahC,OAXA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,cAAgB,EACzB,EAAS,mBAAqB,EAC9B,EAAS,UAAY,EACrB,EAAS,eAAiB,EAC1B,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAS,GAAa",
"debugId": "BCF15E881EA31A1F64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+vercel@2.0.39+d6123d32214422cb/node_modules/@ai-sdk/vercel/dist/index.mjs"],
"sourcesContent": [
"// src/vercel-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.39\" : \"0.0.0-test\";\n\n// src/vercel-provider.ts\nfunction createVercel(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.v0.dev/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"VERCEL_API_KEY\",\n description: \"Vercel\"\n })}`,\n ...options.headers\n },\n `ai-sdk/vercel/${VERSION}`\n );\n const getCommonModelConfig = (modelType) => ({\n provider: `vercel.${modelType}`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createChatModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n ...getCommonModelConfig(\"chat\")\n });\n };\n const provider = (modelId) => createChatModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createChatModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar vercel = createVercel();\nexport {\n VERSION,\n createVercel,\n vercel\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";wQAYA,SAAI,OAAiB,cAGrB,cAAS,MAAY,CAAC,EAAU,CAAC,EAAG,CAClC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,uBACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,iBACzB,YAAa,QACf,CAAC,OACE,EAAQ,OACb,EACA,iBAAiB,GACnB,EACM,EAAuB,CAAC,KAAe,CAC3C,SAAU,UAAU,IACpB,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,KACjB,GACM,EAAkB,CAAC,IAAY,CACnC,OAAO,IAAI,EAAkC,EAAS,IACjD,EAAqB,MAAM,CAChC,CAAC,GAEG,EAAW,CAAC,IAAY,EAAgB,CAAO,EAUrD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAS,EAAa",
"debugId": "5EAE3EE45F8E239564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "FD3574C6E75E4C5F64756E2164756E21",
"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": "76E4CDE7CA4369A064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3DA9C14C9611010164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260612174303_project_dir_strategy.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260612174303_project_dir_strategy\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`project_directory\\` ADD \\`strategy\\` text;`)\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_project_directory\\` (\n \\`project_id\\` text NOT NULL,\n \\`directory\\` text NOT NULL,\n \\`type\\` text,\n \\`strategy\\` text,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`project_directory_pk\\` PRIMARY KEY(\\`project_id\\`, \\`directory\\`),\n CONSTRAINT \\`fk_project_directory_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `INSERT INTO \\`__new_project_directory\\`(\\`project_id\\`, \\`directory\\`, \\`type\\`, \\`time_created\\`) SELECT \\`project_id\\`, \\`directory\\`, \\`type\\`, \\`time_created\\` FROM \\`project_directory\\`;`,\n )\n yield* tx.run(`DROP TABLE \\`project_directory\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_project_directory\\` RENAME TO \\`project_directory\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sDAA0D,EACxE,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,wdAUb,EACD,MAAO,EAAG,IACR,6KACF,EACA,MAAO,EAAG,IAAI,iCAAmC,EACjD,MAAO,EAAG,IAAI,sEAA0E,EACxF,MAAO,EAAG,IAAI,yBAAyB,EACxC,EAEL",
"debugId": "8BB45200644F532D64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "019D2138632D7E5964756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.4/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n",
"import { CredentialsProviderError } from \"@smithy/core/config\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isLoginProfile, resolveLoginCredentials } from \"./resolveLoginCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName } from \"@smithy/core/config\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/nested-clients/sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/core/config\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nexport const resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const { fromLoginCredentials } = await import(\"@aws-sdk/credential-provider-login\");\n const credentials = await fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => {\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n const credentials = await fromProcess({\n ...options,\n profile,\n })();\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_PROCESS\", \"v\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n const credentials = await fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n })({\n callerClientConfig,\n });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\");\n};\n"
],
"mappings": ";0JAAA,oBCAA,oBCAA,eACA,WCDA,eACA,WACa,EAA0B,CAAC,EAAkB,EAAa,IAAW,CAC9E,IAAM,EAAqB,CACvB,aAAc,MAAO,IAAY,CAC7B,IAAQ,YAAa,KAAa,2CAC1B,yBAA0B,KAAa,0CAE/C,OADA,GAAQ,MAAM,sEAAsE,EAC7E,SAAY,QAAM,EAAS,GAAW,CAAC,CAAC,EAAG,EAAsB,CAAO,CAAC,EAAE,EAAE,KAAK,CAAgB,GAE7G,oBAAqB,MAAO,IAAY,CACpC,GAAQ,MAAM,6EAA6E,EAC3F,IAAQ,wBAAyB,KAAa,0CAC9C,MAAO,UAAY,EAAqB,CAAO,EAAE,EAAE,KAAK,CAAgB,GAE5E,YAAa,MAAO,IAAY,CAC5B,GAAQ,MAAM,qEAAqE,EACnF,IAAQ,WAAY,KAAa,0CACjC,MAAO,UAAY,EAAQ,CAAO,EAAE,EAAE,KAAK,CAAgB,EAEnE,EACA,GAAI,KAAoB,EACpB,OAAO,EAAmB,GAG1B,WAAM,IAAI,2BAAyB,4CAA4C,UAAoB,kEAC/B,CAAE,QAAO,CAAC,GAGhF,EAAmB,CAAC,IAAU,uBAAqB,EAAO,qCAAsC,GAAG,ED1BlG,IAAM,EAAsB,CAAC,GAAO,UAAU,UAAW,UAAW,CAAC,IAAM,CAC9E,OAAQ,QAAQ,CAAG,GACf,OAAO,IAAQ,UACf,OAAO,EAAI,WAAa,UACxB,CAAC,YAAa,QAAQ,EAAE,QAAQ,OAAO,EAAI,iBAAiB,EAAI,IAChE,CAAC,YAAa,QAAQ,EAAE,QAAQ,OAAO,EAAI,WAAW,EAAI,IAC1D,CAAC,YAAa,QAAQ,EAAE,QAAQ,OAAO,EAAI,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CAAkB",
"debugId": "281FCEB63C7C99BC64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "508B8A2EF684408E64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "0C1FEBBCEC68C97C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.59/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.59/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.59/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js"],
"sourcesContent": [
"import { getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { resolveProcessCredentials } from \"./resolveProcessCredentials\";\nexport const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init.logger);\n};\n",
"import { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { getValidatedProcessCredentials } from \"./getValidatedProcessCredentials\";\nexport const resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n",
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n"
],
"mappings": ";kJAAA,oBCAA,oBACA,eAAS,sBACT,oBAAS,aCFT,eACa,EAAiC,CAAC,EAAa,EAAM,IAAa,CAC3E,GAAI,EAAK,UAAY,EACjB,MAAM,MAAM,WAAW,gDAA0D,EAErF,GAAI,EAAK,cAAgB,QAAa,EAAK,kBAAoB,OAC3D,MAAM,MAAM,WAAW,oDAA8D,EAEzF,GAAI,EAAK,WAAY,CACjB,IAAM,EAAc,IAAI,KAExB,GADmB,IAAI,KAAK,EAAK,UAAU,EAC1B,EACb,MAAM,MAAM,WAAW,oDAA8D,EAG7F,IAAI,EAAY,EAAK,UACrB,G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
"sourcesContent": [
],
"mappings": "",
"debugId": "EA1F3D7E8177F52164756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst process = require(\"process\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const args = 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n try {\n const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-win.js.map"
],
"mappings": ";wKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,eACA,MACA,MACN,eAAe,CAAY,EAAG,CAE1B,IAAI,EAAU,8BACd,GAAI,EAAQ,OAAS,QAAU,2BAA4B,EAAQ,IAC/D,EAAU,mCAAqC,EAEnD,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,GAAG,8EAAiB,GAC/C,OAAO,MAAM,QAAQ,EAC1C,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,KAAK,EAG7B,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "3DCB70024BFDF15964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentui+core-linux-arm64@0.4.5/node_modules/@opentui/core-linux-arm64/index.bun.js"],
"sourcesContent": [
"const module = await import(\"./libopentui.so\", { with: { type: \"file\" } })\n\nexport default module.default\n"
],
"mappings": ";oDAAA,IAAM,EAAS,KAAa,yCAAmB,CAAE,KAAM,CAAE,KAAM,MAAO,CAAE,GAEzD,IAAO",
"debugId": "1F060770D83D0E1564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/effect/layer-node.ts", "../core/src/global.ts", "../../node_modules/.bun/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js", "../core/src/util/flock.ts", "../core/src/util/hash.ts", "../core/src/flag/flag.ts", "../core/src/effect/app-node.ts"],
"sourcesContent": [
"import { Brand, Context, Layer } from \"effect\"\n\ntype AnyNode = Node<unknown, unknown, any>\ntype RuntimeLayer = Layer.Layer<never, unknown, unknown>\ntype NodeList<Item extends AnyNode = AnyNode> = readonly [] | readonly [Item, ...Item[]]\nexport type Output<Item> = [Item] extends [never] ? never : Item extends Node<infer A, unknown, any> ? A : never\nexport type Error<Item> = [Item] extends [never] ? never : Item extends Node<unknown, infer E, any> ? E : never\ntype NodeTag<Item> = [Item] extends [never] ? undefined : Item extends Node<unknown, unknown, infer T> ? T : never\ntype Missing<Required, Dependencies extends NodeList> = Exclude<Required, Output<Dependencies[number]>>\ntype CheckDependencies<Implementation extends Layer.Any, Dependencies extends NodeList> = [\n Missing<Layer.Services<Implementation>, Dependencies>,\n] extends [never]\n ? unknown\n : { readonly \"Missing dependencies\": Missing<Layer.Services<Implementation>, Dependencies> }\ndeclare const $OutputType: unique symbol\ndeclare const $ErrorType: unique symbol\n\nexport type Tag<Name extends string = string> = Name & Brand.Brand<\"LayerNode.Tag\">\n\nconst makeTag = Brand.nominal<Tag>()\n\nexport interface Node<A, E = never, T extends Tag | undefined = undefined> {\n readonly kind: \"layer\" | \"unbound\" | \"group\"\n readonly name: string\n readonly service?: Context.Service.Any\n readonly implementation?: Layer.Any\n readonly dependencies: readonly AnyNode[]\n readonly tag?: T\n readonly [$OutputType]?: () => A\n readonly [$ErrorType]?: () => E\n}\n\ntype NodeIdentity =\n | { readonly service: Context.Service.Any; readonly name?: never }\n | { readonly name: string; readonly service?: never }\ntype DistributiveOmit<A, K extends PropertyKey> = A extends unknown ? Omit<A, K> : never\n\nexport type TagConfig = Readonly<Record<string, readonly string[]>>\ntype TagNames<Config extends TagConfig> = keyof Config & string\ntype NodeInTags<Names extends string> = Node<unknown, unknown, Tag<Names> | undefined>\ntype CheckTags<Items extends NodeList, Names extends string> = [Exclude<Items[number], NodeInTags<Names>>] extends [\n never,\n]\n ? unknown\n : { readonly \"Invalid tag dependencies\": Exclude<Items[number], NodeInTags<Names>> }\n\nexport interface Tags<Config extends TagConfig> {\n readonly values: { readonly [Name in TagNames<Config>]: Tag<Name> }\n readonly make: <Name extends TagNames<Config>>(\n name: Name,\n ) => <const Implementation extends Layer.Any, const Items extends NodeList>(\n input: DistributiveOmit<MakeInput<Implementation, Items, Tag<Name>>, \"tag\"> &\n CheckTags<Items, Name | Extract<Config[Name][number], string>>,\n ) => Node<Layer.Success<Implementation>, Layer.Error<Implementation> | Error<Items[number]>, Tag<Name>>\n}\n\nexport function tags<const Config extends { readonly [Name in keyof Config]: readonly (keyof Config & string)[] }>(\n config: Config,\n): Tags<Config> {\n const names = Object.keys(config) as TagNames<Config>[]\n const values = Object.fromEntries(names.map((name) => [name, makeTag(name)])) as Tags<Config>[\"values\"]\n return {\n values,\n make: ((name: TagNames<Config>) => (input: DistributiveOmit<MakeInput<Layer.Any, NodeList, Tag>, \"tag\">) =>\n make({ ...input, tag: values[name] })) as Tags<Config>[\"make\"],\n }\n}\n\n// Nodes ---------------------------------------------------------------------\n\ntype MakeInput<\n Implementation extends Layer.Any,\n Items extends NodeList,\n T extends Tag | undefined = undefined,\n> = NodeIdentity & {\n readonly layer: Implementation\n readonly deps: Items & CheckDependencies<Implementation, NoInfer<Items>>\n readonly tag?: T\n}\n\nexport function make<\n const Implementation extends Layer.Any,\n const Items extends NodeList,\n const T extends Tag | undefined = undefined,\n>(\n input: MakeInput<Implementation, Items, T>,\n): Node<Layer.Success<Implementation>, Layer.Error<Implementation> | Error<Items[number]>, T> {\n return {\n kind: \"layer\",\n name: input.service !== undefined ? input.service.key : input.name,\n service: input.service,\n implementation: input.layer,\n dependencies: input.deps,\n tag: input.tag,\n }\n}\n\nexport function unbound<R, Shape, const T extends Tag>(service: Context.Key<R, Shape>, tag: T): Node<R, never, T> {\n return {\n kind: \"unbound\",\n name: service.key,\n service,\n dependencies: [],\n tag,\n }\n}\n\nexport function group<const Items extends readonly AnyNode[]>(\n dependencies: Items,\n): Node<Output<Items[number]>, Error<Items[number]>, NodeTag<Items[number]>> {\n return { kind: \"group\", name: \"group\", dependencies }\n}\n\nexport type Replacement = readonly [source: AnyNode, replacement: AnyNode | Layer.Any]\nexport type Replacements = readonly Replacement[]\n\ntype CheckReplacementErrors<SourceError, ReplacementError> = [Exclude<ReplacementError, SourceError>] extends [never]\n ? unknown\n : { readonly \"New replacement errors\": Exclude<ReplacementError, SourceError> }\n\ntype CheckReplacement<Item> = Item extends readonly [Node<infer A, infer E, infer T>, infer Replacement]\n ? Replacement extends Node<NoInfer<A>, infer E2, T>\n ? CheckReplacementErrors<E, NoInfer<E2>>\n : Replacement extends Layer.Layer<NoInfer<A>, infer E2, never>\n ? CheckReplacementErrors<E, NoInfer<E2>>\n : { readonly \"Invalid replacement\": Replacement }\n : { readonly \"Invalid replacement\": Item }\n\ntype CheckReplacements<Items extends Replacements> = {\n readonly [K in keyof Items]: CheckReplacement<Items[K]>\n}\n\ntype ValidReplacements<Items extends Replacements> = Items & CheckReplacements<Items>\n\nfunction replacementNode(source: AnyNode, replacement: AnyNode | Layer.Any) {\n const replacementNode = isNode(replacement)\n ? replacement\n : make({\n ...nodeMakeIdentity(source),\n layer: replacement as Layer.Layer<unknown, unknown>,\n deps: [],\n tag: source.tag,\n })\n if (source.name !== replacementNode.name) {\n throw new Error(`Cannot replace ${source.name} with ${replacementNode.name}`)\n }\n if (source.tag !== replacementNode.tag) {\n throw new Error(`Cannot replace ${source.name} across tags`)\n }\n return replacementNode\n}\n\nfunction nodeMakeIdentity(node: AnyNode): NodeIdentity {\n if (node.service !== undefined) return { service: node.service }\n return { name: node.name }\n}\n\nfunction isNode(input: Layer.Any | AnyNode): input is AnyNode {\n return \"kind\" in input && \"dependencies\" in input\n}\n\n// Tree -----------------------------------------------------------------------\n\ntype Visit<Result> = (node: AnyNode, context: VisitContext<Result>) => Result\n\ntype VisitContext<Result> = {\n readonly cache: Map<AnyNode, Result>\n readonly visit: (node: AnyNode) => Result\n}\n\nfunction walk<Result>(\n root: AnyNode,\n visit: Visit<Result>,\n options: {\n readonly cache?: Map<AnyNode, Result>\n readonly resolve?: (node: AnyNode) => AnyNode\n readonly detectCycles?: boolean\n } = {},\n) {\n const cache = options.cache ?? new Map<AnyNode, Result>()\n const visiting = new Set<AnyNode>()\n const stack: AnyNode[] = []\n\n const recur = (node: AnyNode): Result => {\n const target = options.resolve?.(node) ?? node\n const cached = cache.get(target)\n if (cached !== undefined || cache.has(target)) return cached!\n\n if (options.detectCycles !== false && visiting.has(target)) {\n const start = stack.indexOf(target)\n throw new Error(\n `Cycle detected in layer tree: ${[...stack.slice(start), target].map((item) => item.name).join(\" -> \")}`,\n )\n }\n\n visiting.add(target)\n stack.push(target)\n try {\n const result = visit(target, { cache, visit: recur })\n if (!cache.has(target)) cache.set(target, result)\n return result\n } finally {\n stack.pop()\n visiting.delete(target)\n }\n }\n\n return recur(root)\n}\n\nexport function hoist<A, E, T extends Tag, const Items extends Replacements = readonly []>(\n root: Node<A, E, any>,\n tag: T,\n replacements?: ValidReplacements<Items>,\n): {\n readonly node: Node<A, E>\n readonly hoisted: Node<unknown, E>\n} {\n const hoisted = new Map<string, AnyNode>()\n const replacementMap = replacementMapFrom(replacements)\n\n const node = walk<AnyNode>(\n root,\n (node, context) => {\n if (node.kind === \"group\") {\n return { ...node, dependencies: node.dependencies.map(context.visit) }\n }\n if (node.tag === tag) {\n const existing = hoisted.get(node.name)\n if (existing && existing !== node) {\n throw new Error(`Tag ${tag} has conflicting implementations for ${node.name}`)\n }\n hoisted.set(node.name, rewriteReplacementDependencies(node, replacementMap))\n return group([])\n }\n if (node.kind === \"unbound\") {\n return node\n }\n return { ...node, dependencies: node.dependencies.map(context.visit) }\n },\n { resolve: (node) => replacementMap.get(node.name) ?? node },\n )\n\n return {\n node: node as Node<A, E>,\n hoisted: group(Array.from(hoisted.values())) as Node<unknown, E>,\n }\n}\n\nexport function compile<A, E, const Items extends Replacements = readonly []>(\n root: Node<A, E, any>,\n replacements?: ValidReplacements<Items>,\n): Layer.Layer<A, E> {\n const replacementMap = replacementMapFrom(replacements)\n const cache = new Map<AnyNode, RuntimeLayer>()\n const compileNode = (node: AnyNode) =>\n walk<RuntimeLayer>(\n node,\n (node, context) => {\n if (node.kind === \"unbound\") throw new Error(`Unbound layer node: ${node.name}`)\n const dependencies = node.dependencies.flatMap(flatten).map(context.visit)\n const implementation = node.implementation! as RuntimeLayer\n return dependencies.length === 0\n ? implementation\n : implementation.pipe(Layer.provide(dependencies as [RuntimeLayer, ...RuntimeLayer[]]))\n },\n { cache, resolve: (node) => replacementMap.get(node.name) ?? node },\n )\n const layers = flatten(root).map((node) => compileNode(node))\n const layer = layers.reduce<RuntimeLayer>((result, layer) => layer.pipe(Layer.provideMerge(result)), Layer.empty)\n return layer as Layer.Layer<A, E>\n}\n\nfunction replacementMapFrom(replacements?: Replacements) {\n return (\n replacements?.reduce((map, [source, replacement]) => {\n const normalized = rewriteReplacementDependencies(replacementNode(source, replacement), map)\n const current = new Map([[source.name, normalized]])\n for (const [name, node] of map) map.set(name, rewriteReplacementDependencies(node, current))\n map.set(source.name, normalized)\n return map\n }, new Map<string, AnyNode>()) ?? new Map<string, AnyNode>()\n )\n}\n\nfunction rewriteReplacementDependencies(root: AnyNode, replacements: ReadonlyMap<string, AnyNode>) {\n if (replacements.size === 0) return root\n const cache = new Map<AnyNode, AnyNode>()\n const visiting = new Set<AnyNode>()\n const stack: AnyNode[] = []\n\n const recur = (node: AnyNode, isRoot = false): AnyNode => {\n const target = isRoot ? node : (replacements.get(node.name) ?? node)\n const cached = cache.get(target)\n if (cached !== undefined || cache.has(target)) return cached!\n if (visiting.has(target)) {\n const start = stack.indexOf(target)\n throw new Error(\n `Cycle detected in layer tree: ${[...stack.slice(start), target].map((item) => item.name).join(\" -> \")}`,\n )\n }\n\n visiting.add(target)\n stack.push(target)\n try {\n const dependencies = target.dependencies.map((dependency) => recur(dependency))\n const result = dependencies.every((dependency, index) => dependency === target.dependencies[index])\n ? target\n : { ...target, dependencies }\n cache.set(target, result)\n return result\n } finally {\n stack.pop()\n visiting.delete(target)\n }\n }\n\n return recur(root, true)\n}\n\nexport function hasUnbound(root: Node<unknown, unknown, any>, source: AnyNode): boolean {\n if (source.kind !== \"unbound\") throw new Error(`Cannot check non-unbound layer node: ${source.name}`)\n return walk<boolean>(root, (node, context) => {\n if (node === source) return true\n return node.dependencies.some(context.visit)\n })\n}\n\nfunction flatten(node: AnyNode): readonly AnyNode[] {\n return node.kind === \"group\" ? node.dependencies.flatMap(flatten) : [node]\n}\n\nexport * as LayerNode from \"./layer-node\"\n",
"import path from \"path\"\nimport fs from \"fs/promises\"\nimport { xdgData, xdgCache, xdgConfig, xdgState } from \"xdg-basedir\"\nimport os from \"os\"\nimport { Context, Effect, Layer } from \"effect\"\nimport { Flock } from \"./util/flock\"\nimport { Flag } from \"./flag/flag\"\nimport { makeGlobalNode } from \"./effect/app-node\"\n\nconst app = \"opencode\"\nconst data = path.join(xdgData!, app)\nconst cache = path.join(xdgCache!, app)\nconst config = path.join(xdgConfig!, app)\nconst state = path.join(xdgState!, app)\nconst tmp = path.join(os.tmpdir(), app)\n\nconst paths = {\n get home() {\n return process.env.OPENCODE_TEST_HOME ?? os.homedir()\n },\n data,\n bin: path.join(cache, \"bin\"),\n log: path.join(data, \"log\"),\n repos: path.join(data, \"repos\"),\n cache,\n config,\n state,\n tmp,\n}\n\nexport const Path = paths\n\nFlock.setGlobal({ state })\n\nawait Promise.all([\n fs.mkdir(Path.data, { recursive: true }),\n fs.mkdir(Path.config, { recursive: true }),\n fs.mkdir(Path.state, { recursive: true }),\n fs.mkdir(Path.tmp, { recursive: true }),\n fs.mkdir(Path.log, { recursive: true }),\n fs.mkdir(Path.bin, { recursive: true }),\n fs.mkdir(Path.repos, { recursive: true }),\n])\n\nexport class Service extends Context.Service<Service, Interface>()(\"@opencode/Global\") {}\n\nexport interface Interface {\n readonly home: string\n readonly data: string\n readonly cache: string\n readonly config: string\n readonly state: string\n readonly tmp: string\n readonly bin: string\n readonly log: string\n readonly repos: string\n}\n\nexport function make(input: Partial<Interface> = {}): Interface {\n return {\n home: Path.home,\n data: Path.data,\n cache: Path.cache,\n config: Flag.OPENCODE_CONFIG_DIR ?? Path.config,\n state: Path.state,\n tmp: Path.tmp,\n bin: Path.bin,\n log: Path.log,\n repos: Path.repos,\n ...input,\n }\n}\n\nconst layer = Layer.effect(\n Service,\n Effect.sync(() => Service.of(make())),\n)\n\nexport const node = makeGlobalNode({ service: Service, layer: layer, deps: [] })\n\nexport const layerWith = (input: Partial<Interface>) =>\n Layer.effect(\n Service,\n Effect.sync(() => Service.of(make(input))),\n )\n\nexport * as Global from \"./global\"\n",
"import os from 'os';\nimport path from 'path';\n\nconst homeDirectory = os.homedir();\nconst {env} = process;\n\nexport const xdgData = env.XDG_DATA_HOME ||\n\t(homeDirectory ? path.join(homeDirectory, '.local', 'share') : undefined);\n\nexport const xdgConfig = env.XDG_CONFIG_HOME ||\n\t(homeDirectory ? path.join(homeDirectory, '.config') : undefined);\n\nexport const xdgState = env.XDG_STATE_HOME ||\n\t(homeDirectory ? path.join(homeDirectory, '.local', 'state') : undefined);\n\nexport const xdgCache = env.XDG_CACHE_HOME || (homeDirectory ? path.join(homeDirectory, '.cache') : undefined);\n\nexport const xdgRuntime = env.XDG_RUNTIME_DIR || undefined;\n\nexport const xdgDataDirectories = (env.XDG_DATA_DIRS || '/usr/local/share/:/usr/share/').split(':');\n\nif (xdgData) {\n\txdgDataDirectories.unshift(xdgData);\n}\n\nexport const xdgConfigDirectories = (env.XDG_CONFIG_DIRS || '/etc/xdg').split(':');\n\nif (xdgConfig) {\n\txdgConfigDirectories.unshift(xdgConfig);\n}\n",
"import path from \"path\"\nimport os from \"os\"\nimport { randomBytes, randomUUID } from \"crypto\"\nimport { mkdir, readFile, rm, stat, utimes, writeFile } from \"fs/promises\"\nimport { Hash } from \"./hash\"\nimport { Effect } from \"effect\"\n\nexport type FlockGlobal = {\n state: string\n}\n\nexport namespace Flock {\n let global: FlockGlobal | undefined\n\n export function setGlobal(g: FlockGlobal) {\n global = g\n }\n\n const root = () => {\n if (!global) throw new Error(\"Flock global not set\")\n return path.join(global.state, \"locks\")\n }\n\n // Defaults for callers that do not provide timing options.\n const defaultOpts = {\n staleMs: 60_000,\n timeoutMs: 5 * 60_000,\n baseDelayMs: 100,\n maxDelayMs: 2_000,\n }\n\n export interface WaitEvent {\n key: string\n attempt: number\n delay: number\n waited: number\n }\n\n export type Wait = (input: WaitEvent) => void | Promise<void>\n\n export interface Options {\n dir?: string\n signal?: AbortSignal\n staleMs?: number\n timeoutMs?: number\n baseDelayMs?: number\n maxDelayMs?: number\n onWait?: Wait\n }\n\n type Opts = {\n staleMs: number\n timeoutMs: number\n baseDelayMs: number\n maxDelayMs: number\n }\n\n type Owned = {\n acquired: true\n startHeartbeat: (intervalMs?: number) => void\n release: () => Promise<void>\n }\n\n export interface Lease {\n release: () => Promise<void>\n [Symbol.asyncDispose]: () => Promise<void>\n }\n\n function code(err: unknown) {\n if (typeof err !== \"object\" || err === null || !(\"code\" in err)) return\n const value = err.code\n if (typeof value !== \"string\") return\n return value\n }\n\n function sleep(ms: number, signal?: AbortSignal) {\n return new Promise<void>((resolve, reject) => {\n if (signal?.aborted) {\n reject(signal.reason ?? new Error(\"Aborted\"))\n return\n }\n\n let timer: NodeJS.Timeout | undefined\n\n const done = () => {\n signal?.removeEventListener(\"abort\", abort)\n resolve()\n }\n\n const abort = () => {\n if (timer) {\n clearTimeout(timer)\n }\n signal?.removeEventListener(\"abort\", abort)\n reject(signal?.reason ?? new Error(\"Aborted\"))\n }\n\n signal?.addEventListener(\"abort\", abort, { once: true })\n timer = setTimeout(done, ms)\n })\n }\n\n function jitter(ms: number) {\n const j = Math.floor(ms * 0.3)\n const d = Math.floor(Math.random() * (2 * j + 1)) - j\n return Math.max(0, ms + d)\n }\n\n function mono() {\n return performance.now()\n }\n\n function wall() {\n return performance.timeOrigin + mono()\n }\n\n async function stats(file: string) {\n try {\n return await stat(file)\n } catch (err) {\n const errCode = code(err)\n if (errCode === \"ENOENT\" || errCode === \"ENOTDIR\") return\n throw err\n }\n }\n\n async function stale(lockDir: string, heartbeatPath: string, metaPath: string, staleMs: number) {\n // Stale detection allows automatic recovery after crashed owners.\n const now = wall()\n const heartbeat = await stats(heartbeatPath)\n if (heartbeat) {\n return now - heartbeat.mtimeMs > staleMs\n }\n\n const meta = await stats(metaPath)\n if (meta) {\n return now - meta.mtimeMs > staleMs\n }\n\n const dir = await stats(lockDir)\n if (!dir) {\n return false\n }\n\n return now - dir.mtimeMs > staleMs\n }\n\n async function tryAcquireLockDir(lockDir: string, opts: Opts): Promise<Owned | { acquired: false }> {\n const token = randomUUID?.() ?? randomBytes(16).toString(\"hex\")\n const metaPath = path.join(lockDir, \"meta.json\")\n const heartbeatPath = path.join(lockDir, \"heartbeat\")\n\n try {\n await mkdir(lockDir, { mode: 0o700 })\n } catch (err) {\n if (code(err) !== \"EEXIST\") {\n throw err\n }\n\n if (!(await stale(lockDir, heartbeatPath, metaPath, opts.staleMs))) {\n return { acquired: false }\n }\n\n const breakerPath = lockDir + \".breaker\"\n try {\n await mkdir(breakerPath, { mode: 0o700 })\n } catch (claimErr) {\n const errCode = code(claimErr)\n if (errCode === \"EEXIST\") {\n const breaker = await stats(breakerPath)\n if (breaker && wall() - breaker.mtimeMs > opts.staleMs) {\n await rm(breakerPath, { recursive: true, force: true }).catch(() => undefined)\n }\n return { acquired: false }\n }\n\n if (errCode === \"ENOENT\" || errCode === \"ENOTDIR\") {\n return { acquired: false }\n }\n\n throw claimErr\n }\n\n try {\n // Breaker ownership ensures only one contender performs stale cleanup.\n if (!(await stale(lockDir, heartbeatPath, metaPath, opts.staleMs))) {\n return { acquired: false }\n }\n\n await rm(lockDir, { recursive: true, force: true })\n\n try {\n await mkdir(lockDir, { mode: 0o700 })\n } catch (retryErr) {\n const errCode = code(retryErr)\n if (errCode === \"EEXIST\" || errCode === \"ENOTEMPTY\") {\n return { acquired: false }\n }\n throw retryErr\n }\n } finally {\n await rm(breakerPath, { recursive: true, force: true }).catch(() => undefined)\n }\n }\n\n const meta = {\n token,\n pid: process.pid,\n hostname: os.hostname(),\n createdAt: new Date().toISOString(),\n }\n\n await writeFile(heartbeatPath, \"\", { flag: \"wx\" }).catch(async () => {\n await rm(lockDir, { recursive: true, force: true })\n throw new Error(\"Lock acquired but heartbeat already existed (possible compromise).\")\n })\n\n await writeFile(metaPath, JSON.stringify(meta, null, 2), { flag: \"wx\" }).catch(async () => {\n await rm(lockDir, { recursive: true, force: true })\n throw new Error(\"Lock acquired but meta.json already existed (possible compromise).\")\n })\n\n let timer: NodeJS.Timeout | undefined\n\n const startHeartbeat = (intervalMs = Math.max(100, Math.floor(opts.staleMs / 3))) => {\n if (timer) return\n // Heartbeat prevents long critical sections from being evicted as stale.\n timer = setInterval(() => {\n const t = new Date()\n void utimes(heartbeatPath, t, t).catch(() => undefined)\n }, intervalMs)\n timer.unref?.()\n }\n\n const release = async () => {\n if (timer) {\n clearInterval(timer)\n timer = undefined\n }\n\n const current = await readFile(metaPath, \"utf8\")\n .then((raw) => {\n const parsed = JSON.parse(raw)\n if (!parsed || typeof parsed !== \"object\") return {}\n return {\n token: \"token\" in parsed && typeof parsed.token === \"string\" ? parsed.token : undefined,\n }\n })\n .catch((err) => {\n const errCode = code(err)\n if (errCode === \"ENOENT\" || errCode === \"ENOTDIR\") {\n throw new Error(\"Refusing to release: lock is compromised (metadata missing).\")\n }\n if (err instanceof SyntaxError) {\n throw new Error(\"Refusing to release: lock is compromised (metadata invalid).\")\n }\n throw err\n })\n // Token check prevents deleting a lock that was re-acquired by another process.\n if (current.token !== token) {\n throw new Error(\"Refusing to release: lock token mismatch (not the owner).\")\n }\n\n await rm(lockDir, { recursive: true, force: true })\n }\n\n return {\n acquired: true,\n startHeartbeat,\n release,\n }\n }\n\n async function acquireLockDir(\n lockDir: string,\n input: { key: string; onWait?: Wait; signal?: AbortSignal },\n opts: Opts,\n ) {\n const stop = mono() + opts.timeoutMs\n let attempt = 0\n let waited = 0\n let delay = opts.baseDelayMs\n\n while (true) {\n input.signal?.throwIfAborted()\n\n const res = await tryAcquireLockDir(lockDir, opts)\n if (res.acquired) {\n return res\n }\n\n if (mono() > stop) {\n throw new Error(`Timed out waiting for lock: ${input.key}`)\n }\n\n attempt += 1\n const ms = jitter(delay)\n await input.onWait?.({\n key: input.key,\n attempt,\n delay: ms,\n waited,\n })\n await sleep(ms, input.signal)\n waited += ms\n delay = Math.min(opts.maxDelayMs, Math.floor(delay * 1.7))\n }\n }\n\n export async function acquire(key: string, input: Options = {}): Promise<Lease> {\n input.signal?.throwIfAborted()\n const cfg: Opts = {\n staleMs: input.staleMs ?? defaultOpts.staleMs,\n timeoutMs: input.timeoutMs ?? defaultOpts.timeoutMs,\n baseDelayMs: input.baseDelayMs ?? defaultOpts.baseDelayMs,\n maxDelayMs: input.maxDelayMs ?? defaultOpts.maxDelayMs,\n }\n const dir = input.dir ?? root()\n\n await mkdir(dir, { recursive: true })\n const lockfile = path.join(dir, Hash.fast(key) + \".lock\")\n const lock = await acquireLockDir(\n lockfile,\n {\n key,\n onWait: input.onWait,\n signal: input.signal,\n },\n cfg,\n )\n lock.startHeartbeat()\n\n const release = () => lock.release()\n return {\n release,\n [Symbol.asyncDispose]() {\n return release()\n },\n }\n }\n\n export async function withLock<T>(key: string, fn: () => Promise<T>, input: Options = {}) {\n await using _ = await acquire(key, input)\n input.signal?.throwIfAborted()\n return await fn()\n }\n\n export const effect = Effect.fn(\"Flock.effect\")(function* (key: string, input: Options = {}) {\n return yield* Effect.acquireRelease(\n Effect.promise((signal) => Flock.acquire(key, { ...input, signal })).pipe(\n Effect.withSpan(\"Flock.acquire\", {\n attributes: { key },\n }),\n ),\n (lock) => Effect.promise(() => lock.release()).pipe(Effect.withSpan(\"Flock.release\")),\n ).pipe(Effect.asVoid)\n })\n}\n",
"import { createHash } from \"crypto\"\n\nexport namespace Hash {\n export function fast(input: string | Buffer): string {\n return createHash(\"sha1\").update(input).digest(\"hex\")\n }\n\n export function sha256(input: string | Buffer): string {\n return createHash(\"sha256\").update(input).digest(\"hex\")\n }\n}\n",
"import { Config } from \"effect\"\n\nexport function truthy(key: string) {\n const value = process.env[key]?.toLowerCase()\n return value === \"true\" || value === \"1\"\n}\n\nconst copy = process.env[\"OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT\"]\nconst fff = process.env[\"OPENCODE_DISABLE_FFF\"]\n\nfunction enabledByExperimental(key: string) {\n return process.env[key] === undefined ? truthy(\"OPENCODE_EXPERIMENTAL\") : truthy(key)\n}\n\nexport const Flag = {\n OTEL_EXPORTER_OTLP_ENDPOINT: process.env[\"OTEL_EXPORTER_OTLP_ENDPOINT\"],\n OTEL_EXPORTER_OTLP_HEADERS: process.env[\"OTEL_EXPORTER_OTLP_HEADERS\"],\n\n OPENCODE_AUTO_HEAP_SNAPSHOT: truthy(\"OPENCODE_AUTO_HEAP_SNAPSHOT\"),\n OPENCODE_GIT_BASH_PATH: process.env[\"OPENCODE_GIT_BASH_PATH\"],\n OPENCODE_CONFIG: process.env[\"OPENCODE_CONFIG\"],\n OPENCODE_CONFIG_CONTENT: process.env[\"OPENCODE_CONFIG_CONTENT\"],\n OPENCODE_DISABLE_AUTOUPDATE: truthy(\"OPENCODE_DISABLE_AUTOUPDATE\"),\n OPENCODE_ALWAYS_NOTIFY_UPDATE: truthy(\"OPENCODE_ALWAYS_NOTIFY_UPDATE\"),\n OPENCODE_DISABLE_PRUNE: truthy(\"OPENCODE_DISABLE_PRUNE\"),\n OPENCODE_DISABLE_TERMINAL_TITLE: truthy(\"OPENCODE_DISABLE_TERMINAL_TITLE\"),\n OPENCODE_SHOW_TTFD: truthy(\"OPENCODE_SHOW_TTFD\"),\n OPENCODE_DISABLE_AUTOCOMPACT: truthy(\"OPENCODE_DISABLE_AUTOCOMPACT\"),\n OPENCODE_DISABLE_MODELS_FETCH: truthy(\"OPENCODE_DISABLE_MODELS_FETCH\"),\n OPENCODE_DISABLE_MOUSE: truthy(\"OPENCODE_DISABLE_MOUSE\"),\n OPENCODE_FAKE_VCS: process.env[\"OPENCODE_FAKE_VCS\"],\n OPENCODE_SERVER_PASSWORD: process.env[\"OPENCODE_SERVER_PASSWORD\"],\n OPENCODE_SERVER_USERNAME: process.env[\"OPENCODE_SERVER_USERNAME\"],\n OPENCODE_DISABLE_FFF: fff === undefined ? process.platform === \"win32\" : truthy(\"OPENCODE_DISABLE_FFF\"),\n\n // Experimental\n OPENCODE_EXPERIMENTAL_FILEWATCHER: Config.boolean(\"OPENCODE_EXPERIMENTAL_FILEWATCHER\").pipe(\n Config.withDefault(false),\n ),\n OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: Config.boolean(\"OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER\").pipe(\n Config.withDefault(false),\n ),\n OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT:\n copy === undefined ? process.platform === \"win32\" : truthy(\"OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT\"),\n OPENCODE_MODELS_URL: process.env[\"OPENCODE_MODELS_URL\"],\n OPENCODE_MODELS_PATH: process.env[\"OPENCODE_MODELS_PATH\"],\n OPENCODE_DB: process.env[\"OPENCODE_DB\"],\n\n OPENCODE_WORKSPACE_ID: process.env[\"OPENCODE_WORKSPACE_ID\"],\n OPENCODE_EXPERIMENTAL_WORKSPACES: enabledByExperimental(\"OPENCODE_EXPERIMENTAL_WORKSPACES\"),\n\n // Evaluated at access time (not module load) because tests, the CLI, and\n // external tooling set these env vars at runtime.\n get OPENCODE_DISABLE_PROJECT_CONFIG() {\n return truthy(\"OPENCODE_DISABLE_PROJECT_CONFIG\")\n },\n get OPENCODE_EXPERIMENTAL_REFERENCES() {\n return enabledByExperimental(\"OPENCODE_EXPERIMENTAL_REFERENCES\")\n },\n get OPENCODE_TUI_CONFIG() {\n return process.env[\"OPENCODE_TUI_CONFIG\"]\n },\n get OPENCODE_CONFIG_DIR() {\n return process.env[\"OPENCODE_CONFIG_DIR\"]\n },\n get OPENCODE_PURE() {\n return truthy(\"OPENCODE_PURE\")\n },\n get OPENCODE_PERMISSION() {\n return process.env[\"OPENCODE_PERMISSION\"]\n },\n get OPENCODE_PLUGIN_META_FILE() {\n return process.env[\"OPENCODE_PLUGIN_META_FILE\"]\n },\n get OPENCODE_CLIENT() {\n return process.env[\"OPENCODE_CLIENT\"] ?? \"cli\"\n },\n}\n",
"import { LayerNode } from \"./layer-node\"\n\nexport const tags = LayerNode.tags({\n location: [\"global\"],\n global: [],\n})\n\nexport type GlobalNode<A, E = never> = LayerNode.Node<A, E, (typeof tags.values)[\"global\"]>\nexport type LocationNode<A, E = never> = LayerNode.Node<A, E, (typeof tags.values)[\"location\"]>\n\nexport const makeGlobalNode = tags.make(\"global\")\nexport const makeLocationNode = tags.make(\"location\")\n\nexport * as Node from \"./app-node\"\n"
],
"mappings": ";qQAmBA,SAAM,GAAU,GAAM,QAAa,EAqC5B,SAAS,EAAkG,CAChH,EACc,CACd,IAAM,EAAQ,OAAO,KAAK,CAAM,EAC1B,EAAS,OAAO,YAAY,EAAM,IAAI,CAAC,I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
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "9ED9E679BFEF031564756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "B44C547C5C96A61364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.66/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js", "../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.66/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, getProfileName, parseKnownFiles } from \"@smithy/core/config\";\nimport { LoginCredentialsFetcher } from \"./LoginCredentialsFetcher\";\nexport const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\n const profiles = await parseKnownFiles(init || {});\n const profileName = getProfileName({\n profile: init?.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile?.login_session) {\n throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n",
"import { CredentialsProviderError, readFile } from \"@smithy/core/config\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { createHash, createPrivateKey, createPublicKey, sign } from \"node:crypto\";\nimport { promises as fs } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nexport class LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = await import(\"@aws-sdk/nested-clients/signin\");\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await fs.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = dirname(tokenFilePath);\n try {\n await fs.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await fs.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n"
],
"mappings": ";iMAAA,oBACA,gBCDA,oBACA,WACA,qBAAS,sBAAY,qBAAkB,UAAiB,eACxD,mBAAS,WACT,kBAAS,WACT,kBAAS,UAAS,aACX,MAAM,CAAwB,CACjC,YACA,KACA,yBACO,mBAAoB,OAC3B,WAAW,CAAC,EAAa,EAAM,EAAoB,CAC/C,KAAK,YAAc,EACnB,KAAK,KAAO,EACZ,KAAK,mBAAqB,OAExB,gBAAe,EAAG,CACpB,IAAM,EAAQ,MAAM,KAAK,UAAU,EACnC,GAAI,CAAC,EACD,MAAM,IAAI,2BAAyB,sCAAsC,KAAK,uDAAwD,CAA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Aa,IAC1B,EAAgB,EAAK,SAAU,OAAO,KAAK,CAAO,EAAG,CAAU,EAE/D,EADe,KAAK,kBAAkB,CAAa,EACvB,SAAS,WAAW,EACtD,MAAO,GAAG,KAAW,IAEzB,MAAO,EAAO,CACV,MAAM,IAAI,2BAAyB,kCAAkC,aAAiB,MAAQ,EAAM,QAAU,OAAO,CAAK,IAAK,CAAE,OAAQ,KAAK,OAAQ,YAAa,EAAM,CAAC,GAGtL,CDjQO,IAAM,EAAuB,CAAC,IAAS,OAAS,sBAAuB,CAAC,IAAM,CACjF,GAAM,QAAQ,QAAQ,sDAAsD,EAC5E,IAAM,EAAW,MAAM,kBAAgB,GAAQ,CAAC,CAAC,EAC3C,EAAc,iBAAe,CAC/B,QAAS,GAAM,SAAW,GAAoB,OAClD,CAAC,EACK,EAAU,EAAS,GACzB,GAAI,CAAC,GAAS,cACV,MAAM,IAAI,2BAAyB,WAAW,oCAA+C,CACzF,YAAa,GACb,OAAQ,GAAM,MAClB,CAAC,EAGL,IAAM,EAAc,MADJ,IAAI,EAAwB,EAAS,EAAM,CAAkB,EAC3C,gBAAgB,EAClD,OAAO,uBAAqB,EAAa,oBAAqB,IAAI",
"debugId": "21EBB849BD65A08664756E2164756E21",
"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": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "3F8CE797B8C56A0964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "04D9D255E62DB47264756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.65/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js", "../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.65/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js"],
"sourcesContent": [
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { readFileSync } from \"node:fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n",
"export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
],
"mappings": ";kJAAA,oBACA,gBACA,uBAAS,WCFF,IAAM,EAAe,CAAC,IAAS,MAAO,IAA0B,CACnE,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,IAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,GAClG,8BAA+B,EACrC,GAAI,CAAC,EAA4B,CAC7B,IAAQ,wCAAyC,KAAa,0CAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,IACb,GAAuB,sBACvB,EAAK,kBACZ,CACJ,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDnBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,MAAO,IAA0B,CACzE,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,IAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,GAAI,CAAC,GAAwB,CAAC,EAC1B,MAAM,IAAI,2BAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,IAAM,EAAc,MAAM,EAAa,IAChC,EACH,iBAAkB,2BAAyB,iBAAiB,EAAE,IAC1D,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC5D,UACA,iBACJ,CAAC,EAAE,CAAqB,EACxB,GAAI,IAAyB,QAAQ,IAAI,GACrC,uBAAqB,EAAa,wCAAyC,GAAG,EAElF,OAAO",
"debugId": "134CCA2A405F95F264756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260227213759_add_session_workspace_id.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260227213759_add_session_workspace_id\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`workspace_id\\` text;`)\n yield* tx.run(`CREATE INDEX \\`session_workspace_idx\\` ON \\`session\\` (\\`workspace_id\\`);`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,0CACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gDAAoD,EAClE,MAAO,EAAG,IAAI,qEAA2E,EAC1F,EAEL",
"debugId": "4ED73ED658158F6B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+cerebras@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/cerebras/dist/index.mjs"],
"sourcesContent": [
"// src/cerebras-provider.ts\nimport { OpenAICompatibleChatLanguageModel } from \"@ai-sdk/openai-compatible\";\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/version.ts\nvar VERSION = true ? \"2.0.41\" : \"0.0.0-test\";\n\n// src/cerebras-provider.ts\nvar cerebrasErrorSchema = z.object({\n message: z.string(),\n type: z.string(),\n param: z.string(),\n code: z.string()\n});\nvar cerebrasErrorStructure = {\n errorSchema: cerebrasErrorSchema,\n errorToMessage: (data) => data.message\n};\nfunction createCerebras(options = {}) {\n var _a;\n const baseURL = withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.cerebras.ai/v1\"\n );\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"CEREBRAS_API_KEY\",\n description: \"Cerebras API key\"\n })}`,\n ...options.headers\n },\n `ai-sdk/cerebras/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n return new OpenAICompatibleChatLanguageModel(modelId, {\n provider: `cerebras.chat`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch,\n errorStructure: cerebrasErrorStructure,\n supportsStructuredOutputs: true\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chat = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar cerebras = createCerebras();\nexport {\n VERSION,\n cerebras,\n createCerebras\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";qRAaA,SAAI,OAAiB,cAGjB,OAAsB,OAAE,OAAO,CACjC,QAAS,EAAE,OAAO,EAClB,KAAM,EAAE,OAAO,EACf,MAAO,EAAE,OAAO,EAChB,KAAM,EAAE,OAAO,CACjB,CAAC,EACG,EAAyB,CAC3B,YAAa,EACb,eAAgB,CAAC,IAAS,EAAK,OACjC,EACA,SAAS,CAAc,CAAC,EAAU,CAAC,EAAG,CACpC,IAAI,EACJ,IAAM,EAAU,GACb,EAAK,EAAQ,UAAY,KAAO,EAAK,4BACxC,EACM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,mBACzB,YAAa,kBACf,CAAC,OACE,EAAQ,OACb,EACA,mBAAmB,GACrB,EACM,EAAsB,CAAC,IAAY,CACvC,OAAO,IAAI,EAAkC,EAAS,CACpD,SAAU,gBACV,IAAK,EAAG,UAAW,GAAG,IAAU,IAChC,QAAS,EACT,MAAO,EAAQ,MACf,eAAgB,EAChB,0BAA2B,EAC7B,CAAC,GAEG,EAAW,CAAC,IAAY,EAAoB,CAAO,EAWzD,OAVA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,KAAO,EAChB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,EAAW,EAAe",
"debugId": "A8F6572A11BD34E264756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260309230000_move_org_to_state.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260309230000_move_org_to_state\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`ALTER TABLE \\`account_state\\` ADD \\`active_org_id\\` text;`)\n yield* tx.run(\n `UPDATE \\`account_state\\` SET \\`active_org_id\\` = (SELECT \\`selected_org_id\\` FROM \\`account\\` WHERE \\`account\\`.\\`id\\` = \\`account_state\\`.\\`active_account_id\\`);`,\n )\n yield* tx.run(`ALTER TABLE \\`account\\` DROP COLUMN \\`selected_org_id\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,mCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,uDAA2D,EACzE,MAAO,EAAG,IACR,oJACF,EACA,MAAO,EAAG,IAAI,sDAA0D,EACzE,EAEL",
"debugId": "E33C204F707B745364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n if (!idLine) {\n return undefined;\n }\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-darwin.js.map"
],
"mappings": ";gKAKA,YAAO,oBAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,MACA,MACN,eAAe,CAAY,EAAG,CAC1B,GAAI,CAEA,IAAM,GADS,MAAO,EAAG,EAAY,WAAW,wCAAwC,GAClE,OACjB,MAAM;AAAA,CAAI,EACV,KAAK,KAAQ,EAAK,SAAS,gBAAgB,CAAC,EACjD,GAAI,CAAC,EACD,OAEJ,IAAM,EAAQ,EAAO,MAAM,OAAO,EAClC,GAAI,EAAM,SAAW,EACjB,OAAO,EAAM,GAAG,MAAM,EAAG,EAAE,EAGnC,MAAO,EAAG,CACN,EAAM,KAAK,MAAM,6BAA6B,GAAG,EAErD,OAEI,eAAe",
"debugId": "F43F65E3E9000A7664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260427172553_slow_nightmare.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260427172553_slow_nightmare\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`session_message\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`type\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n \\`data\\` text NOT NULL,\n CONSTRAINT \\`fk_session_message_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_entry_session_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_entry_session_type_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_entry_time_created_idx\\`;`)\n yield* tx.run(`CREATE INDEX \\`session_message_session_idx\\` ON \\`session_message\\` (\\`session_id\\`);`)\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_type_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`type\\`);`,\n )\n yield* tx.run(`CREATE INDEX \\`session_message_time_created_idx\\` ON \\`session_message\\` (\\`time_created\\`);`)\n yield* tx.run(`DROP TABLE \\`session_entry\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,gCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+aAUb,EACD,MAAO,EAAG,IAAI,mDAAqD,EACnE,MAAO,EAAG,IAAI,wDAA0D,EACxE,MAAO,EAAG,IAAI,wDAA0D,EACxE,MAAO,EAAG,IAAI,iFAAuF,EACrG,MAAO,EAAG,IACR,6FACF,EACA,MAAO,EAAG,IAAI,wFAA8F,EAC5G,MAAO,EAAG,IAAI,6BAA+B,EAC9C,EAEL",
"debugId": "975F9DC21DEC039664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260603001617_session_message_projection_indexes.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260603001617_session_message_projection_indexes\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_idx\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_type_idx\\`;`)\n yield* tx.run(`CREATE INDEX \\`event_aggregate_seq_idx\\` ON \\`event\\` (\\`aggregate_id\\`,\\`seq\\`);`)\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_time_created_id_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`time_created\\`,\\`id\\`);`,\n )\n yield* tx.run(\n `CREATE INDEX \\`session_message_session_type_time_created_id_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`type\\`,\\`time_created\\`,\\`id\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,oDACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,qDAAuD,EACrE,MAAO,EAAG,IAAI,0DAA4D,EAC1E,MAAO,EAAG,IAAI,2EAAmF,EACjG,MAAO,EAAG,IACR,qHACF,EACA,MAAO,EAAG,IACR,iIACF,EACD,EAEL",
"debugId": "F5DAEC5D73A2CC0A64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260622170816_reset_v2_session_state.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260622170816_reset_v2_session_state\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DELETE FROM \\`session_context_epoch\\`;`)\n yield* tx.run(`DELETE FROM \\`session_input\\`;`)\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`DELETE FROM \\`event\\`;`)\n yield* tx.run(`DELETE FROM \\`event_sequence\\`;`)\n yield* tx.run(`UPDATE \\`session\\` SET \\`workspace_id\\` = NULL WHERE \\`workspace_id\\` IS NOT NULL;`)\n yield* tx.run(`DELETE FROM \\`workspace\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sCAAwC,EACtD,MAAO,EAAG,IAAI,8BAAgC,EAC9C,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,sBAAwB,EACtC,MAAO,EAAG,IAAI,+BAAiC,EAC/C,MAAO,EAAG,IAAI,8EAAoF,EAClG,MAAO,EAAG,IAAI,0BAA4B,EAC3C,EAEL",
"debugId": "1FEAC8A89AE1F17C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "13AB8FD47C27689F64756E2164756E21",
"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": "43FF252160B95D6064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260601202201_amazing_prowler.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260601202201_amazing_prowler\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP TABLE \\`permission\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,iCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,0BAA4B,EAC3C,EAEL",
"debugId": "0E521B4B3967432864756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260511173437_session-metadata.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260511173437_session-metadata\",\n up(tx) {\n return Effect.gen(function* () {\n // This column briefly shipped again under 20260530232709_lovely_romulus.\n if (\n (yield* tx.all<{ name: string }>(`PRAGMA table_info(\\`session\\`)`)).some((column) => column.name === \"metadata\")\n )\n return\n yield* tx.run(`ALTER TABLE \\`session\\` ADD \\`metadata\\` text;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAE7B,IACG,MAAO,EAAG,IAAsB,8BAAgC,GAAG,KAAK,CAAC,IAAW,EAAO,OAAS,UAAU,EAE/G,OACF,MAAO,EAAG,IAAI,4CAAgD,EAC/D,EAEL",
"debugId": "6FD43B9DAC794ECD64756E2164756E21",
"names": []
}

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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O,EAAkB,MAAM,EAAS,KAAK,EAAe,EAAM,GAAI,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": "7B1F172717297A7C64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260602002951_lowly_union_jack.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260602002951_lowly_union_jack\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`permission\\` (\n \\`id\\` text PRIMARY KEY,\n \\`project_id\\` text NOT NULL,\n \\`action\\` text NOT NULL,\n \\`resource\\` text NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL,\n CONSTRAINT \\`fk_permission_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`permission_project_action_resource_idx\\` ON \\`permission\\` (\\`project_id\\`,\\`action\\`,\\`resource\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,kCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2aAUb,EACD,MAAO,EAAG,IACR,kHACF,EACD,EAEL",
"debugId": "5D796CAC26C4BDF464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260611192811_lush_chimera.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260611192811_lush_chimera\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DROP INDEX IF EXISTS \\`credential_connector_active_idx\\`;`)\n yield* tx.run(`DROP TABLE \\`credential\\`;`)\n yield* tx.run(`\n CREATE TABLE \\`credential\\` (\n \\`id\\` text PRIMARY KEY,\n \\`integration_id\\` text,\n \\`label\\` text NOT NULL,\n \\`value\\` text NOT NULL,\n \\`connector_id\\` text,\n \\`method_id\\` text,\n \\`active\\` integer,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,8BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,yDAA2D,EACzE,MAAO,EAAG,IAAI,0BAA4B,EAC1C,MAAO,EAAG,IAAI,oXAYb,EACF,EAEL",
"debugId": "D003D51D91E65C9164756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../../node_modules/.bun/ai-gateway-provider@3.1.2+a6631614dda8d488/node_modules/ai-gateway-provider/dist/providers/unified.mjs"],
"sourcesContent": [
"// src/providers/unified.ts\nimport { createOpenAICompatible } from \"@ai-sdk/openai-compatible\";\nvar createUnified = (arg) => {\n return createOpenAICompatible({\n baseURL: \"https://gateway.ai.cloudflare.com/v1/compat\",\n // intercepted and replaced with actual base URL later\n name: \"Unified\",\n ...arg || {}\n });\n};\nvar unified = createUnified();\nexport {\n createUnified,\n unified\n};\n//# sourceMappingURL=unified.mjs.map"
],
"mappings": ";8NAEA,SAAI,OAAgB,MAAC,SAAQ,MAC3B,OAAO,EAAuB,CAC5B,QAAS,8CAET,KAAM,aACH,GAAO,CAAC,CACb,CAAC,GAEC,EAAU,EAAc",
"debugId": "67956FC2A92E5E0664756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@opentelemetry+resources@2.6.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js"],
"sourcesContent": [
"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n api_1.diag.debug('could not read machine-id: unsupported platform');\n return undefined;\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-unsupported.js.map"
],
"mappings": ";iHAKA,YAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EACpD,eAAoB,OAC5B,IAAM,MACN,eAAe,CAAY,EAAG,CAC1B,EAAM,KAAK,MAAM,iDAAiD,EAClE,OAEI,eAAe",
"debugId": "04692361EAA5F2E964756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "8AD3FE122F83516064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "22D6A9BB982BA24C64756E2164756E21",
"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": "D3E88A8C3C51C5C164756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/ai-gateway-provider@3.1.2+a6631614dda8d488/node_modules/ai-gateway-provider/dist/index.mjs"],
"sourcesContent": [
"var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/auth.ts\nvar CF_TEMP_TOKEN = \"CF_TEMP_TOKEN\";\n\n// src/providers.ts\nvar providers = [\n {\n name: \"openai\",\n regex: /^https:\\/\\/api\\.openai\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.openai\\.com\\//, \"\")\n },\n {\n name: \"deepseek\",\n regex: /^https:\\/\\/api\\.deepseek\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.deepseek\\.com\\//, \"\")\n },\n {\n name: \"anthropic\",\n regex: /^https:\\/\\/api\\.anthropic\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.anthropic\\.com\\//, \"\"),\n headerKey: \"x-api-key\"\n },\n {\n name: \"google-ai-studio\",\n regex: /^https:\\/\\/generativelanguage\\.googleapis\\.com\\//,\n headerKey: \"x-goog-api-key\",\n transformEndpoint: (url) => url.replace(/^https:\\/\\/generativelanguage\\.googleapis\\.com\\//, \"\")\n },\n {\n name: \"google-vertex-ai\",\n regex: /aiplatform\\.googleapis\\.com/,\n transformEndpoint: (url) => url.replace(/https:\\/\\/(.*)[-]?aiplatform\\.googleapis\\.com\\//, \"\")\n },\n {\n name: \"grok\",\n regex: /^https:\\/\\/api\\.x\\.ai\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.x\\.ai\\//, \"\")\n },\n {\n name: \"mistral\",\n regex: /^https:\\/\\/api\\.mistral\\.ai\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.mistral\\.ai\\//, \"\")\n },\n {\n name: \"perplexity-ai\",\n regex: /^https:\\/\\/api\\.perplexity\\.ai\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.perplexity\\.ai\\//, \"\")\n },\n {\n name: \"replicate\",\n regex: /^https:\\/\\/api\\.replicate\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.replicate\\.com\\//, \"\")\n },\n {\n name: \"groq\",\n regex: /^https:\\/\\/api\\.groq\\.com\\/openai\\/v1\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/api\\.groq\\.com\\/openai\\/v1\\//, \"\")\n },\n {\n name: \"google-vertex-ai\",\n regex: /^https:\\/\\/(?:[a-z0-9]+-)*aiplatform\\.googleapis\\.com\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/(?:[a-z0-9]+-)*aiplatform\\.googleapis\\.com\\//, \"\"),\n headerKey: \"authorization\"\n },\n {\n name: \"azure-openai\",\n regex: /^https:\\/\\/(?<resource>[^.]+)\\.openai\\.azure\\.com\\/openai\\/deployments\\/(?<deployment>[^/]+)\\/(?<rest>.*)$/,\n transformEndpoint: (url) => {\n const match = url.match(\n /^https:\\/\\/(?<resource>[^.]+)\\.openai\\.azure\\.com\\/openai\\/deployments\\/(?<deployment>[^/]+)\\/(?<rest>.*)$/\n );\n if (!match || !match.groups) return url;\n const { resource, deployment, rest } = match.groups;\n if (!resource || !deployment || !rest) {\n throw new Error(\"Failed to parse Azure OpenAI endpoint URL.\");\n }\n return `${resource}/${deployment}/${rest}`;\n },\n headerKey: \"api-key\"\n },\n {\n name: \"openrouter\",\n regex: /^https:\\/\\/openrouter\\.ai\\/api\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/openrouter\\.ai\\/api\\//, \"\")\n },\n {\n name: \"compat\",\n regex: /^https:\\/\\/gateway\\.ai\\.cloudflare\\.com\\/v1\\/compat\\//,\n transformEndpoint: (url) => url.replace(/^https:\\/\\/gateway\\.ai\\.cloudflare\\.com\\/v1\\/compat\\//, \"\")\n }\n];\n\n// src/index.ts\nvar AiGatewayInternalFetchError = class extends Error {\n};\nvar AiGatewayDoesNotExist = class extends Error {\n};\nvar AiGatewayUnauthorizedError = class extends Error {\n};\nasync function streamToObject(stream) {\n const response = new Response(stream);\n return await response.json();\n}\nvar AiGatewayChatLanguageModel = class {\n constructor(models, config) {\n __publicField(this, \"specificationVersion\", \"v3\");\n __publicField(this, \"defaultObjectGenerationMode\", \"json\");\n __publicField(this, \"supportedUrls\", {\n // No URLS are supported for this language model\n });\n __publicField(this, \"models\");\n __publicField(this, \"config\");\n this.models = models;\n this.config = config;\n }\n get modelId() {\n if (!this.models[0]) {\n throw new Error(\"models cannot be empty array\");\n }\n return this.models[0].modelId;\n }\n get provider() {\n if (!this.models[0]) {\n throw new Error(\"models cannot be empty array\");\n }\n return this.models[0].provider;\n }\n async processModelRequest(options, modelMethod) {\n const requests = [];\n for (const model of this.models) {\n if (!model.config || !Object.keys(model.config).includes(\"fetch\")) {\n throw new Error(\n `Sorry, but provider \"${model.provider}\" is currently not supported, please open a issue in the github repo!`\n );\n }\n model.config.fetch = (url, request) => {\n requests.push({\n modelProvider: model.provider,\n request,\n url\n });\n throw new AiGatewayInternalFetchError(\"Stopping provider execution...\");\n };\n try {\n await model[modelMethod](options);\n } catch (e) {\n if (!(e instanceof AiGatewayInternalFetchError)) {\n throw e;\n }\n }\n }\n const body = await Promise.all(\n requests.map(async (req) => {\n let providerConfig = null;\n for (const provider of providers) {\n if (provider.regex.test(req.url)) {\n providerConfig = provider;\n }\n }\n if (!providerConfig) {\n throw new Error(\n `Sorry, but provider \"${req.modelProvider}\" is currently not supported, please open a issue in the github repo!`\n );\n }\n if (!req.request.body) {\n throw new Error(\"Ai Gateway provider received an unexpected empty body\");\n }\n const authHeader = providerConfig.headerKey ?? \"authorization\";\n const authValue = \"get\" in req.request.headers ? req.request.headers.get(authHeader) : req.request.headers[authHeader];\n if (authValue?.indexOf(CF_TEMP_TOKEN) !== -1) {\n if (\"delete\" in req.request.headers) {\n req.request.headers.delete(authHeader);\n } else {\n delete req.request.headers[authHeader];\n }\n }\n return {\n endpoint: providerConfig.transformEndpoint(req.url),\n headers: req.request.headers,\n provider: providerConfig.name,\n query: await streamToObject(req.request.body)\n };\n })\n );\n const headers = parseAiGatewayOptions(this.config.options ?? {});\n let resp;\n if (\"binding\" in this.config) {\n const updatedBody = body.map((obj) => ({\n ...obj,\n headers: {\n ...obj.headers ?? {},\n ...Object.fromEntries(headers.entries())\n }\n }));\n resp = await this.config.binding.run(updatedBody, {\n signal: options.abortSignal\n });\n } else {\n headers.set(\"Content-Type\", \"application/json\");\n headers.set(\"cf-aig-authorization\", `Bearer ${this.config.apiKey}`);\n resp = await fetch(\n `https://gateway.ai.cloudflare.com/v1/${this.config.accountId}/${this.config.gateway}`,\n {\n body: JSON.stringify(body),\n headers,\n method: \"POST\",\n signal: options.abortSignal\n }\n );\n }\n if (resp.status === 400) {\n const cloneResp = resp.clone();\n const result = await cloneResp.json();\n if (result.success === false && result.error && result.error.length > 0 && result.error[0]?.code === 2001) {\n throw new AiGatewayDoesNotExist(\"This AI gateway does not exist\");\n }\n } else if (resp.status === 401) {\n const cloneResp = resp.clone();\n const result = await cloneResp.json();\n if (result.success === false && result.error && result.error.length > 0 && result.error[0]?.code === 2009) {\n throw new AiGatewayUnauthorizedError(\n \"Your AI Gateway has authentication active, but you didn't provide a valid apiKey\"\n );\n }\n }\n const step = Number.parseInt(resp.headers.get(\"cf-aig-step\") ?? \"0\", 10);\n if (!this.models[step]) {\n throw new Error(\"Unexpected AI Gateway Error\");\n }\n this.models[step].config = {\n ...this.models[step].config,\n fetch: (_url, _req) => resp\n };\n return this.models[step][modelMethod](options);\n }\n async doStream(options) {\n return this.processModelRequest(options, \"doStream\");\n }\n async doGenerate(options) {\n return this.processModelRequest(options, \"doGenerate\");\n }\n};\nfunction createAiGateway(options) {\n const createChatModel = (models) => {\n return new AiGatewayChatLanguageModel(Array.isArray(models) ? models : [models], options);\n };\n const provider = (models) => createChatModel(models);\n provider.chat = createChatModel;\n return provider;\n}\nfunction parseAiGatewayOptions(options) {\n const headers = new Headers();\n if (options.skipCache === true) {\n headers.set(\"cf-skip-cache\", \"true\");\n }\n if (options.cacheTtl) {\n headers.set(\"cf-cache-ttl\", options.cacheTtl.toString());\n }\n if (options.metadata) {\n headers.set(\"cf-aig-metadata\", JSON.stringify(options.metadata));\n }\n if (options.cacheKey) {\n headers.set(\"cf-aig-cache-key\", options.cacheKey);\n }\n if (options.collectLog !== void 0) {\n headers.set(\"cf-aig-collect-log\", options.collectLog === true ? \"true\" : \"false\");\n }\n if (options.eventId !== void 0) {\n headers.set(\"cf-aig-event-id\", options.eventId);\n }\n if (options.requestTimeoutMs !== void 0) {\n headers.set(\"cf-aig-request-timeout\", options.requestTimeoutMs.toString());\n }\n if (options.retries !== void 0) {\n if (options.retries.maxAttempts !== void 0) {\n headers.set(\"cf-aig-max-attempts\", options.retries.maxAttempts.toString());\n }\n if (options.retries.retryDelayMs !== void 0) {\n headers.set(\"cf-aig-retry-delay\", options.retries.retryDelayMs.toString());\n }\n if (options.retries.backoff !== void 0) {\n headers.set(\"cf-aig-backoff\", options.retries.backoff);\n }\n }\n return headers;\n}\nexport {\n AiGatewayChatLanguageModel,\n AiGatewayDoesNotExist,\n AiGatewayInternalFetchError,\n AiGatewayUnauthorizedError,\n createAiGateway,\n parseAiGatewayOptions\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";uCAAA,IAA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,IAAI,EAA2B,MAAM,QAAQ,CAAM,EAAI,EAAS,CAAC,CAAM,EAAG,CAAO,GAEpF,EAAW,CAAC,IAAW,EAAgB,CAAM,EAEnD,OADA,EAAS,KAAO,EACT,EAET,SAAS,CAAqB,CAAC,EAAS,CACtC,IAAM,EAAU,IAAI,QACpB,GAAI,EAAQ,YAAc,GACxB,EAAQ,IAAI,gBAAiB,MAAM,EAErC,GAAI,EAAQ,SACV,EAAQ,IAAI,eAAgB,EAAQ,SAAS,SAAS,CAAC,EAEzD,GAAI,EAAQ,SACV,EAAQ,IAAI,kBAAmB,KAAK,UAAU,EAAQ,QAAQ,CAAC,EAEjE,GAAI,EAAQ,SACV,EAAQ,IAAI,mBAAoB,EAAQ,QAAQ,EAElD,GAAI,EAAQ,aAAoB,OAC9B,EAAQ,IAAI,qBAAsB,EAAQ,aAAe,GAAO,OAAS,OAAO,EAElF,GAAI,EAAQ,UAAiB,OAC3B,EAAQ,IAAI,kBAAmB,EAAQ,OAAO,EAEhD,GAAI,EAAQ,mBAA0B,OACpC,EAAQ,IAAI,yBAA0B,EAAQ,iBAAiB,SAAS,CAAC,EAE3E,GAAI,EAAQ,UAAiB,OAAG,CAC9B,GAAI,EAAQ,QAAQ,cAAqB,OACvC,EAAQ,IAAI,sBAAuB,EAAQ,QAAQ,YAAY,SAAS,CAAC,EAE3E,GAAI,EAAQ,QAAQ,eAAsB,OACxC,EAAQ,IAAI,qBAAsB,EAAQ,QAAQ,aAAa,SAAS,CAAC,EAE3E,GAAI,EAAQ,QAAQ,UAAiB,OACnC,EAAQ,IAAI,iBAAkB,EAAQ,QAAQ,OAAO,EAGzD,OAAO",
"debugId": "4A92B768FEBA117B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260622202450_simplify_session_input.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260622202450_simplify_session_input\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DELETE FROM \\`session_context_epoch\\`;`)\n yield* tx.run(`DELETE FROM \\`session_input\\`;`)\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`DELETE FROM \\`event\\`;`)\n yield* tx.run(`DELETE FROM \\`event_sequence\\`;`)\n yield* tx.run(`UPDATE \\`session\\` SET \\`workspace_id\\` = NULL WHERE \\`workspace_id\\` IS NOT NULL;`)\n yield* tx.run(`DELETE FROM \\`workspace\\`;`)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,wCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sCAAwC,EACtD,MAAO,EAAG,IAAI,8BAAgC,EAC9C,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,sBAAwB,EACtC,MAAO,EAAG,IAAI,+BAAiC,EAC/C,MAAO,EAAG,IAAI,8EAAoF,EAClG,MAAO,EAAG,IAAI,0BAA4B,EAC3C,EAEL",
"debugId": "D75C4568E3ED8DBC64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "251835E978FE3A8464756E2164756E21",
"names": []
}
{
"version": 3,
"sources": [],
"sourcesContent": [
],
"mappings": "",
"debugId": "64E8DF4D4FBB240B64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@smithy+node-http-handler@4.9.7/node_modules/@smithy/node-http-handler/dist-cjs/index.js"],
"sourcesContent": [
"const { buildQueryString, HttpResponse } = require(\"@smithy/core/protocols\");\nconst node_https = require(\"node:https\");\nconst { Readable } = require(\"node:stream\");\nconst http2 = require(\"node:http2\");\nconst { streamCollector } = require(\"@smithy/core/serde\");\nexports.streamCollector = streamCollector;\n\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n\nconst NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\nconst getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name in headers) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\n\nconst timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n};\n\nconst DEFER_EVENT_LISTENER_TIME$2 = 1000;\nconst setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = (offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs - offset);\n const doWithSocket = (socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n }\n else {\n timing.clearTimeout(timeoutId);\n }\n };\n if (request.socket) {\n doWithSocket(request.socket);\n }\n else {\n request.on(\"socket\", doWithSocket);\n }\n };\n if (timeoutInMs < 2000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);\n};\n\nconst setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {\n if (timeoutInMs) {\n return timing.setTimeout(() => {\n let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? \"ERROR\" : \"WARN\"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;\n if (throwOnRequestTimeout) {\n const error = Object.assign(new Error(msg), {\n name: \"TimeoutError\",\n code: \"ETIMEDOUT\",\n });\n req.destroy(error);\n reject(error);\n }\n else {\n msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;\n logger?.warn?.(msg);\n }\n }, timeoutInMs);\n }\n return -1;\n};\n\nconst DEFER_EVENT_LISTENER_TIME$1 = 3000;\nconst setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = () => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n }\n else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n };\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n};\n\nconst DEFER_EVENT_LISTENER_TIME = 3000;\nconst setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n const registerTimeout = (offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = () => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: \"TimeoutError\" }));\n };\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n }\n else {\n request.setTimeout(timeout, onTimeout);\n }\n };\n if (0 < timeoutInMs && timeoutInMs < 6000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n\nconst MIN_WAIT_TIME = 6_000;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {\n const headers = request.headers;\n const expect = headers ? headers.Expect || headers.expect : undefined;\n let timeoutId = -1;\n let sendBody = true;\n if (!externalAgent && expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n }),\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\nfunction writeBody(httpRequest, body) {\n if (body instanceof Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n const isBuffer = Buffer.isBuffer(body);\n const isString = typeof body === \"string\";\n if (isBuffer || isString) {\n if (isBuffer && body.byteLength === 0) {\n httpRequest.end();\n }\n else {\n httpRequest.end(body);\n }\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" &&\n uint8.buffer &&\n typeof uint8.byteOffset === \"number\" &&\n typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n\nconst DEFAULT_REQUEST_TIMEOUT = 0;\nlet hAgent = undefined;\nlet hRequest = undefined;\nclass NodeHttpHandler {\n config;\n configProvider;\n socketWarningTimestamp = 0;\n externalAgent = false;\n metadata = { handlerProtocol: \"http/1.1\" };\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttpHandler(instanceOrOptions);\n }\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15_000;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n })\n .catch(reject);\n }\n else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const config = this.config;\n const isSSL = request.protocol === \"https:\";\n if (!isSSL && !this.config.httpAgent) {\n this.config.httpAgent = await this.config.httpAgentProvider();\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = undefined;\n let socketWarningTimeoutId = -1;\n let connectionTimeoutId = -1;\n let requestTimeoutId = -1;\n let socketTimeoutId = -1;\n let keepAliveTimeoutId = -1;\n const clearTimeouts = () => {\n timing.clearTimeout(socketWarningTimeoutId);\n timing.clearTimeout(connectionTimeoutId);\n timing.clearTimeout(requestTimeoutId);\n timing.clearTimeout(socketTimeoutId);\n timing.clearTimeout(keepAliveTimeoutId);\n };\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const headers = request.headers;\n const expectContinue = headers ? (headers.Expect ?? headers.expect) === \"100-continue\" : false;\n let agent = isSSL ? config.httpsAgent : config.httpAgent;\n if (expectContinue && !this.externalAgent) {\n agent = new (isSSL ? node_https.Agent : hAgent)({\n keepAlive: false,\n maxSockets: Infinity,\n });\n }\n socketWarningTimeoutId = timing.setTimeout(() => {\n this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);\n }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));\n const queryString = request.query ? buildQueryString(request.query) : \"\";\n let auth = undefined;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n }\n else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth,\n };\n const requestFunc = isSSL ? node_https.request : hRequest;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = () => {\n req.destroy();\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;\n connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);\n requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);\n socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n keepAliveTimeoutId = setSocketKeepAlive(req, {\n keepAlive: httpAgent.keepAlive,\n keepAliveMsecs: httpAgent.keepAliveMsecs,\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {\n clearTimeouts();\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout,\n socketTimeout,\n socketAcquisitionWarningTimeout,\n throwOnRequestTimeout,\n httpAgentProvider: async () => {\n const node_http = require('node:http');\n const { Agent, request } = node_http.default ?? node_http;\n hRequest = request;\n hAgent = Agent;\n if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpAgent;\n }\n return new hAgent({ keepAlive, maxSockets, ...httpAgent });\n },\n httpsAgent: (() => {\n if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpsAgent;\n }\n return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger,\n };\n }\n}\n\nconst ids = new Uint16Array(1);\nclass ClientHttp2SessionRef {\n id = ids[0]++;\n total = 0;\n max = 0;\n session;\n refs = 0;\n constructor(session) {\n session.unref();\n this.session = session;\n }\n retain() {\n if (this.session.destroyed) {\n throw new Error(\"@smithy/node-http-handler - cannot acquire reference to destroyed session.\");\n }\n this.refs += 1;\n this.total += 1;\n this.max = Math.max(this.refs, this.max);\n this.session.ref();\n }\n free() {\n if (this.session.destroyed) {\n return;\n }\n this.refs -= 1;\n if (this.refs === 0) {\n this.session.unref();\n }\n if (this.refs < 0) {\n throw new Error(\"@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.\");\n }\n }\n deref() {\n return this.session;\n }\n close() {\n if (!this.session.closed) {\n this.session.close();\n }\n }\n destroy() {\n this.refs = 0;\n if (!this.session.destroyed) {\n this.session.destroy();\n }\n }\n useCount() {\n return this.refs;\n }\n}\n\nclass NodeHttp2ConnectionPool {\n sessions = [];\n maxConcurrency = 0;\n constructor(sessions) {\n this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));\n }\n poll() {\n let cleanup = false;\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n cleanup = true;\n continue;\n }\n if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {\n return session;\n }\n }\n if (cleanup) {\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n this.remove(session);\n }\n }\n }\n }\n offerLast(ref) {\n this.sessions.push(ref);\n }\n remove(ref) {\n const ix = this.sessions.indexOf(ref);\n if (ix > -1) {\n this.sessions.splice(ix, 1);\n }\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n setMaxConcurrency(maxConcurrency) {\n this.maxConcurrency = maxConcurrency;\n }\n destroy(ref) {\n this.remove(ref);\n ref.destroy();\n }\n}\n\nclass NodeHttp2ConnectionManager {\n config;\n connectOptions;\n connectionPools = new Map();\n constructor(config) {\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const pool = this.getPool(url);\n if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {\n const available = pool.poll();\n if (available) {\n available.retain();\n return available;\n }\n }\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\"Fail to set maxConcurrentStreams to \" +\n this.config.maxConcurrency +\n \"when creating new session for \" +\n requestContext.destination.toString());\n }\n });\n }\n const graceful = () => {\n this.removeFromPoolAndClose(url, ref);\n };\n const ensureDestroyed = () => {\n this.removeFromPoolAndCheckedDestroy(url, ref);\n };\n session.on(\"goaway\", graceful);\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n pool.offerLast(ref);\n ref.retain();\n return ref;\n }\n release(_requestContext, ref) {\n ref.free();\n }\n createIsolatedSession(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n session.settings({ maxConcurrentStreams: 1 });\n const ensureDestroyed = () => {\n ref.destroy();\n };\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n ref.retain();\n return ref;\n }\n destroy() {\n for (const [url, connectionPool] of this.connectionPools) {\n for (const session of [...connectionPool]) {\n session.destroy();\n }\n this.connectionPools.delete(url);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n for (const pool of this.connectionPools.values()) {\n pool.setMaxConcurrency(maxConcurrentStreams);\n }\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {\n this.connectOptions = nodeHttp2ConnectOptions;\n }\n debug() {\n const pools = {};\n for (const [url, pool] of this.connectionPools) {\n const sessions = [];\n for (const ref of pool) {\n sessions.push({\n id: ref.id,\n active: ref.useCount(),\n maxConcurrent: ref.max,\n totalRequests: ref.total,\n });\n }\n pools[url] = { sessions };\n }\n return pools;\n }\n removeFromPoolAndClose(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.close();\n }\n removeFromPoolAndCheckedDestroy(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.destroy();\n }\n getPool(url) {\n if (!this.connectionPools.has(url)) {\n const pool = new NodeHttp2ConnectionPool();\n if (this.config.maxConcurrency) {\n pool.setMaxConcurrency(this.config.maxConcurrency);\n }\n this.connectionPools.set(url, pool);\n }\n return this.connectionPools.get(url);\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n connect(url) {\n return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions);\n }\n}\n\nconst { constants } = http2;\nclass NodeHttp2Handler {\n config;\n configProvider;\n metadata = { handlerProtocol: \"h2\" };\n connectionManager = new NodeHttp2ConnectionManager({});\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttp2Handler(instanceOrOptions);\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((opts) => {\n resolve(opts || {});\n })\n .catch(reject);\n }\n else {\n resolve(options || {});\n }\n });\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;\n this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);\n if (maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);\n }\n if (nodeHttp2ConnectOptions) {\n this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);\n }\n }\n const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;\n const useIsolatedSession = disableConcurrentStreams || isEventStream;\n const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = undefined;\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const connectConfig = {\n requestTimeout: this.config?.sessionTimeout,\n isEventStream,\n };\n const ref = useIsolatedSession\n ? this.connectionManager.createIsolatedSession(requestContext, connectConfig)\n : this.connectionManager.lease(requestContext, connectConfig);\n const session = ref.deref();\n const rejectWithDestroy = (err) => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n fulfilled = true;\n reject(err);\n };\n const queryString = query ? buildQueryString(query) : \"\";\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const clientHttp2Stream = session.request({\n ...request.headers,\n [constants.HTTP2_HEADER_PATH]: path,\n [constants.HTTP2_HEADER_METHOD]: method,\n });\n if (effectiveRequestTimeout) {\n clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {\n clientHttp2Stream.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = () => {\n clientHttp2Stream.close();\n const abortError = buildAbortError(abortSignal);\n rejectWithDestroy(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n clientHttp2Stream.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n clientHttp2Stream.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n clientHttp2Stream.on(\"error\", rejectWithDestroy);\n clientHttp2Stream.on(\"aborted\", () => {\n rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));\n });\n clientHttp2Stream.on(\"response\", (headers) => {\n const httpResponse = new HttpResponse({\n statusCode: headers[\":status\"] ?? -1,\n headers: getTransformedHeaders(headers),\n body: clientHttp2Stream,\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (useIsolatedSession) {\n session.close();\n }\n });\n clientHttp2Stream.on(\"close\", () => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n else {\n this.connectionManager.release(requestContext, ref);\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\n\nexports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;\nexports.NodeHttp2Handler = NodeHttp2Handler;\nexports.NodeHttpHandler = NodeHttpHandler;\n"
],
"mappings": ";2KAAA,SAAQ,wBAAkB,qBACpB,cACE,yBACF,cACE,wBACA,mBAAkB,GAE1B,SAAS,CAAe,CAAC,EAAa,CAClC,IAAM,EAAS,GAAe,OAAO,IAAgB,UAAY,WAAY,EACvE,EAAY,OACZ,OACN,GAAI,EAAQ,CACR,GAAI,aAAkB,MAAO,CACzB,IAAM,EAAiB,MAAM,iBAAiB,EAG9C,OAFA,EAAW,KAAO,aAClB,EAAW,MAAQ,EACZ,EAEX,IAAM,EAAiB,MAAM,OAAO,CAAM,CAAC,EAE3C,OADA,EAAW,KAAO,aACX,EAEX,IAAM,EAAiB,MAAM,iBAAiB,EAE9C,OADA,EAAW,KAAO,aACX,EAGX,IAAM,GAA6B,CAAC,aAAc,QAAS,WAAW,EAEhE,EAAwB,CAAC,IAAY,CACvC,IAAM,EAAqB,CAAC,EAC5B,QAAW,KAAQ,EAAS,CACxB,IAAM,EAAe,EAAQ,GAC7B,EAAmB,GAAQ,MAAM,QAAQ,CAAY,EAAI,EAAa,KAAK,GAAG,EAAI,EAEtF,OAAO,GAGL,EAAS,CACX,WAAY,CAAC,EAAI,IAAO,WAAW,EAAI,CAAE,EACzC,aAAc,CAAC,IAAc,aAAa,CAAS,CACvD,EAEM,EAA8B,KAC9B,GAAuB,CAAC,EAAS,EAAQ,EAAc,IAAM,CAC/D,GAAI,CAAC,EACD,MAAO,GAEX,IAAM,EAAkB,CAAC,IAAW,CAChC,IAAM,EAAY,EAAO,WAAW,IAAM,CACtC,EAAQ,QAAQ,EAChB,EAAO,OAAO,OAAW,MAAM,kIAAkI,OAAiB,EAAG,CACjL,KAAM,cACV,CAAC,CAAC,GACH,EAAc,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K,kBAAkB,QAAQ,EAAgB,CAAG,EAEtD,GAAI,CAAC,EACD,EAAsB,MAAM,wDAAwD,CAAC,EAE5F,EACD,EAA0B,EAAiB,EAAmB,EAAS,CAAuB,EACjG,EAEL,sBAAsB,CAAC,EAAK,EAAO,CAC/B,KAAK,OAAS,OACd,KAAK,eAAiB,KAAK,eAAe,KAAK,CAAC,IAAW,CACvD,MAAO,IACA,GACF,GAAM,CACX,EACH,EAEL,kBAAkB,EAAG,CACjB,OAAO,KAAK,QAAU,CAAC,EAE/B,CAEQ,2BAA0B,GAC1B,oBAAmB,EACnB,mBAAkB",
"debugId": "3577371B8ECC05BF64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@aws-sdk+nested-clients@3.997.33/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js"],
"sourcesContent": [
"const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require(\"@aws-sdk/core/client\");\nconst { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require(\"@smithy/core\");\nconst { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require(\"@smithy/core/client\");\nconst { Command: $Command } = require(\"@smithy/core/client\");\nexports.$Command = $Command;\nexports.__Client = Client;\nconst { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require(\"@smithy/core/config\");\nconst { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require(\"@smithy/core/endpoints\");\nconst { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require(\"@smithy/core/protocols\");\nconst { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require(\"@smithy/core/retry\");\nconst { TypeRegistry, getSchemaSerdePlugin } = require(\"@smithy/core/schema\");\nconst { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require(\"@smithy/core/serde\");\nconst { streamCollector, NodeHttpHandler } = require(\"@smithy/node-http-handler\");\nconst { AwsRestJsonProtocol } = require(\"@aws-sdk/core/protocols\");\nconst { Sha256 } = require(\"@smithy/core/checksum\");\n\nconst defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.997.32\";\nvar packageInfo = {\n\tversion: version};\n\nconst s = \"ref\";\nconst a = -1, b = false, c = true, d = \"isSet\", e = \"booleanEquals\", f = \"coalesce\", g = \"PartitionResult\", h = \"stringEquals\", i = \"getAttr\", j = \"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k = { [s]: \"Endpoint\" }, l = { \"fn\": i, \"argv\": [{ [s]: g }, \"name\"] }, m = { [s]: \"Region\" }, n = { [s]: g }, o = { \"authSchemes\": [{ \"name\": \"sigv4\", \"signingName\": \"signin\", \"signingRegion\": \"{Region}\" }] }, p = {}, q = [m];\nconst _data = {\n conditions: [\n [d, q],\n [e, [{ fn: f, argv: [{ [s]: \"IsControlPlane\" }, b] }, c]],\n [d, [k]],\n [\"aws.partition\", q, g],\n [e, [{ [s]: \"UseFIPS\" }, c]],\n [h, [l, \"aws\"]],\n [e, [{ fn: f, argv: [{ [s]: \"IsOAuthEndpoint\" }, b] }, c]],\n [e, [{ [s]: \"UseDualStack\" }, c]],\n [h, [l, \"aws-cn\"]],\n [h, [m, \"us-gov-west-1\"]],\n [h, [l, \"aws-us-gov\"]],\n [e, [{ fn: i, argv: [n, \"supportsFIPS\"] }, c]],\n [h, [l, \"aws-iso\"]],\n [h, [l, \"aws-iso-b\"]],\n [h, [l, \"aws-iso-f\"]],\n [h, [l, \"aws-iso-e\"]],\n [h, [l, \"aws-eusc\"]],\n [e, [{ fn: i, argv: [n, \"supportsDualStack\"] }, c]]\n ],\n results: [\n [a],\n [\"https://signin.{Region}.api.aws\", o],\n [\"https://signin.{Region}.api.amazonwebservices.com.cn\", o],\n [j, o],\n [a, \"FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation.\"],\n [\"https://{Region}.oauth.signin.aws\", o],\n [\"https://{Region}.signin.aws.amazon.com\", p],\n [\"https://{Region}.signin.amazonaws.cn\", p],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", p],\n [\"https://{Region}.signin.c2shome.ic.gov\", p],\n [\"https://{Region}.signin.sc2shome.sgov.gov\", p],\n [\"https://{Region}.signin.csphome.hci.ic.gov\", p],\n [\"https://{Region}.signin.csphome.adc-e.uk\", p],\n [\"https://{Region}.signin.amazonaws-eusc.eu\", p],\n [\"https://signin-fips.amazonaws-us-gov.com\", p],\n [\"https://{Region}.signin-fips.amazonaws-us-gov.com\", p],\n [\"https://{Region}.signin.{PartitionResult#dnsSuffix}\", p],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [k, p],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", p],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", p],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [j, p],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", p],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 6, 3,\n 2, 36, 4,\n 4, 5, r + 27,\n 6, r + 4, r + 27,\n 1, 29, 7,\n 2, 36, 8,\n 3, 9, 31,\n 4, 22, 10,\n 5, 19, 11,\n 7, 21, 12,\n 8, r + 7, 13,\n 10, r + 8, 14,\n 12, r + 9, 15,\n 13, r + 10, 16,\n 14, r + 11, 17,\n 15, r + 12, 18,\n 16, r + 13, r + 16,\n 6, r + 5, 20,\n 7, 21, r + 6,\n 17, r + 24, r + 25,\n 6, r + 4, 23,\n 7, 27, 24,\n 9, r + 14, 25,\n 10, r + 15, 26,\n 11, r + 22, r + 23,\n 11, 28, r + 21,\n 17, r + 20, r + 21,\n 2, 35, 30,\n 3, 39, 31,\n 4, 32, r + 27,\n 6, r + 4, 33,\n 7, r + 27, 34,\n 9, r + 14, r + 27,\n 3, 39, 36,\n 4, 38, 37,\n 7, r + 18, r + 19,\n 6, r + 4, r + 17,\n 5, r + 1, 40,\n 8, r + 2, r + 3,\n]);\nconst bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"IsControlPlane\", \"IsOAuthEndpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n\nclass SigninServiceException extends ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SigninServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nclass InternalServerException extends SigninServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nclass TooManyRequestsError extends SigninServiceException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nclass ValidationException extends SigninServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _COATWIAM = \"CreateOAuth2TokenWithIAM\";\nconst _COATWIAMR = \"CreateOAuth2TokenWithIAMRequest\";\nconst _COATWIAMRr = \"CreateOAuth2TokenWithIAMResponse\";\nconst _ISE = \"InternalServerException\";\nconst _OAAT = \"OAuthAccessToken\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _at = \"access_token\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ei = \"expires_in\";\nconst _gT = \"grantType\";\nconst _gt = \"grant_type\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _r = \"resource\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst _tt = \"token_type\";\nconst n0 = \"com.amazonaws.signin\";\nconst _s_registry = TypeRegistry.for(_s);\nvar SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(SigninServiceException$, SigninServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nvar AccessDeniedException$ = [-3, n0, _ADE,\n { [_e]: _c },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar InternalServerException$ = [-3, n0, _ISE,\n { [_e]: _se, [_hE]: 500 },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar TooManyRequestsError$ = [-3, n0, _TMRE,\n { [_e]: _c, [_hE]: 429 },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);\nvar ValidationException$ = [-3, n0, _VE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(ValidationException$, ValidationException);\nconst errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar OAuthAccessToken = [0, n0, _OAAT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar AccessToken$ = [3, n0, _AT,\n 8,\n [_aKI, _sAK, _sT],\n [[0, { [_jN]: _aKI }], [0, { [_jN]: _sAK }], [0, { [_jN]: _sT }]], 3\n];\nvar CreateOAuth2TokenRequest$ = [3, n0, _COATR,\n 0,\n [_tI],\n [[() => CreateOAuth2TokenRequestBody$, 16]], 1\n];\nvar CreateOAuth2TokenRequestBody$ = [3, n0, _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [[0, { [_jN]: _cI }], [0, { [_jN]: _gT }], 0, [0, { [_jN]: _rU }], [0, { [_jN]: _cV }], [() => RefreshToken, { [_jN]: _rT }]], 2\n];\nvar CreateOAuth2TokenResponse$ = [3, n0, _COATRr,\n 0,\n [_tO],\n [[() => CreateOAuth2TokenResponseBody$, 16]], 1\n];\nvar CreateOAuth2TokenResponseBody$ = [3, n0, _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken$, { [_jN]: _aT }], [0, { [_jN]: _tT }], [1, { [_jN]: _eI }], [() => RefreshToken, { [_jN]: _rT }], [0, { [_jN]: _iT }]], 4\n];\nvar CreateOAuth2TokenWithIAMRequest$ = [3, n0, _COATWIAMR,\n 0,\n [_gT, _r],\n [[0, { [_jN]: _gt }], 0], 2\n];\nvar CreateOAuth2TokenWithIAMResponse$ = [3, n0, _COATWIAMRr,\n 0,\n [_aT, _tT, _eI],\n [[() => OAuthAccessToken, { [_jN]: _at }], [0, { [_jN]: _tt }], [1, { [_jN]: _ei }]], 3\n];\nvar CreateOAuth2Token$ = [9, n0, _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] }, () => CreateOAuth2TokenRequest$, () => CreateOAuth2TokenResponse$\n];\nvar CreateOAuth2TokenWithIAM$ = [9, n0, _COATWIAM,\n { [_h]: [\"POST\", \"/v1/token?x-amz-client-auth-method=iam\", 200] }, () => CreateOAuth2TokenWithIAMRequest$, () => CreateOAuth2TokenWithIAMResponse$\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2023-01-01\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config);\n emitWarningIfUnsupportedVersion$1(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nconst command = makeBuilder(commonParams, \"Signin\", \"SigninClient\", getEndpointPlugin);\nconst _ep0 = {\n IsControlPlane: { type: \"staticContextParams\", value: false },\n};\nconst _ep1 = {\n IsOAuthEndpoint: { type: \"staticContextParams\", value: true },\n};\nconst _mw0 = (Command, cs, config, o) => [];\n\nclass CreateOAuth2TokenCommand extends command(_ep0, _mw0, \"CreateOAuth2Token\", CreateOAuth2Token$) {\n}\n\nclass CreateOAuth2TokenWithIAMCommand extends command(_ep1, _mw0, \"CreateOAuth2TokenWithIAM\", CreateOAuth2TokenWithIAM$) {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n CreateOAuth2TokenWithIAMCommand,\n};\nclass Signin extends SigninClient {\n}\ncreateAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n CONFLICT: \"CONFLICT\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n RESOURCE_NOT_FOUND: \"RESOURCE_NOT_FOUND\",\n SERVER_ERROR: \"server_error\",\n SERVICE_QUOTA_EXCEEDED: \"SERVICE_QUOTA_EXCEEDED\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessToken$ = AccessToken$;\nexports.CreateOAuth2Token$ = CreateOAuth2Token$;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;\nexports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;\nexports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;\nexports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;\nexports.CreateOAuth2TokenWithIAM$ = CreateOAuth2TokenWithIAM$;\nexports.CreateOAuth2TokenWithIAMCommand = CreateOAuth2TokenWithIAMCommand;\nexports.CreateOAuth2TokenWithIAMRequest$ = CreateOAuth2TokenWithIAMRequest$;\nexports.CreateOAuth2TokenWithIAMResponse$ = CreateOAuth2TokenWithIAMResponse$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nexports.SigninServiceException = SigninServiceException;\nexports.SigninServiceException$ = SigninServiceException$;\nexports.TooManyRequestsError = TooManyRequestsError;\nexports.TooManyRequestsError$ = TooManyRequestsError$;\nexports.ValidationException = ValidationException;\nexports.ValidationException$ = ValidationException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"
],
"mappings": ";+VAAA,SAAQ,6BAAsB,qCAAiC,QAAmC,uCAAgC,8BAA4B,sCAAoC,0CAAwC,0BAAwB,2BAAyB,sBAAoB,uBAAqB,mBAAiB,sCAC7U,gBAAc,0CAAwC,iCAA+B,+BACrF,qBAAmB,oBAAkB,oBAAkB,cAAY,mCAAiC,6BAA2B,oCAAkC,+BAA6B,UAAQ,eAAa,iCACnN,QAAS,SACjB,IAAQ,GAAW,GACX,GAAW,GACnB,IAAQ,6BAA2B,aAAY,yCAAuC,8CAA4C,8BAA4B,mCAAiC,8BACvL,yBAAuB,iBAAe,kBAAgB,2BAAyB,yBAAuB,4BACtG,YAAU,wCAAsC,mCAAiC,iCACjF,sBAAoB,kCAAgC,mCAAiC,sBAAoB,yBACzG,gBAAc,+BACd,4BAA0B,qBAAmB,8CAC7C,UAAQ,YAAU,YAAU,cAAY,8BACxC,mBAAiB,0BACjB,8BACA,gBAEF,GAAgD,MAAO,EAAQ,EAAS,IAAU,CACpF,MAAO,CACH,UAAW,GAAiB,CAAO,EAAE,UACrC,OAAQ,MAAM,GAAkB,EAAO,MAAM,EAAE,IAAM,IAAM,CACvD,MAAU,MAAM,yDAAyD,IAC1E,CACP,GAEJ,SAAS,EAAgC,CAAC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AM,2BAA4B,EAAyB,CAAE,CACzH,CAEA,IAAM,GAAW,CACb,2BACA,iCACJ,EACA,MAAM,UAAe,CAAa,CAClC,CACA,GAAuB,GAAU,CAAM,EAEvC,IAAM,GAAkB,CACpB,iBAAkB,mBAClB,SAAU,WACV,yBAA0B,2BAC1B,gBAAiB,kBACjB,mBAAoB,qBACpB,aAAc,eACd,uBAAwB,yBACxB,cAAe,gBACf,yBAA0B,0BAC9B,EAEA,IAAQ,GAAwB,EACxB,GAAyB,GACzB,GAAe,GACf,GAAqB,GACrB,GAA2B,EAC3B,GAA4B,GAC5B,GAAgC,GAChC,GAA6B,GAC7B,GAAiC,GACjC,GAA4B,GAC5B,GAAkC,EAClC,GAAmC,GACnC,GAAoC,GACpC,GAA0B,EAC1B,GAA2B,GAC3B,GAAkB,GAClB,GAAS,EACT,GAAe,EACf,GAAyB,EACzB,GAA0B,GAC1B,GAAuB,EACvB,GAAwB,GACxB,GAAsB,EACtB,GAAuB,GACvB,GAAsB",
"debugId": "CD5B479DBB04AA2064756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/aws4fetch@1.0.20/node_modules/aws4fetch/dist/aws4fetch.esm.mjs"],
"sourcesContent": [
"/**\n * @license MIT <https://opensource.org/licenses/MIT>\n * @copyright Michael Hart 2024\n */\nconst encoder = new TextEncoder();\nconst HOST_SERVICES = {\n appstream2: 'appstream',\n cloudhsmv2: 'cloudhsm',\n email: 'ses',\n marketplace: 'aws-marketplace',\n mobile: 'AWSMobileHubService',\n pinpoint: 'mobiletargeting',\n queue: 'sqs',\n 'git-codecommit': 'codecommit',\n 'mturk-requester-sandbox': 'mturk-requester',\n 'personalize-runtime': 'personalize',\n};\nconst UNSIGNABLE_HEADERS = new Set([\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n 'presigned-expires',\n 'expect',\n 'x-amzn-trace-id',\n 'range',\n 'connection',\n]);\nclass AwsClient {\n constructor({ accessKeyId, secretAccessKey, sessionToken, service, region, cache, retries, initRetryMs }) {\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n this.service = service;\n this.region = region;\n this.cache = cache || new Map();\n this.retries = retries != null ? retries : 10;\n this.initRetryMs = initRetryMs || 50;\n }\n async sign(input, init) {\n if (input instanceof Request) {\n const { method, url, headers, body } = input;\n init = Object.assign({ method, url, headers }, init);\n if (init.body == null && headers.has('Content-Type')) {\n init.body = body != null && headers.has('X-Amz-Content-Sha256') ? body : await input.clone().arrayBuffer();\n }\n input = url;\n }\n const signer = new AwsV4Signer(Object.assign({ url: input.toString() }, init, this, init && init.aws));\n const signed = Object.assign({}, init, await signer.sign());\n delete signed.aws;\n try {\n return new Request(signed.url.toString(), signed)\n } catch (e) {\n if (e instanceof TypeError) {\n return new Request(signed.url.toString(), Object.assign({ duplex: 'half' }, signed))\n }\n throw e\n }\n }\n async fetch(input, init) {\n for (let i = 0; i <= this.retries; i++) {\n const fetched = fetch(await this.sign(input, init));\n if (i === this.retries) {\n return fetched\n }\n const res = await fetched;\n if (res.status < 500 && res.status !== 429) {\n return res\n }\n await new Promise(resolve => setTimeout(resolve, Math.random() * this.initRetryMs * Math.pow(2, i)));\n }\n throw new Error('An unknown error occurred, ensure retries is not negative')\n }\n}\nclass AwsV4Signer {\n constructor({ method, url, headers, body, accessKeyId, secretAccessKey, sessionToken, service, region, cache, datetime, signQuery, appendSessionToken, allHeaders, singleEncode }) {\n if (url == null) throw new TypeError('url is a required option')\n if (accessKeyId == null) throw new TypeError('accessKeyId is a required option')\n if (secretAccessKey == null) throw new TypeError('secretAccessKey is a required option')\n this.method = method || (body ? 'POST' : 'GET');\n this.url = new URL(url);\n this.headers = new Headers(headers || {});\n this.body = body;\n this.accessKeyId = accessKeyId;\n this.secretAccessKey = secretAccessKey;\n this.sessionToken = sessionToken;\n let guessedService, guessedRegion;\n if (!service || !region) {\n[guessedService, guessedRegion] = guessServiceRegion(this.url, this.headers);\n }\n this.service = service || guessedService || '';\n this.region = region || guessedRegion || 'us-east-1';\n this.cache = cache || new Map();\n this.datetime = datetime || new Date().toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n this.signQuery = signQuery;\n this.appendSessionToken = appendSessionToken || this.service === 'iotdevicegateway';\n this.headers.delete('Host');\n if (this.service === 's3' && !this.signQuery && !this.headers.has('X-Amz-Content-Sha256')) {\n this.headers.set('X-Amz-Content-Sha256', 'UNSIGNED-PAYLOAD');\n }\n const params = this.signQuery ? this.url.searchParams : this.headers;\n params.set('X-Amz-Date', this.datetime);\n if (this.sessionToken && !this.appendSessionToken) {\n params.set('X-Amz-Security-Token', this.sessionToken);\n }\n this.signableHeaders = ['host', ...this.headers.keys()]\n .filter(header => allHeaders || !UNSIGNABLE_HEADERS.has(header))\n .sort();\n this.signedHeaders = this.signableHeaders.join(';');\n this.canonicalHeaders = this.signableHeaders\n .map(header => header + ':' + (header === 'host' ? this.url.host : (this.headers.get(header) || '').replace(/\\s+/g, ' ')))\n .join('\\n');\n this.credentialString = [this.datetime.slice(0, 8), this.region, this.service, 'aws4_request'].join('/');\n if (this.signQuery) {\n if (this.service === 's3' && !params.has('X-Amz-Expires')) {\n params.set('X-Amz-Expires', '86400');\n }\n params.set('X-Amz-Algorithm', 'AWS4-HMAC-SHA256');\n params.set('X-Amz-Credential', this.accessKeyId + '/' + this.credentialString);\n params.set('X-Amz-SignedHeaders', this.signedHeaders);\n }\n if (this.service === 's3') {\n try {\n this.encodedPath = decodeURIComponent(this.url.pathname.replace(/\\+/g, ' '));\n } catch (e) {\n this.encodedPath = this.url.pathname;\n }\n } else {\n this.encodedPath = this.url.pathname.replace(/\\/+/g, '/');\n }\n if (!singleEncode) {\n this.encodedPath = encodeURIComponent(this.encodedPath).replace(/%2F/g, '/');\n }\n this.encodedPath = encodeRfc3986(this.encodedPath);\n const seenKeys = new Set();\n this.encodedSearch = [...this.url.searchParams]\n .filter(([k]) => {\n if (!k) return false\n if (this.service === 's3') {\n if (seenKeys.has(k)) return false\n seenKeys.add(k);\n }\n return true\n })\n .map(pair => pair.map(p => encodeRfc3986(encodeURIComponent(p))))\n .sort(([k1, v1], [k2, v2]) => k1 < k2 ? -1 : k1 > k2 ? 1 : v1 < v2 ? -1 : v1 > v2 ? 1 : 0)\n .map(pair => pair.join('='))\n .join('&');\n }\n async sign() {\n if (this.signQuery) {\n this.url.searchParams.set('X-Amz-Signature', await this.signature());\n if (this.sessionToken && this.appendSessionToken) {\n this.url.searchParams.set('X-Amz-Security-Token', this.sessionToken);\n }\n } else {\n this.headers.set('Authorization', await this.authHeader());\n }\n return {\n method: this.method,\n url: this.url,\n headers: this.headers,\n body: this.body,\n }\n }\n async authHeader() {\n return [\n 'AWS4-HMAC-SHA256 Credential=' + this.accessKeyId + '/' + this.credentialString,\n 'SignedHeaders=' + this.signedHeaders,\n 'Signature=' + (await this.signature()),\n ].join(', ')\n }\n async signature() {\n const date = this.datetime.slice(0, 8);\n const cacheKey = [this.secretAccessKey, date, this.region, this.service].join();\n let kCredentials = this.cache.get(cacheKey);\n if (!kCredentials) {\n const kDate = await hmac('AWS4' + this.secretAccessKey, date);\n const kRegion = await hmac(kDate, this.region);\n const kService = await hmac(kRegion, this.service);\n kCredentials = await hmac(kService, 'aws4_request');\n this.cache.set(cacheKey, kCredentials);\n }\n return buf2hex(await hmac(kCredentials, await this.stringToSign()))\n }\n async stringToSign() {\n return [\n 'AWS4-HMAC-SHA256',\n this.datetime,\n this.credentialString,\n buf2hex(await hash(await this.canonicalString())),\n ].join('\\n')\n }\n async canonicalString() {\n return [\n this.method.toUpperCase(),\n this.encodedPath,\n this.encodedSearch,\n this.canonicalHeaders + '\\n',\n this.signedHeaders,\n await this.hexBodyHash(),\n ].join('\\n')\n }\n async hexBodyHash() {\n let hashHeader = this.headers.get('X-Amz-Content-Sha256') || (this.service === 's3' && this.signQuery ? 'UNSIGNED-PAYLOAD' : null);\n if (hashHeader == null) {\n if (this.body && typeof this.body !== 'string' && !('byteLength' in this.body)) {\n throw new Error('body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header')\n }\n hashHeader = buf2hex(await hash(this.body || ''));\n }\n return hashHeader\n }\n}\nasync function hmac(key, string) {\n const cryptoKey = await crypto.subtle.importKey(\n 'raw',\n typeof key === 'string' ? encoder.encode(key) : key,\n { name: 'HMAC', hash: { name: 'SHA-256' } },\n false,\n ['sign'],\n );\n return crypto.subtle.sign('HMAC', cryptoKey, encoder.encode(string))\n}\nasync function hash(content) {\n return crypto.subtle.digest('SHA-256', typeof content === 'string' ? encoder.encode(content) : content)\n}\nconst HEX_CHARS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\nfunction buf2hex(arrayBuffer) {\n const buffer = new Uint8Array(arrayBuffer);\n let out = '';\n for (let idx = 0; idx < buffer.length; idx++) {\n const n = buffer[idx];\n out += HEX_CHARS[(n >>> 4) & 0xF];\n out += HEX_CHARS[n & 0xF];\n }\n return out\n}\nfunction encodeRfc3986(urlEncodedStr) {\n return urlEncodedStr.replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase())\n}\nfunction guessServiceRegion(url, headers) {\n const { hostname, pathname } = url;\n if (hostname.endsWith('.on.aws')) {\n const match = hostname.match(/^[^.]{1,63}\\.lambda-url\\.([^.]{1,63})\\.on\\.aws$/);\n return match != null ? ['lambda', match[1] || ''] : ['', '']\n }\n if (hostname.endsWith('.r2.cloudflarestorage.com')) {\n return ['s3', 'auto']\n }\n if (hostname.endsWith('.backblazeb2.com')) {\n const match = hostname.match(/^(?:[^.]{1,63}\\.)?s3\\.([^.]{1,63})\\.backblazeb2\\.com$/);\n return match != null ? ['s3', match[1] || ''] : ['', '']\n }\n const match = hostname.replace('dualstack.', '').match(/([^.]{1,63})\\.(?:([^.]{0,63})\\.)?amazonaws\\.com(?:\\.cn)?$/);\n let service = (match && match[1]) || '';\n let region = match && match[2];\n if (region === 'us-gov') {\n region = 'us-gov-west-1';\n } else if (region === 's3' || region === 's3-accelerate') {\n region = 'us-east-1';\n service = 's3';\n } else if (service === 'iot') {\n if (hostname.startsWith('iot.')) {\n service = 'execute-api';\n } else if (hostname.startsWith('data.jobs.iot.')) {\n service = 'iot-jobs-data';\n } else {\n service = pathname === '/mqtt' ? 'iotdevicegateway' : 'iotdata';\n }\n } else if (service === 'autoscaling') {\n const targetPrefix = (headers.get('X-Amz-Target') || '').split('.')[0];\n if (targetPrefix === 'AnyScaleFrontendService') {\n service = 'application-autoscaling';\n } else if (targetPrefix === 'AnyScaleScalingPlannerFrontendService') {\n service = 'autoscaling-plans';\n }\n } else if (region == null && service.startsWith('s3-')) {\n region = service.slice(3).replace(/^fips-|^external-1/, '');\n service = 's3';\n } else if (service.endsWith('-fips')) {\n service = service.slice(0, -5);\n } else if (region && /-\\d$/.test(service) && !/-\\d$/.test(region)) {\n[service, region] = [region, service];\n }\n return [HOST_SERVICES[service] || service, region || '']\n}\n\nexport { AwsClient, AwsV4Signer };\n"
],
"mappings": ";AAIA,IAAM,EAAU,IAAI,YACd,EAAgB,CACpB,WAAY,YACZ,WAAY,WACZ,MAAO,MACP,YAAa,kBACb,OAAQ,sBACR,SAAU,kBACV,MAAO,MACP,iBAAkB,aAClB,0BAA2B,kBAC3B,sBAAuB,aACzB,EACM,EAAqB,IAAI,IAAI,CACjC,gBACA,eACA,iBACA,aACA,oBACA,SACA,kBACA,QACA,YACF,CAAC,EAkDD,MAAM,CAAY,CAChB,WAAW,EAAG,SAAQ,MAAK,UAAS,OAAM,cAAa,kBAAiB,eAAc,UAAS,SAAQ,QAAO,WAAU,YAAW,qBAAoB,aAAY,gBAAgB,CACjL,GAAI,GAAO,KAAM,MAAU,UAAU,0BAA0B,EAC/D,GAAI,GAAe,KAAM,MAAU,UAAU,kCAAkC,EAC/E,GAAI,GAAmB,KAAM,MAAU,UAAU,sCAA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E",
"debugId": "4C8DFFEC1B4361BB64756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../../node_modules/.bun/@ai-sdk+perplexity@3.0.26+d6123d32214422cb/node_modules/@ai-sdk/perplexity/dist/index.mjs"],
"sourcesContent": [
"// src/perplexity-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n generateId,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/perplexity-language-model.ts\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/convert-perplexity-usage.ts\nfunction convertPerplexityUsage(usage) {\n var _a, _b, _c;\n if (usage == null) {\n return {\n inputTokens: {\n total: void 0,\n noCache: void 0,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: void 0,\n text: void 0,\n reasoning: void 0\n },\n raw: void 0\n };\n }\n const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n const reasoningTokens = (_c = usage.reasoning_tokens) != null ? _c : 0;\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens,\n cacheRead: void 0,\n cacheWrite: void 0\n },\n outputTokens: {\n total: completionTokens,\n text: completionTokens - reasoningTokens,\n reasoning: reasoningTokens\n },\n raw: usage\n };\n}\n\n// src/convert-to-perplexity-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertUint8ArrayToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToPerplexityMessages(prompt) {\n const messages = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"user\":\n case \"assistant\": {\n const hasMultipartContent = content.some(\n (part) => part.type === \"file\" && part.mediaType.startsWith(\"image/\") || part.type === \"file\" && part.mediaType === \"application/pdf\"\n );\n const messageContent = content.map((part, index) => {\n var _a;\n switch (part.type) {\n case \"text\": {\n return {\n type: \"text\",\n text: part.text\n };\n }\n case \"file\": {\n if (part.mediaType === \"application/pdf\") {\n return part.data instanceof URL ? {\n type: \"file_url\",\n file_url: {\n url: part.data.toString()\n },\n file_name: part.filename\n } : {\n type: \"file_url\",\n file_url: {\n url: typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)\n },\n file_name: part.filename || `document-${index}.pdf`\n };\n } else if (part.mediaType.startsWith(\"image/\")) {\n return part.data instanceof URL ? {\n type: \"image_url\",\n image_url: {\n url: part.data.toString()\n }\n } : {\n type: \"image_url\",\n image_url: {\n url: `data:${(_a = part.mediaType) != null ? _a : \"image/jpeg\"};base64,${typeof part.data === \"string\" ? part.data : convertUint8ArrayToBase64(part.data)}`\n }\n };\n }\n }\n }\n }).filter(Boolean);\n messages.push({\n role,\n content: hasMultipartContent ? messageContent : messageContent.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\")\n });\n break;\n }\n case \"tool\": {\n throw new UnsupportedFunctionalityError({\n functionality: \"Tool messages\"\n });\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return messages;\n}\n\n// src/map-perplexity-finish-reason.ts\nfunction mapPerplexityFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n case \"length\":\n return finishReason;\n default:\n return \"other\";\n }\n}\n\n// src/perplexity-language-model.ts\nvar PerplexityLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v3\";\n this.provider = \"perplexity\";\n this.supportedUrls = {\n // No URLs are supported.\n };\n this.modelId = modelId;\n this.config = config;\n }\n getArgs({\n prompt,\n maxOutputTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerOptions\n }) {\n var _a;\n const warnings = [];\n if (topK != null) {\n warnings.push({ type: \"unsupported\", feature: \"topK\" });\n }\n if (stopSequences != null) {\n warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n }\n if (seed != null) {\n warnings.push({ type: \"unsupported\", feature: \"seed\" });\n }\n return {\n args: {\n // model id:\n model: this.modelId,\n // standardized settings:\n frequency_penalty: frequencyPenalty,\n max_tokens: maxOutputTokens,\n presence_penalty: presencePenalty,\n temperature,\n top_k: topK,\n top_p: topP,\n // response format:\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? {\n type: \"json_schema\",\n json_schema: { schema: responseFormat.schema }\n } : void 0,\n // provider extensions\n ...(_a = providerOptions == null ? void 0 : providerOptions.perplexity) != null ? _a : {},\n // messages:\n messages: convertToPerplexityMessages(prompt)\n },\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n const { args: body, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createJsonResponseHandler(\n perplexityResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const choice = response.choices[0];\n const content = [];\n const text = choice.message.content;\n if (text.length > 0) {\n content.push({ type: \"text\", text });\n }\n if (response.citations != null) {\n for (const url of response.citations) {\n content.push({\n type: \"source\",\n sourceType: \"url\",\n id: this.config.generateId(),\n url\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertPerplexityUsage(response.usage),\n request: { body },\n response: {\n ...getResponseMetadata(response),\n headers: responseHeaders,\n body: rawResponse\n },\n warnings,\n providerMetadata: {\n perplexity: {\n images: (_c = (_b = response.images) == null ? void 0 : _b.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }))) != null ? _c : null,\n usage: {\n citationTokens: (_e = (_d = response.usage) == null ? void 0 : _d.citation_tokens) != null ? _e : null,\n numSearchQueries: (_g = (_f = response.usage) == null ? void 0 : _f.num_search_queries) != null ? _g : null\n },\n cost: ((_h = response.usage) == null ? void 0 : _h.cost) ? {\n inputTokensCost: (_i = response.usage.cost.input_tokens_cost) != null ? _i : null,\n outputTokensCost: (_j = response.usage.cost.output_tokens_cost) != null ? _j : null,\n requestCost: (_k = response.usage.cost.request_cost) != null ? _k : null,\n totalCost: (_l = response.usage.cost.total_cost) != null ? _l : null\n } : null\n }\n }\n };\n }\n async doStream(options) {\n const { args, warnings } = this.getArgs(options);\n const body = { ...args, stream: true };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: `${this.config.baseURL}/chat/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: createJsonErrorResponseHandler({\n errorSchema: perplexityErrorSchema,\n errorToMessage\n }),\n successfulResponseHandler: createEventSourceResponseHandler(\n perplexityChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n let finishReason = {\n unified: \"other\",\n raw: void 0\n };\n let usage = void 0;\n const providerMetadata = {\n perplexity: {\n usage: {\n citationTokens: null,\n numSearchQueries: null\n },\n cost: null,\n images: null\n }\n };\n let isFirstChunk = true;\n let isActive = false;\n const self = this;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n start(controller) {\n controller.enqueue({ type: \"stream-start\", warnings });\n },\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (options.includeRawChunks) {\n controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n }\n if (!chunk.success) {\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isFirstChunk) {\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n (_a = value.citations) == null ? void 0 : _a.forEach((url) => {\n controller.enqueue({\n type: \"source\",\n sourceType: \"url\",\n id: self.config.generateId(),\n url\n });\n });\n isFirstChunk = false;\n }\n if (value.usage != null) {\n usage = value.usage;\n providerMetadata.perplexity.usage = {\n citationTokens: (_b = value.usage.citation_tokens) != null ? _b : null,\n numSearchQueries: (_c = value.usage.num_search_queries) != null ? _c : null\n };\n providerMetadata.perplexity.cost = value.usage.cost ? {\n inputTokensCost: (_d = value.usage.cost.input_tokens_cost) != null ? _d : null,\n outputTokensCost: (_e = value.usage.cost.output_tokens_cost) != null ? _e : null,\n requestCost: (_f = value.usage.cost.request_cost) != null ? _f : null,\n totalCost: (_g = value.usage.cost.total_cost) != null ? _g : null\n } : null;\n }\n if (value.images != null) {\n providerMetadata.perplexity.images = value.images.map((image) => ({\n imageUrl: image.image_url,\n originUrl: image.origin_url,\n height: image.height,\n width: image.width\n }));\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = {\n unified: mapPerplexityFinishReason(choice.finish_reason),\n raw: choice.finish_reason\n };\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n const textContent = delta.content;\n if (textContent != null) {\n if (!isActive) {\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n isActive = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: textContent\n });\n }\n },\n flush(controller) {\n if (isActive) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n }\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: convertPerplexityUsage(usage),\n providerMetadata\n });\n }\n })\n ),\n request: { body },\n response: { headers: responseHeaders }\n };\n }\n};\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id,\n modelId: model,\n timestamp: new Date(created * 1e3)\n };\n}\nvar perplexityCostSchema = z.object({\n input_tokens_cost: z.number().nullish(),\n output_tokens_cost: z.number().nullish(),\n request_cost: z.number().nullish(),\n total_cost: z.number().nullish()\n});\nvar perplexityUsageSchema = z.object({\n prompt_tokens: z.number(),\n completion_tokens: z.number(),\n total_tokens: z.number().nullish(),\n citation_tokens: z.number().nullish(),\n num_search_queries: z.number().nullish(),\n reasoning_tokens: z.number().nullish(),\n cost: perplexityCostSchema.nullish()\n});\nvar perplexityImageSchema = z.object({\n image_url: z.string(),\n origin_url: z.string(),\n height: z.number(),\n width: z.number()\n});\nvar perplexityResponseSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n message: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityChunkSchema = z.object({\n id: z.string(),\n created: z.number(),\n model: z.string(),\n choices: z.array(\n z.object({\n delta: z.object({\n role: z.literal(\"assistant\"),\n content: z.string()\n }),\n finish_reason: z.string().nullish()\n })\n ),\n citations: z.array(z.string()).nullish(),\n images: z.array(perplexityImageSchema).nullish(),\n usage: perplexityUsageSchema.nullish()\n});\nvar perplexityErrorSchema = z.object({\n error: z.object({\n code: z.number(),\n message: z.string().nullish(),\n type: z.string().nullish()\n })\n});\nvar errorToMessage = (data) => {\n var _a, _b;\n return (_b = (_a = data.error.message) != null ? _a : data.error.type) != null ? _b : \"unknown error\";\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.26\" : \"0.0.0-test\";\n\n// src/perplexity-provider.ts\nfunction createPerplexity(options = {}) {\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"PERPLEXITY_API_KEY\",\n description: \"Perplexity\"\n })}`,\n ...options.headers\n },\n `ai-sdk/perplexity/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n var _a;\n return new PerplexityLanguageModel(modelId, {\n baseURL: withoutTrailingSlash(\n (_a = options.baseURL) != null ? _a : \"https://api.perplexity.ai\"\n ),\n headers: getHeaders,\n generateId,\n fetch: options.fetch\n });\n };\n const provider = (modelId) => createLanguageModel(modelId);\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n return provider;\n}\nvar perplexity = createPerplexity();\nexport {\n VERSION,\n createPerplexity,\n perplexity\n};\n//# sourceMappingURL=index.mjs.map"
],
"mappings": ";sSAsBA,cAAS,MAAsB,MAAC,OAAO,CACrC,IAAI,EAAI,EAAI,EACZ,GAAI,GAAS,KACX,MAAO,CACL,YAAa,CACX,MAAY,OACZ,QAAc,OACd,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAY,OACZ,KAAW,OACX,UAAgB,MAClB,EACA,IAAU,MACZ,EAEF,IAAM,GAAgB,EAAK,EAAM,gBAAkB,KAAO,EAAK,EACzD,GAAoB,EAAK,EAAM,oBAAsB,KAAO,EAAK,EACjE,GAAmB,EAAK,EAAM,mBAAqB,KAAO,EAAK,EACrE,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EACT,UAAgB,OAChB,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EAAmB,EACzB,UAAW,CACb,EACA,IAAK,CACP,EAQF,SAAS,CAA2B,CAAC,EAAQ,CAC3C,IAAM,EAAW,CAAC,EAClB,QAAa,OAAM,aAAa,EAC9B,OAAQ,OACD,SAAU,CACb,EAAS,KAAK,CAAE,KAAM,SAAU,SAAQ,CAAC,EACzC,KACF,KACK,WACA,YAAa,CAChB,IAAM,EAAsB,EAAQ,KAClC,CAAC,IAAS,EAAK,OAAS,QAAU,EAAK,UAAU,WAAW,QAAQ,GAAK,EAA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EACA,UAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EACvC,OAAQ,EAAE,MAAM,CAAqB,EAAE,QAAQ,EAC/C,MAAO,EAAsB,QAAQ,CACvC,CAAC,EACG,EAAwB,EAAE,OAAO,CACnC,MAAO,EAAE,OAAO,CACd,KAAM,EAAE,OAAO,EACf,QAAS,EAAE,OAAO,EAAE,QAAQ,EAC5B,KAAM,EAAE,OAAO,EAAE,QAAQ,CAC3B,CAAC,CACH,CAAC,EACG,EAAiB,CAAC,IAAS,CAC7B,IAAI,EAAI,EACR,OAAQ,GAAM,EAAK,EAAK,MAAM,UAAY,KAAO,EAAK,EAAK,MAAM,OAAS,KAAO,EAAK,iBAIpF,EAAiB,SAGrB,SAAS,CAAgB,CAAC,EAAU,CAAC,EAAG,CACtC,IAAM,EAAa,IAAM,EACvB,CACE,cAAe,UAAU,EAAW,CAClC,OAAQ,EAAQ,OAChB,wBAAyB,qBACzB,YAAa,YACf,CAAC,OACE,EAAQ,OACb,EACA,qBAAqB,GACvB,EACM,EAAsB,CAAC,IAAY,CACvC,IAAI,EACJ,OAAO,IAAI,EAAwB,EAAS,CAC1C,QAAS,GACN,EAAK,EAAQ,UAAY,KAAO,EAAK,2BACxC,EACA,QAAS,EACT,aACA,MAAO,EAAQ,KACjB,CAAC,GAEG,EAAW,CAAC,IAAY,EAAoB,CAAO,EAUzD,OATA,EAAS,qBAAuB,KAChC,EAAS,cAAgB,EACzB,EAAS,eAAiB,CAAC,IAAY,CACrC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,gBAAiB,CAAC,GAErE,EAAS,mBAAqB,EAAS,eACvC,EAAS,WAAa,CAAC,IAAY,CACjC,MAAM,IAAI,EAAiB,CAAE,UAAS,UAAW,YAAa,CAAC,GAE1D,EAET,IAAI,GAAa,EAAiB",
"debugId": "4658539FAEEF912A64756E2164756E21",
"names": []
}

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

{
"version": 3,
"sources": ["../core/src/database/migration/20260225215848_workspace.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260225215848_workspace\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`workspace\\` (\n \\`id\\` text PRIMARY KEY,\n \\`branch\\` text,\n \\`project_id\\` text NOT NULL,\n \\`config\\` text NOT NULL,\n CONSTRAINT \\`fk_workspace_project_id_project_id_fk\\` FOREIGN KEY (\\`project_id\\`) REFERENCES \\`project\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,2BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,sUAQb,EACF,EAEL",
"debugId": "70F0B38A8721644764756E2164756E21",
"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/database/migration/20260611035744_credential.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260611035744_credential\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`\n CREATE TABLE \\`credential\\` (\n \\`id\\` text PRIMARY KEY,\n \\`connector_id\\` text NOT NULL,\n \\`method_id\\` text NOT NULL,\n \\`label\\` text NOT NULL,\n \\`value\\` text NOT NULL,\n \\`active\\` integer DEFAULT false NOT NULL,\n \\`time_created\\` integer NOT NULL,\n \\`time_updated\\` integer NOT NULL\n );\n `)\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`credential_connector_active_idx\\` ON \\`credential\\` (\\`connector_id\\`) WHERE \"credential\".\"active\" = 1;`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,4BACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,2XAWb,EACD,MAAO,EAAG,IACR,yHACF,EACD,EAEL",
"debugId": "4D266CA512252E2364756E2164756E21",
"names": []
}
{
"version": 3,
"sources": ["../core/src/database/migration/20260604172448_event_sourced_session_input.ts"],
"sourcesContent": [
"import { Effect } from \"effect\"\nimport type { DatabaseMigration } from \"../migration\"\n\nexport default {\n id: \"20260604172448_event_sourced_session_input\",\n up(tx) {\n return Effect.gen(function* () {\n yield* tx.run(`DELETE FROM \\`session_input\\`;`)\n yield* tx.run(`DELETE FROM \\`session_message\\`;`)\n yield* tx.run(`DELETE FROM \\`event\\`;`)\n yield* tx.run(`DELETE FROM \\`event_sequence\\`;`)\n yield* tx.run(`UPDATE \\`session\\` SET \\`workspace_id\\` = NULL;`)\n yield* tx.run(`DELETE FROM \\`workspace\\`;`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`event_aggregate_seq_idx\\`;`)\n yield* tx.run(`CREATE UNIQUE INDEX \\`event_aggregate_seq_idx\\` ON \\`event\\` (\\`aggregate_id\\`,\\`seq\\`);`)\n yield* tx.run(`DROP INDEX IF EXISTS \\`session_message_session_seq_idx\\`;`)\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`session_message_session_seq_idx\\` ON \\`session_message\\` (\\`session_id\\`,\\`seq\\`);`,\n )\n yield* tx.run(`PRAGMA foreign_keys=OFF;`)\n yield* tx.run(`\n CREATE TABLE \\`__new_session_input\\` (\n \\`id\\` text PRIMARY KEY,\n \\`session_id\\` text NOT NULL,\n \\`prompt\\` text NOT NULL,\n \\`delivery\\` text NOT NULL,\n \\`admitted_seq\\` integer NOT NULL,\n \\`promoted_seq\\` integer,\n \\`time_created\\` integer NOT NULL,\n CONSTRAINT \\`fk_session_input_session_id_session_id_fk\\` FOREIGN KEY (\\`session_id\\`) REFERENCES \\`session\\`(\\`id\\`) ON DELETE CASCADE\n );\n `)\n yield* tx.run(`DROP TABLE \\`session_input\\`;`)\n yield* tx.run(`ALTER TABLE \\`__new_session_input\\` RENAME TO \\`session_input\\`;`)\n yield* tx.run(`PRAGMA foreign_keys=ON;`)\n yield* tx.run(\n `CREATE INDEX \\`session_input_session_pending_delivery_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`,\\`delivery\\`,\\`admitted_seq\\`);`,\n )\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`session_input_session_admitted_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`admitted_seq\\`);`,\n )\n yield* tx.run(\n `CREATE UNIQUE INDEX \\`session_input_session_promoted_seq_idx\\` ON \\`session_input\\` (\\`session_id\\`,\\`promoted_seq\\`);`,\n )\n })\n },\n} satisfies DatabaseMigration.Migration\n"
],
"mappings": ";wHAGA,SAAe,QACb,GAAI,6CACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,8BAAgC,EAC9C,MAAO,EAAG,IAAI,gCAAkC,EAChD,MAAO,EAAG,IAAI,sBAAwB,EACtC,MAAO,EAAG,IAAI,+BAAiC,EAC/C,MAAO,EAAG,IAAI,6CAAiD,EAC/D,MAAO,EAAG,IAAI,0BAA4B,EAC1C,MAAO,EAAG,IAAI,iDAAmD,EACjE,MAAO,EAAG,IAAI,kFAA0F,EACxG,MAAO,EAAG,IAAI,yDAA2D,EACzE,MAAO,EAAG,IACR,kGACF,EACA,MAAO,EAAG,IAAI,0BAA0B,EACxC,MAAO,EAAG,IAAI,0dAWb,EACD,MAAO,EAAG,IAAI,6BAA+B,EAC7C,MAAO,EAAG,IAAI,8DAAkE,EAChF,MAAO,EAAG,IAAI,yBAAyB,EACvC,MAAO,EAAG,IACR,2IACF,EACA,MAAO,EAAG,IACR,gHACF,EACA,MAAO,EAAG,IACR,gHACF,EACD,EAEL",
"debugId": "1080E9135C28598A64756E2164756E21",
"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": "AEB9B7595EF9ECFF64756E2164756E21",
"names": []
}

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

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

Sorry, the diff of this file is not supported yet