@ai-sdk/harness-pi 1.0.74 → 1.0.76

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/harness-pi",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -30,7 +30,7 @@
30
30
  "@earendil-works/pi-coding-agent": "^0.80.10",
31
31
  "pi-mcp-adapter": "2.12.1",
32
32
  "typebox": "^1.1.38",
33
- "@ai-sdk/harness": "1.0.72",
33
+ "@ai-sdk/harness": "1.0.74",
34
34
  "@ai-sdk/provider-utils": "5.0.27"
35
35
  },
36
36
  "peerDependencies": {
@@ -41,7 +41,7 @@
41
41
  "tsup": "^8.5.1",
42
42
  "typescript": "5.8.3",
43
43
  "zod": "3.25.76",
44
- "@ai-sdk/sandbox-just-bash": "1.0.72",
44
+ "@ai-sdk/sandbox-just-bash": "1.0.74",
45
45
  "@vercel/ai-tsconfig": "0.0.0"
46
46
  },
47
47
  "engines": {
package/src/pi-session.ts CHANGED
@@ -17,6 +17,7 @@ import { tmpdir } from 'node:os';
17
17
  import path from 'node:path';
18
18
  import { Type } from 'typebox';
19
19
  import {
20
+ HarnessCapabilityUnsupportedError,
20
21
  type HarnessV1BuiltinToolFiltering,
21
22
  type HarnessV1ContinueTurnOptions,
22
23
  type HarnessV1ContinueTurnState,
@@ -1311,6 +1312,12 @@ export async function createPiSession(
1311
1312
  doPromptTurn: async (
1312
1313
  promptOpts: HarnessV1PromptTurnOptions,
1313
1314
  ): Promise<HarnessV1PromptControl> => {
1315
+ if (promptOpts.responseFormat?.type === 'json') {
1316
+ throw new HarnessCapabilityUnsupportedError({
1317
+ message: "Harness 'pi' does not support structured output.",
1318
+ harnessId: HARNESS_ID,
1319
+ });
1320
+ }
1314
1321
  return runTurn({
1315
1322
  text: extractUserText(promptOpts.prompt),
1316
1323
  tools: promptOpts.tools ?? [],
@@ -1323,6 +1330,12 @@ export async function createPiSession(
1323
1330
  doContinueTurn: async (
1324
1331
  continueOpts: HarnessV1ContinueTurnOptions,
1325
1332
  ): Promise<HarnessV1PromptControl> => {
1333
+ if (continueOpts.responseFormat?.type === 'json') {
1334
+ throw new HarnessCapabilityUnsupportedError({
1335
+ message: "Harness 'pi' does not support structured output.",
1336
+ harnessId: HARNESS_ID,
1337
+ });
1338
+ }
1326
1339
  if (activeTurn != null) {
1327
1340
  currentEmit = continueOpts.emit;
1328
1341
  return createPromptControl({