@ai-sdk/harness 1.0.65 → 1.0.66
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 +8 -0
- package/dist/agent/index.d.ts +13 -7
- package/dist/agent/index.js +1 -0
- package/dist/agent/index.js.map +1 -1
- package/dist/index.d.ts +10 -4
- package/package.json +3 -3
- package/src/agent/harness-agent-settings.ts +3 -3
- package/src/agent/internal/run-prompt.ts +2 -1
- package/src/v1/harness-v1-session.ts +11 -4
package/dist/index.d.ts
CHANGED
|
@@ -820,10 +820,10 @@ type HarnessV1PromptTurnOptions = {
|
|
|
820
820
|
readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
|
|
821
821
|
/**
|
|
822
822
|
* Free-form instructions for the session. The framework supplies the same
|
|
823
|
-
* value on every turn
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
823
|
+
* value on every turn. Adapters should append it to the runtime's native
|
|
824
|
+
* system or developer prompt when supported. Otherwise, they should prepend
|
|
825
|
+
* it to the first user message of a fresh session and rely on the runtime's
|
|
826
|
+
* persisted history when resuming.
|
|
827
827
|
*/
|
|
828
828
|
readonly instructions?: string;
|
|
829
829
|
/**
|
|
@@ -853,6 +853,12 @@ type HarnessV1ContinueTurnOptions = {
|
|
|
853
853
|
* may ignore them; an adapter that re-drives the turn (rerun) needs them.
|
|
854
854
|
*/
|
|
855
855
|
readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
|
|
856
|
+
/**
|
|
857
|
+
* Free-form session instructions. An adapter that re-drives the runtime may
|
|
858
|
+
* need these to reconstruct its native system or developer prompt. An
|
|
859
|
+
* adapter that attaches to a live turn may ignore them.
|
|
860
|
+
*/
|
|
861
|
+
readonly instructions?: string;
|
|
856
862
|
/**
|
|
857
863
|
* Signal that aborts the continued turn. The adapter must cancel any
|
|
858
864
|
* underlying work and resolve `done` (with an error if appropriate).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/harness",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@ai-sdk/provider": "4.0.7",
|
|
48
48
|
"@ai-sdk/provider-utils": "5.0.26",
|
|
49
|
-
"ai": "7.0.
|
|
49
|
+
"ai": "7.0.60"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"ws": "^8.21.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"typescript": "5.8.3",
|
|
66
66
|
"ws": "^8.21.0",
|
|
67
67
|
"zod": "3.25.76",
|
|
68
|
-
"@ai-sdk/otel": "1.0.
|
|
68
|
+
"@ai-sdk/otel": "1.0.60",
|
|
69
69
|
"@vercel/ai-tsconfig": "0.0.0"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
@@ -132,9 +132,9 @@ export type HarnessAgentSettings<
|
|
|
132
132
|
readonly skills?: ReadonlyArray<HarnessAgentSkill>;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* Instructions for the underlying agent runtime. Adapters
|
|
136
|
-
*
|
|
137
|
-
*
|
|
135
|
+
* Instructions for the underlying agent runtime. Adapters append this to a
|
|
136
|
+
* native system or developer prompt when supported. Otherwise, they prepend
|
|
137
|
+
* it to the first user message of a fresh session.
|
|
138
138
|
*/
|
|
139
139
|
readonly instructions?: string;
|
|
140
140
|
|
|
@@ -72,7 +72,7 @@ export function runPrompt<
|
|
|
72
72
|
/**
|
|
73
73
|
* Turn entry point. `'prompt'` (default) starts a new turn from `prompt`;
|
|
74
74
|
* `'continue'` continues the in-flight turn via `doContinueTurn` and ignores
|
|
75
|
-
* `prompt
|
|
75
|
+
* `prompt`.
|
|
76
76
|
*/
|
|
77
77
|
mode?: 'prompt' | 'continue';
|
|
78
78
|
/** Required for `mode: 'prompt'`; absent for `mode: 'continue'`. */
|
|
@@ -173,6 +173,7 @@ export function runPrompt<
|
|
|
173
173
|
? emit =>
|
|
174
174
|
input.session.doContinueTurn({
|
|
175
175
|
tools: input.toolSpecs,
|
|
176
|
+
instructions: input.instructions,
|
|
176
177
|
abortSignal: input.abortSignal,
|
|
177
178
|
emit,
|
|
178
179
|
})
|
|
@@ -112,10 +112,10 @@ export type HarnessV1PromptTurnOptions = {
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Free-form instructions for the session. The framework supplies the same
|
|
115
|
-
* value on every turn
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
115
|
+
* value on every turn. Adapters should append it to the runtime's native
|
|
116
|
+
* system or developer prompt when supported. Otherwise, they should prepend
|
|
117
|
+
* it to the first user message of a fresh session and rely on the runtime's
|
|
118
|
+
* persisted history when resuming.
|
|
119
119
|
*/
|
|
120
120
|
readonly instructions?: string;
|
|
121
121
|
|
|
@@ -149,6 +149,13 @@ export type HarnessV1ContinueTurnOptions = {
|
|
|
149
149
|
*/
|
|
150
150
|
readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Free-form session instructions. An adapter that re-drives the runtime may
|
|
154
|
+
* need these to reconstruct its native system or developer prompt. An
|
|
155
|
+
* adapter that attaches to a live turn may ignore them.
|
|
156
|
+
*/
|
|
157
|
+
readonly instructions?: string;
|
|
158
|
+
|
|
152
159
|
/**
|
|
153
160
|
* Signal that aborts the continued turn. The adapter must cancel any
|
|
154
161
|
* underlying work and resolve `done` (with an error if appropriate).
|