@poncho-ai/harness 0.51.0 → 0.52.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/harness@0.51.0 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
2
+ > @poncho-ai/harness@0.52.0 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
3
3
  > node scripts/embed-docs.js && tsup src/index.ts --format esm --dts
4
4
 
5
5
  [embed-docs] Generated poncho-docs.ts with 4 topics
@@ -8,9 +8,9 @@
8
8
  CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
- ESM dist/index.js 535.65 KB
11
+ ESM dist/index.js 536.18 KB
12
12
  ESM dist/isolate-F2PPSUL6.js 53.82 KB
13
- ESM ⚡️ Build success in 264ms
13
+ ESM ⚡️ Build success in 234ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 7640ms
16
- DTS dist/index.d.ts 91.35 KB
15
+ DTS ⚡️ Build success in 7615ms
16
+ DTS dist/index.d.ts 92.18 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @poncho-ai/harness
2
2
 
3
+ ## 0.52.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d8453b4`](https://github.com/cesr/poncho-ai/commit/d8453b4f2360a1734e448960fe52f6c450cdf842) Thanks [@cesr](https://github.com/cesr)! - harness: propagate `suppressTelemetry` to subagents.
8
+
9
+ A telemetry-off run (e.g. incognito) now suppresses telemetry for the subagents it spawns too, not just the parent turn. The parent run's `suppressTelemetry` is exposed on `ToolContext`, captured by `spawn_subagent` into the new `SubagentManager.spawn({ suppressTelemetry })` option, stored on the subagent conversation's `subagentMeta`, and read back by the orchestrator's `runSubagent` / continuation so the child run (and its re-runs) emit no `invoke_agent` / `execute_tool` / AI-SDK spans.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`d8453b4`](https://github.com/cesr/poncho-ai/commit/d8453b4f2360a1734e448960fe52f6c450cdf842)]:
14
+ - @poncho-ai/sdk@1.14.0
15
+
16
+ ## 0.51.1
17
+
18
+ ### Patch Changes
19
+
20
+ - [`3c72a7f`](https://github.com/cesr/poncho-ai/commit/3c72a7f0861dbe2c623931e3a08e1a89a14554b1) Thanks [@cesr](https://github.com/cesr)! - harness: forward `suppressTelemetry` through `runConversationTurn` and `continueFromToolResult`.
21
+
22
+ `RunConversationTurnOpts` and `continueFromToolResult`'s input now carry `suppressTelemetry`, passed into the run input (alongside the existing `disablePromptCache` passthrough). Hosts driving turns through these helpers (rather than calling `runWithTelemetry` directly) can now suppress telemetry per turn and per approval-resume — the missing piece for serving telemetry-off (incognito) turns and their continuations from a single shared harness.
23
+
3
24
  ## 0.51.0
4
25
 
5
26
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -195,6 +195,10 @@ interface Conversation {
195
195
  status: "running" | "completed" | "error" | "stopped";
196
196
  result?: _poncho_ai_sdk.RunResult;
197
197
  error?: _poncho_ai_sdk.AgentFailure;
198
+ /** Inherited from the parent run at spawn time — when true, this
199
+ * subagent's runs emit no telemetry (e.g. spawned from an incognito
200
+ * turn). Read by the orchestrator's runSubagent / continuation. */
201
+ suppressTelemetry?: boolean;
198
202
  };
199
203
  channelMeta?: {
200
204
  platform: string;
@@ -1178,6 +1182,9 @@ interface SubagentManager {
1178
1182
  parentConversationId: string;
1179
1183
  ownerId: string;
1180
1184
  tenantId?: string | null;
1185
+ /** Inherit the parent run's telemetry choice — when true, the subagent
1186
+ * run (and its re-runs) emit no telemetry. */
1187
+ suppressTelemetry?: boolean;
1181
1188
  }): Promise<SubagentSpawnResult>;
1182
1189
  sendMessage(subagentId: string, message: string): Promise<SubagentSpawnResult>;
1183
1190
  stop(subagentId: string): Promise<void>;
@@ -1450,6 +1457,9 @@ declare class AgentHarness {
1450
1457
  tenantId?: string;
1451
1458
  parameters?: Record<string, unknown>;
1452
1459
  abortSignal?: AbortSignal;
1460
+ /** Emit no telemetry for the continuation run (e.g. resuming an
1461
+ * incognito turn after an approval). */
1462
+ suppressTelemetry?: boolean;
1453
1463
  }): AsyncGenerator<AgentEvent>;
1454
1464
  runToCompletion(input: RunInput): Promise<HarnessRunOutput>;
1455
1465
  }
@@ -2162,6 +2172,12 @@ interface RunConversationTurnOpts {
2162
2172
  * harness skips the Anthropic cache write.
2163
2173
  */
2164
2174
  disablePromptCache?: boolean;
2175
+ /**
2176
+ * Forwarded to `RunInput.suppressTelemetry`. Set true to emit no telemetry
2177
+ * for this run (e.g. an incognito / telemetry-off turn) even on a harness
2178
+ * built with an OTLP exporter attached.
2179
+ */
2180
+ suppressTelemetry?: boolean;
2165
2181
  /** Per-event hook — called for every AgentEvent yielded by the run, in order. */
2166
2182
  onEvent?: (event: AgentEvent) => void | Promise<void>;
2167
2183
  }
