@factory/droid-sdk 0.10.0 → 0.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/README.md +31 -0
- package/dist/api.d.mts +15058 -0
- package/dist/api.d.ts +15058 -0
- package/dist/api.js +253 -0
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +253 -0
- package/dist/api.mjs.map +1 -0
- package/dist/chunk-7ZD7MMNA.mjs +2268 -0
- package/dist/chunk-7ZD7MMNA.mjs.map +1 -0
- package/dist/{chunk-OBPHU4RT.js → chunk-KAAWCHO4.js} +28866 -20935
- package/dist/chunk-KAAWCHO4.js.map +1 -0
- package/dist/{chunk-TWAVPIPS.mjs → chunk-NWFX4MPJ.mjs} +29443 -21512
- package/dist/chunk-NWFX4MPJ.mjs.map +1 -0
- package/dist/chunk-ZQ7TS73S.js +2268 -0
- package/dist/chunk-ZQ7TS73S.js.map +1 -0
- package/dist/{index-DWBA4zgW.d.mts → index-Cf2WtJqJ.d.mts} +62447 -39436
- package/dist/{index-DWBA4zgW.d.ts → index-Cf2WtJqJ.d.ts} +62447 -39436
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -4
- package/dist/node.d.mts +114 -22
- package/dist/node.d.ts +114 -22
- package/dist/node.js +1561 -687
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +1253 -379
- package/dist/node.mjs.map +1 -1
- package/examples/node/custom-model-editing-disposable.sh +1 -1
- package/examples/node/rest-api.ts +55 -0
- package/examples/node/start-workstream.ts +76 -0
- package/package.json +13 -3
- package/dist/chunk-OBPHU4RT.js.map +0 -1
- package/dist/chunk-TWAVPIPS.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ The SDK requires Node.js 18 or later.
|
|
|
17
17
|
| ------------------------- | --------------- | ----------------------------------------------------------------------------------------- |
|
|
18
18
|
| `@factory/droid-sdk/node` | Node | Start Droid subprocesses, run prompts, manage local sessions, and define SDK MCP tools |
|
|
19
19
|
| `@factory/droid-sdk` | Browser or Node | Connect to an existing Droid daemon and use browser-safe schemas, types, and REST helpers |
|
|
20
|
+
| `@factory/droid-sdk/api` | Browser or Node | Call any Factory REST API operation through a client generated from the public API spec |
|
|
20
21
|
|
|
21
22
|
By default, Node session APIs start the `droid` CLI from `PATH` and read
|
|
22
23
|
`FACTORY_API_KEY`. A custom executable, API key, or transport can be supplied
|
|
@@ -74,6 +75,36 @@ Runnable examples are available under [`examples/node`](./examples/node) and
|
|
|
74
75
|
`JsonRpcMessage` objects. Put codecs inside transports that cross a serialized
|
|
75
76
|
boundary. External wire formats are unchanged.
|
|
76
77
|
|
|
78
|
+
### Shared display messages
|
|
79
|
+
|
|
80
|
+
- `filterMessagesForUI` no longer copies messages. A message with nothing to
|
|
81
|
+
hide comes back as the same object, and a stripped message as a projection
|
|
82
|
+
that later calls return again. Treat the results as read-only: mutating one
|
|
83
|
+
changes your input or what later calls return. Replace a message instead of
|
|
84
|
+
editing it.
|
|
85
|
+
|
|
86
|
+
### Open status values (0.11.0)
|
|
87
|
+
|
|
88
|
+
- `RemoteSession['status']`, `MachineTemplateBuildStatus['status']`, and
|
|
89
|
+
`MachineTemplateBuildStatus['failureReason']` now accept values a newer
|
|
90
|
+
server adds instead of failing the response. An exhaustive `switch` over
|
|
91
|
+
one of them needs a branch for an unknown value.
|
|
92
|
+
- Those fields of `RemoteSessionSchema` and
|
|
93
|
+
`MachineTemplateBuildStatusSchema` are unions now, not enums: `.enum` on
|
|
94
|
+
them is gone, and `.options` lists the union's member schemas rather than
|
|
95
|
+
the known values.
|
|
96
|
+
|
|
97
|
+
### Machine template list (0.11.0)
|
|
98
|
+
|
|
99
|
+
- `listMachineTemplates` no longer takes `limit` or `cursor`. The API
|
|
100
|
+
returns every template in one response, with `pagination.hasMore` always
|
|
101
|
+
`false` and `pagination.nextCursor` always `null`.
|
|
102
|
+
- `ListMachineTemplatesOptions` drops `limit` and `cursor` but stays an
|
|
103
|
+
interface over `FactoryApiOptions`, so declaration merging into it keeps
|
|
104
|
+
compiling. An options object literal that passes either field fails
|
|
105
|
+
typecheck; a variable typed with extra properties compiles, and the helper
|
|
106
|
+
does not send them.
|
|
107
|
+
|
|
77
108
|
The [canonical SDK guide](https://docs.factory.ai/sdk/typescript) remains the
|
|
78
109
|
full API reference.
|
|
79
110
|
|