@ai-sdk/harness-pi 1.0.74 → 1.0.75

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,14 @@
1
1
  # @ai-sdk/harness-pi
2
2
 
3
+ ## 1.0.75
4
+
5
+ ### Patch Changes
6
+
7
+ - 62a9c2a: feat(harness): add support for structured output to `HarnessAgent` via `output` property
8
+ - Updated dependencies [62a9c2a]
9
+ - Updated dependencies [d25cae2]
10
+ - @ai-sdk/harness@1.0.73
11
+
3
12
  ## 1.0.74
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -116,13 +116,16 @@ import { mkdir as mkdir3, rm as rm2 } from "fs/promises";
116
116
  import { tmpdir } from "os";
117
117
  import path7 from "path";
118
118
  import { Type as Type2 } from "typebox";
119
+ import {
120
+ HarnessCapabilityUnsupportedError as HarnessCapabilityUnsupportedError2
121
+ } from "@ai-sdk/harness";
119
122
  import { resolveSandboxHomeDir } from "@ai-sdk/harness/utils";
120
123
 
121
124
  // src/pi-auth.ts
122
125
  import { getAiGatewayAuthFromEnv } from "@ai-sdk/harness/utils";
123
126
 
124
127
  // src/version.ts
125
- var VERSION = true ? "1.0.74" : "0.0.0-test";
128
+ var VERSION = true ? "1.0.75" : "0.0.0-test";
126
129
 
127
130
  // src/pi-auth.ts
128
131
  var DEFAULT_GATEWAY_BASE_URL = "https://ai-gateway.vercel.sh";
@@ -2574,6 +2577,12 @@ async function createPiSession(input) {
2574
2577
  // only resume path is restoring the session file on a fresh/snapshotted
2575
2578
  // sandbox, i.e. `rerun`.
2576
2579
  doPromptTurn: async (promptOpts) => {
2580
+ if (promptOpts.responseFormat?.type === "json") {
2581
+ throw new HarnessCapabilityUnsupportedError2({
2582
+ message: "Harness 'pi' does not support structured output.",
2583
+ harnessId: HARNESS_ID2
2584
+ });
2585
+ }
2577
2586
  return runTurn({
2578
2587
  text: extractUserText(promptOpts.prompt),
2579
2588
  tools: promptOpts.tools ?? [],
@@ -2583,6 +2592,12 @@ async function createPiSession(input) {
2583
2592
  });
2584
2593
  },
2585
2594
  doContinueTurn: async (continueOpts) => {
2595
+ if (continueOpts.responseFormat?.type === "json") {
2596
+ throw new HarnessCapabilityUnsupportedError2({
2597
+ message: "Harness 'pi' does not support structured output.",
2598
+ harnessId: HARNESS_ID2
2599
+ });
2600
+ }
2586
2601
  if (activeTurn != null) {
2587
2602
  currentEmit = continueOpts.emit;
2588
2603
  return createPromptControl({