mohdel 0.122.0 → 0.123.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.
Files changed (2) hide show
  1. package/README.md +18 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -233,9 +233,26 @@ With no session-bin configured, thin-gate runs in demo mode: `POST /v1/call` ret
233
233
 
234
234
  The client snippet under [Library Usage](#library-usage) above is the full surface: `call(envelope, { socketPath, signal? })` returns an async iterable of events. Pass an `AbortSignal` to cancel in flight; thin-gate forwards a cancel control message to the session and reuses it on the pool. The envelope is the flat `answer(prompt, options)` surface plus transport metadata (`callId`, `authId`, `auth.key`, optional `traceparent`); see [`js/core/envelope.js`](js/core/envelope.js) for the full field list.
235
235
 
236
+ ### Other languages
237
+
238
+ The gate's HTTP surface is specified in [PROTOCOL.md §10](PROTOCOL.md#10-gate-http-surface-clients); `test/conformance/` holds the fixtures a client round-trips. Reference clients live under `clients/`:
239
+
240
+ - **Lua** — [`clients/lua`](clients/lua): Lua 5.1+ / LuaJIT, transports over LuaSocket or `curl`. `cd clients/lua && luarocks make`.
241
+ - **Gleam** — [`clients/gleam`](clients/gleam): Erlang target, typed events and results, `gen_tcp` over the unix socket. Path dependency until it is on Hex.
242
+ - **Rust** — [`clients/rust`](clients/rust): async (tokio), uses the gate's own wire types from the `mohdel-protocol` crate. Path dependency until it is on crates.io.
243
+ - **OCaml** — [`clients/ocaml`](clients/ocaml): synchronous, stdlib `Unix` transport, `yojson`; OCaml 4.14+. `opam pin` until it is on opam.
244
+
245
+ ```lua
246
+ local mohdel = require('mohdel')
247
+ local c = mohdel.connect{ socket = '/tmp/mohdel-data.sock' }
248
+ for ev in c:call(envelope):events() do
249
+ if ev.type == 'delta' then io.write(ev.delta.delta) end
250
+ end
251
+ ```
252
+
236
253
  ### Canonical types (frozen wire contract)
237
254
 
238
- Wire format is JSON over NDJSON frames, camelCase. Types are defined in `js/core/` (JSDoc) and mirrored in `rust/thin-gate/src/protocol.rs` (serde). Cross-language conformance tests enforce round-trip fidelity. The session-side protocol (envelopes in, events out, cancel control messages) is specified in [PROTOCOL.md](PROTOCOL.md) — read that to implement a session in another language.
255
+ Wire format is JSON over NDJSON frames, camelCase. Types are defined in `js/core/` (JSDoc) and mirrored in `rust/protocol/src/protocol.rs` (serde, the `mohdel-protocol` crate). Cross-language conformance tests enforce round-trip fidelity. The session-side protocol (envelopes in, events out, cancel control messages) is specified in [PROTOCOL.md](PROTOCOL.md) — read that to implement a session in another language.
239
256
 
240
257
  - **`CallEnvelope`** — flat `answer()` options plus transport metadata: `callId`, `authId`, `auth.key`, `traceparent?`, `baggage?`, `provider`, `model`, `prompt`, `outputBudget?`, `outputType?`, `outputStyle?`, `outputEffort?`, `images?`, `videos?`, `cache?`, `tools?`, `toolChoice?`, `parallelToolCalls?`, `identifier?`.
241
258
  - **`Event`** — three-variant union discriminated on `type`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mohdel",
3
- "version": "0.122.0",
3
+ "version": "0.123.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Christophe Le Bars",
@@ -108,7 +108,7 @@
108
108
  "@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
109
109
  "@opentelemetry/sdk-node": "^0.222.0",
110
110
  "chalk": "^6.0.0",
111
- "mohdel-thin-gate-linux-x64-gnu": "0.122.0"
111
+ "mohdel-thin-gate-linux-x64-gnu": "0.123.0"
112
112
  },
113
113
  "dependencies": {
114
114
  "@anthropic-ai/sdk": "^0.122.0",