@poncho-ai/harness 0.7.2 → 0.8.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/dist/index.d.ts +21 -1
- package/dist/index.js +642 -302
- package/package.json +2 -2
- package/src/agent-identity.ts +131 -0
- package/src/agent-parser.ts +3 -1
- package/src/harness.ts +91 -22
- package/src/index.ts +1 -0
- package/src/memory.ts +30 -34
- package/src/state.ts +468 -256
- package/test/agent-identity.test.ts +42 -0
- package/test/harness.test.ts +211 -1
- package/test/state.test.ts +30 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.
|
|
2
|
+
> @poncho-ai/harness@0.8.0 build /Users/cesar/Dev/latitude/poncho-ai/packages/harness
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
[34mCLI[39m tsup v8.5.1
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m130.60 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 39ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 3563ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m17.17 KB[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ interface AgentLimitsConfig {
|
|
|
15
15
|
}
|
|
16
16
|
interface AgentFrontmatter {
|
|
17
17
|
name: string;
|
|
18
|
+
id?: string;
|
|
18
19
|
description?: string;
|
|
19
20
|
model?: AgentModelConfig;
|
|
20
21
|
limits?: AgentLimitsConfig;
|
|
@@ -44,6 +45,19 @@ declare const parseAgentMarkdown: (content: string) => ParsedAgent;
|
|
|
44
45
|
declare const parseAgentFile: (workingDir: string) => Promise<ParsedAgent>;
|
|
45
46
|
declare const renderAgentPrompt: (agent: ParsedAgent, context?: RuntimeRenderContext) => string;
|
|
46
47
|
|
|
48
|
+
declare const STORAGE_SCHEMA_VERSION = "v1";
|
|
49
|
+
type AgentIdentity = {
|
|
50
|
+
name: string;
|
|
51
|
+
id: string;
|
|
52
|
+
};
|
|
53
|
+
declare const getPonchoStoreRoot: () => string;
|
|
54
|
+
declare const slugifyStorageComponent: (value: string) => string;
|
|
55
|
+
declare const generateAgentId: () => string;
|
|
56
|
+
declare const resolveAgentIdentity: (workingDir: string) => Promise<AgentIdentity>;
|
|
57
|
+
declare const ensureAgentIdentity: (workingDir: string) => Promise<AgentIdentity>;
|
|
58
|
+
declare const buildAgentDirectoryName: (identity: AgentIdentity) => string;
|
|
59
|
+
declare const getAgentStoreDirectory: (identity: AgentIdentity) => string;
|
|
60
|
+
|
|
47
61
|
interface ConversationState {
|
|
48
62
|
runId: string;
|
|
49
63
|
messages: Message[];
|
|
@@ -111,9 +125,11 @@ declare class InMemoryConversationStore implements ConversationStore {
|
|
|
111
125
|
}
|
|
112
126
|
declare const createStateStore: (config?: StateConfig, options?: {
|
|
113
127
|
workingDir?: string;
|
|
128
|
+
agentId?: string;
|
|
114
129
|
}) => StateStore;
|
|
115
130
|
declare const createConversationStore: (config?: StateConfig, options?: {
|
|
116
131
|
workingDir?: string;
|
|
132
|
+
agentId?: string;
|
|
117
133
|
}) => ConversationStore;
|
|
118
134
|
|
|
119
135
|
interface MainMemory {
|
|
@@ -295,6 +311,7 @@ declare class AgentHarness {
|
|
|
295
311
|
private memoryStore?;
|
|
296
312
|
private loadedConfig?;
|
|
297
313
|
private loadedSkills;
|
|
314
|
+
private skillFingerprint;
|
|
298
315
|
private readonly activeSkillNames;
|
|
299
316
|
private readonly registeredMcpToolNames;
|
|
300
317
|
private parsedAgent?;
|
|
@@ -318,6 +335,9 @@ declare class AgentHarness {
|
|
|
318
335
|
private isRootScriptAllowedByPolicy;
|
|
319
336
|
private requiresApprovalForToolCall;
|
|
320
337
|
private refreshMcpTools;
|
|
338
|
+
private buildSkillFingerprint;
|
|
339
|
+
private registerSkillTools;
|
|
340
|
+
private refreshSkillsIfChanged;
|
|
321
341
|
initialize(): Promise<void>;
|
|
322
342
|
shutdown(): Promise<void>;
|
|
323
343
|
listTools(): ToolDefinition[];
|
|
@@ -475,4 +495,4 @@ declare class ToolDispatcher {
|
|
|
475
495
|
executeBatch(calls: ToolCall[], context: ToolContext): Promise<ToolExecutionResult[]>;
|
|
476
496
|
}
|
|
477
497
|
|
|
478
|
-
export { type AgentFrontmatter, AgentHarness, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type Conversation, type ConversationState, type ConversationStore, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type ModelProviderFactory, type ParsedAgent, type PonchoConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type TelemetryConfig, TelemetryEmitter, type ToolCall, ToolDispatcher, type ToolExecutionResult, buildSkillContextWindow, createConversationStore, createDefaultTools, createMemoryStore, createMemoryTools, createModelProvider, createSkillTools, createStateStore, createWriteTool, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, readSkillResource, renderAgentPrompt, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig };
|
|
498
|
+
export { type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type Conversation, type ConversationState, type ConversationStore, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type ModelProviderFactory, type ParsedAgent, type PonchoConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, STORAGE_SCHEMA_VERSION, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type TelemetryConfig, TelemetryEmitter, type ToolCall, ToolDispatcher, type ToolExecutionResult, buildAgentDirectoryName, buildSkillContextWindow, createConversationStore, createDefaultTools, createMemoryStore, createMemoryTools, createModelProvider, createSkillTools, createStateStore, createWriteTool, ensureAgentIdentity, generateAgentId, getAgentStoreDirectory, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };
|