@poncho-ai/harness 0.11.2 → 0.13.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 +17 -0
- package/dist/index.d.ts +60 -1
- package/dist/index.js +660 -134
- package/package.json +2 -2
- package/src/agent-parser.ts +76 -0
- package/src/config.ts +10 -0
- package/src/harness.ts +215 -24
- package/src/index.ts +1 -0
- package/src/upload-store.ts +387 -0
- package/test/agent-parser.test.ts +118 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.
|
|
2
|
+
> @poncho-ai/harness@0.13.0 build /home/runner/work/poncho-ai/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[32m161.82 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 68ms
|
|
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 4388ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.54 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#8](https://github.com/cesr/poncho-ai/pull/8) [`658bc54`](https://github.com/cesr/poncho-ai/commit/658bc54d391cb0b58aa678a2b86cd617eebdd8aa) Thanks [@cesr](https://github.com/cesr)! - Add cron job support for scheduled agent tasks. Define recurring jobs in AGENT.md frontmatter with schedule, task, and optional timezone. Includes in-process scheduler for local dev with hot-reload, HTTP endpoint for Vercel/serverless with self-continuation, Vercel scaffold generation with drift detection, and full tool activity tracking in cron conversations.
|
|
8
|
+
|
|
9
|
+
## 0.12.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`035e8b3`](https://github.com/cesr/poncho-ai/commit/035e8b300ac4de6e7cbc4e2ab6bd06cdfd0e1ae3) Thanks [@cesr](https://github.com/cesr)! - Add multimodal file support for agents — images, PDFs, and text files can be uploaded via the web UI, HTTP API, and terminal CLI. Includes pluggable upload storage (local, Vercel Blob, S3), write-behind caching, build-time dependency injection, and graceful handling of unsupported formats.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`035e8b3`](https://github.com/cesr/poncho-ai/commit/035e8b300ac4de6e7cbc4e2ab6bd06cdfd0e1ae3)]:
|
|
18
|
+
- @poncho-ai/sdk@1.0.0
|
|
19
|
+
|
|
3
20
|
## 0.11.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ interface AgentLimitsConfig {
|
|
|
13
13
|
maxSteps?: number;
|
|
14
14
|
timeout?: number;
|
|
15
15
|
}
|
|
16
|
+
interface CronJobConfig {
|
|
17
|
+
schedule: string;
|
|
18
|
+
task: string;
|
|
19
|
+
timezone?: string;
|
|
20
|
+
}
|
|
16
21
|
interface AgentFrontmatter {
|
|
17
22
|
name: string;
|
|
18
23
|
id?: string;
|
|
@@ -27,6 +32,7 @@ interface AgentFrontmatter {
|
|
|
27
32
|
mcp?: string[];
|
|
28
33
|
scripts?: string[];
|
|
29
34
|
};
|
|
35
|
+
cron?: Record<string, CronJobConfig>;
|
|
30
36
|
}
|
|
31
37
|
interface ParsedAgent {
|
|
32
38
|
frontmatter: AgentFrontmatter;
|
|
@@ -216,6 +222,14 @@ interface StorageConfig {
|
|
|
216
222
|
maxRecallConversations?: number;
|
|
217
223
|
};
|
|
218
224
|
}
|
|
225
|
+
interface UploadsConfig {
|
|
226
|
+
provider?: "local" | "vercel-blob" | "s3";
|
|
227
|
+
/** Vercel Blob access mode. Must match the store's configuration. Defaults to "public". */
|
|
228
|
+
access?: "public" | "private";
|
|
229
|
+
bucket?: string;
|
|
230
|
+
region?: string;
|
|
231
|
+
endpoint?: string;
|
|
232
|
+
}
|
|
219
233
|
type BuiltInToolToggles = {
|
|
220
234
|
list_directory?: boolean;
|
|
221
235
|
read_file?: boolean;
|
|
@@ -259,6 +273,7 @@ interface PonchoConfig extends McpConfig {
|
|
|
259
273
|
/** Extra directories (relative to project root) to scan for skills.
|
|
260
274
|
* `skills/` and `.poncho/skills/` are always scanned. */
|
|
261
275
|
skillPaths?: string[];
|
|
276
|
+
uploads?: UploadsConfig;
|
|
262
277
|
build?: {
|
|
263
278
|
vercel?: Record<string, unknown>;
|
|
264
279
|
docker?: Record<string, unknown>;
|
|
@@ -273,6 +288,47 @@ declare const loadPonchoConfig: (workingDir: string) => Promise<PonchoConfig | u
|
|
|
273
288
|
declare const createDefaultTools: (workingDir: string) => ToolDefinition[];
|
|
274
289
|
declare const createWriteTool: (workingDir: string) => ToolDefinition;
|
|
275
290
|
|
|
291
|
+
declare const PONCHO_UPLOAD_SCHEME = "poncho-upload://";
|
|
292
|
+
interface UploadStore {
|
|
293
|
+
put(key: string, data: Buffer, mediaType: string): Promise<string>;
|
|
294
|
+
get(urlOrKey: string): Promise<Buffer>;
|
|
295
|
+
delete(urlOrKey: string): Promise<void>;
|
|
296
|
+
}
|
|
297
|
+
/** Derive a content-addressed key from file data. */
|
|
298
|
+
declare const deriveUploadKey: (data: Buffer, mediaType: string) => string;
|
|
299
|
+
declare class LocalUploadStore implements UploadStore {
|
|
300
|
+
private readonly uploadsDir;
|
|
301
|
+
constructor(workingDir: string);
|
|
302
|
+
put(_key: string, data: Buffer, mediaType: string): Promise<string>;
|
|
303
|
+
get(urlOrKey: string): Promise<Buffer>;
|
|
304
|
+
delete(urlOrKey: string): Promise<void>;
|
|
305
|
+
}
|
|
306
|
+
declare class VercelBlobUploadStore implements UploadStore {
|
|
307
|
+
private sdk;
|
|
308
|
+
private readonly workingDir?;
|
|
309
|
+
private readonly access;
|
|
310
|
+
constructor(workingDir?: string, access?: "public" | "private");
|
|
311
|
+
loadSdk(): Promise<any>;
|
|
312
|
+
put(key: string, data: Buffer, mediaType: string): Promise<string>;
|
|
313
|
+
get(urlOrKey: string): Promise<Buffer>;
|
|
314
|
+
delete(urlOrKey: string): Promise<void>;
|
|
315
|
+
}
|
|
316
|
+
declare class S3UploadStore implements UploadStore {
|
|
317
|
+
private s3Sdk;
|
|
318
|
+
private presignerSdk;
|
|
319
|
+
private client;
|
|
320
|
+
private readonly bucket;
|
|
321
|
+
private readonly region?;
|
|
322
|
+
private readonly endpoint?;
|
|
323
|
+
private readonly workingDir?;
|
|
324
|
+
constructor(bucket: string, region?: string, endpoint?: string, workingDir?: string);
|
|
325
|
+
ensureClient(): Promise<void>;
|
|
326
|
+
put(key: string, data: Buffer, mediaType: string): Promise<string>;
|
|
327
|
+
get(urlOrKey: string): Promise<Buffer>;
|
|
328
|
+
delete(urlOrKey: string): Promise<void>;
|
|
329
|
+
}
|
|
330
|
+
declare const createUploadStore: (config: UploadsConfig | undefined, workingDir: string) => Promise<UploadStore>;
|
|
331
|
+
|
|
276
332
|
type ModelProviderFactory = (modelName: string) => LanguageModel;
|
|
277
333
|
/**
|
|
278
334
|
* Creates a model provider factory for the specified AI provider
|
|
@@ -293,6 +349,7 @@ interface HarnessOptions {
|
|
|
293
349
|
approvalId: string;
|
|
294
350
|
}) => Promise<boolean> | boolean;
|
|
295
351
|
modelProvider?: ModelProviderFactory;
|
|
352
|
+
uploadStore?: UploadStore;
|
|
296
353
|
}
|
|
297
354
|
interface HarnessRunOutput {
|
|
298
355
|
runId: string;
|
|
@@ -307,6 +364,7 @@ declare class AgentHarness {
|
|
|
307
364
|
private readonly modelProviderInjected;
|
|
308
365
|
private readonly dispatcher;
|
|
309
366
|
private readonly approvalHandler?;
|
|
367
|
+
readonly uploadStore?: UploadStore;
|
|
310
368
|
private skillContextWindow;
|
|
311
369
|
private memoryStore?;
|
|
312
370
|
private loadedConfig?;
|
|
@@ -322,6 +380,7 @@ declare class AgentHarness {
|
|
|
322
380
|
private registerConfiguredBuiltInTools;
|
|
323
381
|
private shouldEnableWriteTool;
|
|
324
382
|
constructor(options?: HarnessOptions);
|
|
383
|
+
get frontmatter(): AgentFrontmatter | undefined;
|
|
325
384
|
private listActiveSkills;
|
|
326
385
|
private getAgentMcpIntent;
|
|
327
386
|
private getAgentScriptIntent;
|
|
@@ -495,4 +554,4 @@ declare class ToolDispatcher {
|
|
|
495
554
|
executeBatch(calls: ToolCall[], context: ToolContext): Promise<ToolExecutionResult[]>;
|
|
496
555
|
}
|
|
497
556
|
|
|
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 };
|
|
557
|
+
export { type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type Conversation, type ConversationState, type ConversationStore, type CronJobConfig, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, LocalUploadStore, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type ModelProviderFactory, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PonchoConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, S3UploadStore, STORAGE_SCHEMA_VERSION, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type TelemetryConfig, TelemetryEmitter, type ToolCall, ToolDispatcher, type ToolExecutionResult, type UploadStore, type UploadsConfig, VercelBlobUploadStore, buildAgentDirectoryName, buildSkillContextWindow, createConversationStore, createDefaultTools, createMemoryStore, createMemoryTools, createModelProvider, createSkillTools, createStateStore, createUploadStore, createWriteTool, deriveUploadKey, ensureAgentIdentity, generateAgentId, getAgentStoreDirectory, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };
|