@poncho-ai/harness 0.14.1 → 0.15.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 +20 -0
- package/dist/index.d.ts +53 -17
- package/dist/index.js +241 -43
- package/package.json +2 -2
- package/src/config.ts +25 -8
- package/src/harness.ts +268 -35
- package/src/latitude-capture.ts +9 -10
- package/src/memory.ts +8 -13
- package/src/model-factory.ts +13 -6
- package/src/state.ts +14 -12
- package/src/telemetry.ts +15 -3
- package/test/telemetry.test.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.
|
|
2
|
+
> @poncho-ai/harness@0.15.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[32m182.55 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 144ms
|
|
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 6528ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m22.34 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`139ed89`](https://github.com/cesr/poncho-ai/commit/139ed89a5df2372cfb0a124c967f51f4d8158c3b) Thanks [@cesr](https://github.com/cesr)! - Add browser automation for Poncho agents with real-time viewport streaming, per-conversation tab management, interactive browser control in the web UI, and shared agent-level profiles for authentication persistence.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`139ed89`](https://github.com/cesr/poncho-ai/commit/139ed89a5df2372cfb0a124c967f51f4d8158c3b)]:
|
|
12
|
+
- @poncho-ai/sdk@1.1.0
|
|
13
|
+
|
|
14
|
+
## 0.14.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`1f47bb4`](https://github.com/cesr/poncho-ai/commit/1f47bb49e5d48dc17644172012b057190b316469) Thanks [@cesr](https://github.com/cesr)! - Add conversation rename via double-click on the title in the web UI, standardize all credential config fields to the `*Env` naming pattern, and sync the init README template with the repo README.
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`1f47bb4`](https://github.com/cesr/poncho-ai/commit/1f47bb49e5d48dc17644172012b057190b316469)]:
|
|
21
|
+
- @poncho-ai/sdk@1.0.3
|
|
22
|
+
|
|
3
23
|
## 0.14.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -111,8 +111,8 @@ type StateProviderName = "local" | "memory" | "redis" | "upstash" | "dynamodb";
|
|
|
111
111
|
interface StateConfig {
|
|
112
112
|
provider?: StateProviderName;
|
|
113
113
|
ttl?: number;
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
urlEnv?: string;
|
|
115
|
+
tokenEnv?: string;
|
|
116
116
|
table?: string;
|
|
117
117
|
region?: string;
|
|
118
118
|
}
|
|
@@ -154,8 +154,8 @@ interface MainMemory {
|
|
|
154
154
|
interface MemoryConfig {
|
|
155
155
|
enabled?: boolean;
|
|
156
156
|
provider?: StateProviderName;
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
urlEnv?: string;
|
|
158
|
+
tokenEnv?: string;
|
|
159
159
|
table?: string;
|
|
160
160
|
region?: string;
|
|
161
161
|
ttl?: number;
|
|
@@ -218,8 +218,8 @@ declare class LocalMcpBridge {
|
|
|
218
218
|
|
|
219
219
|
interface StorageConfig {
|
|
220
220
|
provider?: "local" | "memory" | "redis" | "upstash" | "dynamodb";
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
urlEnv?: string;
|
|
222
|
+
tokenEnv?: string;
|
|
223
223
|
table?: string;
|
|
224
224
|
region?: string;
|
|
225
225
|
ttl?: number | {
|
|
@@ -274,6 +274,7 @@ interface PonchoConfig extends McpConfig {
|
|
|
274
274
|
required?: boolean;
|
|
275
275
|
type?: "bearer" | "header" | "custom";
|
|
276
276
|
headerName?: string;
|
|
277
|
+
tokenEnv?: string;
|
|
277
278
|
validate?: (token: string, req?: unknown) => Promise<boolean> | boolean;
|
|
278
279
|
};
|
|
279
280
|
state?: {
|
|
@@ -283,12 +284,20 @@ interface PonchoConfig extends McpConfig {
|
|
|
283
284
|
};
|
|
284
285
|
memory?: MemoryConfig;
|
|
285
286
|
storage?: StorageConfig;
|
|
287
|
+
providers?: {
|
|
288
|
+
openai?: {
|
|
289
|
+
apiKeyEnv?: string;
|
|
290
|
+
};
|
|
291
|
+
anthropic?: {
|
|
292
|
+
apiKeyEnv?: string;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
286
295
|
telemetry?: {
|
|
287
296
|
enabled?: boolean;
|
|
288
297
|
otlp?: string;
|
|
289
298
|
latitude?: {
|
|
290
|
-
|
|
291
|
-
|
|
299
|
+
apiKeyEnv?: string;
|
|
300
|
+
projectIdEnv?: string;
|
|
292
301
|
path?: string;
|
|
293
302
|
documentPath?: string;
|
|
294
303
|
};
|
|
@@ -307,6 +316,19 @@ interface PonchoConfig extends McpConfig {
|
|
|
307
316
|
};
|
|
308
317
|
/** Set to `false` to disable the built-in web UI (headless / API-only mode). */
|
|
309
318
|
webUi?: false;
|
|
319
|
+
/** Enable browser automation tools. Set `true` for defaults, or provide config. */
|
|
320
|
+
browser?: boolean | {
|
|
321
|
+
viewport?: {
|
|
322
|
+
width?: number;
|
|
323
|
+
height?: number;
|
|
324
|
+
};
|
|
325
|
+
quality?: number;
|
|
326
|
+
everyNthFrame?: number;
|
|
327
|
+
profileDir?: string;
|
|
328
|
+
sessionName?: string;
|
|
329
|
+
executablePath?: string;
|
|
330
|
+
headless?: boolean;
|
|
331
|
+
};
|
|
310
332
|
}
|
|
311
333
|
declare const resolveStateConfig: (config: PonchoConfig | undefined) => StateConfig | undefined;
|
|
312
334
|
declare const resolveMemoryConfig: (config: PonchoConfig | undefined) => MemoryConfig | undefined;
|
|
@@ -363,12 +385,20 @@ type ModelProviderFactory = (modelName: string) => LanguageModel;
|
|
|
363
385
|
* resolve via the base prefix. Longest match wins.
|
|
364
386
|
*/
|
|
365
387
|
declare const getModelContextWindow: (modelName: string) => number;
|
|
388
|
+
interface ProviderConfig {
|
|
389
|
+
openai?: {
|
|
390
|
+
apiKeyEnv?: string;
|
|
391
|
+
};
|
|
392
|
+
anthropic?: {
|
|
393
|
+
apiKeyEnv?: string;
|
|
394
|
+
};
|
|
395
|
+
}
|
|
366
396
|
/**
|
|
367
|
-
* Creates a model provider factory for the specified AI provider
|
|
368
|
-
*
|
|
369
|
-
*
|
|
397
|
+
* Creates a model provider factory for the specified AI provider.
|
|
398
|
+
* API keys are read from environment variables; override the env var
|
|
399
|
+
* name via the `providers` config in `poncho.config.js`.
|
|
370
400
|
*/
|
|
371
|
-
declare const createModelProvider: (provider?: string) => ModelProviderFactory;
|
|
401
|
+
declare const createModelProvider: (provider?: string, config?: ProviderConfig) => ModelProviderFactory;
|
|
372
402
|
|
|
373
403
|
interface ToolCall {
|
|
374
404
|
id: string;
|
|
@@ -422,6 +452,8 @@ declare class AgentHarness {
|
|
|
422
452
|
private readonly registeredMcpToolNames;
|
|
423
453
|
private latitudeTelemetry?;
|
|
424
454
|
private insideTelemetryCapture;
|
|
455
|
+
private _browserSession?;
|
|
456
|
+
private _browserMod?;
|
|
425
457
|
private parsedAgent?;
|
|
426
458
|
private mcpBridge?;
|
|
427
459
|
private resolveToolAccess;
|
|
@@ -454,6 +486,10 @@ declare class AgentHarness {
|
|
|
454
486
|
private registerSkillTools;
|
|
455
487
|
private refreshSkillsIfChanged;
|
|
456
488
|
initialize(): Promise<void>;
|
|
489
|
+
private initBrowserTools;
|
|
490
|
+
/** Conversation ID of the currently executing run (set during run, cleared after). */
|
|
491
|
+
private _currentRunConversationId?;
|
|
492
|
+
get browserSession(): unknown;
|
|
457
493
|
shutdown(): Promise<void>;
|
|
458
494
|
listTools(): ToolDefinition[];
|
|
459
495
|
/**
|
|
@@ -489,8 +525,8 @@ declare class AgentHarness {
|
|
|
489
525
|
* Vercel AI SDK support.
|
|
490
526
|
*/
|
|
491
527
|
interface LatitudeCaptureConfig {
|
|
492
|
-
|
|
493
|
-
|
|
528
|
+
apiKeyEnv?: string;
|
|
529
|
+
projectIdEnv?: string;
|
|
494
530
|
path?: string;
|
|
495
531
|
defaultPath?: string;
|
|
496
532
|
}
|
|
@@ -585,8 +621,8 @@ interface TelemetryConfig {
|
|
|
585
621
|
enabled?: boolean;
|
|
586
622
|
otlp?: string;
|
|
587
623
|
latitude?: {
|
|
588
|
-
|
|
589
|
-
|
|
624
|
+
apiKeyEnv?: string;
|
|
625
|
+
projectIdEnv?: string;
|
|
590
626
|
path?: string;
|
|
591
627
|
documentPath?: string;
|
|
592
628
|
};
|
|
@@ -599,4 +635,4 @@ declare class TelemetryEmitter {
|
|
|
599
635
|
private sendOtlp;
|
|
600
636
|
}
|
|
601
637
|
|
|
602
|
-
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 MessagingChannelConfig, 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 ToolAccess, 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, getModelContextWindow, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };
|
|
638
|
+
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 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 TelemetryConfig, TelemetryEmitter, type ToolAccess, 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, getModelContextWindow, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };
|