@poncho-ai/harness 0.25.0 → 0.27.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.25.0 build /Users/cesar/Dev/latitude/poncho-ai/packages/harness
2
+ > @poncho-ai/harness@0.27.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,8 +8,8 @@
8
8
  CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
- ESM dist/index.js 268.11 KB
12
- ESM ⚡️ Build success in 638ms
11
+ ESM dist/index.js 278.61 KB
12
+ ESM ⚡️ Build success in 148ms
13
13
  DTS Build start
14
- DTS ⚡️ Build success in 9953ms
15
- DTS dist/index.d.ts 28.15 KB
14
+ DTS ⚡️ Build success in 7054ms
15
+ DTS dist/index.d.ts 29.13 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @poncho-ai/harness
2
2
 
3
+ ## 0.27.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#42](https://github.com/cesr/poncho-ai/pull/42) [`e58a984`](https://github.com/cesr/poncho-ai/commit/e58a984efaa673b649318102bbf735fb4c2f9172) Thanks [@cesr](https://github.com/cesr)! - Add continuation model and fire-and-forget subagents
8
+
9
+ **Continuation model**: Agents no longer send a synthetic `"Continue"` user message between steps. Instead, the harness injects a transient signal when needed, and the full internal message chain is preserved across continuations so the LLM never loses context. `RunInput` gains `disableSoftDeadline` and `RunResult` gains `continuationMessages`.
10
+
11
+ **Fire-and-forget subagents**: Subagents now run asynchronously in the background. `spawn_subagent` returns immediately with a subagent ID; results are delivered back to the parent conversation as a callback once the subagent completes. Subagents cannot spawn their own subagents. The web UI shows results in a collapsible disclosure and reconnects the live event stream automatically when the parent agent resumes.
12
+
13
+ **Bug fixes**:
14
+ - Fixed a race condition where concurrent runs on the same harness instance could assign a subagent or browser tab to the wrong parent conversation (shared `_currentRunConversationId` field replaced with per-run `ToolContext.conversationId`).
15
+ - Fixed Upstash KV store silently dropping large values by switching from URL-path encoding to request body format for `SET`/`SETEX` commands.
16
+ - Fixed empty assistant content blocks causing Anthropic `text content blocks must be non-empty` errors.
17
+
18
+ **Client**: Added `getConversationStatus()` and `waitForSubagents` option on `sendMessage()`.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [[`e58a984`](https://github.com/cesr/poncho-ai/commit/e58a984efaa673b649318102bbf735fb4c2f9172)]:
23
+ - @poncho-ai/sdk@1.6.0
24
+
25
+ ## 0.26.0
26
+
27
+ ### Minor Changes
28
+
29
+ - [#40](https://github.com/cesr/poncho-ai/pull/40) [`95ae86b`](https://github.com/cesr/poncho-ai/commit/95ae86b4ea0d913357ccca9a43a227c83e46b9c4) Thanks [@cesr](https://github.com/cesr)! - Add built-in todo tools (todo_list, todo_add, todo_update, todo_remove) with per-conversation storage and a live todo panel in the web UI
30
+
3
31
  ## 0.25.0
4
32
 
5
33
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -123,6 +123,14 @@ interface StateStore {
123
123
  set(state: ConversationState): Promise<void>;
124
124
  delete(runId: string): Promise<void>;
125
125
  }
126
+ interface PendingSubagentResult {
127
+ subagentId: string;
128
+ task: string;
129
+ status: "completed" | "error" | "stopped";
130
+ result?: _poncho_ai_sdk.RunResult;
131
+ error?: _poncho_ai_sdk.AgentFailure;
132
+ timestamp: number;
133
+ }
126
134
  interface Conversation {
127
135
  conversationId: string;
128
136
  title: string;
@@ -161,6 +169,13 @@ interface Conversation {
161
169
  channelId: string;
162
170
  platformThreadId: string;
163
171
  };
172
+ pendingSubagentResults?: PendingSubagentResult[];
173
+ subagentCallbackCount?: number;
174
+ runningCallbackSince?: number;
175
+ lastActivityAt?: number;
176
+ /** Harness-internal message chain preserved across continuation runs.
177
+ * Cleared when a run completes without continuation. */
178
+ _continuationMessages?: Message[];
164
179
  createdAt: number;
165
180
  updatedAt: number;
166
181
  }
@@ -172,6 +187,7 @@ interface ConversationStore {
172
187
  update(conversation: Conversation): Promise<void>;
173
188
  rename(conversationId: string, title: string): Promise<Conversation | undefined>;
174
189
  delete(conversationId: string): Promise<boolean>;
190
+ appendSubagentResult(conversationId: string, result: PendingSubagentResult): Promise<void>;
175
191
  }
176
192
  type StateProviderName = "local" | "memory" | "redis" | "upstash" | "dynamodb";
177
193
  interface StateConfig {
@@ -204,6 +220,7 @@ declare class InMemoryConversationStore implements ConversationStore {
204
220
  update(conversation: Conversation): Promise<void>;
205
221
  rename(conversationId: string, title: string): Promise<Conversation | undefined>;
206
222
  delete(conversationId: string): Promise<boolean>;
223
+ appendSubagentResult(conversationId: string, result: PendingSubagentResult): Promise<void>;
207
224
  }
208
225
  type ConversationSummary = {
209
226
  conversationId: string;
@@ -330,6 +347,10 @@ type BuiltInToolToggles = {
330
347
  edit_file?: boolean;
331
348
  delete_file?: boolean;
332
349
  delete_directory?: boolean;
350
+ todo_list?: boolean;
351
+ todo_add?: boolean;
352
+ todo_update?: boolean;
353
+ todo_remove?: boolean;
333
354
  };
334
355
  interface MessagingChannelConfig {
335
356
  platform: "slack" | "resend" | "telegram";
@@ -480,6 +501,17 @@ declare class S3UploadStore implements UploadStore {
480
501
  }
481
502
  declare const createUploadStore: (config: UploadsConfig | undefined, workingDir: string) => Promise<UploadStore>;
482
503
 
504
+ type TodoStatus = "pending" | "in_progress" | "completed";
505
+ type TodoPriority = "high" | "medium" | "low";
506
+ interface TodoItem {
507
+ id: string;
508
+ content: string;
509
+ status: TodoStatus;
510
+ priority: TodoPriority;
511
+ createdAt: number;
512
+ updatedAt: number;
513
+ }
514
+
483
515
  type ModelProviderFactory = (modelName: string) => LanguageModel;
484
516
  /**
485
517
  * Returns the context window size (in tokens) for a given model name.
@@ -515,13 +547,16 @@ interface SubagentSummary {
515
547
  status: string;
516
548
  messageCount: number;
517
549
  }
550
+ interface SubagentSpawnResult {
551
+ subagentId: string;
552
+ }
518
553
  interface SubagentManager {
519
554
  spawn(opts: {
520
555
  task: string;
521
556
  parentConversationId: string;
522
557
  ownerId: string;
523
- }): Promise<SubagentResult>;
524
- sendMessage(subagentId: string, message: string): Promise<SubagentResult>;
558
+ }): Promise<SubagentSpawnResult>;
559
+ sendMessage(subagentId: string, message: string): Promise<SubagentSpawnResult>;
525
560
  stop(subagentId: string): Promise<void>;
526
561
  list(parentConversationId: string): Promise<SubagentSummary[]>;
527
562
  }
@@ -571,6 +606,7 @@ declare class AgentHarness {
571
606
  readonly uploadStore?: UploadStore;
572
607
  private skillContextWindow;
573
608
  private memoryStore?;
609
+ private todoStore?;
574
610
  private loadedConfig?;
575
611
  private loadedSkills;
576
612
  private skillFingerprint;
@@ -600,6 +636,7 @@ declare class AgentHarness {
600
636
  private shouldEnableWriteTool;
601
637
  constructor(options?: HarnessOptions);
602
638
  get frontmatter(): AgentFrontmatter | undefined;
639
+ getTodos(conversationId: string): Promise<TodoItem[]>;
603
640
  private listActiveSkills;
604
641
  private getAgentMcpIntent;
605
642
  private getAgentScriptIntent;
@@ -636,10 +673,6 @@ declare class AgentHarness {
636
673
  initialize(): Promise<void>;
637
674
  private buildBrowserStoragePersistence;
638
675
  private initBrowserTools;
639
- /** Conversation ID of the currently executing run (set during run, cleared after). */
640
- private _currentRunConversationId?;
641
- /** Owner ID of the currently executing run (used by subagent tools). */
642
- private _currentRunOwnerId?;
643
676
  get browserSession(): unknown;
644
677
  shutdown(): Promise<void>;
645
678
  listTools(): ToolDefinition[];
@@ -778,6 +811,6 @@ declare class TelemetryEmitter {
778
811
  private sendOtlp;
779
812
  }
780
813
 
781
- declare const createSubagentTools: (manager: SubagentManager, getConversationId: () => string | undefined, getOwnerId: () => string) => ToolDefinition[];
814
+ declare const createSubagentTools: (manager: SubagentManager) => ToolDefinition[];
782
815
 
783
- export { type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type CompactMessagesOptions, type CompactResult, type CompactionConfig, type Conversation, type ConversationState, type ConversationStore, type ConversationSummary, type CronJobConfig, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, LocalUploadStore, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type MessagingChannelConfig, type ModelProviderFactory, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PonchoConfig, type ProviderConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, S3UploadStore, STORAGE_SCHEMA_VERSION, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type SubagentManager, type SubagentResult, type SubagentSummary, type TelemetryConfig, TelemetryEmitter, type ToolAccess, type ToolCall, ToolDispatcher, type ToolExecutionResult, type UploadStore, type UploadsConfig, VercelBlobUploadStore, buildAgentDirectoryName, buildSkillContextWindow, compactMessages, createConversationStore, createDefaultTools, createDeleteDirectoryTool, createDeleteTool, createEditTool, createMemoryStore, createMemoryTools, createModelProvider, createSkillTools, createStateStore, createSubagentTools, createUploadStore, createWriteTool, deriveUploadKey, ensureAgentIdentity, estimateTokens, estimateTotalTokens, findSafeSplitPoint, generateAgentId, getAgentStoreDirectory, getModelContextWindow, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, ponchoDocsTool, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveCompactionConfig, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };
816
+ export { type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type CompactMessagesOptions, type CompactResult, type CompactionConfig, type Conversation, type ConversationState, type ConversationStore, type ConversationSummary, type CronJobConfig, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, LocalUploadStore, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type MessagingChannelConfig, type ModelProviderFactory, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PendingSubagentResult, type PonchoConfig, type ProviderConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, S3UploadStore, STORAGE_SCHEMA_VERSION, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type SubagentManager, type SubagentResult, type SubagentSpawnResult, type SubagentSummary, type TelemetryConfig, TelemetryEmitter, type ToolAccess, type ToolCall, ToolDispatcher, type ToolExecutionResult, type UploadStore, type UploadsConfig, VercelBlobUploadStore, buildAgentDirectoryName, buildSkillContextWindow, compactMessages, createConversationStore, createDefaultTools, createDeleteDirectoryTool, createDeleteTool, createEditTool, createMemoryStore, createMemoryTools, createModelProvider, createSkillTools, createStateStore, createSubagentTools, createUploadStore, createWriteTool, deriveUploadKey, ensureAgentIdentity, estimateTokens, estimateTotalTokens, findSafeSplitPoint, generateAgentId, getAgentStoreDirectory, getModelContextWindow, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, ponchoDocsTool, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveCompactionConfig, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };