@poncho-ai/harness 0.23.0 → 0.25.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 +5 -5
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +20 -2
- package/dist/index.js +228 -80
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/default-tools.ts +53 -0
- package/src/harness.ts +129 -41
- package/src/memory.ts +63 -46
- package/test/harness.test.ts +193 -3
- package/test/memory.test.ts +100 -15
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.
|
|
2
|
+
> @poncho-ai/harness@0.25.0 build /Users/cesar/Dev/latitude/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[
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.js [22m[32m268.11 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 638ms
|
|
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 9953ms
|
|
15
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m28.15 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5a103ca`](https://github.com/cesr/poncho-ai/commit/5a103ca62238cceaa4f4b31769a96637330d6b84) Thanks [@cesr](https://github.com/cesr)! - Split `memory_main_update` into `memory_main_write` (full overwrite) and `memory_main_edit` (targeted string replacement). Hot-reload AGENT.md and skills in dev mode without restarting the server. Merge agent + skill MCP tool patterns additively. Fix MissingToolResultsError when resuming from nested approval checkpoints.
|
|
8
|
+
|
|
9
|
+
## 0.24.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`aee4f17`](https://github.com/cesr/poncho-ai/commit/aee4f17237d33b2cc134ed9934b709d967ca3f10) Thanks [@cesr](https://github.com/cesr)! - Add `edit_file` built-in tool with str_replace semantics for targeted file edits. The tool takes `path`, `old_str`, and `new_str` parameters, enforces uniqueness of the match, and is write-gated like `write_file` (disabled in production by default). Also improves browser SSE frame streaming with backpressure handling and auto-stops screencast when all listeners disconnect.
|
|
14
|
+
|
|
3
15
|
## 0.23.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -247,7 +247,6 @@ interface MemoryStore {
|
|
|
247
247
|
getMainMemory(): Promise<MainMemory>;
|
|
248
248
|
updateMainMemory(input: {
|
|
249
249
|
content: string;
|
|
250
|
-
mode?: "replace" | "append";
|
|
251
250
|
}): Promise<MainMemory>;
|
|
252
251
|
}
|
|
253
252
|
declare const createMemoryStore: (agentId: string, config?: MemoryConfig, options?: {
|
|
@@ -328,6 +327,7 @@ type BuiltInToolToggles = {
|
|
|
328
327
|
list_directory?: boolean;
|
|
329
328
|
read_file?: boolean;
|
|
330
329
|
write_file?: boolean;
|
|
330
|
+
edit_file?: boolean;
|
|
331
331
|
delete_file?: boolean;
|
|
332
332
|
delete_directory?: boolean;
|
|
333
333
|
};
|
|
@@ -434,6 +434,7 @@ declare const loadPonchoConfig: (workingDir: string) => Promise<PonchoConfig | u
|
|
|
434
434
|
|
|
435
435
|
declare const createDefaultTools: (workingDir: string) => ToolDefinition[];
|
|
436
436
|
declare const createWriteTool: (workingDir: string) => ToolDefinition;
|
|
437
|
+
declare const createEditTool: (workingDir: string) => ToolDefinition;
|
|
437
438
|
declare const createDeleteTool: (workingDir: string) => ToolDefinition;
|
|
438
439
|
declare const createDeleteDirectoryTool: (workingDir: string) => ToolDefinition;
|
|
439
440
|
declare const ponchoDocsTool: ToolDefinition;
|
|
@@ -581,6 +582,7 @@ declare class AgentHarness {
|
|
|
581
582
|
private _browserSession?;
|
|
582
583
|
private _browserMod?;
|
|
583
584
|
private parsedAgent?;
|
|
585
|
+
private agentFileFingerprint;
|
|
584
586
|
private mcpBridge?;
|
|
585
587
|
private subagentManager?;
|
|
586
588
|
private resolveToolAccess;
|
|
@@ -614,6 +616,22 @@ declare class AgentHarness {
|
|
|
614
616
|
private buildSkillFingerprint;
|
|
615
617
|
private registerSkillTools;
|
|
616
618
|
private static readonly SKILL_REFRESH_DEBOUNCE_MS;
|
|
619
|
+
/**
|
|
620
|
+
* Re-read AGENT.md and update the parsed agent when the file has changed
|
|
621
|
+
* on disk. Returns `true` when the agent was actually re-parsed.
|
|
622
|
+
*
|
|
623
|
+
* Preserves the agent identity (id) across reloads so conversation
|
|
624
|
+
* continuity isn't broken.
|
|
625
|
+
*/
|
|
626
|
+
private refreshAgentIfChanged;
|
|
627
|
+
/**
|
|
628
|
+
* Re-scan skill directories and update metadata, tools, and context window
|
|
629
|
+
* when skills have changed on disk. Returns `true` when the skill set was
|
|
630
|
+
* actually updated.
|
|
631
|
+
*
|
|
632
|
+
* @param force - bypass the time-based debounce (used for mid-run refreshes
|
|
633
|
+
* after the agent may have written new skill files).
|
|
634
|
+
*/
|
|
617
635
|
private refreshSkillsIfChanged;
|
|
618
636
|
initialize(): Promise<void>;
|
|
619
637
|
private buildBrowserStoragePersistence;
|
|
@@ -762,4 +780,4 @@ declare class TelemetryEmitter {
|
|
|
762
780
|
|
|
763
781
|
declare const createSubagentTools: (manager: SubagentManager, getConversationId: () => string | undefined, getOwnerId: () => string) => ToolDefinition[];
|
|
764
782
|
|
|
765
|
-
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, 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 };
|
|
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 };
|