@smooai/smooth-operator 1.1.0 → 1.3.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 +39 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
<p align="center"
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://smoo.ai"><img src="https://raw.githubusercontent.com/SmooAI/smooth-operator/main/.github/banner-typescript.png" alt="@smooai/smooth-operator — the TypeScript client for the smooth-operator protocol." width="100%" /></a>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
<p align="center"
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://smoo.ai"><img src="https://img.shields.io/badge/Smoo_AI-platform-00A6A6?style=for-the-badge&labelColor=020618" alt="Smoo AI"></a>
|
|
7
|
+
<a href="https://github.com/SmooAI/smooth-operator/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-F49F0A?style=for-the-badge&labelColor=020618" alt="license"></a>
|
|
8
|
+
<a href="https://lom.smoo.ai"><img src="https://img.shields.io/badge/hosted-lom.smoo.ai-FF6B6C?style=for-the-badge&labelColor=020618" alt="lom.smoo.ai"></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@smooai/smooth-operator"><img src="https://img.shields.io/npm/v/@smooai/smooth-operator?style=for-the-badge&labelColor=020618&color=00A6A6" alt="npm"></a>
|
|
10
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-%E2%89%A522-00A6A6?style=for-the-badge&labelColor=020618" alt="Node ≥ 22"></a>
|
|
11
|
+
</p>
|
|
4
12
|
|
|
5
13
|
<p align="center">
|
|
6
|
-
<a href="
|
|
7
|
-
<img src="https://img.shields.io/badge/tests-16%20passing-success" alt="16 tests passing" />
|
|
8
|
-
<img src="https://img.shields.io/badge/serverless%20%C2%B7%20polyglot%20%C2%B7%20TDD-6f42c1" alt="serverless · polyglot · TDD" />
|
|
9
|
-
<a href="https://lom.smoo.ai"><img src="https://img.shields.io/badge/hosted-lom.smoo.ai-0aa" alt="lom.smoo.ai" /></a>
|
|
14
|
+
<b><code>@smooai/smooth-operator</code></b> — the Lambda-native TypeScript client for the <a href="https://github.com/SmooAI/smooth-operator">smooth-operator</a> service.<br/>Streaming agent turns, HITL resume, fully typed. One of <b>five native SDKs</b> over one schema-driven WebSocket protocol.
|
|
10
15
|
</p>
|
|
11
16
|
|
|
12
17
|
---
|
|
13
18
|
|
|
14
19
|
## What is this?
|
|
15
20
|
|
|
16
|
-
The **native TypeScript client** for the [smooth-operator](
|
|
21
|
+
The **native TypeScript client** for the [smooth-operator](https://github.com/SmooAI/smooth-operator/blob/main/docs/PROTOCOL.md) WebSocket protocol — and the one the [smooai monorepo dogfoods](https://github.com/SmooAI/smooth-operator). It connects to a running smooth-operator **service** (create a session, send a message, stream the agent's events back) — not the agent engine itself. Types are **generated** from the language-neutral JSON Schemas in [`spec/`](https://github.com/SmooAI/smooth-operator/tree/main/spec) (and committed, so consumers don't need the generator), with an ergonomic layer — discriminated unions + type guards — on top. It's Lambda-native and transport-injectable, so it runs in a browser, on Node, or inside a Lambda handler unchanged.
|
|
17
22
|
|
|
18
23
|
---
|
|
19
24
|
|
|
@@ -35,7 +40,7 @@ pulls React into their bundle.
|
|
|
35
40
|
| Import | What |
|
|
36
41
|
| --- | --- |
|
|
37
42
|
| `@smooai/smooth-operator` | the protocol client (`SmoothAgentClient`, streaming turns, HITL) |
|
|
38
|
-
| `@smooai/smooth-operator/react` | React bindings — `useConversation` hook + `<SmoothChat>` (see [the guide](
|
|
43
|
+
| `@smooai/smooth-operator/react` | React bindings — `useConversation` hook + `<SmoothChat>` (see [the guide](https://github.com/SmooAI/smooth-operator/blob/main/docs/Guides/React%20Components%20and%20Custom%20UIs.md)) |
|
|
39
44
|
| `@smooai/smooth-operator/react/styles.css` | default stylesheet for the React components |
|
|
40
45
|
| `@smooai/smooth-operator/widget` | the embeddable web-component chat widget (`mountChatWidget`, `<smooth-agent-chat>`) |
|
|
41
46
|
| `@smooai/smooth-operator/widget/standalone` | the prebuilt IIFE bundle for a no-build `<script>` embed |
|
|
@@ -54,7 +59,7 @@ const final = await turn; // EventualResponse — cost, tokens, messageId
|
|
|
54
59
|
console.log(final.data.payload.messageId);
|
|
55
60
|
```
|
|
56
61
|
|
|
57
|
-
(Point `url` at your own [`smooth-operator-server`](
|
|
62
|
+
(Point `url` at your own [`smooth-operator-server`](https://github.com/SmooAI/smooth-operator/blob/main/rust/README.md), or at the hosted endpoint.)
|
|
58
63
|
|
|
59
64
|
---
|
|
60
65
|
|
|
@@ -115,7 +120,7 @@ v.validateEvent(incomingEvent); // { valid, errors } — ajv-compiled from the s
|
|
|
115
120
|
|
|
116
121
|
## Polyglot — one spec, five clients
|
|
117
122
|
|
|
118
|
-
This is one of five native clients generated from the same protocol. Need C# / Microsoft.Extensions.AI? The **`IChatClient` facade** lives in the [.NET client](
|
|
123
|
+
This is one of five native clients generated from the same protocol. Need C# / Microsoft.Extensions.AI? The **`IChatClient` facade** lives in the [.NET client](https://github.com/SmooAI/smooth-operator/tree/main/dotnet/src) (it's a .NET-ecosystem feature). This TypeScript package is the native streaming client.
|
|
119
124
|
|
|
120
125
|
```mermaid
|
|
121
126
|
%%{init: {'theme':'base','themeVariables':{'background':'#020618','primaryColor':'#0b1426','primaryTextColor':'#e6edf6','primaryBorderColor':'#2b3a52','lineColor':'#7c8aa0','secondaryColor':'#0b1426','tertiaryColor':'#0b1426','fontFamily':'ui-sans-serif, system-ui, sans-serif','clusterBkg':'#0b1426','clusterBorder':'#22304a'}}}%%
|
|
@@ -145,7 +150,7 @@ flowchart TD
|
|
|
145
150
|
|
|
146
151
|
**16 tests** cover the conformance fixtures, the client (with a mock transport so real parsing/correlation/HITL run), and type-level checks. In the **live cross-language E2E**, this client boots a real `smooth-operator-server` subprocess (KB seeded), drives a real `claude-haiku-4-5` turn over WebSocket, and asserts ≥1 streamed event, a knowledge-grounded "17", and per-session memory.
|
|
147
152
|
|
|
148
|
-
**The proof story:** an LLM-as-judge scored a multi-turn answer **1/5** (the runtime forgot turn 1's context); the failing eval drove a per-session-memory fix; **it now scores 5/5** — a regression a substring test would have missed. See [`docs/EVALS.md`](
|
|
153
|
+
**The proof story:** an LLM-as-judge scored a multi-turn answer **1/5** (the runtime forgot turn 1's context); the failing eval drove a per-session-memory fix; **it now scores 5/5** — a regression a substring test would have missed. See [`docs/EVALS.md`](https://github.com/SmooAI/smooth-operator/blob/main/docs/EVALS.md).
|
|
149
154
|
|
|
150
155
|
Live tests are **gated, never silently skipped**: they run with `SMOOTH_AGENT_E2E=1` + `SMOOAI_GATEWAY_KEY` and skip cleanly otherwise.
|
|
151
156
|
|
|
@@ -169,6 +174,27 @@ The generated types are committed; CI runs `pnpm generate` + `git diff --exit-co
|
|
|
169
174
|
|
|
170
175
|
Point the client at the hosted **[lom.smoo.ai](https://lom.smoo.ai)** endpoint, or at your own self-hosted `smooth-operator-server` (AWS Lambda or k8s) — same protocol, same client, same code.
|
|
171
176
|
|
|
172
|
-
##
|
|
177
|
+
## 🧩 Part of Smoo AI
|
|
178
|
+
|
|
179
|
+
`@smooai/smooth-operator` is built and open-sourced by **[Smoo AI](https://smoo.ai)** — the AI-powered business platform with AI built into every product. It's the TypeScript member of the **polyglot SDK set** (TypeScript · Python · Go · .NET · Rust) for the [smooth-operator](https://github.com/SmooAI/smooth-operator) service.
|
|
180
|
+
|
|
181
|
+
- 🌐 **The service** — [smooth-operator](https://github.com/SmooAI/smooth-operator) (protocol, server, the five clients, AWS/k8s deploy)
|
|
182
|
+
- 🧰 **More open source from Smoo AI** — [smoo.ai/open-source](https://smoo.ai/open-source)
|
|
183
|
+
- ☁️ **Hosted** — [lom.smoo.ai](https://lom.smoo.ai) runs smooth-operator for you, managed and multi-tenant
|
|
184
|
+
|
|
185
|
+
## 🔗 Links
|
|
173
186
|
|
|
174
|
-
|
|
187
|
+
- 📦 **npm** — [`@smooai/smooth-operator`](https://www.npmjs.com/package/@smooai/smooth-operator)
|
|
188
|
+
- 🛰️ **Protocol** — [`docs/PROTOCOL.md`](https://github.com/SmooAI/smooth-operator/blob/main/docs/PROTOCOL.md)
|
|
189
|
+
- 🧪 **Evals** — [`docs/EVALS.md`](https://github.com/SmooAI/smooth-operator/blob/main/docs/EVALS.md)
|
|
190
|
+
- 💬 **Issues** — [github.com/SmooAI/smooth-operator/issues](https://github.com/SmooAI/smooth-operator/issues)
|
|
191
|
+
|
|
192
|
+
## 📄 License
|
|
193
|
+
|
|
194
|
+
MIT © 2026 Smoo AI. See [LICENSE](https://github.com/SmooAI/smooth-operator/blob/main/LICENSE).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
<p align="center">
|
|
199
|
+
Built by <a href="https://smoo.ai"><strong>Smoo AI</strong></a> — AI built into every product.
|
|
200
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smooai/smooth-operator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "TypeScript SDK for the smooth-operator WebSocket protocol: the native client (`.`), React bindings (`./react`), and the embeddable web-component chat widget (`./widget`). Generated from the language-neutral JSON Schemas in spec/.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|