alchemylab-opencode 1.0.25 → 2.0.0

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 (123) hide show
  1. package/NODE_COMPAT.md +23 -174
  2. package/dist/20260127222353_familiar_lady_ursula-KV747FJX.js +14 -0
  3. package/dist/{chunk-LTCXIXYM.js → 20260211171708_add_project_commands-GDOHPDPF.js} +3 -1
  4. package/dist/20260213144116_wakeful_the_professor-ZVDD54AK.js +14 -0
  5. package/dist/20260225215848_workspace-ZMSOZSPA.js +14 -0
  6. package/dist/20260227213759_add_session_workspace_id-ROENWPKA.js +14 -0
  7. package/dist/20260228203230_blue_harpoon-IW3Z4TQZ.js +14 -0
  8. package/dist/20260303231226_add_workspace_fields-OUVZMNAG.js +14 -0
  9. package/dist/20260309230000_move_org_to_state-NOXAPU5V.js +14 -0
  10. package/dist/20260312043431_session_message_cursor-DJ4T3T4R.js +14 -0
  11. package/dist/20260323234822_events-72GIKJ2A.js +14 -0
  12. package/dist/20260410174513_workspace-name-JXSWFBJN.js +14 -0
  13. package/dist/20260413175956_chief_energizer-4HEWZ6U3.js +14 -0
  14. package/dist/20260423070820_add_icon_url_override-X5SHFGTI.js +14 -0
  15. package/dist/20260427172553_slow_nightmare-PS5T2AH2.js +14 -0
  16. package/dist/{chunk-YRY5Y3QL.js → 20260428004200_add_session_path-LGW75WYA.js} +3 -1
  17. package/dist/{valibot--1zFm7rT-FSYJNYJ6.js → 20260501142318_next_venus-J3TLVXZ6.js} +3 -1
  18. package/dist/20260504145000_add_sync_owner-3R52GB4C.js +14 -0
  19. package/dist/20260507164347_add_workspace_time-JHDRCZAR.js +14 -0
  20. package/dist/20260510033149_session_usage-UGBVOXZB.js +53 -0
  21. package/dist/20260511000411_data_migration_state-FB4LBFSE.js +14 -0
  22. package/dist/20260511173437_session-metadata-T2XHGWHS.js +14 -0
  23. package/dist/20260601010001_normalize_storage_paths-5MAY5GT3.js +14 -0
  24. package/dist/{chunk-PWFRMDDF.js → 20260601202201_amazing_prowler-PET224YG.js} +3 -0
  25. package/dist/20260602002951_lowly_union_jack-PG6XDMGL.js +14 -0
  26. package/dist/20260602182828_add_project_directories-ZCH2ACGG.js +14 -0
  27. package/dist/20260603001617_session_message_projection_indexes-XVLJTUF2.js +14 -0
  28. package/dist/20260603040000_session_message_projection_order-XG6RACZQ.js +14 -0
  29. package/dist/20260603141458_session_input_inbox-K2VQ7V6E.js +14 -0
  30. package/dist/20260603160727_jittery_ezekiel_stane-WKJLRDO7.js +14 -0
  31. package/dist/20260604172448_event_sourced_session_input-NTXOECR7.js +14 -0
  32. package/dist/20260605003541_add_session_context_snapshot-DXMQEXMT.js +14 -0
  33. package/dist/{zod-Bwrt9trS-HVDOFWRP.js → 20260605042240_add_context_epoch_agent-W6IQYZXE.js} +3 -1
  34. package/dist/20260611035744_credential-XTMSYTJD.js +14 -0
  35. package/dist/20260611192811_lush_chimera-XPLIQMJD.js +14 -0
  36. package/dist/20260612174303_project_dir_strategy-FR2NGQKK.js +14 -0
  37. package/dist/20260622142730_simplify_session_context_epoch-NTQZR3RE.js +14 -0
  38. package/dist/20260622170816_reset_v2_session_state-5JPHJTZG.js +14 -0
  39. package/dist/20260622202450_simplify_session_input-2EXF2HMV.js +14 -0
  40. package/dist/app-runtime-6NGO2HRS.js +14 -0
  41. package/dist/chunk-4K2RXRZL.js +14 -0
  42. package/dist/chunk-BM2C7NHL.js +41 -0
  43. package/dist/chunk-E47SMIVL.js +186 -0
  44. package/dist/chunk-OMDJ6ZZ2.js +684 -0
  45. package/dist/chunk-PLQOF3WF.js +393 -0
  46. package/dist/chunk-QRABYJKL.js +14 -0
  47. package/dist/chunk-RHIWAYN5.js +14 -0
  48. package/dist/{arktype-aI7TBD0R-TFNARRIP.js → chunk-VURLSDCB.js} +3 -1
  49. package/dist/chunk-Z5TLIUAI.js +28 -0
  50. package/dist/chunk-ZMHNE2MU.js +865 -0
  51. package/dist/chunk-ZWLTE2TM.js +1455 -0
  52. package/dist/code-mode-YFX4N2VN.js +40 -0
  53. package/dist/copilot-provider-TX4YFKJZ.js +14 -0
  54. package/dist/photon-VQS5F5BI.js +14 -0
  55. package/dist/pty.node-Y3N2XKYG.js +14 -0
  56. package/dist/run.js +3 -1
  57. package/dist/serve.js +3 -1
  58. package/dist/server-TI57TGPO.js +17 -0
  59. package/dist/session-6RNXZNG6.js +14 -0
  60. package/dist/{chunk-2ANK3QEN.js → worktree-3RZQEGVC.js} +3 -1
  61. package/package.json +83 -50
  62. package/patches/@ai-sdk%2Famazon-bedrock@4.0.166.patch +164 -0
  63. package/patches/@ai-sdk%2Fanthropic@3.0.111.patch +528 -0
  64. package/patches/@ai-sdk%2Fgoogle@3.0.73.patch +69 -0
  65. package/patches/@ai-sdk%2Fgroq@3.0.31.patch +79 -0
  66. package/patches/@ai-sdk%2Fmistral@3.0.51.patch +714 -0
  67. package/patches/@ai-sdk%2Fopenai-compatible@2.0.41.patch +39 -0
  68. package/patches/@ai-sdk%2Fopenai@3.0.88.patch +280 -0
  69. package/patches/@ai-sdk%2Fxai@3.0.139.patch +296 -0
  70. package/patches/@modelcontextprotocol%2Fsdk@1.29.0.patch +647 -0
  71. package/patches/@npmcli%2Fagent@4.0.2.patch +13 -0
  72. package/patches/@silvia-odwyer%2Fphoton-node@0.3.4.patch +285 -0
  73. package/patches/effect@4.0.0-beta.83.patch +57 -0
  74. package/patches/gcp-metadata@8.1.2.patch +14 -0
  75. package/patches/pacote@21.5.0.patch +18 -0
  76. package/postinstall.cjs +146 -0
  77. package/dist/chunk-26PYOYAY.js +0 -13
  78. package/dist/chunk-7KKA6WBY.js +0 -12
  79. package/dist/chunk-CZVKIDQZ.js +0 -12
  80. package/dist/chunk-FXLFZ5DL.js +0 -12
  81. package/dist/chunk-GXWCFXGG.js +0 -12
  82. package/dist/chunk-M4CB72HE.js +0 -13
  83. package/dist/chunk-MBZTOEAD.js +0 -12
  84. package/dist/chunk-NLFNI3VW.js +0 -18
  85. package/dist/chunk-XJGIPERR.js +0 -2187
  86. package/dist/chunk-YDTJPTBK.js +0 -18
  87. package/dist/default-u_dwuiYb-652AQZKX.js +0 -12
  88. package/dist/effect-QlVUlMFu-JVYEXAZL.js +0 -12
  89. package/dist/log-MVJ7H4K5.js +0 -12
  90. package/dist/pty.node-X2EITEZ4.js +0 -12
  91. package/dist/registry-4BBWPCYV.js +0 -12
  92. package/dist/run-XDEC53H6.js +0 -20
  93. package/dist/run-service-6DJSRAIA.js +0 -12
  94. package/dist/schema-YWIVP7UR.js +0 -12
  95. package/dist/server-IT7ZVNR2.js +0 -12
  96. package/dist/session-HPEX3PLB.js +0 -12
  97. package/dist/share-next-3FDGRL3C.js +0 -12
  98. package/dist/sury-CWZTCd75-3YHH6KVI.js +0 -12
  99. package/dist/typebox-Dei93FPO-GLI7OCTY.js +0 -12
  100. package/dist/valibot-D_HTw1Gn-E5NKVIOV.js +0 -12
  101. package/dist/worktree-INBHVVO4.js +0 -12
  102. package/dist/zod-DSgpEGAE-DSH6V7MG.js +0 -12
  103. package/packages/opencode/migration/20260127222353_familiar_lady_ursula/migration.sql +0 -90
  104. package/packages/opencode/migration/20260127222353_familiar_lady_ursula/snapshot.json +0 -796
  105. package/packages/opencode/migration/20260211171708_add_project_commands/migration.sql +0 -1
  106. package/packages/opencode/migration/20260211171708_add_project_commands/snapshot.json +0 -806
  107. package/packages/opencode/migration/20260213144116_wakeful_the_professor/migration.sql +0 -11
  108. package/packages/opencode/migration/20260213144116_wakeful_the_professor/snapshot.json +0 -897
  109. package/packages/opencode/migration/20260225215848_workspace/migration.sql +0 -7
  110. package/packages/opencode/migration/20260225215848_workspace/snapshot.json +0 -959
  111. package/packages/opencode/migration/20260227213759_add_session_workspace_id/migration.sql +0 -2
  112. package/packages/opencode/migration/20260227213759_add_session_workspace_id/snapshot.json +0 -983
  113. package/packages/opencode/migration/20260228203230_blue_harpoon/migration.sql +0 -17
  114. package/packages/opencode/migration/20260228203230_blue_harpoon/snapshot.json +0 -1102
  115. package/packages/opencode/migration/20260303231226_add_workspace_fields/migration.sql +0 -5
  116. package/packages/opencode/migration/20260303231226_add_workspace_fields/snapshot.json +0 -1013
  117. package/packages/opencode/migration/20260309230000_move_org_to_state/migration.sql +0 -3
  118. package/packages/opencode/migration/20260309230000_move_org_to_state/snapshot.json +0 -1156
  119. package/packages/opencode/migration/20260312043431_session_message_cursor/migration.sql +0 -4
  120. package/packages/opencode/migration/20260312043431_session_message_cursor/snapshot.json +0 -1168
  121. package/packages/opencode/migration/20260323234822_events/migration.sql +0 -13
  122. package/packages/opencode/migration/20260323234822_events/snapshot.json +0 -1271
  123. package/packages/opencode/migration/20260409000000_add_session_metadata/migration.sql +0 -1
