@opencode-ai/cli-windows-arm64 0.0.0-beta-202606050000

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/bin/chunk-047brskp.js.map +10 -0
  2. package/bin/chunk-087s56gx.js.map +11 -0
  3. package/bin/chunk-0fd7e98q.js.map +10 -0
  4. package/bin/chunk-0fxqxahr.js.map +23 -0
  5. package/bin/chunk-0m0ysqkf.js.map +10 -0
  6. package/bin/chunk-0twas8m4.js.map +10 -0
  7. package/bin/chunk-0w8srq86.js.map +9 -0
  8. package/bin/chunk-0zaxan0f.js.map +10 -0
  9. package/bin/chunk-10g9mzpr.js.map +10 -0
  10. package/bin/chunk-1ks336sp.js.map +10 -0
  11. package/bin/chunk-1m5frevr.js.map +11 -0
  12. package/bin/chunk-1qafz13b.js.map +10 -0
  13. package/bin/chunk-1v1eg9ea.js.map +10 -0
  14. package/bin/chunk-1xcexrst.js.map +10 -0
  15. package/bin/chunk-1zdchkt5.js.map +19 -0
  16. package/bin/chunk-24ytprtt.js.map +15 -0
  17. package/bin/chunk-2gdcvx81.js.map +576 -0
  18. package/bin/chunk-37mqnge5.js.map +16 -0
  19. package/bin/chunk-3h1gycas.js.map +167 -0
  20. package/bin/chunk-3n2hpq8t.js.map +73 -0
  21. package/bin/chunk-3n6fe6h1.js.map +10 -0
  22. package/bin/chunk-3s93j8bp.js.map +10 -0
  23. package/bin/chunk-4kkfbnqc.js.map +10 -0
  24. package/bin/chunk-4q3zgnq0.js.map +51 -0
  25. package/bin/chunk-58crwv73.js.map +10 -0
  26. package/bin/chunk-59ag69w3.js.map +10 -0
  27. package/bin/chunk-5czy6c2t.js.map +10 -0
  28. package/bin/chunk-5vshf5d9.js.map +17 -0
  29. package/bin/chunk-61ex0ysa.js.map +10 -0
  30. package/bin/chunk-6bm18v4w.js.map +10 -0
  31. package/bin/chunk-6c8zad0q.js.map +10 -0
  32. package/bin/chunk-6m6559kj.js.map +10 -0
  33. package/bin/chunk-6t6j2syw.js.map +10 -0
  34. package/bin/chunk-753zwk10.js.map +10 -0
  35. package/bin/chunk-778262wk.js.map +17 -0
  36. package/bin/chunk-77cxfwjv.js.map +20 -0
  37. package/bin/chunk-78g08k7w.js.map +10 -0
  38. package/bin/chunk-7e33eexw.js.map +10 -0
  39. package/bin/chunk-7h3thzht.js.map +10 -0
  40. package/bin/chunk-7p88mnrp.js.map +10 -0
  41. package/bin/chunk-8g9cx71s.js.map +10 -0
  42. package/bin/chunk-8m4e6jm9.js.map +37 -0
  43. package/bin/chunk-9777kknm.js.map +10 -0
  44. package/bin/chunk-9av9p5be.js.map +10 -0
  45. package/bin/chunk-9pxszgex.js.map +10 -0
  46. package/bin/chunk-9rp9xyz4.js.map +11 -0
  47. package/bin/chunk-9t3ktng1.js.map +10 -0
  48. package/bin/chunk-9y4bxd9z.js.map +10 -0
  49. package/bin/chunk-a0wmwbtm.js.map +10 -0
  50. package/bin/chunk-addegf2c.js.map +56 -0
  51. package/bin/chunk-aqr51qaz.js.map +12 -0
  52. package/bin/chunk-ar99dprb.js.map +9 -0
  53. package/bin/chunk-aspg97y0.js.map +13 -0
  54. package/bin/chunk-b16pmd6c.js.map +10 -0
  55. package/bin/chunk-bt4a2b38.js.map +10 -0
  56. package/bin/chunk-bvgxtvy5.js.map +10 -0
  57. package/bin/chunk-c405mav2.js.map +10 -0
  58. package/bin/chunk-c8jy587n.js.map +9 -0
  59. package/bin/chunk-cq3s2bc3.js.map +11 -0
  60. package/bin/chunk-cxavw1f9.js.map +27 -0
  61. package/bin/chunk-d2d2qyc8.js.map +10 -0
  62. package/bin/chunk-d6q844vr.js.map +10 -0
  63. package/bin/chunk-d7en3gra.js.map +20 -0
  64. package/bin/chunk-de8e7pt7.js.map +10 -0
  65. package/bin/chunk-en70h511.js.map +11 -0
  66. package/bin/chunk-f1dc53f5.js.map +20 -0
  67. package/bin/chunk-f5tfppa3.js.map +9 -0
  68. package/bin/chunk-fr19nwzq.js.map +9 -0
  69. package/bin/chunk-g2hzewm5.js.map +15 -0
  70. package/bin/chunk-g75pjf1s.js.map +10 -0
  71. package/bin/chunk-h6jav6rr.js.map +9 -0
  72. package/bin/chunk-h77hc9q0.js.map +9 -0
  73. package/bin/chunk-hcrstn1a.js.map +131 -0
  74. package/bin/chunk-hhes0fb4.js.map +10 -0
  75. package/bin/chunk-j49r3r0h.js.map +50 -0
  76. package/bin/chunk-j96y437a.js.map +9 -0
  77. package/bin/chunk-jen69edq.js.map +33 -0
  78. package/bin/chunk-jscajwnx.js.map +9 -0
  79. package/bin/chunk-jwpekcgc.js.map +10 -0
  80. package/bin/chunk-k12sqt5c.js.map +10 -0
  81. package/bin/chunk-kbksyj8q.js.map +81 -0
  82. package/bin/chunk-m31nxbnx.js.map +10 -0
  83. package/bin/chunk-m5rn1t9e.js.map +10 -0
  84. package/bin/chunk-m6jr02jt.js.map +10 -0
  85. package/bin/chunk-mb38k8t0.js.map +10 -0
  86. package/bin/chunk-mjtn9njj.js.map +13 -0
  87. package/bin/chunk-mww4n4f4.js.map +13 -0
  88. package/bin/chunk-mxmh510w.js.map +9 -0
  89. package/bin/chunk-n4bc2p29.js.map +9 -0
  90. package/bin/chunk-n5f9tqke.js.map +10 -0
  91. package/bin/chunk-ny339t5n.js.map +9 -0
  92. package/bin/chunk-nyhw1wge.js.map +9 -0
  93. package/bin/chunk-p7vb6q61.js.map +10 -0
  94. package/bin/chunk-p9fsk8xk.js.map +28 -0
  95. package/bin/chunk-ph8xj7gz.js.map +9 -0
  96. package/bin/chunk-ppjn2gwr.js.map +20 -0
  97. package/bin/chunk-pvt3zcpb.js.map +10 -0
  98. package/bin/chunk-pzcbqccc.js.map +10 -0
  99. package/bin/chunk-q2z8hcc9.js.map +11 -0
  100. package/bin/chunk-q8d3f8vv.js.map +10 -0
  101. package/bin/chunk-qsj8gt5c.js.map +10 -0
  102. package/bin/chunk-qt4k35pb.js.map +9 -0
  103. package/bin/chunk-qxp1n90a.js.map +10 -0
  104. package/bin/chunk-r4xfgh1d.js.map +10 -0
  105. package/bin/chunk-rcbp13zr.js.map +10 -0
  106. package/bin/chunk-rg3jde5f.js.map +9 -0
  107. package/bin/chunk-rt3p96q3.js.map +193 -0
  108. package/bin/chunk-s6p78e64.js.map +10 -0
  109. package/bin/chunk-sfvtysgk.js.map +11 -0
  110. package/bin/chunk-sy53xwps.js.map +388 -0
  111. package/bin/chunk-tb0f4dfz.js.map +11 -0
  112. package/bin/chunk-tjaapjgk.js.map +10 -0
  113. package/bin/chunk-tp53m8fs.js.map +10 -0
  114. package/bin/chunk-tx4d8n2c.js.map +10 -0
  115. package/bin/chunk-v4k8v6ad.js.map +10 -0
  116. package/bin/chunk-v5t5sfsa.js.map +13 -0
  117. package/bin/chunk-v6m6x911.js.map +11 -0
  118. package/bin/chunk-vht6r6mg.js.map +10 -0
  119. package/bin/chunk-vn7d3q1a.js.map +13 -0
  120. package/bin/chunk-vqn23nvj.js.map +37 -0
  121. package/bin/chunk-wsc1m3ya.js.map +10 -0
  122. package/bin/chunk-wzt86v8e.js.map +10 -0
  123. package/bin/chunk-x0j6zt83.js.map +10 -0
  124. package/bin/chunk-xnyqakct.js.map +10 -0
  125. package/bin/chunk-xtwd1g04.js.map +10 -0
  126. package/bin/chunk-y1y94hd9.js.map +113 -0
  127. package/bin/chunk-yj84ce63.js.map +10 -0
  128. package/bin/chunk-yjd4gfrw.js.map +10 -0
  129. package/bin/chunk-ymbn2qrb.js.map +11 -0
  130. package/bin/chunk-yrctbw5z.js.map +10 -0
  131. package/bin/chunk-z24btbc0.js.map +9 -0
  132. package/bin/chunk-z6004x1f.js.map +10 -0
  133. package/bin/chunk-z8txj8wr.js.map +10 -0
  134. package/bin/chunk-z9nnfhja.js.map +10 -0
  135. package/bin/index.js.map +12 -0
  136. package/bin/lildax.exe +0 -0
  137. package/package.json +15 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../core/src/database/migration/20260511000411_data_migration_state.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "mappings": ";wHAGA,SAAe,QACb,GAAI,sCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,gJAKb,EACF,EAEL",
