@poncho-ai/sdk 1.7.0 → 1.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 +11 -11
- package/.turbo/turbo-test.log +0 -14
- package/CHANGELOG.md +22 -0
- package/dist/index.d.ts +6 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.7.
|
|
2
|
+
> @poncho-ai/sdk@1.7.1 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
CLI Building entry: src/index.ts
|
|
6
|
+
CLI Using tsconfig: tsconfig.json
|
|
7
|
+
CLI tsup v8.5.1
|
|
8
|
+
CLI Target: es2022
|
|
9
|
+
ESM Build start
|
|
10
|
+
ESM dist/index.js 12.46 KB
|
|
11
|
+
ESM ⚡️ Build success in 21ms
|
|
12
|
+
DTS Build start
|
|
13
|
+
DTS ⚡️ Build success in 1577ms
|
|
14
|
+
DTS dist/index.d.ts 24.03 KB
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @poncho-ai/sdk@1.6.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 1[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 15:57:51
|
|
13
|
-
[2m Duration [22m 401ms[2m (transform 116ms, setup 0ms, collect 115ms, tests 1ms, environment 0ms, prepare 80ms)[22m
|
|
14
|
-
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`83d3c5f`](https://github.com/cesr/poncho-ai/commit/83d3c5f841fe84965d1f9fec6dfc5d8832e4489a) Thanks [@cesr](https://github.com/cesr)! - feat: add multi-tenancy with JWT-based tenant scoping
|
|
8
|
+
|
|
9
|
+
Deploy one agent, serve many tenants with fully isolated conversations, memory, reminders, and secrets. Tenancy activates automatically when a valid JWT is received — no config changes needed.
|
|
10
|
+
- **Auth**: `createTenantToken()` in client SDK, `poncho auth create-token` CLI, or any HS256 JWT library.
|
|
11
|
+
- **Isolation**: conversations, memory, reminders, and todos scoped per tenant.
|
|
12
|
+
- **Per-tenant secrets**: encrypted secret overrides for MCP auth tokens, manageable via CLI (`poncho secrets`), API, and web UI settings panel.
|
|
13
|
+
- **MCP**: per-tenant token resolution with deferred discovery for servers without a default env var.
|
|
14
|
+
- **Web UI**: `?token=` tenant access, settings cog for secret management, dark mode support.
|
|
15
|
+
- **Backward compatible**: existing single-user deployments work unchanged.
|
|
16
|
+
|
|
17
|
+
## 1.7.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#54](https://github.com/cesr/poncho-ai/pull/54) [`2341915`](https://github.com/cesr/poncho-ai/commit/23419152d52c39f3bcaf8cdcd424625d5f897315) Thanks [@cesr](https://github.com/cesr)! - Reduce high-cost outliers with aggressive runtime controls and better cost visibility.
|
|
22
|
+
|
|
23
|
+
This adds older-turn tool result archiving/truncation, tighter retry/step/subagent limits, compaction tuning, selective prompt cache behavior, and richer cache-write token attribution in logs/events.
|
|
24
|
+
|
|
3
25
|
## 1.7.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -559,6 +559,7 @@ interface Message {
|
|
|
559
559
|
timestamp?: number;
|
|
560
560
|
tokenCount?: number;
|
|
561
561
|
step?: number;
|
|
562
|
+
runId?: string;
|
|
562
563
|
toolActivity?: string[];
|
|
563
564
|
sections?: Array<{
|
|
564
565
|
type: "text" | "tools";
|
|
@@ -577,6 +578,8 @@ interface ToolContext {
|
|
|
577
578
|
parameters: Record<string, unknown>;
|
|
578
579
|
abortSignal?: AbortSignal;
|
|
579
580
|
conversationId?: string;
|
|
581
|
+
/** The tenant ID when running in multi-tenant mode. */
|
|
582
|
+
tenantId?: string;
|
|
580
583
|
}
|
|
581
584
|
type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (input: TInput, context: ToolContext) => Promise<TOutput> | TOutput;
|
|
582
585
|
interface ToolDefinition<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> {
|
|
@@ -607,11 +610,14 @@ interface RunInput {
|
|
|
607
610
|
conversationId?: string;
|
|
608
611
|
/** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
|
|
609
612
|
disableSoftDeadline?: boolean;
|
|
613
|
+
/** Scope this run to a specific tenant. */
|
|
614
|
+
tenantId?: string;
|
|
610
615
|
}
|
|
611
616
|
interface TokenUsage {
|
|
612
617
|
input: number;
|
|
613
618
|
output: number;
|
|
614
619
|
cached: number;
|
|
620
|
+
cacheWrite?: number;
|
|
615
621
|
}
|
|
616
622
|
interface RunResult {
|
|
617
623
|
status: "completed" | "error" | "cancelled";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface Message {
|
|
|
34
34
|
timestamp?: number;
|
|
35
35
|
tokenCount?: number;
|
|
36
36
|
step?: number;
|
|
37
|
+
runId?: string;
|
|
37
38
|
toolActivity?: string[];
|
|
38
39
|
sections?: Array<{ type: "text" | "tools"; content: string | string[] }>;
|
|
39
40
|
isCompactionSummary?: boolean;
|
|
@@ -57,6 +58,8 @@ export interface ToolContext {
|
|
|
57
58
|
parameters: Record<string, unknown>;
|
|
58
59
|
abortSignal?: AbortSignal;
|
|
59
60
|
conversationId?: string;
|
|
61
|
+
/** The tenant ID when running in multi-tenant mode. */
|
|
62
|
+
tenantId?: string;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (
|
|
@@ -104,12 +107,15 @@ export interface RunInput {
|
|
|
104
107
|
conversationId?: string;
|
|
105
108
|
/** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
|
|
106
109
|
disableSoftDeadline?: boolean;
|
|
110
|
+
/** Scope this run to a specific tenant. */
|
|
111
|
+
tenantId?: string;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
export interface TokenUsage {
|
|
110
115
|
input: number;
|
|
111
116
|
output: number;
|
|
112
117
|
cached: number;
|
|
118
|
+
cacheWrite?: number;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
export interface RunResult {
|