@@ -0,0 +1,14 @@
1
+ // Built by esbuild from opencode-server source
2
+ if (typeof globalThis.Bun === 'undefined') {
3
+ globalThis.Bun = {
4
+ version: '0.0.0-node-compat',
5
+ stdin: { async text() { const chunks = []; for await (const c of process.stdin) chunks.push(c); return Buffer.concat(chunks).toString(); } },
6
+ which(cmd) { try { return require('child_process').execFileSync('which', [cmd], { encoding: 'utf8' }).trim(); } catch { return null; } },
7
+ };
8
+ }
9
+ if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
10
+ if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
11
+ import { createRequire as __alchemyCreateRequire } from 'node:module';
12
+ const require = __alchemyCreateRequire(import.meta.url);
13
+
14
+ import{A as n,B as o,C as p,D as q,E as r,F as s,G as t,H as u,I as v,J as w,K as x,L as y,M as z,N as A,n as a,o as b,p as c,q as d,r as e,s as f,t as g,u as h,v as i,w as j,x as k,y as l,z as m}from"./chunk-Z5TLIUAI.js";import"./chunk-OMDJ6ZZ2.js";import"./chunk-BM2C7NHL.js";import"./chunk-RHIWAYN5.js";export{d as ArchivedTimestamp,w as BusyError,l as ChildrenInput,i as CreateInput,t as Event,j as ForkInput,k as GetInput,h as GlobalInfo,f as Info,s as MessagesInput,e as Metadata,g as ProjectInfo,m as RemoveInput,x as Service,A as Session,o as SetArchivedInput,p as SetMetadataInput,q as SetPermissionInput,r as SetRevertInput,n as SetTitleInput,b as fromRow,v as getUsage,a as isDefaultTitle,z as node,u as plan,c as toRow,y as use};
@@ -8,5 +8,7 @@ if (typeof globalThis.Bun === 'undefined') {
8
8
  }