8
+ "debugId": "455B8B3708F8754A64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "version": 3,
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"],
4
+ "sourcesContent": [
5
+ "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",
6
+ "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",
7
+ "export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
8
+ "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",
9
+ "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",
10
+ "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",
11
+ "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",
12
+ "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",
13
+ "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",
14
+ "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",
15
+ "export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
16
+ "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",
17
+ "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",
18
+ "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"
19
+ ],
20
+ "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,G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": []
23
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../core/src/database/migration/20260602182828_add_project_directories.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "mappings": ";wHAGA,SAAe,QACb,GAAI,yCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,+bASb,EACF,EAEL",
8
+ "debugId": "88448DE3498C05ED64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["src/commands/handlers/service/restart.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "mappings": ";uLAAA,mBAAS,gBAMT,SAAe,IAAQ,QACrB,EAAS,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",
8
+ "debugId": "CB9EE7FC01C24C9E64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [
5
+ ],
6
+ "mappings": "",
7
+ "debugId": "A1E8AFC9BE2FE1BF64756E2164756E21",
8
+ "names": []
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../core/src/database/migration/20260410174513_workspace-name.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "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",
8
+ "debugId": "90D88FEA25D2D1F464756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../core/src/database/migration/20260127222353_familiar_lady_ursula.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "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",
8
+ "debugId": "238B89868183099364756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../core/src/database/migration/20260213144116_wakeful_the_professor.ts"],
4
+ "sourcesContent": [
5
+ "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"
6
+ ],
7
+ "mappings": ";wHAGA,SAAe,QACb,GAAI,uCACJ,EAAE,CAAC,EAAI,CACL,OAAO,EAAO,IAAI,SAAU,EAAG,CAC7B,MAAO,EAAG,IAAI,6bAYb,EACF,EAEL",
8
+ "debugId": "C023A81EBF19B7E664756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../node_modules/.bun/@ai-sdk+openai-compatible@2.0.41+d6123d32214422cb/node_modules/@ai-sdk/openai-compatible/dist/internal/index.mjs", "../../node_modules/.bun/@ai-sdk+alibaba@1.0.17+d6123d32214422cb/node_modules/@ai-sdk/alibaba/dist/index.mjs"],
4
+ "sourcesContent": [
5
+ "// src/chat/convert-to-openai-compatible-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport {\n convertBase64ToUint8Array,\n convertToBase64\n} from \"@ai-sdk/provider-utils\";\nfunction getOpenAIMetadata(message) {\n var _a, _b;\n return (_b = (_a = message == null ? void 0 : message.providerOptions) == null ? void 0 : _a.openaiCompatible) != null ? _b : {};\n}\nfunction getAudioFormat(mediaType) {\n switch (mediaType) {\n case \"audio/wav\":\n return \"wav\";\n case \"audio/mp3\":\n case \"audio/mpeg\":\n return \"mp3\";\n default:\n return null;\n }\n}\nfunction convertToOpenAICompatibleChatMessages(prompt) {\n var _a, _b, _c;\n const messages = [];\n for (const { role, content, ...message } of prompt) {\n const metadata = getOpenAIMetadata({ ...message });\n switch (role) {\n case \"system\": {\n messages.push({ role: \"system\", content, ...metadata });\n break;\n }\n case \"user\": {\n if (content.length === 1 && content[0].type === \"text\") {\n messages.push({\n role: \"user\",\n content: content[0].text,\n ...getOpenAIMetadata(content[0])\n });\n break;\n }\n messages.push({\n role: \"user\",\n content: content.map((part) => {\n var _a2;\n const partMetadata = getOpenAIMetadata(part);\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text, ...partMetadata };\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: {\n url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`\n },\n ...partMetadata\n };\n }\n if (part.mediaType.startsWith(\"audio/\")) {\n if (part.data instanceof URL) {\n throw new UnsupportedFunctionalityError({\n functionality: \"audio file parts with URLs\"\n });\n }\n const format = getAudioFormat(part.mediaType);\n if (format === null) {\n throw new UnsupportedFunctionalityError({\n functionality: `audio media type ${part.mediaType}`\n });\n }\n return {\n type: \"input_audio\",\n input_audio: {\n data: convertToBase64(part.data),\n format\n },\n ...partMetadata\n };\n }\n if (part.mediaType === \"application/pdf\") {\n if (part.data instanceof URL) {\n throw new UnsupportedFunctionalityError({\n functionality: \"PDF file parts with URLs\"\n });\n }\n return {\n type: \"file\",\n file: {\n filename: (_a2 = part.filename) != null ? _a2 : \"document.pdf\",\n file_data: `data:application/pdf;base64,${convertToBase64(part.data)}`\n },\n ...partMetadata\n };\n }\n if (part.mediaType.startsWith(\"text/\")) {\n const textContent = part.data instanceof URL ? part.data.toString() : typeof part.data === \"string\" ? new TextDecoder().decode(\n convertBase64ToUint8Array(part.data)\n ) : new TextDecoder().decode(part.data);\n return {\n type: \"text\",\n text: textContent,\n ...partMetadata\n };\n }\n throw new UnsupportedFunctionalityError({\n functionality: `file part media type ${part.mediaType}`\n });\n }\n }\n }),\n ...metadata\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n let reasoning = \"\";\n const toolCalls = [];\n for (const part of content) {\n const partMetadata = getOpenAIMetadata(part);\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"reasoning\": {\n reasoning += part.text;\n break;\n }\n case \"tool-call\": {\n const thoughtSignature = (_b = (_a = part.providerOptions) == null ? void 0 : _a.google) == null ? void 0 : _b.thoughtSignature;\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.input)\n },\n ...partMetadata,\n // Include extra_content for Google Gemini thought signatures\n ...thoughtSignature ? {\n extra_content: {\n google: {\n thought_signature: String(thoughtSignature)\n }\n }\n } : {}\n });\n break;\n }\n }\n }\n messages.push({\n role: \"assistant\",\n content: text,\n ...reasoning.length > 0 ? { reasoning_content: reasoning } : {},\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0,\n ...metadata\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 = (_c = output.reason) != null ? _c : \"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 const toolResponseMetadata = getOpenAIMetadata(toolResponse);\n messages.push({\n role: \"tool\",\n tool_call_id: toolResponse.toolCallId,\n content: contentValue,\n ...toolResponseMetadata\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/chat/convert-openai-compatible-chat-usage.ts\nfunction convertOpenAICompatibleChatUsage(usage) {\n var _a, _b, _c, _d, _e, _f;\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 cacheReadTokens = (_d = (_c = usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0;\n const reasoningTokens = (_f = (_e = usage.completion_tokens_details) == null ? void 0 : _e.reasoning_tokens) != null ? _f : 0;\n return {\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: usage\n };\n}\n\n// src/chat/map-openai-compatible-finish-reason.ts\nfunction mapOpenAICompatibleFinishReason(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/chat/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/chat/openai-compatible-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 openaiCompatTools = [];\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 openaiCompatTools.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: openaiCompatTools, 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: openaiCompatTools, toolChoice: type, toolWarnings };\n case \"tool\":\n return {\n tools: openaiCompatTools,\n toolChoice: {\n type: \"function\",\n function: { name: toolChoice.toolName }\n },\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\nexport {\n convertOpenAICompatibleChatUsage,\n convertToOpenAICompatibleChatMessages,\n getResponseMetadata,\n mapOpenAICompatibleFinishReason,\n prepareTools\n};\n//# sourceMappingURL=index.mjs.map",
6
+ "// src/alibaba-provider.ts\nimport {\n NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n createJsonErrorResponseHandler as createJsonErrorResponseHandler2,\n loadApiKey,\n withoutTrailingSlash,\n withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\n\n// src/alibaba-chat-language-model.ts\nimport {\n getResponseMetadata,\n mapOpenAICompatibleFinishReason,\n prepareTools\n} from \"@ai-sdk/openai-compatible/internal\";\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 z2 } from \"zod/v4\";\n\n// src/alibaba-chat-options.ts\nimport { z } from \"zod/v4\";\nvar alibabaLanguageModelOptions = z.object({\n /**\n * Enable thinking/reasoning mode for supported models.\n * When enabled, the model generates reasoning content before the response.\n *\n * @default false\n */\n enableThinking: z.boolean().optional(),\n /**\n * Maximum number of reasoning tokens to generate.\n */\n thinkingBudget: z.number().positive().optional(),\n /**\n * Whether to enable parallel function calling during tool use.\n *\n * @default true\n */\n parallelToolCalls: z.boolean().optional()\n});\n\n// src/convert-alibaba-usage.ts\nimport { convertOpenAICompatibleChatUsage } from \"@ai-sdk/openai-compatible/internal\";\nfunction convertAlibabaUsage(usage) {\n var _a, _b, _c, _d;\n const baseUsage = convertOpenAICompatibleChatUsage(usage);\n const cacheWriteTokens = (_b = (_a = usage == null ? void 0 : usage.prompt_tokens_details) == null ? void 0 : _a.cache_creation_input_tokens) != null ? _b : 0;\n const noCacheTokens = ((_c = baseUsage.inputTokens.total) != null ? _c : 0) - ((_d = baseUsage.inputTokens.cacheRead) != null ? _d : 0) - cacheWriteTokens;\n return {\n ...baseUsage,\n inputTokens: {\n ...baseUsage.inputTokens,\n cacheWrite: cacheWriteTokens,\n noCache: noCacheTokens\n }\n };\n}\n\n// src/convert-to-alibaba-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction formatImageUrl({\n data,\n mediaType\n}) {\n return data instanceof URL ? data.toString() : `data:${mediaType};base64,${convertToBase64(data)}`;\n}\nfunction convertToAlibabaChatMessages({\n prompt,\n cacheControlValidator\n}) {\n var _a, _b;\n const messages = [];\n for (const { role, content, ...message } of prompt) {\n const messageCacheControl = cacheControlValidator == null ? void 0 : cacheControlValidator.getCacheControl(\n message.providerOptions\n );\n switch (role) {\n case \"system\": {\n if (messageCacheControl) {\n messages.push({\n role: \"system\",\n content: [\n {\n type: \"text\",\n text: content,\n cache_control: messageCacheControl\n }\n ]\n });\n } else {\n messages.push({ role: \"system\", content });\n }\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part, index) => {\n var _a2;\n const isLastPart = index === content.length - 1;\n const partCacheControl = (_a2 = cacheControlValidator == null ? void 0 : cacheControlValidator.getCacheControl(part.providerOptions)) != null ? _a2 : isLastPart ? messageCacheControl : void 0;\n switch (part.type) {\n case \"text\": {\n return {\n type: \"text\",\n text: part.text,\n ...partCacheControl ? { cache_control: partCacheControl } : {}\n };\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: {\n url: formatImageUrl({ data: part.data, mediaType })\n },\n ...partCacheControl ? { cache_control: partCacheControl } : {}\n };\n } else {\n throw new UnsupportedFunctionalityError({\n functionality: \"Only image 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 }\n }\n messages.push({\n role: \"assistant\",\n content: messageCacheControl ? [{ type: \"text\", text, cache_control: messageCacheControl }] : text || null,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n });\n break;\n }\n case \"tool\": {\n const toolResponses = content.filter(\n (r) => r.type !== \"tool-approval-response\"\n );\n for (let i = 0; i < toolResponses.length; i++) {\n const toolResponse = toolResponses[i];\n const output = toolResponse.output;\n const isLastPart = i === toolResponses.length - 1;\n const partCacheControl = (_a = cacheControlValidator == null ? void 0 : cacheControlValidator.getCacheControl(\n toolResponse.providerOptions\n )) != null ? _a : isLastPart ? messageCacheControl : void 0;\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 = (_b = output.reason) != null ? _b : \"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: partCacheControl ? [\n {\n type: \"text\",\n text: contentValue,\n cache_control: partCacheControl\n }\n ] : 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-cache-control.ts\nvar MAX_CACHE_BREAKPOINTS = 4;\nfunction getCacheControl(providerMetadata) {\n var _a;\n const alibaba2 = providerMetadata == null ? void 0 : providerMetadata.alibaba;\n const cacheControlValue = (_a = alibaba2 == null ? void 0 : alibaba2.cacheControl) != null ? _a : alibaba2 == null ? void 0 : alibaba2.cache_control;\n return cacheControlValue;\n}\nvar CacheControlValidator = class {\n constructor() {\n this.breakpointCount = 0;\n this.warnings = [];\n }\n getCacheControl(providerMetadata) {\n const cacheControlValue = getCacheControl(providerMetadata);\n if (!cacheControlValue) {\n return void 0;\n }\n this.breakpointCount++;\n if (this.breakpointCount > MAX_CACHE_BREAKPOINTS) {\n this.warnings.push({\n type: \"other\",\n message: `Max breakpoint limit exceeded. Only the last ${MAX_CACHE_BREAKPOINTS} cache markers will take effect.`\n });\n }\n return cacheControlValue;\n }\n getWarnings() {\n return this.warnings;\n }\n};\n\n// src/alibaba-chat-language-model.ts\nvar AlibabaLanguageModel = 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 /**\n * Builds request arguments for Alibaba API call.\n * Converts AI SDK options to Alibaba API format.\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;\n const warnings = [];\n const cacheControlValidator = new CacheControlValidator();\n const alibabaOptions = await parseProviderOptions({\n provider: \"alibaba\",\n providerOptions,\n schema: alibabaLanguageModelOptions\n });\n if (frequencyPenalty != null) {\n warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n }\n const baseArgs = {\n model: this.modelId,\n max_tokens: maxOutputTokens,\n temperature,\n top_p: topP,\n top_k: topK,\n presence_penalty: presencePenalty,\n stop: stopSequences,\n seed,\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? responseFormat.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n name: (_a = responseFormat.name) != null ? _a : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n // Alibaba-specific options\n ...(alibabaOptions == null ? void 0 : alibabaOptions.enableThinking) != null ? { enable_thinking: alibabaOptions.enableThinking } : {},\n ...(alibabaOptions == null ? void 0 : alibabaOptions.thinkingBudget) != null ? { thinking_budget: alibabaOptions.thinkingBudget } : {},\n // Convert messages with cache control support\n messages: convertToAlibabaChatMessages({\n prompt,\n cacheControlValidator\n })\n };\n const {\n tools: alibabaTools,\n toolChoice: alibabaToolChoice,\n toolWarnings\n } = prepareTools({ tools, toolChoice });\n warnings.push(...cacheControlValidator.getWarnings());\n return {\n args: {\n ...baseArgs,\n tools: alibabaTools,\n tool_choice: alibabaToolChoice,\n ...alibabaTools != null && (alibabaOptions == null ? void 0 : alibabaOptions.parallelToolCalls) !== void 0 ? { parallel_tool_calls: alibabaOptions.parallelToolCalls } : {}\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n async doGenerate(options) {\n var _a;\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/completions`,\n headers: combineHeaders(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: alibabaFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n alibabaChatResponseSchema\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_content;\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: toolCall.id,\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n }\n }\n return {\n content,\n finishReason: {\n unified: mapOpenAICompatibleFinishReason(choice.finish_reason),\n raw: (_a = choice.finish_reason) != null ? _a : void 0\n },\n usage: convertAlibabaUsage(response.usage),\n request: { body: JSON.stringify(args) },\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 = {\n ...args,\n stream: true,\n stream_options: this.config.includeUsage ? { include_usage: true } : void 0\n };\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: alibabaFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n alibabaChatChunkSchema\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 toolCalls = [];\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;\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 if (value.choices.length === 0) {\n return;\n }\n const choice = value.choices[0];\n const delta = choice.delta;\n if (delta.reasoning_content != null && delta.reasoning_content.length > 0) {\n if (activeReasoningId == null) {\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n activeText = false;\n }\n activeReasoningId = generateId();\n controller.enqueue({\n type: \"reasoning-start\",\n id: activeReasoningId\n });\n }\n controller.enqueue({\n type: \"reasoning-delta\",\n id: activeReasoningId,\n delta: delta.reasoning_content\n });\n }\n if (delta.content != null && delta.content.length > 0) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n activeReasoningId = null;\n }\n if (!activeText) {\n controller.enqueue({ type: \"text-start\", id: \"0\" });\n activeText = true;\n }\n controller.enqueue({\n type: \"text-delta\",\n id: \"0\",\n delta: delta.content\n });\n }\n if (delta.tool_calls != null) {\n if (activeReasoningId != null) {\n controller.enqueue({\n type: \"reasoning-end\",\n id: activeReasoningId\n });\n activeReasoningId = null;\n }\n if (activeText) {\n controller.enqueue({ type: \"text-end\", id: \"0\" });\n activeText = false;\n }\n for (const toolCallDelta of delta.tool_calls) {\n const index = (_a = toolCallDelta.index) != null ? _a : toolCalls.length;\n if (toolCalls[index] == null) {\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 (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: toolCall2.id,\n toolName: toolCall2.function.name,\n input: toolCall2.function.arguments\n });\n toolCall2.hasFinished = true;\n }\n continue;\n }\n const toolCall = toolCalls[index];\n if (toolCall.hasFinished) {\n continue;\n }\n if (((_d = toolCallDelta.function) == null ? void 0 : _d.arguments) != null) {\n toolCall.function.arguments += toolCallDelta.function.arguments;\n controller.enqueue({\n type: \"tool-input-delta\",\n id: toolCall.id,\n delta: toolCallDelta.function.arguments\n });\n }\n if (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: toolCall.id,\n toolName: toolCall.function.name,\n input: toolCall.function.arguments\n });\n toolCall.hasFinished = true;\n }\n }\n }\n if (choice.finish_reason != null) {\n finishReason = {\n unified: mapOpenAICompatibleFinishReason(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: convertAlibabaUsage(usage)\n });\n }\n })\n ),\n request: { body: JSON.stringify(body) },\n response: { headers: responseHeaders }\n };\n }\n};\nvar alibabaUsageSchema = z2.object({\n prompt_tokens: z2.number(),\n completion_tokens: z2.number(),\n total_tokens: z2.number(),\n prompt_tokens_details: z2.object({\n cached_tokens: z2.number().nullish(),\n cache_creation_input_tokens: z2.number().nullish()\n }).nullish(),\n completion_tokens_details: z2.object({\n reasoning_tokens: z2.number().nullish()\n }).nullish()\n});\nvar alibabaChatResponseSchema = z2.object({\n id: z2.string().nullish(),\n created: z2.number().nullish(),\n model: z2.string().nullish(),\n choices: z2.array(\n z2.object({\n message: z2.object({\n role: z2.literal(\"assistant\").nullish(),\n content: z2.string().nullish(),\n reasoning_content: z2.string().nullish(),\n // Alibaba thinking mode\n tool_calls: z2.array(\n z2.object({\n id: z2.string(),\n type: z2.literal(\"function\"),\n function: z2.object({\n name: z2.string(),\n arguments: z2.string()\n })\n })\n ).nullish()\n }),\n finish_reason: z2.string().nullish(),\n index: z2.number()\n })\n ),\n usage: alibabaUsageSchema.nullish()\n});\nvar alibabaChatChunkSchema = z2.object({\n id: z2.string().nullish(),\n created: z2.number().nullish(),\n model: z2.string().nullish(),\n choices: z2.array(\n z2.object({\n delta: z2.object({\n role: z2.enum([\"assistant\"]).nullish(),\n content: z2.string().nullish(),\n reasoning_content: z2.string().nullish(),\n // Alibaba thinking mode delta\n tool_calls: z2.array(\n z2.object({\n index: z2.number().nullish(),\n // Index for accumulating tool calls\n id: z2.string().nullish(),\n type: z2.literal(\"function\").nullish(),\n function: z2.object({\n name: z2.string().nullish(),\n arguments: z2.string().nullish()\n }).nullish()\n })\n ).nullish()\n }),\n finish_reason: z2.string().nullish(),\n index: z2.number()\n })\n ),\n usage: alibabaUsageSchema.nullish()\n // Usage only appears in final chunk\n});\n\n// src/alibaba-video-model.ts\nimport {\n AISDKError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n convertUint8ArrayToBase64,\n createJsonErrorResponseHandler,\n createJsonResponseHandler as createJsonResponseHandler2,\n delay,\n getFromApi,\n lazySchema,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi2,\n resolve,\n zodSchema\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\nvar alibabaVideoModelOptionsSchema = lazySchema(\n () => zodSchema(\n z3.object({\n negativePrompt: z3.string().nullish(),\n audioUrl: z3.string().nullish(),\n promptExtend: z3.boolean().nullish(),\n shotType: z3.enum([\"single\", \"multi\"]).nullish(),\n watermark: z3.boolean().nullish(),\n audio: z3.boolean().nullish(),\n referenceUrls: z3.array(z3.string()).nullish(),\n pollIntervalMs: z3.number().positive().nullish(),\n pollTimeoutMs: z3.number().positive().nullish()\n }).passthrough()\n )\n);\nvar alibabaVideoErrorSchema = z3.object({\n code: z3.string().nullish(),\n message: z3.string(),\n request_id: z3.string().nullish()\n});\nvar alibabaVideoFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: alibabaVideoErrorSchema,\n errorToMessage: (data) => data.message\n});\nvar alibabaVideoCreateTaskSchema = z3.object({\n output: z3.object({\n task_status: z3.string(),\n task_id: z3.string()\n }).nullish(),\n request_id: z3.string().nullish()\n});\nvar alibabaVideoTaskStatusSchema = z3.object({\n output: z3.object({\n task_id: z3.string(),\n task_status: z3.string(),\n video_url: z3.string().nullish(),\n submit_time: z3.string().nullish(),\n scheduled_time: z3.string().nullish(),\n end_time: z3.string().nullish(),\n orig_prompt: z3.string().nullish(),\n actual_prompt: z3.string().nullish(),\n code: z3.string().nullish(),\n message: z3.string().nullish()\n }).nullish(),\n usage: z3.object({\n duration: z3.number().nullish(),\n output_video_duration: z3.number().nullish(),\n SR: z3.number().nullish(),\n size: z3.string().nullish()\n }).nullish(),\n request_id: z3.string().nullish()\n});\nfunction detectMode(modelId) {\n if (modelId.includes(\"-i2v\")) return \"i2v\";\n if (modelId.includes(\"-r2v\")) return \"r2v\";\n return \"t2v\";\n}\nvar AlibabaVideoModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v3\";\n this.maxVideosPerCall = 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;\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 warnings = [];\n const mode = detectMode(this.modelId);\n const alibabaOptions = await parseProviderOptions2({\n provider: \"alibaba\",\n providerOptions: options.providerOptions,\n schema: alibabaVideoModelOptionsSchema\n });\n const input = {};\n if (options.prompt != null) {\n input.prompt = options.prompt;\n }\n if ((alibabaOptions == null ? void 0 : alibabaOptions.negativePrompt) != null) {\n input.negative_prompt = alibabaOptions.negativePrompt;\n }\n if ((alibabaOptions == null ? void 0 : alibabaOptions.audioUrl) != null) {\n input.audio_url = alibabaOptions.audioUrl;\n }\n if (mode === \"i2v\" && options.image != null) {\n if (options.image.type === \"url\") {\n input.img_url = options.image.url;\n } else {\n const base64Data = typeof options.image.data === \"string\" ? options.image.data : convertUint8ArrayToBase64(options.image.data);\n input.img_url = base64Data;\n }\n }\n if (mode === \"r2v\" && (alibabaOptions == null ? void 0 : alibabaOptions.referenceUrls) != null) {\n input.reference_urls = alibabaOptions.referenceUrls;\n }\n const parameters = {};\n if (options.duration != null) {\n parameters.duration = options.duration;\n }\n if (options.seed != null) {\n parameters.seed = options.seed;\n }\n if (options.resolution != null) {\n if (mode === \"i2v\") {\n const resolutionMap = {\n \"1280x720\": \"720P\",\n \"720x1280\": \"720P\",\n \"960x960\": \"720P\",\n \"1088x832\": \"720P\",\n \"832x1088\": \"720P\",\n \"1920x1080\": \"1080P\",\n \"1080x1920\": \"1080P\",\n \"1440x1440\": \"1080P\",\n \"1632x1248\": \"1080P\",\n \"1248x1632\": \"1080P\",\n \"832x480\": \"480P\",\n \"480x832\": \"480P\",\n \"624x624\": \"480P\"\n };\n parameters.resolution = resolutionMap[options.resolution] || options.resolution;\n } else {\n parameters.size = options.resolution.replace(\"x\", \"*\");\n }\n }\n if ((alibabaOptions == null ? void 0 : alibabaOptions.promptExtend) != null) {\n parameters.prompt_extend = alibabaOptions.promptExtend;\n }\n if ((alibabaOptions == null ? void 0 : alibabaOptions.shotType) != null) {\n parameters.shot_type = alibabaOptions.shotType;\n }\n if ((alibabaOptions == null ? void 0 : alibabaOptions.watermark) != null) {\n parameters.watermark = alibabaOptions.watermark;\n }\n if ((alibabaOptions == null ? void 0 : alibabaOptions.audio) != null) {\n parameters.audio = alibabaOptions.audio;\n }\n if (options.aspectRatio) {\n warnings.push({\n type: \"unsupported\",\n feature: \"aspectRatio\",\n details: \"Alibaba video models use explicit size/resolution dimensions. Use the resolution option or providerOptions.alibaba for size control.\"\n });\n }\n if (options.fps) {\n warnings.push({\n type: \"unsupported\",\n feature: \"fps\",\n details: \"Alibaba video models do not support custom FPS.\"\n });\n }\n if (options.n != null && options.n > 1) {\n warnings.push({\n type: \"unsupported\",\n feature: \"n\",\n details: \"Alibaba video models only support generating 1 video per call.\"\n });\n }\n const { value: createResponse } = await postJsonToApi2({\n url: `${this.config.baseURL}/api/v1/services/aigc/video-generation/video-synthesis`,\n headers: combineHeaders2(\n await resolve(this.config.headers),\n options.headers,\n {\n \"X-DashScope-Async\": \"enable\"\n }\n ),\n body: {\n model: this.modelId,\n input,\n parameters\n },\n successfulResponseHandler: createJsonResponseHandler2(\n alibabaVideoCreateTaskSchema\n ),\n failedResponseHandler: alibabaVideoFailedResponseHandler,\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const taskId = (_d = createResponse.output) == null ? void 0 : _d.task_id;\n if (!taskId) {\n throw new AISDKError({\n name: \"ALIBABA_VIDEO_GENERATION_ERROR\",\n message: `No task_id returned from Alibaba API. Response: ${JSON.stringify(createResponse)}`\n });\n }\n const pollIntervalMs = (_e = alibabaOptions == null ? void 0 : alibabaOptions.pollIntervalMs) != null ? _e : 5e3;\n const pollTimeoutMs = (_f = alibabaOptions == null ? void 0 : alibabaOptions.pollTimeoutMs) != null ? _f : 6e5;\n const startTime = Date.now();\n let finalResponse;\n let responseHeaders;\n while (true) {\n await delay(pollIntervalMs, { abortSignal: options.abortSignal });\n if (Date.now() - startTime > pollTimeoutMs) {\n throw new AISDKError({\n name: \"ALIBABA_VIDEO_GENERATION_TIMEOUT\",\n message: `Video generation timed out after ${pollTimeoutMs}ms`\n });\n }\n const { value: statusResponse, responseHeaders: pollHeaders } = await getFromApi({\n url: `${this.config.baseURL}/api/v1/tasks/${taskId}`,\n headers: combineHeaders2(\n await resolve(this.config.headers),\n options.headers\n ),\n successfulResponseHandler: createJsonResponseHandler2(\n alibabaVideoTaskStatusSchema\n ),\n failedResponseHandler: alibabaVideoFailedResponseHandler,\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n responseHeaders = pollHeaders;\n const taskStatus = (_g = statusResponse.output) == null ? void 0 : _g.task_status;\n if (taskStatus === \"SUCCEEDED\") {\n finalResponse = statusResponse;\n break;\n }\n if (taskStatus === \"FAILED\" || taskStatus === \"CANCELED\") {\n throw new AISDKError({\n name: \"ALIBABA_VIDEO_GENERATION_FAILED\",\n message: `Video generation ${taskStatus.toLowerCase()}. Task ID: ${taskId}. ${(_i = (_h = statusResponse.output) == null ? void 0 : _h.message) != null ? _i : \"\"}`\n });\n }\n }\n const videoUrl = (_j = finalResponse == null ? void 0 : finalResponse.output) == null ? void 0 : _j.video_url;\n if (!videoUrl) {\n throw new AISDKError({\n name: \"ALIBABA_VIDEO_GENERATION_ERROR\",\n message: `No video URL in response. Task ID: ${taskId}`\n });\n }\n return {\n videos: [\n {\n type: \"url\",\n url: videoUrl,\n mediaType: \"video/mp4\"\n }\n ],\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n },\n providerMetadata: {\n alibaba: {\n taskId,\n videoUrl,\n ...((_k = finalResponse == null ? void 0 : finalResponse.output) == null ? void 0 : _k.actual_prompt) ? { actualPrompt: finalResponse.output.actual_prompt } : {},\n ...(finalResponse == null ? void 0 : finalResponse.usage) ? {\n usage: {\n duration: finalResponse.usage.duration,\n outputVideoDuration: finalResponse.usage.output_video_duration,\n resolution: finalResponse.usage.SR,\n size: finalResponse.usage.size\n }\n } : {}\n }\n }\n };\n }\n};\n\n// src/version.ts\nvar VERSION = \"1.0.17\";\n\n// src/alibaba-provider.ts\nvar alibabaErrorDataSchema = z4.object({\n error: z4.object({\n message: z4.string(),\n code: z4.string().nullish(),\n type: z4.string().nullish()\n })\n});\nvar alibabaFailedResponseHandler = createJsonErrorResponseHandler2({\n errorSchema: alibabaErrorDataSchema,\n errorToMessage: (data) => data.error.message\n});\nfunction createAlibaba(options = {}) {\n var _a, _b;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://dashscope-intl.aliyuncs.com/compatible-mode/v1\";\n const videoBaseURL = (_b = withoutTrailingSlash(options.videoBaseURL)) != null ? _b : \"https://dashscope-intl.aliyuncs.com\";\n const getHeaders = () => withUserAgentSuffix(\n {\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"ALIBABA_API_KEY\",\n description: \"Alibaba Cloud (DashScope)\"\n })}`,\n ...options.headers\n },\n `ai-sdk/alibaba/${VERSION}`\n );\n const createLanguageModel = (modelId) => {\n var _a2;\n return new AlibabaLanguageModel(modelId, {\n provider: \"alibaba.chat\",\n baseURL,\n headers: getHeaders,\n fetch: options.fetch,\n includeUsage: (_a2 = options.includeUsage) != null ? _a2 : true\n });\n };\n const createVideoModel = (modelId) => new AlibabaVideoModel(modelId, {\n provider: \"alibaba.video\",\n baseURL: videoBaseURL,\n headers: getHeaders,\n fetch: options.fetch\n });\n const provider = function(modelId) {\n if (new.target) {\n throw new Error(\n \"The Alibaba model function cannot be called with the new keyword.\"\n );\n }\n return createLanguageModel(modelId);\n };\n provider.specificationVersion = \"v3\";\n provider.languageModel = createLanguageModel;\n provider.chatModel = createLanguageModel;\n provider.video = createVideoModel;\n provider.videoModel = createVideoModel;\n provider.imageModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n };\n provider.embeddingModel = (modelId) => {\n throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n };\n return provider;\n}\nvar alibaba = createAlibaba();\nexport {\n VERSION,\n alibaba,\n createAlibaba\n};\n//# sourceMappingURL=index.mjs.map"
7
+ ],
8
+ "mappings": ";2XA8MA,cAAS,MAAgC,MAAC,OAAO,CAC/C,IAAI,EAAI,EAAI,EAAI,EAAI,EAAI,EACxB,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,wBAA0B,KAAY,OAAI,EAAG,gBAAkB,KAAO,EAAK,EAC/G,GAAmB,GAAM,EAAK,EAAM,4BAA8B,KAAY,OAAI,EAAG,mBAAqB,KAAO,EAAK,EAC5H,MAAO,CACL,YAAa,CACX,MAAO,EACP,QAAS,EAAe,EACxB,UAAW,EACX,WAAiB,MACnB,EACA,aAAc,CACZ,MAAO,EACP,KAAM,EAAmB,EACzB,UAAW,CACb,EACA,IAAK,CACP,EAIF,SAAS,CAA+B,CAAC,EAAc,CACrD,OAAQ,OACD,OACH,MAAO,WACJ,SACH,MAAO,aACJ,iBACH,MAAO,qBACJ,oBACA,aACH,MAAO,qBAEP,MAAO,SAKb,SAAS,CAAmB,EAC1B,KACA,QACA,WACC,CACD,MAAO,CACL,GAAI,GAAM,KAAO,EAAU,OAC3B,QAAS,GAAS,KAAO,EAAa,OACtC,UAAW,GAAW,KAAO,IAAI,KAAK,EAAU,IAAG,EAAS,MAC9D,EAOF,SAAS,CAAY,EACnB,QACA,cAC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