@ai-sdk/harness 1.0.64 → 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 +17 -0
- package/dist/agent/index.d.ts +13 -7
- package/dist/agent/index.js +2 -0
- package/dist/agent/index.js.map +1 -1
- package/dist/index.d.ts +10 -4
- package/package.json +4 -4
- package/src/agent/harness-agent-settings.ts +3 -3
- package/src/agent/internal/run-prompt.ts +2 -1
- package/src/agent/internal/translate-stream-part.ts +1 -0
- package/src/v1/harness-v1-session.ts +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @ai-sdk/harness
|
|
2
2
|
|
|
3
|
+
## 1.0.66
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9ee30bf: fix(harness): pass instructions appended to system / developer prompt instead of using the workaround of first user prompt
|
|
8
|
+
- Updated dependencies [79c52ef]
|
|
9
|
+
- ai@7.0.60
|
|
10
|
+
|
|
11
|
+
## 1.0.65
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- a03ff6c: feat(harness): add support for per-harness MCP servers
|
|
16
|
+
- Updated dependencies [401a4ba]
|
|
17
|
+
- @ai-sdk/provider-utils@5.0.26
|
|
18
|
+
- ai@7.0.59
|
|
19
|
+
|
|
3
20
|
## 1.0.64
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -694,10 +694,10 @@ type HarnessV1PromptTurnOptions = {
|
|
|
694
694
|
readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
|
|
695
695
|
/**
|
|
696
696
|
* Free-form instructions for the session. The framework supplies the same
|
|
697
|
-
* value on every turn
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
697
|
+
* value on every turn. Adapters should append it to the runtime's native
|
|
698
|
+
* system or developer prompt when supported. Otherwise, they should prepend
|
|
699
|
+
* it to the first user message of a fresh session and rely on the runtime's
|
|
700
|
+
* persisted history when resuming.
|
|
701
701
|
*/
|
|
702
702
|
readonly instructions?: string;
|
|
703
703
|
/**
|
|
@@ -727,6 +727,12 @@ type HarnessV1ContinueTurnOptions = {
|
|
|
727
727
|
* may ignore them; an adapter that re-drives the turn (rerun) needs them.
|
|
728
728
|
*/
|
|
729
729
|
readonly tools?: ReadonlyArray<HarnessV1ToolSpec>;
|
|
730
|
+
/**
|
|
731
|
+
* Free-form session instructions. An adapter that re-drives the runtime may
|
|
732
|
+
* need these to reconstruct its native system or developer prompt. An
|
|
733
|
+
* adapter that attaches to a live turn may ignore them.
|
|
734
|
+
*/
|
|
735
|
+
readonly instructions?: string;
|
|
730
736
|
/**
|
|
731
737
|
* Signal that aborts the continued turn. The adapter must cancel any
|
|
732
738
|
* underlying work and resolve `done` (with an error if appropriate).
|
|
@@ -1180,9 +1186,9 @@ type HarnessAgentSettings<THarness extends HarnessAgentAdapter<any> = HarnessAge
|
|
|
1180
1186
|
*/
|
|
1181
1187
|
readonly skills?: ReadonlyArray<HarnessAgentSkill>;
|
|
1182
1188
|
/**
|
|
1183
|
-
* Instructions for the underlying agent runtime. Adapters
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1189
|
+
* Instructions for the underlying agent runtime. Adapters append this to a
|
|
1190
|
+
* native system or developer prompt when supported. Otherwise, they prepend
|
|
1191
|
+
* it to the first user message of a fresh session.
|
|
1186
1192
|
*/
|
|
1187
1193
|
readonly instructions?: string;
|
|
1188
1194
|
/**
|
package/dist/agent/index.js
CHANGED
|
@@ -812,6 +812,7 @@ function translateStreamPart(event) {
|
|
|
812
812
|
input: void 0,
|
|
813
813
|
output: event.result,
|
|
814
814
|
...event.preliminary !== void 0 ? { preliminary: event.preliminary } : {},
|
|
815
|
+
...event.dynamic !== void 0 ? { dynamic: event.dynamic } : {},
|
|
815
816
|
...event.providerMetadata !== void 0 ? { providerMetadata: event.providerMetadata } : {}
|
|
816
817
|
}
|
|
817
818
|
];
|
|
@@ -1413,6 +1414,7 @@ function runPrompt(input) {
|
|
|
1413
1414
|
bridge = await toHarnessStream({
|
|
1414
1415
|
invoke: input.mode === "continue" ? (emit) => input.session.doContinueTurn({
|
|
1415
1416
|
tools: input.toolSpecs,
|
|
1417
|
+
instructions: input.instructions,
|
|
1416
1418
|
abortSignal: input.abortSignal,
|
|
1417
1419
|
emit
|
|
1418
1420
|
}) : (emit) => {
|