@ai-sdk/harness-claude-code 1.0.123 → 1.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/bridge/index.mjs +17 -2
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/bridge/index.ts +18 -1
- package/src/claude-code-bootstrap.ts +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/harness-claude-code
|
|
2
2
|
|
|
3
|
+
## 1.0.125
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3ea56bc: fix(harness): make bridge asset resolution compatible with Turbopack (and thus Next.js 16)
|
|
8
|
+
- Updated dependencies [3ea56bc]
|
|
9
|
+
- @ai-sdk/harness@1.0.121
|
|
10
|
+
|
|
11
|
+
## 1.0.124
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 7d81368: fix(harness-claude-code): avoid unnecessary warning about `canUseTool()` in combination with `bypassPermissions` flag
|
|
16
|
+
- @ai-sdk/harness@1.0.120
|
|
17
|
+
|
|
3
18
|
## 1.0.123
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/bridge/index.mjs
CHANGED
|
@@ -1362,10 +1362,25 @@ function createPermissionOptions(input) {
|
|
|
1362
1362
|
permissionMode,
|
|
1363
1363
|
inactiveNativeTools
|
|
1364
1364
|
});
|
|
1365
|
-
|
|
1365
|
+
const baseOptions = {
|
|
1366
1366
|
permissionMode: permissionMode === "allow-all" ? "bypassPermissions" : permissionMode === "allow-edits" ? "acceptEdits" : "default",
|
|
1367
1367
|
allowDangerouslySkipPermissions: permissionMode === "allow-all",
|
|
1368
|
-
...permissionSettings ? { settings: permissionSettings } : {}
|
|
1368
|
+
...permissionSettings ? { settings: permissionSettings } : {}
|
|
1369
|
+
};
|
|
1370
|
+
if (permissionMode === "allow-all") {
|
|
1371
|
+
return {
|
|
1372
|
+
...baseOptions,
|
|
1373
|
+
/*
|
|
1374
|
+
* Claude Code exposes AskUserQuestion in headless SDK sessions only
|
|
1375
|
+
* when a permission prompt tool is configured. The stdio prompt tool
|
|
1376
|
+
* preserves that tool surface without supplying the canUseTool callback
|
|
1377
|
+
* that bypassPermissions guarantees it will never invoke.
|
|
1378
|
+
*/
|
|
1379
|
+
permissionPromptToolName: "stdio"
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
return {
|
|
1383
|
+
...baseOptions,
|
|
1369
1384
|
canUseTool: async (toolName, toolInput, options) => {
|
|
1370
1385
|
if (toolName.startsWith("mcp__harness-tools__")) {
|
|
1371
1386
|
return { behavior: "allow", updatedInput: toolInput };
|