@factory/droid-sdk 0.9.0 → 0.10.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/README.md +24 -2
- package/dist/{chunk-FJP5OKS5.js → chunk-OBPHU4RT.js} +13368 -6073
- package/dist/chunk-OBPHU4RT.js.map +1 -0
- package/dist/{chunk-KXDG5ZWS.mjs → chunk-TWAVPIPS.mjs} +13039 -5744
- package/dist/chunk-TWAVPIPS.mjs.map +1 -0
- package/dist/{index-BowvC0_E.d.mts → index-DWBA4zgW.d.mts} +140508 -113129
- package/dist/{index-BowvC0_E.d.ts → index-DWBA4zgW.d.ts} +140508 -113129
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +74 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +79 -7
- package/dist/node.d.mts +114 -26
- package/dist/node.d.ts +114 -26
- package/dist/node.js +979 -595
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +568 -184
- package/dist/node.mjs.map +1 -1
- package/examples/browser/daemon-lifecycle.ts +4 -6
- package/examples/node/custom-model-editing-disposable.sh +88 -0
- package/examples/node/custom-model-editing-disposable.ts +171 -0
- package/examples/node/custom-model-editing.ts +55 -0
- package/examples/node/hook-execution.ts +3 -2
- package/examples/node/sdk-mcp-tool.ts +5 -3
- package/examples/node/tool-controls.ts +7 -5
- package/package.json +2 -2
- package/dist/chunk-FJP5OKS5.js.map +0 -1
- package/dist/chunk-KXDG5ZWS.mjs.map +0 -1
- package/docs/typescript-sdk-reference.md +0 -1437
package/README.md
CHANGED
|
@@ -42,8 +42,8 @@ existing daemon.
|
|
|
42
42
|
|
|
43
43
|
## Documentation
|
|
44
44
|
|
|
45
|
-
The [TypeScript SDK
|
|
46
|
-
|
|
45
|
+
The [TypeScript SDK documentation](https://docs.factory.ai/sdk/typescript) is
|
|
46
|
+
the canonical user-facing guide to:
|
|
47
47
|
|
|
48
48
|
- Node and daemon runtimes
|
|
49
49
|
- Runs, sessions, streaming, attachments, and structured output
|
|
@@ -55,6 +55,28 @@ single user-facing guide to:
|
|
|
55
55
|
Runnable examples are available under [`examples/node`](./examples/node) and
|
|
56
56
|
[`examples/browser`](./examples/browser).
|
|
57
57
|
|
|
58
|
+
### Custom transport migration
|
|
59
|
+
|
|
60
|
+
- **Breaking agent-client change:** `DroidClientOptions.transport` and custom
|
|
61
|
+
session transports now require `DroidClientTransport`, which exchanges
|
|
62
|
+
`JsonRpcMessage` objects through `send` and `onMessage`. No format marker or
|
|
63
|
+
runtime detection is needed.
|
|
64
|
+
- Built-in `ProcessTransport` owns its stdio JSON codec. Its direct `send` and
|
|
65
|
+
`onMessage` callers must now pass and receive objects rather than strings.
|
|
66
|
+
In-process implementations exchange snapshots without codecs.
|
|
67
|
+
- For an existing custom `StringFramedDroidClientTransport`, explicitly pass
|
|
68
|
+
`withJsonRpcCodec(stringTransport)` to `DroidClient` or session options.
|
|
69
|
+
The adapter and both interfaces are exported from `@factory/droid-sdk/node`.
|
|
70
|
+
Do not wrap an already typed transport.
|
|
71
|
+
- **Breaking daemon-client change:** replace `DaemonClient.onMessage` with
|
|
72
|
+
`onTransportMessage` and remove `JSON.parse` from callbacks. Custom
|
|
73
|
+
`DaemonClientTransport.send` and `message` listeners now exchange
|
|
74
|
+
`JsonRpcMessage` objects. Put codecs inside transports that cross a serialized
|
|
75
|
+
boundary. External wire formats are unchanged.
|
|
76
|
+
|
|
77
|
+
The [canonical SDK guide](https://docs.factory.ai/sdk/typescript) remains the
|
|
78
|
+
full API reference.
|
|
79
|
+
|
|
58
80
|
## Browser security
|
|
59
81
|
|
|
60
82
|
The daemon client currently authenticates with a Factory API key. Browser
|