@poncho-ai/harness 0.26.0 → 0.28.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.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +28 -0
- package/dist/index.d.ts +28 -8
- package/dist/index.js +265 -86
- package/package.json +3 -2
- package/src/config.ts +2 -0
- package/src/harness.ts +33 -22
- package/src/index.ts +1 -0
- package/src/kv-store.ts +18 -8
- package/src/search-tools.ts +181 -0
- package/src/state.ts +74 -9
- package/src/subagent-manager.ts +6 -2
- package/src/subagent-tools.ts +21 -48
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.
|
|
2
|
+
> @poncho-ai/harness@0.28.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
|
[34mCLI[39m tsup v8.5.1
|
|
9
9
|
[34mCLI[39m Target: es2022
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
11
|
+
[32mESM[39m [1mdist/index.js [22m[32m284.05 KB[39m
|
|
12
12
|
[32mESM[39m ⚡️ Build success in 147ms
|
|
13
13
|
[34mDTS[39m Build start
|
|
14
|
-
[32mDTS[39m ⚡️ Build success in
|
|
15
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 7926ms
|
|
15
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m29.26 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.28.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c0ca56b`](https://github.com/cesr/poncho-ai/commit/c0ca56b54bb877d96ba8088537d6f1c7461d2a55) Thanks [@cesr](https://github.com/cesr)! - Add built-in `web_search` and `web_fetch` tools so agents can search the web and fetch page content without a browser or API keys. Remove the scaffolded `fetch-page` skill (superseded by `web_fetch`). Fix `browser_open` crash when agent projects have an older `@poncho-ai/browser` installed.
|
|
8
|
+
|
|
9
|
+
## 0.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
15
|
+
**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`.
|
|
16
|
+
|
|
17
|
+
**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.
|
|
18
|
+
|
|
19
|
+
**Bug fixes**:
|
|
20
|
+
- 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`).
|
|
21
|
+
- Fixed Upstash KV store silently dropping large values by switching from URL-path encoding to request body format for `SET`/`SETEX` commands.
|
|
22
|
+
- Fixed empty assistant content blocks causing Anthropic `text content blocks must be non-empty` errors.
|
|
23
|
+
|
|
24
|
+
**Client**: Added `getConversationStatus()` and `waitForSubagents` option on `sendMessage()`.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`e58a984`](https://github.com/cesr/poncho-ai/commit/e58a984efaa673b649318102bbf735fb4c2f9172)]:
|
|
29
|
+
- @poncho-ai/sdk@1.6.0
|
|
30
|
+
|
|
3
31
|
## 0.26.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;
|
|
@@ -334,6 +351,8 @@ type BuiltInToolToggles = {
|
|
|
334
351
|
todo_add?: boolean;
|
|
335
352
|
todo_update?: boolean;
|
|
336
353
|
todo_remove?: boolean;
|
|
354
|
+
web_search?: boolean;
|
|
355
|
+
web_fetch?: boolean;
|
|
337
356
|
};
|
|
338
357
|
interface MessagingChannelConfig {
|
|
339
358
|
platform: "slack" | "resend" | "telegram";
|
|
@@ -530,13 +549,16 @@ interface SubagentSummary {
|
|
|
530
549
|
status: string;
|
|
531
550
|
messageCount: number;
|
|
532
551
|
}
|
|
552
|
+
interface SubagentSpawnResult {
|
|
553
|
+
subagentId: string;
|
|
554
|
+
}
|
|
533
555
|
interface SubagentManager {
|
|
534
556
|
spawn(opts: {
|
|
535
557
|
task: string;
|
|
536
558
|
parentConversationId: string;
|
|
537
559
|
ownerId: string;
|
|
538
|
-
}): Promise<
|
|
539
|
-
sendMessage(subagentId: string, message: string): Promise<
|
|
560
|
+
}): Promise<SubagentSpawnResult>;
|
|
561
|
+
sendMessage(subagentId: string, message: string): Promise<SubagentSpawnResult>;
|
|
540
562
|
stop(subagentId: string): Promise<void>;
|
|
541
563
|
list(parentConversationId: string): Promise<SubagentSummary[]>;
|
|
542
564
|
}
|
|
@@ -653,10 +675,6 @@ declare class AgentHarness {
|
|
|
653
675
|
initialize(): Promise<void>;
|
|
654
676
|
private buildBrowserStoragePersistence;
|
|
655
677
|
private initBrowserTools;
|
|
656
|
-
/** Conversation ID of the currently executing run (set during run, cleared after). */
|
|
657
|
-
private _currentRunConversationId?;
|
|
658
|
-
/** Owner ID of the currently executing run (used by subagent tools). */
|
|
659
|
-
private _currentRunOwnerId?;
|
|
660
678
|
get browserSession(): unknown;
|
|
661
679
|
shutdown(): Promise<void>;
|
|
662
680
|
listTools(): ToolDefinition[];
|
|
@@ -722,6 +740,8 @@ declare class LatitudeCapture {
|
|
|
722
740
|
*/
|
|
723
741
|
declare function jsonSchemaToZod(schema: JsonSchema): z.ZodType;
|
|
724
742
|
|
|
743
|
+
declare const createSearchTools: () => ToolDefinition[];
|
|
744
|
+
|
|
725
745
|
/**
|
|
726
746
|
* Resolve the full list of skill directories to scan.
|
|
727
747
|
* Merges the defaults with any extra paths provided via config.
|
|
@@ -795,6 +815,6 @@ declare class TelemetryEmitter {
|
|
|
795
815
|
private sendOtlp;
|
|
796
816
|
}
|
|
797
817
|
|
|
798
|
-
declare const createSubagentTools: (manager: SubagentManager
|
|
818
|
+
declare const createSubagentTools: (manager: SubagentManager) => ToolDefinition[];
|
|
799
819
|
|
|
800
|
-
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 };
|
|
820
|
+
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, createSearchTools, 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 };
|