9
9
  if (typeof globalThis.__name === 'undefined') { globalThis.__name = (t, n) => { Object.defineProperty(t, 'name', { value: n, configurable: true }); return t; }; }
10
10
  if (typeof globalThis.__export === 'undefined') { globalThis.__export = (t, a) => { for (const k in a) Object.defineProperty(t, k, { get: a[k], enumerable: true }); }; }
11
+ import { createRequire as __alchemyCreateRequire } from 'node:module';
12
+ const require = __alchemyCreateRequire(import.meta.url);
11
13
 
12
- import{a as n}from"./chunk-MBZTOEAD.js";var i=n(t=>`standard-openapi: ${t}`,"errorMessageWrapper"),s=new Map,r=n(async t=>{let e=s.get(t);if(e)return e;let a;switch(t){case"valibot":a=(await import("./valibot-D_HTw1Gn-E5NKVIOV.js")).default();break;case"zod":a=(await import("./zod-DSgpEGAE-DSH6V7MG.js")).default();break;default:a=(await import("./default-u_dwuiYb-652AQZKX.js")).default()}return s.set(t,a),a},"getToOpenAPISchemaFn"),d=n(async(t,e={})=>{let a=await r(t["~standard"].vendor),{components:o={},options:c}=e;return{schema:await a(t,{components:o,options:c}),components:Object.keys(o).length>0?o:void 0}},"toOpenAPISchema");export{i as a,d as b};
14
+ import{i as a,j as b,k as c,l as d,m as e,n as f,o as g,p as h,q as i,r as j,s as k,t as l,u as m,v as n,w as o}from"./chunk-E47SMIVL.js";import"./chunk-ZMHNE2MU.js";import"./chunk-QRABYJKL.js";import"./chunk-OMDJ6ZZ2.js";import"./chunk-BM2C7NHL.js";import"./chunk-RHIWAYN5.js";export{h as CreateFailedError,c as CreateInput,a as Event,b as Info,l as ListFailedError,g as NameGenerationFailedError,f as NotGitError,j as RemoveFailedError,d as RemoveInput,k as ResetFailedError,e as ResetInput,m as Service,i as StartCommandFailedError,o as Worktree,n as node};
package/package.json CHANGED
@@ -1,90 +1,108 @@
1
1
  {
2
2
  "name": "alchemylab-opencode",
3
- "version": "1.0.25",
3
+ "version": "2.0.0",
4
4
  "description": "OpenCode server runtime for AlchemyLab",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
8
  "build": "node build.mjs",
9
9
  "prepublishOnly": "npm run build",
10
- "prepack": "node ../scripts/check-shipped.mjs --npm ."
10
+ "prepack": "node ../scripts/check-shipped.mjs --npm .",
11
+ "postinstall": "node postinstall.cjs"
11
12
  },
