@poncho-ai/sdk 1.15.2 → 1.16.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 +4 -4
- package/CHANGELOG.md +28 -0
- package/dist/index.d.ts +26 -4
- package/package.json +1 -1
- package/src/index.ts +26 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.
|
|
2
|
+
> @poncho-ai/sdk@1.16.0 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[32mESM[39m [1mdist/index.js [22m[32m17.24 KB[39m
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 24ms
|
|
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 1382ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m33.61 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 1.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8a5a367`](https://github.com/cesr/poncho-ai/commit/8a5a367dd4b2ea477b3e0146a7253cedcdc34a1c) Thanks [@cesr](https://github.com/cesr)! - Prompt-cache efficiency: tail breakpoint pin + volatile context slot + span attribution.
|
|
8
|
+
- **Second message-history cache breakpoint.** When prior-run tool results
|
|
9
|
+
are still untruncated, the history breakpoint used to sit only at the
|
|
10
|
+
last _stable_ index (before those results) — so a tool-heavy turn
|
|
11
|
+
re-sent everything after it raw on every step. Now a second breakpoint
|
|
12
|
+
is pinned at the true tail, so the current run reads its own growing
|
|
13
|
+
history at 0.1× while the stable entry keeps serving across runs.
|
|
14
|
+
`addPromptCacheBreakpoints` accepts `number | number[]` (out-of-range
|
|
15
|
+
indices dropped, duplicates collapsed). The Anthropic breakpoint budget
|
|
16
|
+
of 4 is now fully spent: static (1h), memory (1h), stable-history, tail.
|
|
17
|
+
- **`RunInput.volatileContext`** — per-run context rendered into the
|
|
18
|
+
_uncached_ dynamic tail of the system prompt. Embedders that previously
|
|
19
|
+
appended volatile blocks (live VFS tree, connected integrations) to the
|
|
20
|
+
agent body — busting the 1h static cache block on every change — can
|
|
21
|
+
pass them here instead, keeping the static block byte-stable (and
|
|
22
|
+
shareable across users when the agent definition is identical). The
|
|
23
|
+
value is captured per conversation so orchestrator-initiated turns
|
|
24
|
+
(continuations, subagent-callback resumes) reuse it. Forwarded through
|
|
25
|
+
`runConversationTurn` opts.
|
|
26
|
+
- **`RunInput.telemetryAttributes`** — extra attributes stamped on the
|
|
27
|
+
`invoke_agent` root span (e.g. `{"poncho.run.kind": "job"}`), letting
|
|
28
|
+
observability backends segment traffic classes without timing
|
|
29
|
+
forensics. Forwarded through `runConversationTurn` opts.
|
|
30
|
+
|
|
3
31
|
## 1.15.2
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -765,12 +765,26 @@ interface RunInput {
|
|
|
765
765
|
/** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
|
|
766
766
|
disableSoftDeadline?: boolean;
|
|
767
767
|
/**
|
|
768
|
-
* When true, skip the Anthropic prompt-cache
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
768
|
+
* When true, skip the Anthropic message-history prompt-cache breakpoints
|
|
769
|
+
* for this run (the 1h static/memory system breakpoints stay on).
|
|
770
|
+
* Only worth it for runs that are BOTH single-step AND one-shot: the
|
|
771
|
+
* breakpoint is recomputed every step, so any multi-step run reads its
|
|
772
|
+
* own growing history through it at 0.1× — disabling that costs far
|
|
773
|
+
* more than the one wasted 1.25× tail write it saves. (Cron-fired jobs
|
|
774
|
+
* used to set this; they stopped once job runs grew to dozens of steps.)
|
|
772
775
|
*/
|
|
773
776
|
disablePromptCache?: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Volatile per-run context appended to the UNCACHED dynamic tail of the
|
|
779
|
+
* system prompt (after the agent body / skills / memory blocks, which
|
|
780
|
+
* carry 1h cache breakpoints). Put content here that changes often and
|
|
781
|
+
* would otherwise bust the big static cache block if embedded in the
|
|
782
|
+
* agent definition — e.g. a live file-tree listing or connected-
|
|
783
|
+
* integrations summary. Re-sent raw on every step, so keep it small.
|
|
784
|
+
* Orchestrator-initiated turns on the same conversation (subagent
|
|
785
|
+
* callback resumes) reuse the value captured at parent-turn start.
|
|
786
|
+
*/
|
|
787
|
+
volatileContext?: string;
|
|
774
788
|
/**
|
|
775
789
|
* Model name override for this run, captured once at run start. Takes
|
|
776
790
|
* precedence over the agent definition's `model.name` for every step of
|
|
@@ -792,6 +806,14 @@ interface RunInput {
|
|
|
792
806
|
* exporter-less harness instance per mode.
|
|
793
807
|
*/
|
|
794
808
|
suppressTelemetry?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Extra attributes stamped on the `invoke_agent` root telemetry span,
|
|
811
|
+
* e.g. `{ "poncho.run.kind": "job", "poncho.job.name": "heartbeat" }`.
|
|
812
|
+
* Lets observability backends segment traffic classes (jobs vs chat)
|
|
813
|
+
* without timing forensics. String values only; ignored when telemetry
|
|
814
|
+
* is off or suppressed.
|
|
815
|
+
*/
|
|
816
|
+
telemetryAttributes?: Record<string, string>;
|
|
795
817
|
}
|
|
796
818
|
interface TokenUsage {
|
|
797
819
|
input: number;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -146,12 +146,26 @@ export interface RunInput {
|
|
|
146
146
|
/** When true, ignores PONCHO_MAX_DURATION soft deadline (used for background subagent runs). */
|
|
147
147
|
disableSoftDeadline?: boolean;
|
|
148
148
|
/**
|
|
149
|
-
* When true, skip the Anthropic prompt-cache
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
149
|
+
* When true, skip the Anthropic message-history prompt-cache breakpoints
|
|
150
|
+
* for this run (the 1h static/memory system breakpoints stay on).
|
|
151
|
+
* Only worth it for runs that are BOTH single-step AND one-shot: the
|
|
152
|
+
* breakpoint is recomputed every step, so any multi-step run reads its
|
|
153
|
+
* own growing history through it at 0.1× — disabling that costs far
|
|
154
|
+
* more than the one wasted 1.25× tail write it saves. (Cron-fired jobs
|
|
155
|
+
* used to set this; they stopped once job runs grew to dozens of steps.)
|
|
153
156
|
*/
|
|
154
157
|
disablePromptCache?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Volatile per-run context appended to the UNCACHED dynamic tail of the
|
|
160
|
+
* system prompt (after the agent body / skills / memory blocks, which
|
|
161
|
+
* carry 1h cache breakpoints). Put content here that changes often and
|
|
162
|
+
* would otherwise bust the big static cache block if embedded in the
|
|
163
|
+
* agent definition — e.g. a live file-tree listing or connected-
|
|
164
|
+
* integrations summary. Re-sent raw on every step, so keep it small.
|
|
165
|
+
* Orchestrator-initiated turns on the same conversation (subagent
|
|
166
|
+
* callback resumes) reuse the value captured at parent-turn start.
|
|
167
|
+
*/
|
|
168
|
+
volatileContext?: string;
|
|
155
169
|
/**
|
|
156
170
|
* Model name override for this run, captured once at run start. Takes
|
|
157
171
|
* precedence over the agent definition's `model.name` for every step of
|
|
@@ -173,6 +187,14 @@ export interface RunInput {
|
|
|
173
187
|
* exporter-less harness instance per mode.
|
|
174
188
|
*/
|
|
175
189
|
suppressTelemetry?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Extra attributes stamped on the `invoke_agent` root telemetry span,
|
|
192
|
+
* e.g. `{ "poncho.run.kind": "job", "poncho.job.name": "heartbeat" }`.
|
|
193
|
+
* Lets observability backends segment traffic classes (jobs vs chat)
|
|
194
|
+
* without timing forensics. String values only; ignored when telemetry
|
|
195
|
+
* is off or suppressed.
|
|
196
|
+
*/
|
|
197
|
+
telemetryAttributes?: Record<string, string>;
|
|
176
198
|
}
|
|
177
199
|
|
|
178
200
|
export interface TokenUsage {
|