@ai-sdk/harness 1.0.92 → 1.0.93

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.
@@ -8,10 +8,9 @@ import type { HarnessV1ResponseFormat } from './harness-v1-response-format';
8
8
  import type {
9
9
  HarnessV1ContinueTurnState,
10
10
  HarnessV1ResumeSessionState,
11
+ HarnessV1TurnSettings,
11
12
  } from './harness-v1-lifecycle-state';
12
- import type { HarnessV1Skill } from './harness-v1-skill';
13
13
  import type { HarnessV1StreamPart } from './harness-v1-stream-part';
14
- import type { HarnessV1ToolSpec } from './harness-v1-tool-spec';
15
14
  import type { HarnessV1BuiltinToolFiltering } from './harness-v1-tool-filtering';
16
15
 
17
16
  /**
@@ -22,6 +21,12 @@ import type { HarnessV1BuiltinToolFiltering } from './harness-v1-tool-filtering'
22
21
  * calling the adapter, so adapters never need to derive provider-specific paths.
23
22
  */
24
23
  export type HarnessV1StartOptions = {
24
+ /**
25
+ * Model identifier selected by the consumer. Adapters interpret this value
26
+ * according to the underlying harness runtime.
27
+ */
28
+ readonly model?: string;
29
+
25
30
  /**
26
31
  * Stable identifier for this harness session. Used as the underlying
27
32
  * resource name where the adapter has a notion of a named session
@@ -29,12 +34,6 @@ export type HarnessV1StartOptions = {
29
34
  */
30
35
  readonly sessionId: string;
31
36
 
32
- /**
33
- * Skills made available to the underlying runtime for the lifetime of
34
- * the session. Adapters decide how to surface them.
35
- */
36
- readonly skills?: ReadonlyArray<HarnessV1Skill>;
37
-
38
37
  /**
39
38
  * Optional resume payload returned by a prior session lifecycle method. When
40
39
  * provided, the adapter should resume the existing session before accepting a
@@ -95,7 +94,7 @@ export type HarnessV1StartOptions = {
95
94
  /**
96
95
  * Options passed to `HarnessV1Session.doPromptTurn`.
97
96
  */
98
- export type HarnessV1PromptTurnOptions = {
97
+ export type HarnessV1PromptTurnOptions = HarnessV1TurnSettings & {
99
98
  /**
100
99
  * Fresh input for this turn — either a plain string or a single
101
100
  * `ModelMessage`. The harness session owns its own conversation history,
@@ -109,22 +108,6 @@ export type HarnessV1PromptTurnOptions = {
109
108
  */
110
109
  readonly responseFormat?: HarnessV1ResponseFormat;
111
110
 
112
- /**
113
- * Host-defined tools to make available to the underlying runtime for this
114
- * turn. The harness emits `tool-call` events when the runtime calls one
115
- * and waits for `submitToolResult`.
116
- */
117
- readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
118
-
119
- /**
120
- * Free-form instructions for the session. The framework supplies the same
121
- * value on every turn. Adapters should append it to the runtime's native
122
- * system or developer prompt when supported. Otherwise, they should prepend
123
- * it to the first user message of a fresh session and rely on the runtime's
124
- * persisted history when resuming.
125
- */
126
- readonly instructions?: string;
127
-
128
111
  /**
129
112
  * Signal that aborts the in-flight turn. The adapter must cancel any
130
113
  * underlying work and resolve `done` (with an error if appropriate).
@@ -147,27 +130,13 @@ export type HarnessV1PromptTurnOptions = {
147
130
  * in-flight turn rather than starting a new one. It is used to continue a turn
148
131
  * that was previously suspended temporarily, e.g. by the workflow slice loop.
149
132
  */
150
- export type HarnessV1ContinueTurnOptions = {
133
+ export type HarnessV1ContinueTurnOptions = HarnessV1TurnSettings & {
151
134
  /**
152
135
  * Response format of the in-flight turn. Rerun-based adapters use this when
153
136
  * reconstructing the turn; attach-based adapters may ignore it.
154
137
  */
155
138
  readonly responseFormat?: HarnessV1ResponseFormat;
156
139
 
157
- /**
158
- * Host-defined tools to make available for the continued turn. Same shape
159
- * as `doPromptTurn`'s `tools`. An adapter that purely attaches to a live turn
160
- * may ignore them; an adapter that re-drives the turn (rerun) needs them.
161
- */
162
- readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
163
-
164
- /**
165
- * Free-form session instructions. An adapter that re-drives the runtime may
166
- * need these to reconstruct its native system or developer prompt. An
167
- * adapter that attaches to a live turn may ignore them.
168
- */
169
- readonly instructions?: string;
170
-
171
140
  /**
172
141
  * Signal that aborts the continued turn. The adapter must cancel any
173
142
  * underlying work and resolve `done` (with an error if appropriate).
package/src/v1/index.ts CHANGED
@@ -44,6 +44,7 @@ export type {
44
44
  HarnessV1PendingToolApproval,
45
45
  HarnessV1PendingToolResult,
46
46
  HarnessV1ResumeSessionState,
47
+ HarnessV1TurnSettings,
47
48
  } from './harness-v1-lifecycle-state';
48
49
  export type {
49
50
  HarnessV1NetworkPolicy,