12
13
  "files": [
13
14
  "dist/**/*.js",
14
- "packages/opencode/migration/**",
15
+ "dist/**/*.wasm",
16
+ "patches/**",
17
+ "postinstall.cjs",
15
18
  "NODE_COMPAT.md"
16
19
  ],
17
20
  "dependencies": {
18
- "@agentclientprotocol/sdk": "0.16.1",
19
- "@ai-sdk/amazon-bedrock": "^4.0.91",
20
- "@ai-sdk/anthropic": "3.0.118",
21
- "@ai-sdk/azure": "3.0.49",
22
- "@ai-sdk/cerebras": "2.0.41",
21
+ "@agentclientprotocol/sdk": "0.21.0",
22
+ "@ai-sdk/alibaba": "1.0.17",
23
+ "@ai-sdk/amazon-bedrock": "4.0.166",
24
+ "@ai-sdk/anthropic": "3.0.111",
25
+ "@ai-sdk/azure": "3.0.93",
26
+ "@ai-sdk/cerebras": "2.0.60",
23
27
  "@ai-sdk/cohere": "3.0.27",
24
28
  "@ai-sdk/deepinfra": "2.0.41",
25
- "@ai-sdk/gateway": "3.0.80",
26
- "@ai-sdk/google": "3.0.53",
27
- "@ai-sdk/google-vertex": "4.0.95",
29
+ "@ai-sdk/gateway": "3.0.191",
30
+ "@ai-sdk/google": "3.0.73",
31
+ "@ai-sdk/google-vertex": "4.0.181",
28
32
  "@ai-sdk/groq": "3.0.31",
29
- "@ai-sdk/mistral": "3.0.27",
30
- "@ai-sdk/openai": "3.0.48",
31
- "@ai-sdk/openai-compatible": "2.0.37",
33
+ "@ai-sdk/mistral": "3.0.51",
34
+ "@ai-sdk/openai": "3.0.88",
35
+ "@ai-sdk/openai-compatible": "2.0.41",
32
36
  "@ai-sdk/perplexity": "3.0.26",
33
- "@ai-sdk/provider": "3.0.8",
34
- "@ai-sdk/provider-utils": "4.0.23",
35
- "@ai-sdk/togetherai": "2.0.41",
37
+ "@ai-sdk/provider": "3.0.16",
38
+ "@ai-sdk/provider-utils": "4.0.51",
39
+ "@ai-sdk/togetherai": "2.0.68",
36
40
  "@ai-sdk/vercel": "2.0.39",
37
- "@ai-sdk/xai": "3.0.75",
38
- "@aws-sdk/credential-providers": "^3.1025.0",
39
- "@clack/prompts": "1.0.0-alpha.1",
40
- "@effect/platform-node": "4.0.0-beta.43",
41
- "@effect/platform-node-shared": "4.0.0-beta.43",
42
- "@hono/node-server": "1.19.11",
43
- "@hono/node-ws": "1.3.0",
44
- "@hono/zod-validator": "0.4.2",
45
- "@lydell/node-pty": "1.2.0-beta.10",
46
- "@modelcontextprotocol/sdk": "1.27.1",
41
+ "@ai-sdk/xai": "3.0.139",
42
+ "@aws-sdk/credential-providers": "3.1057.0",
43
+ "@effect/opentelemetry": "4.0.0-beta.83",
44
+ "@effect/platform-node": "4.0.0-beta.83",
45
+ "@effect/platform-node-shared": "4.0.0-beta.83",
46
+ "@gitlab/opencode-gitlab-auth": "1.3.3",
47
+ "@lydell/node-pty": "1.2.0-beta.12",
48
+ "@modelcontextprotocol/sdk": "1.29.0",
47
49
  "@npmcli/arborist": "9.4.0",
48
- "@openrouter/ai-sdk-provider": "2.4.2",
50
+ "@npmcli/config": "10.8.1",
51
+ "@openauthjs/openauth": "0.0.0-20250322224806",
52
+ "@openrouter/ai-sdk-provider": "2.9.0",
53
+ "@opentelemetry/api": "1.9.0",
54
+ "@opentelemetry/context-async-hooks": "2.6.1",
55
+ "@opentelemetry/exporter-trace-otlp-http": "0.214.0",
56
+ "@opentelemetry/sdk-trace-base": "2.6.1",
57
+ "@opentelemetry/sdk-trace-node": "2.6.1",
49
58
  "@parcel/watcher": "2.5.1",
59
+ "@silvia-odwyer/photon-node": "0.3.4",
60
+ "@smithy/eventstream-codec": "4.2.14",
61
+ "@smithy/util-utf8": "4.2.2",
62
+ "@standard-schema/spec": "1.0.0",
63
+ "@types/ws": "8.18.1",
50
64
  "@zip.js/zip.js": "2.7.62",
51
- "ai": "6.0.149",
52
- "ai-gateway-provider": "3.1.2",
65
+ "acorn": "8.15.0",
66
+ "ai": "6.0.168",
67
+ "ai-gateway-provider": "3.2.0",
68
+ "aws4fetch": "1.0.20",
53
69
  "bonjour-service": "1.3.0",
54
70
  "chokidar": "4.0.3",
55
71
  "cross-spawn": "7.0.6",
56
72
  "decimal.js": "10.5.0",
57
73
  "diff": "8.0.2",
58
- "drizzle-orm": "1.0.0-beta.19-d95b7a4",
59
- "effect": "4.0.0-beta.43",
74
+ "drizzle-orm": "1.0.0-rc.2",
75
+ "effect": "4.0.0-beta.83",
60
76
  "fuzzysort": "3.1.0",
61
- "gitlab-ai-provider": "^6.4.1",
77
+ "gitlab-ai-provider": "6.19.0",
62
78
  "glob": "13.0.5",
63
- "google-auth-library": "^10.6.2",
79
+ "google-auth-library": "10.5.0",
64
80
  "gray-matter": "4.0.3",
65
- "gtoken": "^8.0.0",
66
- "hono": "4.10.7",
81
+ "htmlparser2": "8.0.2",
67
82
  "ignore": "7.0.5",
83
+ "immer": "11.1.4",
68
84
  "ioredis": "^5.10.1",
69
85
  "jsonc-parser": "3.3.1",
70
86
  "mime-types": "3.0.2",
71
- "minimatch": "10.0.3",
87
+ "minimatch": "10.2.5",
72
88
  "npm-package-arg": "13.0.2",
73
- "open": "10.1.2",
74
- "opencode-gitlab-auth": "2.0.1",
89
+ "open": "11.0.4",
90
+ "opencode-gitlab-auth": "2.1.0",
75
91
  "opencode-poe-auth": "0.0.1",
76
92
  "partial-json": "0.1.7",
77
93
  "remeda": "2.26.0",
78
- "semver": "^7.6.3",
94
+ "semver": "7.7.4",
95
+ "strip-ansi": "7.1.2",
79
96
  "turndown": "7.2.0",
80
97
  "ulid": "3.0.1",
81
- "venice-ai-sdk-provider": "2.0.1",
98
+ "undici": "7.24.7",
99
+ "venice-ai-sdk-provider": "2.1.1",
82
100
  "vscode-jsonrpc": "8.2.1",
83
101
  "which": "6.0.1",
102
+ "ws": "8.21.0",
84
103
  "xdg-basedir": "5.1.0",
85
104
  "yargs": "18.0.0",
86
- "zod": "4.1.8",
87
- "zod-to-json-schema": "3.25.2"
105
+ "zod": "4.1.8"
88
106
  },
