@ai-sdk/harness-claude-code 1.0.168 → 1.0.170

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @ai-sdk/harness-claude-code
2
2
 
3
+ ## 1.0.170
4
+
5
+ ### Patch Changes
6
+
7
+ - 09b3e1d: feat(harness-claude-code): add maxBudgetUsd and strictMcpConfig settings
8
+ - 6e3e999: add questionTimeoutMs and excludeDynamicSections settings
9
+ - Updated dependencies [57086ff]
10
+ - Updated dependencies [95348b3]
11
+ - @ai-sdk/provider-utils@5.0.70
12
+ - @ai-sdk/harness@1.0.166
13
+
14
+ ## 1.0.169
15
+
16
+ ### Patch Changes
17
+
18
+ - 39aae54: fix(harness): ensure harness adapters always resolve the model used
19
+ - a15b2a9: add onDebug setting to observe bridge connection events
20
+ - Updated dependencies [e64ed82]
21
+ - @ai-sdk/provider-utils@5.0.69
22
+ - @ai-sdk/harness@1.0.165
23
+
3
24
  ## 1.0.168
4
25
 
5
26
  ### Patch Changes
@@ -672,11 +672,12 @@ function createCompactionLatch(emit) {
672
672
  }
673
673
  //#endregion
674
674
  //#region src/bridge/claude-code-system-prompt.ts
675
- function createClaudeCodeSystemPrompt(instructions) {
675
+ function createClaudeCodeSystemPrompt(instructions, options) {
676
676
  return {
677
677
  type: "preset",
678
678
  preset: "claude_code",
679
- ...instructions ? { append: instructions } : {}
679
+ ...instructions ? { append: instructions } : {},
680
+ ...options?.excludeDynamicSections !== void 0 ? { excludeDynamicSections: options.excludeDynamicSections } : {}
680
681
  };
681
682
  }
682
683
  //#endregion
@@ -730,7 +731,7 @@ function createEmitStreamEvent({ state, emit, emitWarning, emitTerminalError, on
730
731
  let streamStarted = false;
731
732
  return (msg) => {
732
733
  const type = msg.type;
733
- if (!streamStarted) {
734
+ if (!streamStarted && type !== "command_lifecycle") {
734
735
  const initModel = type === "system" && msg.subtype === "init" && typeof msg.model === "string" ? msg.model : void 0;
735
736
  emit({
736
737
  type: "stream-start",
@@ -1729,6 +1730,8 @@ async function runTurn(start, turn) {
1729
1730
  options: {
1730
1731
  ...start.model ? { model: start.model } : {},
1731
1732
  ...start.maxTurns !== void 0 ? { maxTurns: start.maxTurns } : {},
1733
+ ...start.maxBudgetUsd !== void 0 ? { maxBudgetUsd: start.maxBudgetUsd } : {},
1734
+ ...start.strictMcpConfig !== void 0 ? { strictMcpConfig: start.strictMcpConfig } : {},
1732
1735
  ...start.agentProgressSummaries !== void 0 ? { agentProgressSummaries: start.agentProgressSummaries } : {},
1733
1736
  ...start.forwardSubagentText !== void 0 ? { forwardSubagentText: start.forwardSubagentText } : {},
1734
1737
  ...start.env !== void 0 ? { env: {
@@ -1738,7 +1741,7 @@ async function runTurn(start, turn) {
1738
1741
  ...skillsOption ? { skills: skillsOption } : {},
1739
1742
  ...nativeTools !== void 0 ? { tools: nativeTools } : {},
1740
1743
  ...inactiveNativeTools.length > 0 ? { disallowedTools: inactiveNativeTools } : {},
1741
- systemPrompt: createClaudeCodeSystemPrompt(start.instructions),
1744
+ systemPrompt: createClaudeCodeSystemPrompt(start.instructions, { excludeDynamicSections: start.excludeDynamicSections }),
1742
1745
  thinking: start.thinking,
1743
1746
  ...start.effort !== void 0 ? { effort: start.effort } : {},
1744
1747
  ...start.responseFormat?.type === "json" && start.responseFormat.schema != null ? { outputFormat: {
@@ -1749,7 +1752,8 @@ async function runTurn(start, turn) {
1749
1752
  hooks: {
1750
1753
  PreToolUse: [{
1751
1754
  matcher: "AskUserQuestion",
1752
- hooks: [questionPreToolUseHook]
1755
+ hooks: [questionPreToolUseHook],
1756
+ ...start.questionTimeoutMs !== void 0 ? { timeout: Math.ceil(start.questionTimeoutMs / 1e3) } : {}
1753
1757
  }],
1754
1758
  PostCompact: [{ hooks: [async (input) => {
1755
1759
  if (typeof input?.compact_summary === "string") compaction.onSummary(input.compact_summary);