car-runtime 0.53.0 → 0.54.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 +17 -0
- package/daemon-wrappers.js +6155 -0
- package/docs/CLI.md +366 -21
- package/docs/agent-ir-spec.md +34 -5
- package/index.d.ts +1076 -19
- package/index.js +45 -0
- package/install.js +16 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -21,6 +21,23 @@ Both the `.node` module **and** the `car-server` daemon binary are
|
|
|
21
21
|
included. Supported platforms: macOS (14+) arm64/x64, Linux
|
|
22
22
|
x64/arm64 glibc, Windows x64.
|
|
23
23
|
|
|
24
|
+
## Call the daemon
|
|
25
|
+
|
|
26
|
+
`CarRuntime` connects lazily. Params and results are JSON strings; generated typed
|
|
27
|
+
wrappers such as `agentsList` share the same governed connection.
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
async function daemonCallExample() {
|
|
31
|
+
// BEGIN CALL_DAEMON_FIVE_LINES
|
|
32
|
+
const { CarRuntime } = (await import('car-runtime')).default;
|
|
33
|
+
const car = new CarRuntime();
|
|
34
|
+
car.registerDaemonHandler('tools.execute', async () => JSON.stringify({ ok: true }));
|
|
35
|
+
const methods = JSON.parse(await car.daemonCall('capabilities.list', '{}'));
|
|
36
|
+
return { car, methods, agents: JSON.parse(await car.agentsList('{}')) };
|
|
37
|
+
// END CALL_DAEMON_FIVE_LINES
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
24
41
|
## Start the daemon
|
|
25
42
|
|
|
26
43
|
```bash
|