89
107
  "trustedDependencies": [
90
108
  "esbuild",
@@ -94,16 +112,31 @@
94
112
  "node": ">=22.16 <23 || >=24"
95
113
  },
96
114
  "overrides": {
97
- "effect": "4.0.0-beta.43",
115
+ "effect": "4.0.0-beta.83",
98
116
  "zod": "4.1.8",
99
- "quansync": "$quansync"
117
+ "@ai-sdk/anthropic": "3.0.111",
118
+ "@ai-sdk/provider": "3.0.16",
119
+ "open": "11.0.4",
120
+ "@npmcli/agent": "4.0.2"
100
121
  },
101
122
  "devDependencies": {
102
- "@hono/standard-validator": "0.2.2",
103
- "@standard-community/standard-json": "0.3.5",
104
- "@standard-community/standard-openapi": "0.2.9",
123
+ "@ff-labs/fff-bun": "0.9.4",
124
+ "@tsconfig/bun": "1.0.9",
125
+ "@tsconfig/node22": "22.0.2",
126
+ "@types/bun": "1.3.13",
127
+ "@types/cross-spawn": "6.0.6",
128
+ "@types/mime-types": "3.0.1",
129
+ "@types/node": "24.12.2",
130
+ "@types/npm-package-arg": "6.1.4",
131
+ "@types/npmcli__arborist": "6.3.3",
132
+ "@types/semver": "7.7.1",
133
+ "@types/turndown": "5.0.5",
134
+ "@types/which": "3.0.4",
135
+ "@types/yargs": "17.0.33",
136
+ "@typescript/native-preview": "7.0.0-dev.20251207.1",
137
+ "bun-pty": "0.4.8",
105
138
  "esbuild": "^0.28.0",
106
- "hono-openapi": "1.1.2",
107
- "quansync": "1.0.0"
139
+ "typescript": "5.8.2",
140
+ "vscode-languageserver-types": "3.17.5"
108
141
  }
