@poncho-ai/sdk 1.10.0 → 1.11.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 +3 -3
- package/CHANGELOG.md +24 -0
- package/dist/index.d.ts +26 -0
- package/package.json +1 -1
- package/src/index.ts +24 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.
|
|
2
|
+
> @poncho-ai/sdk@1.11.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
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
[32mESM[39m [1mdist/index.js [22m[32m17.24 KB[39m
|
|
11
11
|
[32mESM[39m ⚡️ Build success in 21ms
|
|
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 1385ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m29.09 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1adaae2`](https://github.com/cesr/poncho-ai/commit/1adaae2d4cc55800f01d602f2a7d6ecc65031443) Thanks [@cesr](https://github.com/cesr)! - harness: device-dispatch mode for tools that execute on a connected client
|
|
8
|
+
|
|
9
|
+
Tools can now be marked `dispatch: "device"` on `loadedConfig.tools`. When
|
|
10
|
+
the model calls such a tool the dispatcher pauses the run, emits a new
|
|
11
|
+
`tool:device:required` event, and checkpoints with the new
|
|
12
|
+
`kind: "device"` discriminator on `pendingApprovals` — same plumbing as
|
|
13
|
+
the approval flow, different trigger and different resume payload.
|
|
14
|
+
Consumers (e.g. PonchOS for iOS device tools) drive the external
|
|
15
|
+
execution and feed the result back via `continueFromToolResult`.
|
|
16
|
+
|
|
17
|
+
Approval can be combined: `{access: "approval", dispatch: "device"}`
|
|
18
|
+
yields the approval card first, then on resume falls through to the
|
|
19
|
+
device-required event. The wire vocabulary for approvals
|
|
20
|
+
(`approvalId` etc.) is unchanged; the `pendingApprovals` column /
|
|
21
|
+
field name stays.
|
|
22
|
+
|
|
23
|
+
`ToolAccess` is broadened to accept both the legacy string `"approval"`
|
|
24
|
+
and the new `{access?, dispatch?}` object form. Existing configs keep
|
|
25
|
+
working unchanged.
|
|
26
|
+
|
|
3
27
|
## 1.10.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -858,6 +858,32 @@ type AgentEvent = {
|
|
|
858
858
|
name: string;
|
|
859
859
|
input: Record<string, unknown>;
|
|
860
860
|
}>;
|
|
861
|
+
} | {
|
|
862
|
+
/**
|
|
863
|
+
* Tool wants to execute on a connected client device (e.g. iOS).
|
|
864
|
+
* The consumer of the harness is responsible for routing this event
|
|
865
|
+
* to the appropriate WebSocket and POSTing the tool's result back via
|
|
866
|
+
* `resumeRunFromCheckpoint`. Carries the same envelope as the
|
|
867
|
+
* approval-required event; `requestId` plays the role of `approvalId`.
|
|
868
|
+
*/
|
|
869
|
+
type: "tool:device:required";
|
|
870
|
+
tool: string;
|
|
871
|
+
input: unknown;
|
|
872
|
+
requestId: string;
|
|
873
|
+
} | {
|
|
874
|
+
type: "tool:device:checkpoint";
|
|
875
|
+
approvals: Array<{
|
|
876
|
+
approvalId: string;
|
|
877
|
+
tool: string;
|
|
878
|
+
toolCallId: string;
|
|
879
|
+
input: Record<string, unknown>;
|
|
880
|
+
}>;
|
|
881
|
+
checkpointMessages: Message[];
|
|
882
|
+
pendingToolCalls: Array<{
|
|
883
|
+
id: string;
|
|
884
|
+
name: string;
|
|
885
|
+
input: Record<string, unknown>;
|
|
886
|
+
}>;
|
|
861
887
|
} | {
|
|
862
888
|
type: "browser:frame";
|
|
863
889
|
data: string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -196,6 +196,30 @@ export type AgentEvent =
|
|
|
196
196
|
checkpointMessages: Message[];
|
|
197
197
|
pendingToolCalls: Array<{ id: string; name: string; input: Record<string, unknown> }>;
|
|
198
198
|
}
|
|
199
|
+
| {
|
|
200
|
+
/**
|
|
201
|
+
* Tool wants to execute on a connected client device (e.g. iOS).
|
|
202
|
+
* The consumer of the harness is responsible for routing this event
|
|
203
|
+
* to the appropriate WebSocket and POSTing the tool's result back via
|
|
204
|
+
* `resumeRunFromCheckpoint`. Carries the same envelope as the
|
|
205
|
+
* approval-required event; `requestId` plays the role of `approvalId`.
|
|
206
|
+
*/
|
|
207
|
+
type: "tool:device:required";
|
|
208
|
+
tool: string;
|
|
209
|
+
input: unknown;
|
|
210
|
+
requestId: string;
|
|
211
|
+
}
|
|
212
|
+
| {
|
|
213
|
+
type: "tool:device:checkpoint";
|
|
214
|
+
approvals: Array<{
|
|
215
|
+
approvalId: string;
|
|
216
|
+
tool: string;
|
|
217
|
+
toolCallId: string;
|
|
218
|
+
input: Record<string, unknown>;
|
|
219
|
+
}>;
|
|
220
|
+
checkpointMessages: Message[];
|
|
221
|
+
pendingToolCalls: Array<{ id: string; name: string; input: Record<string, unknown> }>;
|
|
222
|
+
}
|
|
199
223
|
| { type: "browser:frame"; data: string; width: number; height: number }
|
|
200
224
|
| {
|
|
201
225
|
type: "browser:status";
|