package/dist/index.js CHANGED
@@ -8299,7 +8299,8 @@ var createSubagentTools = (manager) => [
8299
8299
  task: task.trim(),
8300
8300
  parentConversationId: conversationId,
8301
8301
  ownerId,
8302
- tenantId: context.tenantId
8302
+ tenantId: context.tenantId,
8303
+ suppressTelemetry: context.suppressTelemetry
8303
8304
  });
8304
8305
  return { subagentId, status: "running" };
8305
8306
  }
@@ -11132,6 +11133,7 @@ ${textContent}` };
11132
11133
  abortSignal: input.abortSignal,
11133
11134
  conversationId: input.conversationId,
11134
11135
  tenantId: input.tenantId,
11136
+ suppressTelemetry: input.suppressTelemetry,
11135
11137
  vfs: this.bashManager ? this.createVfsAccess(input.tenantId ?? "__default__") : void 0
11136
11138
  };
11137
11139
  const toolResultsForModel = [];
@@ -11610,7 +11612,8 @@ ${this.skillFingerprint}`;
11610
11612
  conversationId: input.conversationId,
11611
11613
  tenantId: input.tenantId,
11612
11614
  parameters: input.parameters,
11613
- abortSignal: input.abortSignal
11615
+ abortSignal: input.abortSignal,
11616
+ suppressTelemetry: input.suppressTelemetry
11614
11617
  });
11615
11618
  }
11616
11619
  async runToCompletion(input) {
@@ -12902,7 +12905,9 @@ var AgentOrchestrator = class {
12902
12905
  __ownerId: ownerId
12903
12906
  }, conversation),
12904
12907
  messages: harnessMessages,
