@poncho-ai/harness 0.13.0 → 0.13.1
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 +9 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +25 -0
- package/package.json +2 -2
- package/src/config.ts +7 -0
- package/src/harness.ts +25 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.13.
|
|
2
|
+
> @poncho-ai/harness@0.13.1 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[32m162.92 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 81ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 5035ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.73 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#10](https://github.com/cesr/poncho-ai/pull/10) [`d5bce7b`](https://github.com/cesr/poncho-ai/commit/d5bce7be5890c657bea915eb0926feb6de66b218) Thanks [@cesr](https://github.com/cesr)! - Add generic messaging layer with Slack as the first adapter. Agents can now respond to @mentions in Slack by adding `messaging: [{ platform: 'slack' }]` to `poncho.config.js`. Includes signature verification, threaded conversations, processing indicators, and Vercel `waitUntil` support.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`d5bce7b`](https://github.com/cesr/poncho-ai/commit/d5bce7be5890c657bea915eb0926feb6de66b218)]:
|
|
10
|
+
- @poncho-ai/sdk@1.0.1
|
|
11
|
+
|
|
3
12
|
## 0.13.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -235,8 +235,14 @@ type BuiltInToolToggles = {
|
|
|
235
235
|
read_file?: boolean;
|
|
236
236
|
write_file?: boolean;
|
|
237
237
|
};
|
|
238
|
+
interface MessagingChannelConfig {
|
|
239
|
+
platform: "slack";
|
|
240
|
+
botTokenEnv?: string;
|
|
241
|
+
signingSecretEnv?: string;
|
|
242
|
+
}
|
|
238
243
|
interface PonchoConfig extends McpConfig {
|
|
239
244
|
harness?: string;
|
|
245
|
+
messaging?: MessagingChannelConfig[];
|
|
240
246
|
tools?: {
|
|
241
247
|
defaults?: BuiltInToolToggles;
|
|
242
248
|
byEnvironment?: {
|
|
@@ -554,4 +560,4 @@ declare class ToolDispatcher {
|
|
|
554
560
|
executeBatch(calls: ToolCall[], context: ToolContext): Promise<ToolExecutionResult[]>;
|
|
555
561
|
}
|
|
556
562
|
|
|
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 };
|
|
563
|
+
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 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 };
|
package/dist/index.js
CHANGED
|
@@ -2632,6 +2632,31 @@ cron:
|
|
|
2632
2632
|
- To carry context across cron runs, enable memory.
|
|
2633
2633
|
- **IMPORTANT**: When adding a new cron job, always PRESERVE all existing cron jobs. Never remove or overwrite existing jobs unless the user explicitly asks you to replace or delete them. Read the full current \`cron:\` block before editing, and append the new job alongside the existing ones.
|
|
2634
2634
|
|
|
2635
|
+
## Messaging Integrations (Slack, etc.)
|
|
2636
|
+
|
|
2637
|
+
Users can connect this agent to messaging platforms so it responds to @mentions.
|
|
2638
|
+
|
|
2639
|
+
### Slack Setup
|
|
2640
|
+
|
|
2641
|
+
1. Create a Slack App at https://api.slack.com/apps ("From scratch")
|
|
2642
|
+
2. Under **OAuth & Permissions**, add Bot Token Scopes: \`app_mentions:read\`, \`chat:write\`, \`reactions:write\`
|
|
2643
|
+
3. Under **Event Subscriptions**, enable events, set the Request URL to \`https://<deployed-url>/api/messaging/slack\`, and subscribe to \`app_mention\`
|
|
2644
|
+
4. Install the app to the workspace (generates Bot Token \`xoxb-...\`)
|
|
2645
|
+
5. Copy the **Signing Secret** from the Basic Information page
|
|
2646
|
+
6. Add env vars:
|
|
2647
|
+
\`\`\`
|
|
2648
|
+
SLACK_BOT_TOKEN=xoxb-...
|
|
2649
|
+
SLACK_SIGNING_SECRET=...
|
|
2650
|
+
\`\`\`
|
|
2651
|
+
7. Add to \`poncho.config.js\`:
|
|
2652
|
+
\`\`\`javascript
|
|
2653
|
+
messaging: [{ platform: 'slack' }]
|
|
2654
|
+
\`\`\`
|
|
2655
|
+
8. Deploy (or use a tunnel like ngrok for local dev)
|
|
2656
|
+
9. **Vercel only:** install \`@vercel/functions\` so the serverless function stays alive while processing messages (\`npm install @vercel/functions\`)
|
|
2657
|
+
|
|
2658
|
+
The agent will respond in Slack threads when @mentioned. Each Slack thread maps to a separate Poncho conversation.
|
|
2659
|
+
|
|
2635
2660
|
## When users ask about customization:
|
|
2636
2661
|
|
|
2637
2662
|
- Explain and edit \`poncho.config.js\` for model/provider, storage+memory, auth, telemetry, and MCP settings.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poncho-ai/harness",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Agent execution runtime - conversation loop, tool dispatch, streaming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"redis": "^5.10.0",
|
|
31
31
|
"yaml": "^2.4.0",
|
|
32
32
|
"zod": "^3.22.0",
|
|
33
|
-
"@poncho-ai/sdk": "1.0.
|
|
33
|
+
"@poncho-ai/sdk": "1.0.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/mustache": "^4.2.6",
|
package/src/config.ts
CHANGED
|
@@ -38,8 +38,15 @@ export type BuiltInToolToggles = {
|
|
|
38
38
|
write_file?: boolean;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
export interface MessagingChannelConfig {
|
|
42
|
+
platform: "slack";
|
|
43
|
+
botTokenEnv?: string;
|
|
44
|
+
signingSecretEnv?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
export interface PonchoConfig extends McpConfig {
|
|
42
48
|
harness?: string;
|
|
49
|
+
messaging?: MessagingChannelConfig[];
|
|
43
50
|
tools?: {
|
|
44
51
|
defaults?: BuiltInToolToggles;
|
|
45
52
|
byEnvironment?: {
|
package/src/harness.ts
CHANGED
|
@@ -255,6 +255,31 @@ cron:
|
|
|
255
255
|
- To carry context across cron runs, enable memory.
|
|
256
256
|
- **IMPORTANT**: When adding a new cron job, always PRESERVE all existing cron jobs. Never remove or overwrite existing jobs unless the user explicitly asks you to replace or delete them. Read the full current \`cron:\` block before editing, and append the new job alongside the existing ones.
|
|
257
257
|
|
|
258
|
+
## Messaging Integrations (Slack, etc.)
|
|
259
|
+
|
|
260
|
+
Users can connect this agent to messaging platforms so it responds to @mentions.
|
|
261
|
+
|
|
262
|
+
### Slack Setup
|
|
263
|
+
|
|
264
|
+
1. Create a Slack App at https://api.slack.com/apps ("From scratch")
|
|
265
|
+
2. Under **OAuth & Permissions**, add Bot Token Scopes: \`app_mentions:read\`, \`chat:write\`, \`reactions:write\`
|
|
266
|
+
3. Under **Event Subscriptions**, enable events, set the Request URL to \`https://<deployed-url>/api/messaging/slack\`, and subscribe to \`app_mention\`
|
|
267
|
+
4. Install the app to the workspace (generates Bot Token \`xoxb-...\`)
|
|
268
|
+
5. Copy the **Signing Secret** from the Basic Information page
|
|
269
|
+
6. Add env vars:
|
|
270
|
+
\`\`\`
|
|
271
|
+
SLACK_BOT_TOKEN=xoxb-...
|
|
272
|
+
SLACK_SIGNING_SECRET=...
|
|
273
|
+
\`\`\`
|
|
274
|
+
7. Add to \`poncho.config.js\`:
|
|
275
|
+
\`\`\`javascript
|
|
276
|
+
messaging: [{ platform: 'slack' }]
|
|
277
|
+
\`\`\`
|
|
278
|
+
8. Deploy (or use a tunnel like ngrok for local dev)
|
|
279
|
+
9. **Vercel only:** install \`@vercel/functions\` so the serverless function stays alive while processing messages (\`npm install @vercel/functions\`)
|
|
280
|
+
|
|
281
|
+
The agent will respond in Slack threads when @mentioned. Each Slack thread maps to a separate Poncho conversation.
|
|
282
|
+
|
|
258
283
|
## When users ask about customization:
|
|
259
284
|
|
|
260
285
|
- Explain and edit \`poncho.config.js\` for model/provider, storage+memory, auth, telemetry, and MCP settings.
|