109
142
  }
@@ -0,0 +1,164 @@
1
+ diff --git a/dist/index.d.mts b/dist/index.d.mts
2
+ index d194ae227fd1223ba44c8c5157b1bb72b1bab273..db7fdb1b6f4e617baa40539ccef718735d2e9e81 100644
3
+ --- a/dist/index.d.mts
4
+ +++ b/dist/index.d.mts
5
+ @@ -51,6 +51,7 @@ declare const amazonBedrockLanguageModelOptions: z.ZodObject<{
6
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">, z.ZodLiteral<"adaptive">]>>;
7
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
8
+ maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
9
+ + none: "none";
10
+ low: "low";
11
+ medium: "medium";
12
+ high: "high";
13
+ @@ -61,6 +62,12 @@ declare const amazonBedrockLanguageModelOptions: z.ZodObject<{
14
+ omitted: "omitted";
15
+ summarized: "summarized";
16
+ }>>;
17
+ + blockBinding: z.ZodOptional<z.ZodObject<{
18
+ + prefixMismatchBehavior: z.ZodEnum<{
19
+ + error: "error";
20
+ + drop_block: "drop_block";
21
+ + }>;
22
+ + }, z.core.$strip>>;
23
+ }, z.core.$strip>>;
24
+ anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ serviceTier: z.ZodOptional<z.ZodEnum<{
26
+ diff --git a/dist/index.d.ts b/dist/index.d.ts
27
+ index d194ae227fd1223ba44c8c5157b1bb72b1bab273..db7fdb1b6f4e617baa40539ccef718735d2e9e81 100644
28
+ --- a/dist/index.d.ts
29
+ +++ b/dist/index.d.ts
30
+ @@ -51,6 +51,7 @@ declare const amazonBedrockLanguageModelOptions: z.ZodObject<{
31
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodLiteral<"disabled">, z.ZodLiteral<"adaptive">]>>;
32
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
33
+ maxReasoningEffort: z.ZodOptional<z.ZodEnum<{
34
+ + none: "none";
35
+ low: "low";
36
+ medium: "medium";
37
+ high: "high";
38
+ @@ -61,6 +62,12 @@ declare const amazonBedrockLanguageModelOptions: z.ZodObject<{
39
+ omitted: "omitted";
40
+ summarized: "summarized";
41
+ }>>;
42
+ + blockBinding: z.ZodOptional<z.ZodObject<{
43
+ + prefixMismatchBehavior: z.ZodEnum<{
44
+ + error: "error";
45
+ + drop_block: "drop_block";
46
+ + }>;
47
+ + }, z.core.$strip>>;
48
+ }, z.core.$strip>>;
49
+ anthropicBeta: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ serviceTier: z.ZodOptional<z.ZodEnum<{
51
+ diff --git a/dist/index.js b/dist/index.js
52
+ index 2047c91971c23f72dd3cd0c069614f37a30e45f3..ede62d091e3d17fd6130e77a6a209ee0af2a7c20 100644
53
+ --- a/dist/index.js
54
+ +++ b/dist/index.js
55
+ @@ -94,8 +94,11 @@ var amazonBedrockLanguageModelOptions = import_v4.z.object({
56
+ import_v4.z.literal("adaptive")
57
+ ]).optional(),
58
+ budgetTokens: import_v4.z.number().optional(),
59
+ - maxReasoningEffort: import_v4.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
60
+ - display: import_v4.z.enum(["omitted", "summarized"]).optional()
61
+ + maxReasoningEffort: import_v4.z.enum(["none", "low", "medium", "high", "xhigh", "max"]).optional(),
62
+ + display: import_v4.z.enum(["omitted", "summarized"]).optional(),
63
+ + blockBinding: import_v4.z.object({
64
+ + prefixMismatchBehavior: import_v4.z.enum(["error", "drop_block"])
65
+ + }).optional()
66
+ }).optional(),
67
+ /**
68
+ * Anthropic beta features to enable
69
+ @@ -1020,6 +1023,10 @@ var BedrockChatLanguageModel = class {
70
+ ...additionalTools
71
+ };
72
+ }
73
+ + const thinkingBlockBinding = isAnthropicModel && isThinkingEnabled ? (bedrockOptions.reasoningConfig == null ? void 0 : bedrockOptions.reasoningConfig.blockBinding) : void 0;
74
+ + if (thinkingBlockBinding != null) {
75
+ + betas.add("thinking-binding-controls-2026-08-01");
76
+ + }
77
+ if (betas.size > 0 || bedrockOptions.anthropicBeta) {
78
+ const existingBetas = (_g = bedrockOptions.anthropicBeta) != null ? _g : [];
79
+ const mergedBetas = betas.size > 0 ? [...existingBetas, ...Array.from(betas)] : existingBetas;
80
+ @@ -1050,7 +1057,12 @@ var BedrockChatLanguageModel = class {
81
+ ...bedrockOptions.additionalModelRequestFields,
82
+ thinking: {
83
+ type: "enabled",
84
+ - budget_tokens: thinkingBudget
85
+ + budget_tokens: thinkingBudget,
86
+ + ...thinkingBlockBinding != null && {
87
+ + block_binding: {
88
+ + prefix_mismatch_behavior: thinkingBlockBinding.prefixMismatchBehavior
89
+ + }
90
+ + }
91
+ }
92
+ };
93
+ } else if (thinkingType === "adaptive") {
94
+ @@ -1058,7 +1070,12 @@ var BedrockChatLanguageModel = class {
95
+ ...bedrockOptions.additionalModelRequestFields,
96
+ thinking: {
97
+ type: "adaptive",
98
+ - ...thinkingDisplay != null && { display: thinkingDisplay }
99
+ + ...thinkingDisplay != null && { display: thinkingDisplay },
100
+ + ...thinkingBlockBinding != null && {
101
+ + block_binding: {
102
+ + prefix_mismatch_behavior: thinkingBlockBinding.prefixMismatchBehavior
103
+ + }
104
+ + }
105
+ }
106
+ };
107
+ }
108
+ diff --git a/dist/index.mjs b/dist/index.mjs
109
+ index 5a669504cb3b21f20788956bc9c22529c1498c35..bcbcd768759a4e412657795d6db75e21d4e64c09 100644
110
+ --- a/dist/index.mjs
111
+ +++ b/dist/index.mjs
112
+ @@ -83,8 +83,11 @@ var amazonBedrockLanguageModelOptions = z.object({
113
+ z.literal("adaptive")
114
+ ]).optional(),
115
+ budgetTokens: z.number().optional(),
116
+ - maxReasoningEffort: z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
117
+ - display: z.enum(["omitted", "summarized"]).optional()
118
+ + maxReasoningEffort: z.enum(["none", "low", "medium", "high", "xhigh", "max"]).optional(),
119
+ + display: z.enum(["omitted", "summarized"]).optional(),
120
+ + blockBinding: z.object({
121
+ + prefixMismatchBehavior: z.enum(["error", "drop_block"])
122
+ + }).optional()
123
+ }).optional(),
124
+ /**
125
+ * Anthropic beta features to enable
126
+ @@ -1024,6 +1027,10 @@ var BedrockChatLanguageModel = class {
127
+ ...additionalTools
128
+ };
129
+ }
130
+ + const thinkingBlockBinding = isAnthropicModel && isThinkingEnabled ? (bedrockOptions.reasoningConfig == null ? void 0 : bedrockOptions.reasoningConfig.blockBinding) : void 0;
131
+ + if (thinkingBlockBinding != null) {
132
+ + betas.add("thinking-binding-controls-2026-08-01");
133
+ + }
134
+ if (betas.size > 0 || bedrockOptions.anthropicBeta) {
135
+ const existingBetas = (_g = bedrockOptions.anthropicBeta) != null ? _g : [];
136
+ const mergedBetas = betas.size > 0 ? [...existingBetas, ...Array.from(betas)] : existingBetas;
137
+ @@ -1054,7 +1061,12 @@ var BedrockChatLanguageModel = class {
138
+ ...bedrockOptions.additionalModelRequestFields,
139
+ thinking: {
140
+ type: "enabled",
141
+ - budget_tokens: thinkingBudget
142
+ + budget_tokens: thinkingBudget,
143
+ + ...thinkingBlockBinding != null && {
144
+ + block_binding: {
145
+ + prefix_mismatch_behavior: thinkingBlockBinding.prefixMismatchBehavior
146
+ + }
147
+ + }
148
+ }
149
+ };
150
+ } else if (thinkingType === "adaptive") {
151
+ @@ -1062,7 +1074,12 @@ var BedrockChatLanguageModel = class {
152
+ ...bedrockOptions.additionalModelRequestFields,
153
+ thinking: {
154
+ type: "adaptive",
155
+ - ...thinkingDisplay != null && { display: thinkingDisplay }
156
+ + ...thinkingDisplay != null && { display: thinkingDisplay },
157
+ + ...thinkingBlockBinding != null && {
158
+ + block_binding: {
159
+ + prefix_mismatch_behavior: thinkingBlockBinding.prefixMismatchBehavior
160
+ + }
161
+ + }
162
+ }
163
+ };
164
+ }