12905
- abortSignal: childAbortController.signal
12908
+ abortSignal: childAbortController.signal,
12909
+ // Inherit the parent run's telemetry choice (e.g. incognito).
12910
+ suppressTelemetry: conversation.subagentMeta?.suppressTelemetry
12906
12911
  })) {
12907
12912
  if (event.type === "run:started") {
12908
12913
  latestRunId = event.runId;
@@ -13356,7 +13361,9 @@ ${resultBody}`,
13356
13361
  __ownerId: ownerId
13357
13362
  }, conversation),
13358
13363
  messages: continuationMessages,
13359
- abortSignal: childAbortController.signal
13364
+ abortSignal: childAbortController.signal,
13365
+ // Inherit the parent run's telemetry choice (e.g. incognito).
13366
+ suppressTelemetry: conversation.subagentMeta?.suppressTelemetry
13360
13367
  })) {
13361
13368
  if (event.type === "run:started") {
13362
13369
  const active = this.activeConversationRuns.get(conversationId);
@@ -13526,7 +13533,7 @@ ${resultBody}`,
13526
13533
  opts.tenantId ?? null,
13527
13534
  {
13528
13535
  parentConversationId: opts.parentConversationId,
13529
- subagentMeta: { task: opts.task, status: "running" },
13536
+ subagentMeta: { task: opts.task, status: "running", suppressTelemetry: opts.suppressTelemetry },
13530
13537
  messages: [{ role: "user", content: opts.task }]
13531
13538
  }
13532
13539
  );
@@ -13807,7 +13814,8 @@ var runConversationTurn = async (opts) => {
13807
13814
  messages: harnessMessages,
13808
13815
  files: opts.files && opts.files.length > 0 ? opts.files : void 0,
13809
13816
  abortSignal: opts.abortSignal,
13810
- disablePromptCache: opts.disablePromptCache
13817
+ disablePromptCache: opts.disablePromptCache,
13818
+ suppressTelemetry: opts.suppressTelemetry
13811
13819
  },
13812
13820
  initialContextTokens: conversation.contextTokens ?? 0,
13813
13821
  initialContextWindow: conversation.contextWindow ?? 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/harness",
3
- "version": "0.51.0",
3
+ "version": "0.52.0",
4
4
  "description": "Agent execution runtime - conversation loop, tool dispatch, streaming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "mustache": "^4.2.0",
35
35
  "yaml": "^2.4.0",
36
36
  "zod": "^3.22.0",
37
- "@poncho-ai/sdk": "1.13.0"
37
+ "@poncho-ai/sdk": "1.14.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "esbuild": ">=0.17.0",
package/src/harness.ts CHANGED
@@ -3285,6 +3285,7 @@ Code is wrapped in an async IIFE — use \`return\` to return a value to the too
3285
3285
  abortSignal: input.abortSignal,
3286
3286
  conversationId: input.conversationId,
3287
3287
  tenantId: input.tenantId,
3288
+ suppressTelemetry: input.suppressTelemetry,
3288
3289
  vfs: this.bashManager
3289
3290
  ? this.createVfsAccess(input.tenantId ?? "__default__")
3290
3291
  : undefined,
@@ -3825,6 +3826,9 @@ Code is wrapped in an async IIFE — use \`return\` to return a value to the too
3825
3826
  tenantId?: string;
3826
3827
  parameters?: Record<string, unknown>;
3827
3828
  abortSignal?: AbortSignal;
3829
+ /** Emit no telemetry for the continuation run (e.g. resuming an
3830
+ * incognito turn after an approval). */
3831
+ suppressTelemetry?: boolean;
3828
3832
  }): AsyncGenerator<AgentEvent> {
3829
3833
  const messages = [...input.messages];
3830
3834
  const lastMsg = messages[messages.length - 1];
@@ -3883,6 +3887,7 @@ Code is wrapped in an async IIFE — use \`return\` to return a value to the too
3883
3887
  tenantId: input.tenantId,
3884
3888
  parameters: input.parameters,
3885
3889
  abortSignal: input.abortSignal,
3890
+ suppressTelemetry: input.suppressTelemetry,
3886
3891
  });
3887
3892
  }
3888
3893
 
@@ -825,6 +825,8 @@ export class AgentOrchestrator {
825
825
  }, conversation),
826
826
  messages: harnessMessages,
827
827
  abortSignal: childAbortController.signal,
828
+ // Inherit the parent run's telemetry choice (e.g. incognito).
829
+ suppressTelemetry: conversation.subagentMeta?.suppressTelemetry,
828
830
  })) {
829
831
  if (event.type === "run:started") {
830
832
  latestRunId = event.runId;
@@ -1350,6 +1352,8 @@ export class AgentOrchestrator {
1350
1352
  }, conversation),
1351
1353
  messages: continuationMessages,
1352
1354
  abortSignal: childAbortController.signal,
1355
+ // Inherit the parent run's telemetry choice (e.g. incognito).
1356
+ suppressTelemetry: conversation.subagentMeta?.suppressTelemetry,
1353
1357
  })) {
1354
1358
  if (event.type === "run:started") {
1355
1359
  const active = this.activeConversationRuns.get(conversationId);
@@ -1530,7 +1534,7 @@ export class AgentOrchestrator {
1530
1534
  opts.tenantId ?? null,
1531
1535
  {
1532
1536
  parentConversationId: opts.parentConversationId,
1533
- subagentMeta: { task: opts.task, status: "running" },
1537
+ subagentMeta: { task: opts.task, status: "running", suppressTelemetry: opts.suppressTelemetry },
1534
1538
  messages: [{ role: "user", content: opts.task }],
1535
1539
  },
1536
1540
  );
@@ -68,6 +68,12 @@ export interface RunConversationTurnOpts {
68
68
  * harness skips the Anthropic cache write.
69
69
  */
70
70
  disablePromptCache?: boolean;
71
+ /**
72
+ * Forwarded to `RunInput.suppressTelemetry`. Set true to emit no telemetry
73
+ * for this run (e.g. an incognito / telemetry-off turn) even on a harness
74
+ * built with an OTLP exporter attached.
75
+ */
76
+ suppressTelemetry?: boolean;
71
77
  /** Per-event hook — called for every AgentEvent yielded by the run, in order. */
72
78
  onEvent?: (event: AgentEvent) => void | Promise<void>;
73
79
  }
@@ -210,6 +216,7 @@ export const runConversationTurn = async (
210
216
  files: opts.files && opts.files.length > 0 ? opts.files : undefined,
211
217
  abortSignal: opts.abortSignal,
212
218
  disablePromptCache: opts.disablePromptCache,
219
+ suppressTelemetry: opts.suppressTelemetry,
213
220
  },
214
221
  initialContextTokens: conversation.contextTokens ?? 0,
215
222
  initialContextWindow: conversation.contextWindow ?? 0,
package/src/state.ts CHANGED
@@ -75,6 +75,10 @@ export interface Conversation {
75
75
  status: "running" | "completed" | "error" | "stopped";
76
76
  result?: import("@poncho-ai/sdk").RunResult;
77
77
  error?: import("@poncho-ai/sdk").AgentFailure;
78
+ /** Inherited from the parent run at spawn time — when true, this
79
+ * subagent's runs emit no telemetry (e.g. spawned from an incognito
80
+ * turn). Read by the orchestrator's runSubagent / continuation. */
81
+ suppressTelemetry?: boolean;
78
82
  };
79
83
  channelMeta?: {
80
84
  platform: string;
@@ -37,6 +37,9 @@ export interface SubagentManager {
37
37
  parentConversationId: string;
38
38
  ownerId: string;
39
39
  tenantId?: string | null;
40
+ /** Inherit the parent run's telemetry choice — when true, the subagent
41
+ * run (and its re-runs) emit no telemetry. */
42
+ suppressTelemetry?: boolean;
40
43
  }): Promise<SubagentSpawnResult>;
41
44
 
42
45
  sendMessage(subagentId: string, message: string): Promise<SubagentSpawnResult>;
@@ -45,6 +45,7 @@ export const createSubagentTools = (
45
45
  parentConversationId: conversationId,
46
46
  ownerId,
47
47
  tenantId: context.tenantId,
48
+ suppressTelemetry: context.suppressTelemetry,
48
49
  });
49
50
  return { subagentId, status: "running" };
50
51
  },