@ai-sdk/harness 1.0.92 → 1.0.94

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/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
2
2
  import { Experimental_SandboxSession, UserModelMessage, ToolSet, FlexibleSchema, Tool } from '@ai-sdk/provider-utils';
3
3
  import { z } from 'zod/v4';
4
4
  import * as _ai_sdk_provider from '@ai-sdk/provider';
5
- import { JSONValue, LanguageModelV4ToolCall, LanguageModelV4ToolApprovalRequest, LanguageModelV4ToolResult, LanguageModelV4FinishReason, LanguageModelV4Usage, SharedV4ProviderMetadata, JSONSchema7, AISDKError } from '@ai-sdk/provider';
5
+ import { JSONSchema7, JSONValue, LanguageModelV4StreamPart, LanguageModelV4ToolCall, LanguageModelV4ToolApprovalRequest, LanguageModelV4ToolResult, LanguageModelV4FinishReason, LanguageModelV4Usage, SharedV4ProviderMetadata, AISDKError } from '@ai-sdk/provider';
6
6
 
7
7
  /**
8
8
  * One file to write into the sandbox as part of an adapter's bootstrap recipe.
@@ -397,6 +397,66 @@ type HarnessV1ResponseFormat = {
397
397
  readonly description?: string;
398
398
  };
399
399
 
400
+ /**
401
+ * A self-contained instruction bundle the underlying runtime can load into
402
+ * its context. Adapters decide how to surface skills to the runtime.
403
+ */
404
+ type HarnessV1Skill = {
405
+ /** Stable identifier for the skill (kebab-case slug). */
406
+ readonly name: string;
407
+ /**
408
+ * Short, model-facing description. This is what the runtime sees to
409
+ * decide whether the skill is relevant.
410
+ */
411
+ readonly description: string;
412
+ /** Full skill content the model loads when the skill is active. */
413
+ readonly content: string;
414
+ /**
415
+ * Additional files that belong to this skill. Adapters with native skill
416
+ * directories materialize these next to `SKILL.md`; adapters without native
417
+ * skill files include them with the skill content.
418
+ */
419
+ readonly files?: ReadonlyArray<HarnessV1SkillFile>;
420
+ };
421
+ type HarnessV1SkillFile = {
422
+ /**
423
+ * Skill-relative POSIX path, for example `reference.md` or
424
+ * `references/codes.md`. Absolute paths and `..` segments are rejected by
425
+ * adapters before writing.
426
+ */
427
+ readonly path: string;
428
+ /** UTF-8 text content for the file. */
429
+ readonly content: string;
430
+ };
431
+
432
+ /**
433
+ * Description of a host-defined tool that the harness should make available
434
+ * to the underlying agent runtime.
435
+ *
436
+ * Adapters translate this into whatever shape their runtime expects (e.g.
437
+ * Claude Code's tool definitions, Codex CLI's tool config, an MCP server
438
+ * exposed to the runtime, …). The adapter does not execute the tool; when
439
+ * the runtime calls it, the adapter emits a `tool-call` event and waits for
440
+ * `submitToolResult` from the caller.
441
+ */
442
+ type HarnessV1ToolSpec = {
443
+ /**
444
+ * Tool name the agent runtime sees. Must match the name on incoming
445
+ * `tool-call` events.
446
+ */
447
+ readonly name: string;
448
+ /**
449
+ * Human-readable description handed to the runtime, used to help the model
450
+ * decide when to call the tool.
451
+ */
452
+ readonly description?: string;
453
+ /**
454
+ * JSON Schema describing the expected input for the tool. Optional because
455
+ * some runtimes accept tools without schemas (free-form arguments).
456
+ */
457
+ readonly inputSchema?: JSONSchema7;
458
+ };
459
+
400
460
  type HarnessV1PendingToolApproval = {
401
461
  readonly approvalId: string;
402
462
  readonly toolCallId: string;
@@ -411,6 +471,38 @@ type HarnessV1PendingToolResult = {
411
471
  readonly toolName: string;
412
472
  readonly input: string;
413
473
  };
474
+ /**
475
+ * Framework-owned settings captured when a turn begins. The same settings are
476
+ * passed to fresh and continued turns and persisted with unfinished-turn state
477
+ * so a resumed continuation cannot pick up configuration from a later turn.
478
+ */
479
+ type HarnessV1TurnSettings = {
480
+ /**
481
+ * Model identifier selected for this turn. Adapters interpret this value
482
+ * according to the underlying harness runtime. Rerun-based continuations
483
+ * reuse it when reconstructing the turn.
484
+ */
485
+ readonly model?: string;
486
+ /**
487
+ * Skills made available to the underlying runtime for this turn. Adapters
488
+ * must replace skills from the preceding completed turn before starting a
489
+ * fresh turn. Rerun-based continuations use them to reconstruct the turn.
490
+ */
491
+ readonly skills: ReadonlyArray<HarnessV1Skill>;
492
+ /**
493
+ * Free-form instructions for this turn. Adapters should apply them through
494
+ * the runtime's native system or developer instruction mechanism when
495
+ * supported. Rerun-based continuations use them to reconstruct the turn.
496
+ */
497
+ readonly instructions?: string;
498
+ /**
499
+ * Host-defined tools made available to the underlying runtime for this turn.
500
+ * The harness emits `tool-call` events when the runtime calls one and waits
501
+ * for `submitToolResult`. Rerun-based continuations use them to reconstruct
502
+ * the turn.
503
+ */
504
+ readonly tools: ReadonlyArray<HarnessV1ToolSpec>;
505
+ };
414
506
  type HarnessV1LifecycleStateBase = {
415
507
  /**
416
508
  * Identifier of the harness that produced this state. Used by adapters to
@@ -458,40 +550,14 @@ type HarnessV1ContinueTurnState = HarnessV1LifecycleStateBase & {
458
550
  * result before the underlying turn can continue.
459
551
  */
460
552
  readonly pendingToolResults?: readonly HarnessV1PendingToolResult[];
461
- };
462
- type HarnessV1LifecycleState = HarnessV1ResumeSessionState | HarnessV1ContinueTurnState;
463
-
464
- /**
465
- * A self-contained instruction bundle the underlying runtime can load into
466
- * its context. Adapters decide how to surface skills to the runtime.
467
- */
468
- type HarnessV1Skill = {
469
- /** Stable identifier for the skill (kebab-case slug). */
470
- readonly name: string;
471
- /**
472
- * Short, model-facing description. This is what the runtime sees to
473
- * decide whether the skill is relevant.
474
- */
475
- readonly description: string;
476
- /** Full skill content the model loads when the skill is active. */
477
- readonly content: string;
478
- /**
479
- * Additional files that belong to this skill. Adapters with native skill
480
- * directories materialize these next to `SKILL.md`; adapters without native
481
- * skill files include them with the skill content.
482
- */
483
- readonly files?: ReadonlyArray<HarnessV1SkillFile>;
484
- };
485
- type HarnessV1SkillFile = {
486
553
  /**
487
- * Skill-relative POSIX path, for example `reference.md` or
488
- * `references/codes.md`. Absolute paths and `..` segments are rejected by
489
- * adapters before writing.
554
+ * Framework-owned settings captured when the unfinished turn began. They
555
+ * are persisted outside adapter data so a resumed continuation cannot pick
556
+ * up settings prepared for a later turn.
490
557
  */
491
- readonly path: string;
492
- /** UTF-8 text content for the file. */
493
- readonly content: string;
558
+ readonly turnSettings?: HarnessV1TurnSettings;
494
559
  };
560
+ type HarnessV1LifecycleState = HarnessV1ResumeSessionState | HarnessV1ContinueTurnState;
495
561
 
496
562
  /**
497
563
  * Warning emitted by a harness adapter during a call.
@@ -575,7 +641,13 @@ type HarnessV1StreamPart = {
575
641
  type: 'reasoning-end';
576
642
  id: string;
577
643
  harnessMetadata?: HarnessV1Metadata;
578
- } | (LanguageModelV4ToolCall & {
644
+ } | Extract<LanguageModelV4StreamPart, {
645
+ type: 'tool-input-start';
646
+ }> | Extract<LanguageModelV4StreamPart, {
647
+ type: 'tool-input-delta';
648
+ }> | Extract<LanguageModelV4StreamPart, {
649
+ type: 'tool-input-end';
650
+ }> | (LanguageModelV4ToolCall & {
579
651
  nativeName?: string;
580
652
  /**
581
653
  * Total tool calls in the current model step, when known before tool
@@ -741,6 +813,23 @@ declare const harnessV1StreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
741
813
  type: z.ZodLiteral<"reasoning-end">;
742
814
  id: z.ZodString;
743
815
  harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
816
+ }, z.core.$strip>, z.ZodObject<{
817
+ type: z.ZodLiteral<"tool-input-start">;
818
+ id: z.ZodString;
819
+ toolName: z.ZodString;
820
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
821
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
822
+ dynamic: z.ZodOptional<z.ZodBoolean>;
823
+ title: z.ZodOptional<z.ZodString>;
824
+ }, z.core.$strip>, z.ZodObject<{
825
+ type: z.ZodLiteral<"tool-input-delta">;
826
+ id: z.ZodString;
827
+ delta: z.ZodString;
828
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
829
+ }, z.core.$strip>, z.ZodObject<{
830
+ type: z.ZodLiteral<"tool-input-end">;
831
+ id: z.ZodString;
832
+ providerMetadata: z.ZodOptional<z.ZodType<SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<SharedV4ProviderMetadata, unknown>>>;
744
833
  }, z.core.$strip>, z.ZodObject<{
745
834
  type: z.ZodLiteral<"tool-call">;
746
835
  toolCallId: z.ZodString;
@@ -802,34 +891,6 @@ declare const harnessV1StreamPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
802
891
  rawValue: z.ZodUnknown;
803
892
  }, z.core.$strip>]>;
804
893
 
805
- /**
806
- * Description of a host-defined tool that the harness should make available
807
- * to the underlying agent runtime.
808
- *
809
- * Adapters translate this into whatever shape their runtime expects (e.g.
810
- * Claude Code's tool definitions, Codex CLI's tool config, an MCP server
811
- * exposed to the runtime, …). The adapter does not execute the tool; when
812
- * the runtime calls it, the adapter emits a `tool-call` event and waits for
813
- * `submitToolResult` from the caller.
814
- */
815
- type HarnessV1ToolSpec = {
816
- /**
817
- * Tool name the agent runtime sees. Must match the name on incoming
818
- * `tool-call` events.
819
- */
820
- readonly name: string;
821
- /**
822
- * Human-readable description handed to the runtime, used to help the model
823
- * decide when to call the tool.
824
- */
825
- readonly description?: string;
826
- /**
827
- * JSON Schema describing the expected input for the tool. Optional because
828
- * some runtimes accept tools without schemas (free-form arguments).
829
- */
830
- readonly inputSchema?: JSONSchema7;
831
- };
832
-
833
894
  type HarnessV1BuiltinToolFiltering = {
834
895
  mode: 'allow';
835
896
  toolNames: string[];
@@ -859,11 +920,6 @@ type HarnessV1StartOptions = {
859
920
  * (sandbox name, native session id, …).
860
921
  */
861
922
  readonly sessionId: string;
862
- /**
863
- * Skills made available to the underlying runtime for the lifetime of
864
- * the session. Adapters decide how to surface them.
865
- */
866
- readonly skills?: ReadonlyArray<HarnessV1Skill>;
867
923
  /**
868
924
  * Optional resume payload returned by a prior session lifecycle method. When
869
925
  * provided, the adapter should resume the existing session before accepting a
@@ -917,7 +973,7 @@ type HarnessV1StartOptions = {
917
973
  /**
918
974
  * Options passed to `HarnessV1Session.doPromptTurn`.
919
975
  */
920
- type HarnessV1PromptTurnOptions = {
976
+ type HarnessV1PromptTurnOptions = HarnessV1TurnSettings & {
921
977
  /**
922
978
  * Fresh input for this turn — either a plain string or a single
923
979
  * `ModelMessage`. The harness session owns its own conversation history,
@@ -929,20 +985,6 @@ type HarnessV1PromptTurnOptions = {
929
985
  * JSON response format must throw `HarnessCapabilityUnsupportedError`.
930
986
  */
931
987
  readonly responseFormat?: HarnessV1ResponseFormat;
932
- /**
933
- * Host-defined tools to make available to the underlying runtime for this
934
- * turn. The harness emits `tool-call` events when the runtime calls one
935
- * and waits for `submitToolResult`.
936
- */
937
- readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
938
- /**
939
- * Free-form instructions for the session. The framework supplies the same
940
- * value on every turn. Adapters should append it to the runtime's native
941
- * system or developer prompt when supported. Otherwise, they should prepend
942
- * it to the first user message of a fresh session and rely on the runtime's
943
- * persisted history when resuming.
944
- */
945
- readonly instructions?: string;
946
988
  /**
947
989
  * Signal that aborts the in-flight turn. The adapter must cancel any
948
990
  * underlying work and resolve `done` (with an error if appropriate).
@@ -963,24 +1005,12 @@ type HarnessV1PromptTurnOptions = {
963
1005
  * in-flight turn rather than starting a new one. It is used to continue a turn
964
1006
  * that was previously suspended temporarily, e.g. by the workflow slice loop.
965
1007
  */
966
- type HarnessV1ContinueTurnOptions = {
1008
+ type HarnessV1ContinueTurnOptions = HarnessV1TurnSettings & {
967
1009
  /**
968
1010
  * Response format of the in-flight turn. Rerun-based adapters use this when
969
1011
  * reconstructing the turn; attach-based adapters may ignore it.
970
1012
  */
971
1013
  readonly responseFormat?: HarnessV1ResponseFormat;
972
- /**
973
- * Host-defined tools to make available for the continued turn. Same shape
974
- * as `doPromptTurn`'s `tools`. An adapter that purely attaches to a live turn
975
- * may ignore them; an adapter that re-drives the turn (rerun) needs them.
976
- */
977
- readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
978
- /**
979
- * Free-form session instructions. An adapter that re-drives the runtime may
980
- * need these to reconstruct its native system or developer prompt. An
981
- * adapter that attaches to a live turn may ignore them.
982
- */
983
- readonly instructions?: string;
984
1014
  /**
985
1015
  * Signal that aborts the continued turn. The adapter must cancel any
986
1016
  * underlying work and resolve `done` (with an error if appropriate).
@@ -1011,13 +1041,6 @@ type HarnessV1Session = {
1011
1041
  * sessions report `false`; resumed sessions report `true`.
1012
1042
  */
1013
1043
  readonly isResume: boolean;
1014
- /**
1015
- * The model id the underlying runtime is configured to use, if the adapter
1016
- * knows it (e.g. from its settings). Surfaced into telemetry as
1017
- * `gen_ai.request.model` and the trace span labels. Omitted when the adapter
1018
- * defers to the runtime's own default and has no concrete id.
1019
- */
1020
- readonly modelId?: string;
1021
1044
  /**
1022
1045
  * Run one prompt turn. Returns a control handle the host uses to feed
1023
1046
  * tool results, approvals, and user messages back into the turn while it
@@ -1542,6 +1565,23 @@ declare const harnessV1BridgeOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Z
1542
1565
  type: z.ZodLiteral<"reasoning-end">;
1543
1566
  id: z.ZodString;
1544
1567
  harnessMetadata: z.ZodOptional<z.ZodType<HarnessV1Metadata, unknown, z.core.$ZodTypeInternals<HarnessV1Metadata, unknown>>>;
1568
+ }, z.core.$strip>, z.ZodObject<{
1569
+ type: z.ZodLiteral<"tool-input-start">;
1570
+ id: z.ZodString;
1571
+ toolName: z.ZodString;
1572
+ providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1573
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1574
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1575
+ title: z.ZodOptional<z.ZodString>;
1576
+ }, z.core.$strip>, z.ZodObject<{
1577
+ type: z.ZodLiteral<"tool-input-delta">;
1578
+ id: z.ZodString;
1579
+ delta: z.ZodString;
1580
+ providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1581
+ }, z.core.$strip>, z.ZodObject<{
1582
+ type: z.ZodLiteral<"tool-input-end">;
1583
+ id: z.ZodString;
1584
+ providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV4ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV4ProviderMetadata, unknown>>>;
1545
1585
  }, z.core.$strip>, z.ZodObject<{
1546
1586
  type: z.ZodLiteral<"tool-call">;
1547
1587
  toolCallId: z.ZodString;
@@ -1798,4 +1838,4 @@ declare class HarnessSandboxAuthenticationError extends HarnessError {
1798
1838
  static isInstance(error: unknown): error is HarnessSandboxAuthenticationError;
1799
1839
  }
1800
1840
 
1801
- export { type Experimental_HarnessV1BridgeUserMessageResponse, HARNESS_V1_BUILTIN_TOOLS, HARNESS_V1_BUILTIN_TOOL_NAMES, HarnessCapabilityUnsupportedError, HarnessError, HarnessSandboxAuthenticationError, type HarnessV1, type HarnessV1Authentication, type HarnessV1AuthenticationEnvironment, type HarnessV1Bootstrap, type HarnessV1BootstrapCommand, type HarnessV1BootstrapFile, type HarnessV1BridgeDebugEvent, type HarnessV1BridgeOutboundMessage, type HarnessV1BridgeReady, type HarnessV1BridgeSandboxLog, type HarnessV1BridgeToolWire, type HarnessV1BuiltinTool, type HarnessV1BuiltinToolFiltering, type HarnessV1BuiltinToolName, type HarnessV1BuiltinToolUseKind, type HarnessV1CallWarning, type HarnessV1ContinueTurnOptions, type HarnessV1ContinueTurnState, type HarnessV1CredentialForwarding, type HarnessV1DebugConfig, type HarnessV1DebugLevel, type HarnessV1Diagnostic, type HarnessV1JSONArray, type HarnessV1JSONObject, type HarnessV1JSONSchema, type HarnessV1JSONValue, type HarnessV1LifecycleState, type HarnessV1Metadata, type HarnessV1NetworkPolicy, type HarnessV1NetworkSandboxSession, type HarnessV1Observability, type HarnessV1PendingToolApproval, type HarnessV1PendingToolResult, type HarnessV1PermissionMode, type HarnessV1PortEndpoint, type HarnessV1Prompt, type HarnessV1PromptControl, type HarnessV1PromptTurnOptions, type HarnessV1RequestTransformation, type HarnessV1RequestTransformationSources, type HarnessV1ResponseFormat, type HarnessV1ResumeSessionState, type HarnessV1SandboxProvider, type HarnessV1Session, type HarnessV1Skill, type HarnessV1StartOptions, type HarnessV1StreamPart, type HarnessV1ToolSpec, commonTool, experimental_harnessV1BridgeUserMessageInboundSchema, experimental_harnessV1BridgeUserMessageResponseSchema, getHarnessV1BuiltinToolFilteringDenialReason, harnessV1BridgeAbortInboundSchema, harnessV1BridgeBuiltinToolFilteringSchema, harnessV1BridgeDebugEventSchema, harnessV1BridgeDestroyInboundSchema, harnessV1BridgeHelloSchema, harnessV1BridgeInboundCommandSchemas, harnessV1BridgeOutboundMessageSchema, harnessV1BridgePermissionModeSchema, harnessV1BridgeReadySchema, harnessV1BridgeResponseFormatSchema, harnessV1BridgeResumeInboundSchema, harnessV1BridgeSandboxLogSchema, harnessV1BridgeStartBaseSchema, harnessV1BridgeStopInboundSchema, harnessV1BridgeStopSchema, harnessV1BridgeThreadSchema, harnessV1BridgeToolApprovalResponseInboundSchema, harnessV1BridgeToolResultInboundSchema, harnessV1BridgeToolWireSchema, harnessV1BridgeUserMessageInboundSchema, harnessV1DebugConfigSchema, harnessV1DebugLevelSchema, harnessV1DiagnosticFromBridgeFrame, harnessV1ErrorPartSchema, harnessV1FileChangePartSchema, harnessV1FinishPartSchema, harnessV1FinishStepPartSchema, harnessV1RawPartSchema, harnessV1ReasoningDeltaPartSchema, harnessV1ReasoningEndPartSchema, harnessV1ReasoningStartPartSchema, harnessV1StreamPartSchema, harnessV1StreamStartPartSchema, harnessV1TextDeltaPartSchema, harnessV1TextEndPartSchema, harnessV1TextStartPartSchema, harnessV1ToolApprovalRequestPartSchema, harnessV1ToolCallPartSchema, harnessV1ToolResultPartSchema, isHarnessV1BuiltinToolIncluded };
1841
+ export { type Experimental_HarnessV1BridgeUserMessageResponse, HARNESS_V1_BUILTIN_TOOLS, HARNESS_V1_BUILTIN_TOOL_NAMES, HarnessCapabilityUnsupportedError, HarnessError, HarnessSandboxAuthenticationError, type HarnessV1, type HarnessV1Authentication, type HarnessV1AuthenticationEnvironment, type HarnessV1Bootstrap, type HarnessV1BootstrapCommand, type HarnessV1BootstrapFile, type HarnessV1BridgeDebugEvent, type HarnessV1BridgeOutboundMessage, type HarnessV1BridgeReady, type HarnessV1BridgeSandboxLog, type HarnessV1BridgeToolWire, type HarnessV1BuiltinTool, type HarnessV1BuiltinToolFiltering, type HarnessV1BuiltinToolName, type HarnessV1BuiltinToolUseKind, type HarnessV1CallWarning, type HarnessV1ContinueTurnOptions, type HarnessV1ContinueTurnState, type HarnessV1CredentialForwarding, type HarnessV1DebugConfig, type HarnessV1DebugLevel, type HarnessV1Diagnostic, type HarnessV1JSONArray, type HarnessV1JSONObject, type HarnessV1JSONSchema, type HarnessV1JSONValue, type HarnessV1LifecycleState, type HarnessV1Metadata, type HarnessV1NetworkPolicy, type HarnessV1NetworkSandboxSession, type HarnessV1Observability, type HarnessV1PendingToolApproval, type HarnessV1PendingToolResult, type HarnessV1PermissionMode, type HarnessV1PortEndpoint, type HarnessV1Prompt, type HarnessV1PromptControl, type HarnessV1PromptTurnOptions, type HarnessV1RequestTransformation, type HarnessV1RequestTransformationSources, type HarnessV1ResponseFormat, type HarnessV1ResumeSessionState, type HarnessV1SandboxProvider, type HarnessV1Session, type HarnessV1Skill, type HarnessV1StartOptions, type HarnessV1StreamPart, type HarnessV1ToolSpec, type HarnessV1TurnSettings, commonTool, experimental_harnessV1BridgeUserMessageInboundSchema, experimental_harnessV1BridgeUserMessageResponseSchema, getHarnessV1BuiltinToolFilteringDenialReason, harnessV1BridgeAbortInboundSchema, harnessV1BridgeBuiltinToolFilteringSchema, harnessV1BridgeDebugEventSchema, harnessV1BridgeDestroyInboundSchema, harnessV1BridgeHelloSchema, harnessV1BridgeInboundCommandSchemas, harnessV1BridgeOutboundMessageSchema, harnessV1BridgePermissionModeSchema, harnessV1BridgeReadySchema, harnessV1BridgeResponseFormatSchema, harnessV1BridgeResumeInboundSchema, harnessV1BridgeSandboxLogSchema, harnessV1BridgeStartBaseSchema, harnessV1BridgeStopInboundSchema, harnessV1BridgeStopSchema, harnessV1BridgeThreadSchema, harnessV1BridgeToolApprovalResponseInboundSchema, harnessV1BridgeToolResultInboundSchema, harnessV1BridgeToolWireSchema, harnessV1BridgeUserMessageInboundSchema, harnessV1DebugConfigSchema, harnessV1DebugLevelSchema, harnessV1DiagnosticFromBridgeFrame, harnessV1ErrorPartSchema, harnessV1FileChangePartSchema, harnessV1FinishPartSchema, harnessV1FinishStepPartSchema, harnessV1RawPartSchema, harnessV1ReasoningDeltaPartSchema, harnessV1ReasoningEndPartSchema, harnessV1ReasoningStartPartSchema, harnessV1StreamPartSchema, harnessV1StreamStartPartSchema, harnessV1TextDeltaPartSchema, harnessV1TextEndPartSchema, harnessV1TextStartPartSchema, harnessV1ToolApprovalRequestPartSchema, harnessV1ToolCallPartSchema, harnessV1ToolResultPartSchema, isHarnessV1BuiltinToolIncluded };
package/dist/index.js CHANGED
@@ -157,6 +157,26 @@ var harnessV1ReasoningEndPartSchema = z2.object({
157
157
  id: z2.string(),
158
158
  harnessMetadata: harnessV1MetadataSchema.optional()
159
159
  });
160
+ var harnessV1ToolInputStartPartSchema = z2.object({
161
+ type: z2.literal("tool-input-start"),
162
+ id: z2.string(),
163
+ toolName: z2.string(),
164
+ providerMetadata: harnessV1ProviderMetadataSchema.optional(),
165
+ providerExecuted: z2.boolean().optional(),
166
+ dynamic: z2.boolean().optional(),
167
+ title: z2.string().optional()
168
+ });
169
+ var harnessV1ToolInputDeltaPartSchema = z2.object({
170
+ type: z2.literal("tool-input-delta"),
171
+ id: z2.string(),
172
+ delta: z2.string(),
173
+ providerMetadata: harnessV1ProviderMetadataSchema.optional()
174
+ });
175
+ var harnessV1ToolInputEndPartSchema = z2.object({
176
+ type: z2.literal("tool-input-end"),
177
+ id: z2.string(),
178
+ providerMetadata: harnessV1ProviderMetadataSchema.optional()
179
+ });
160
180
  var harnessV1ToolCallPartSchema = z2.object({
161
181
  type: z2.literal("tool-call"),
162
182
  toolCallId: z2.string(),
@@ -226,6 +246,9 @@ var harnessV1StreamPartSchema = z2.discriminatedUnion("type", [
226
246
  harnessV1ReasoningStartPartSchema,
227
247
  harnessV1ReasoningDeltaPartSchema,
228
248
  harnessV1ReasoningEndPartSchema,
249
+ harnessV1ToolInputStartPartSchema,
250
+ harnessV1ToolInputDeltaPartSchema,
251
+ harnessV1ToolInputEndPartSchema,
229
252
  harnessV1ToolCallPartSchema,
230
253
  harnessV1ToolApprovalRequestPartSchema,
231
254
  harnessV1ToolResultPartSchema,
@@ -348,6 +371,9 @@ var harnessV1BridgeOutboundMessageSchema = z4.discriminatedUnion(
348
371
  harnessV1ReasoningStartPartSchema,
349
372
  harnessV1ReasoningDeltaPartSchema,
350
373
  harnessV1ReasoningEndPartSchema,
374
+ harnessV1ToolInputStartPartSchema,
375
+ harnessV1ToolInputDeltaPartSchema,
376
+ harnessV1ToolInputEndPartSchema,
351
377
  harnessV1ToolCallPartSchema,
352
378
  harnessV1ToolApprovalRequestPartSchema,
353
379
  harnessV1ToolResultPartSchema,