@poncho-ai/sdk 1.3.0 → 1.4.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/.turbo/turbo-lint.log +6 -0
- package/.turbo/turbo-test.log +14 -0
- package/CHANGELOG.md +15 -0
- package/dist/index.d.ts +56 -4
- package/dist/index.js +42 -0
- package/package.json +1 -1
- package/src/config-registry.ts +42 -0
- package/src/index.ts +6 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.
|
|
2
|
+
> @poncho-ai/sdk@1.4.1 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
|
|
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[32m11.44 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 42ms
|
|
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 922ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m21.50 KB[39m
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
> @poncho-ai/sdk@1.1.1 test /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
|
|
3
|
+
> vitest
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[7m[1m[36m RUN [39m[22m[27m [36mv1.6.1[39m [90m/Users/cesar/Dev/latitude/poncho-ai/packages/sdk[39m
|
|
7
|
+
|
|
8
|
+
[32m✓[39m test/sdk.test.ts [2m ([22m[2m1 test[22m[2m)[22m[90m 3[2mms[22m[39m
|
|
9
|
+
|
|
10
|
+
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
11
|
+
[2m Tests [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
12
|
+
[2m Start at [22m 17:47:36
|
|
13
|
+
[2m Duration [22m 992ms[2m (transform 343ms, setup 0ms, collect 429ms, tests 3ms, environment 0ms, prepare 129ms)[22m
|
|
14
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 1.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`de28ef5`](https://github.com/cesr/poncho-ai/commit/de28ef5acceed921269d15816acd392f5208f03d) Thanks [@cesr](https://github.com/cesr)! - Add Telegram messaging adapter with private/group chat support, file attachments, /new command, and typing indicators.
|
|
8
|
+
|
|
9
|
+
## 1.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`075b9ac`](https://github.com/cesr/poncho-ai/commit/075b9ac3556847af913bf2b58f030575c3b99852) Thanks [@cesr](https://github.com/cesr)! - Batch tool approvals, fix serverless session persistence and adapter init
|
|
14
|
+
- Batch tool approvals: all approval-requiring tool calls in a single step are now collected and presented together instead of one at a time.
|
|
15
|
+
- Fix messaging adapter route registration: routes are only registered after successful initialization, preventing "Adapter not initialised" errors on Vercel.
|
|
16
|
+
- Add stateless signed-cookie sessions so web UI auth survives serverless cold starts.
|
|
17
|
+
|
|
3
18
|
## 1.3.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -321,6 +321,9 @@ declare const ONBOARDING_FIELDS: readonly [{
|
|
|
321
321
|
}, {
|
|
322
322
|
readonly value: "slack";
|
|
323
323
|
readonly label: "Slack";
|
|
324
|
+
}, {
|
|
325
|
+
readonly value: "telegram";
|
|
326
|
+
readonly label: "Telegram";
|
|
324
327
|
}, {
|
|
325
328
|
readonly value: "resend";
|
|
326
329
|
readonly label: "Email (Resend)";
|
|
@@ -356,6 +359,38 @@ declare const ONBOARDING_FIELDS: readonly [{
|
|
|
356
359
|
readonly fieldId: "messaging.platform";
|
|
357
360
|
readonly equals: "slack";
|
|
358
361
|
};
|
|
362
|
+
}, {
|
|
363
|
+
readonly id: "env.TELEGRAM_BOT_TOKEN";
|
|
364
|
+
readonly domain: "messaging";
|
|
365
|
+
readonly target: "env";
|
|
366
|
+
readonly path: "TELEGRAM_BOT_TOKEN";
|
|
367
|
+
readonly kind: "string";
|
|
368
|
+
readonly scopes: ["full"];
|
|
369
|
+
readonly label: "Telegram Bot Token";
|
|
370
|
+
readonly prompt: "Telegram Bot Token (from @BotFather)";
|
|
371
|
+
readonly defaultValue: "";
|
|
372
|
+
readonly placeholder: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11";
|
|
373
|
+
readonly secret: true;
|
|
374
|
+
readonly dependsOn: {
|
|
375
|
+
readonly fieldId: "messaging.platform";
|
|
376
|
+
readonly equals: "telegram";
|
|
377
|
+
};
|
|
378
|
+
}, {
|
|
379
|
+
readonly id: "env.TELEGRAM_WEBHOOK_SECRET";
|
|
380
|
+
readonly domain: "messaging";
|
|
381
|
+
readonly target: "env";
|
|
382
|
+
readonly path: "TELEGRAM_WEBHOOK_SECRET";
|
|
383
|
+
readonly kind: "string";
|
|
384
|
+
readonly scopes: ["full"];
|
|
385
|
+
readonly label: "Telegram Webhook Secret";
|
|
386
|
+
readonly prompt: "Webhook secret token (optional, recommended for security)";
|
|
387
|
+
readonly defaultValue: "";
|
|
388
|
+
readonly placeholder: "my-secret-token";
|
|
389
|
+
readonly secret: true;
|
|
390
|
+
readonly dependsOn: {
|
|
391
|
+
readonly fieldId: "messaging.platform";
|
|
392
|
+
readonly equals: "telegram";
|
|
393
|
+
};
|
|
359
394
|
}, {
|
|
360
395
|
readonly id: "env.RESEND_API_KEY";
|
|
361
396
|
readonly domain: "messaging";
|
|
@@ -403,6 +438,21 @@ declare const ONBOARDING_FIELDS: readonly [{
|
|
|
403
438
|
readonly fieldId: "messaging.platform";
|
|
404
439
|
readonly equals: "resend";
|
|
405
440
|
};
|
|
441
|
+
}, {
|
|
442
|
+
readonly id: "env.RESEND_REPLY_TO";
|
|
443
|
+
readonly domain: "messaging";
|
|
444
|
+
readonly target: "env";
|
|
445
|
+
readonly path: "RESEND_REPLY_TO";
|
|
446
|
+
readonly kind: "string";
|
|
447
|
+
readonly scopes: ["full"];
|
|
448
|
+
readonly label: "Reply-To Address";
|
|
449
|
+
readonly prompt: "Reply-To address for outgoing emails (optional, defaults to From address)";
|
|
450
|
+
readonly defaultValue: "";
|
|
451
|
+
readonly placeholder: "support@yourdomain.com";
|
|
452
|
+
readonly dependsOn: {
|
|
453
|
+
readonly fieldId: "messaging.platform";
|
|
454
|
+
readonly equals: "resend";
|
|
455
|
+
};
|
|
406
456
|
}, {
|
|
407
457
|
readonly id: "messaging.resend.mode";
|
|
408
458
|
readonly domain: "messaging";
|
|
@@ -604,10 +654,12 @@ type AgentEvent = {
|
|
|
604
654
|
reason?: string;
|
|
605
655
|
} | {
|
|
606
656
|
type: "tool:approval:checkpoint";
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
657
|
+
approvals: Array<{
|
|
658
|
+
approvalId: string;
|
|
659
|
+
tool: string;
|
|
660
|
+
toolCallId: string;
|
|
661
|
+
input: Record<string, unknown>;
|
|
662
|
+
}>;
|
|
611
663
|
checkpointMessages: Message[];
|
|
612
664
|
pendingToolCalls: Array<{
|
|
613
665
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -250,6 +250,7 @@ var ONBOARDING_FIELDS = [
|
|
|
250
250
|
options: [
|
|
251
251
|
{ value: "none", label: "None" },
|
|
252
252
|
{ value: "slack", label: "Slack" },
|
|
253
|
+
{ value: "telegram", label: "Telegram" },
|
|
253
254
|
{ value: "resend", label: "Email (Resend)" }
|
|
254
255
|
]
|
|
255
256
|
},
|
|
@@ -280,6 +281,34 @@ var ONBOARDING_FIELDS = [
|
|
|
280
281
|
secret: true,
|
|
281
282
|
dependsOn: { fieldId: "messaging.platform", equals: "slack" }
|
|
282
283
|
},
|
|
284
|
+
{
|
|
285
|
+
id: "env.TELEGRAM_BOT_TOKEN",
|
|
286
|
+
domain: "messaging",
|
|
287
|
+
target: "env",
|
|
288
|
+
path: "TELEGRAM_BOT_TOKEN",
|
|
289
|
+
kind: "string",
|
|
290
|
+
scopes: ["full"],
|
|
291
|
+
label: "Telegram Bot Token",
|
|
292
|
+
prompt: "Telegram Bot Token (from @BotFather)",
|
|
293
|
+
defaultValue: "",
|
|
294
|
+
placeholder: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
|
|
295
|
+
secret: true,
|
|
296
|
+
dependsOn: { fieldId: "messaging.platform", equals: "telegram" }
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: "env.TELEGRAM_WEBHOOK_SECRET",
|
|
300
|
+
domain: "messaging",
|
|
301
|
+
target: "env",
|
|
302
|
+
path: "TELEGRAM_WEBHOOK_SECRET",
|
|
303
|
+
kind: "string",
|
|
304
|
+
scopes: ["full"],
|
|
305
|
+
label: "Telegram Webhook Secret",
|
|
306
|
+
prompt: "Webhook secret token (optional, recommended for security)",
|
|
307
|
+
defaultValue: "",
|
|
308
|
+
placeholder: "my-secret-token",
|
|
309
|
+
secret: true,
|
|
310
|
+
dependsOn: { fieldId: "messaging.platform", equals: "telegram" }
|
|
311
|
+
},
|
|
283
312
|
{
|
|
284
313
|
id: "env.RESEND_API_KEY",
|
|
285
314
|
domain: "messaging",
|
|
@@ -321,6 +350,19 @@ var ONBOARDING_FIELDS = [
|
|
|
321
350
|
placeholder: "Agent <agent@yourdomain.com>",
|
|
322
351
|
dependsOn: { fieldId: "messaging.platform", equals: "resend" }
|
|
323
352
|
},
|
|
353
|
+
{
|
|
354
|
+
id: "env.RESEND_REPLY_TO",
|
|
355
|
+
domain: "messaging",
|
|
356
|
+
target: "env",
|
|
357
|
+
path: "RESEND_REPLY_TO",
|
|
358
|
+
kind: "string",
|
|
359
|
+
scopes: ["full"],
|
|
360
|
+
label: "Reply-To Address",
|
|
361
|
+
prompt: "Reply-To address for outgoing emails (optional, defaults to From address)",
|
|
362
|
+
defaultValue: "",
|
|
363
|
+
placeholder: "support@yourdomain.com",
|
|
364
|
+
dependsOn: { fieldId: "messaging.platform", equals: "resend" }
|
|
365
|
+
},
|
|
324
366
|
{
|
|
325
367
|
id: "messaging.resend.mode",
|
|
326
368
|
domain: "messaging",
|
package/package.json
CHANGED
package/src/config-registry.ts
CHANGED
|
@@ -295,6 +295,7 @@ export const ONBOARDING_FIELDS = [
|
|
|
295
295
|
options: [
|
|
296
296
|
{ value: "none", label: "None" },
|
|
297
297
|
{ value: "slack", label: "Slack" },
|
|
298
|
+
{ value: "telegram", label: "Telegram" },
|
|
298
299
|
{ value: "resend", label: "Email (Resend)" },
|
|
299
300
|
],
|
|
300
301
|
},
|
|
@@ -325,6 +326,34 @@ export const ONBOARDING_FIELDS = [
|
|
|
325
326
|
secret: true,
|
|
326
327
|
dependsOn: { fieldId: "messaging.platform", equals: "slack" },
|
|
327
328
|
},
|
|
329
|
+
{
|
|
330
|
+
id: "env.TELEGRAM_BOT_TOKEN",
|
|
331
|
+
domain: "messaging",
|
|
332
|
+
target: "env",
|
|
333
|
+
path: "TELEGRAM_BOT_TOKEN",
|
|
334
|
+
kind: "string",
|
|
335
|
+
scopes: ["full"],
|
|
336
|
+
label: "Telegram Bot Token",
|
|
337
|
+
prompt: "Telegram Bot Token (from @BotFather)",
|
|
338
|
+
defaultValue: "",
|
|
339
|
+
placeholder: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
|
|
340
|
+
secret: true,
|
|
341
|
+
dependsOn: { fieldId: "messaging.platform", equals: "telegram" },
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
id: "env.TELEGRAM_WEBHOOK_SECRET",
|
|
345
|
+
domain: "messaging",
|
|
346
|
+
target: "env",
|
|
347
|
+
path: "TELEGRAM_WEBHOOK_SECRET",
|
|
348
|
+
kind: "string",
|
|
349
|
+
scopes: ["full"],
|
|
350
|
+
label: "Telegram Webhook Secret",
|
|
351
|
+
prompt: "Webhook secret token (optional, recommended for security)",
|
|
352
|
+
defaultValue: "",
|
|
353
|
+
placeholder: "my-secret-token",
|
|
354
|
+
secret: true,
|
|
355
|
+
dependsOn: { fieldId: "messaging.platform", equals: "telegram" },
|
|
356
|
+
},
|
|
328
357
|
{
|
|
329
358
|
id: "env.RESEND_API_KEY",
|
|
330
359
|
domain: "messaging",
|
|
@@ -366,6 +395,19 @@ export const ONBOARDING_FIELDS = [
|
|
|
366
395
|
placeholder: "Agent <agent@yourdomain.com>",
|
|
367
396
|
dependsOn: { fieldId: "messaging.platform", equals: "resend" },
|
|
368
397
|
},
|
|
398
|
+
{
|
|
399
|
+
id: "env.RESEND_REPLY_TO",
|
|
400
|
+
domain: "messaging",
|
|
401
|
+
target: "env",
|
|
402
|
+
path: "RESEND_REPLY_TO",
|
|
403
|
+
kind: "string",
|
|
404
|
+
scopes: ["full"],
|
|
405
|
+
label: "Reply-To Address",
|
|
406
|
+
prompt: "Reply-To address for outgoing emails (optional, defaults to From address)",
|
|
407
|
+
defaultValue: "",
|
|
408
|
+
placeholder: "support@yourdomain.com",
|
|
409
|
+
dependsOn: { fieldId: "messaging.platform", equals: "resend" },
|
|
410
|
+
},
|
|
369
411
|
{
|
|
370
412
|
id: "messaging.resend.mode",
|
|
371
413
|
domain: "messaging",
|
package/src/index.ts
CHANGED
|
@@ -149,10 +149,12 @@ export type AgentEvent =
|
|
|
149
149
|
| { type: "tool:approval:denied"; approvalId: string; reason?: string }
|
|
150
150
|
| {
|
|
151
151
|
type: "tool:approval:checkpoint";
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
approvals: Array<{
|
|
153
|
+
approvalId: string;
|
|
154
|
+
tool: string;
|
|
155
|
+
toolCallId: string;
|
|
156
|
+
input: Record<string, unknown>;
|
|
157
|
+
}>;
|
|
156
158
|
checkpointMessages: Message[];
|
|
157
159
|
pendingToolCalls: Array<{ id: string; name: string; input: Record<string, unknown> }>;
|
|
158
160
|
}
|