You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/clients/javascript.md
+70-8Lines changed: 70 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: "TypeScript client with React, Vue, and Svelte hooks"
5
5
6
6
# atmosphere.js -- TypeScript Client
7
7
8
-
TypeScript client for the Atmosphere Framework (currently `5.0.22`). Supports WebTransport/HTTP3, WebSocket, SSE, HTTP Streaming, and Long-Polling transports with first-class React, Vue, and Svelte hooks.
8
+
TypeScript client for the Atmosphere Framework (currently `5.0.24`). Supports WebTransport/HTTP3, WebSocket, SSE, HTTP Streaming, and Long-Polling transports with first-class React, Vue, and Svelte hooks.
9
9
10
10
## npm Coordinates
11
11
@@ -35,10 +35,10 @@ The package ships ESM, CommonJS, and TypeScript declarations. Framework integrat
`append()`, `reload()`, `stop()`, and `reset()` are also available for custom
146
+
chat UIs.
147
+
135
148
### `useAtmosphereCore`
136
149
137
150
Shared low-level hook exported from `atmosphere.js/react-native` for building custom hooks. It manages subscription lifecycle, state, and cleanup — the RN-aware `useAtmosphereRN` and `useStreamingRN` hooks are built on top of it. Use it when the built-in hooks don't fit your use case.
| Built-in | 0 | Y | Y | Y | Y || Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
639
+
| Spring AI | 100 | Y | Y | Y | Y || Y | Y | Y | Y | Y | Y | Y | Y || Y | Y | Y |
640
+
| LangChain4j | 100 | Y | Y | Y | Y || Y | Y | Y | Y | Y | Y | Y | Y || Y | Y | Y |
641
+
| Google ADK | 100 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y || Y | Y | Y |
642
+
| Embabel | 100 | Y | Y | Y | Y | Y | Y | Y | Y || Y || Y | Y || Y | Y | Y |
643
+
| JetBrains Koog | 100 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y || Y | Y | Y |
644
+
| Alibaba AgentScope | 100 | Y || Y | Y || Y |||||| Y | Y || Y | Y | Y |
645
+
| Spring AI Alibaba | 100 | Y¹ || Y | Y || Y ||||||| Y || Y² | Y | Y |
646
+
| Microsoft Semantic Kernel | 100 | Y | Y | Y | Y || Y | Y ||||| Y | Y || Y | Y | Y |
647
+
648
+
¹ Spring AI Alibaba emits its final reply as one Atmosphere stream chunk, but
649
+
the upstream `ReactAgent.call()` path is buffered rather than token-by-token.
650
+
651
+
² Spring AI Alibaba participates in wall-clock budget enforcement. Token and
652
+
step budget breaches require token-usage metadata, which that SDK path does not
653
+
surface today.
648
654
649
655
**How structured output works:**`AiPipeline` wraps the streaming session with `StructuredOutputCapturingSession` and augments the system prompt with JSON-schema instructions before the runtime runs. Any runtime that honors `SYSTEM_PROMPT` therefore gets `STRUCTURED_OUTPUT` automatically via the pipeline — no per-runtime adapter code required. `BuiltInAgentRuntime` additionally enables native `jsonMode` on the OpenAI-compatible client for provider-level JSON enforcement on top of the pipeline wrap. Source: `modules/ai/src/main/java/org/atmosphere/ai/pipeline/AiPipeline.java:128-135`, `modules/ai/src/main/java/org/atmosphere/ai/llm/BuiltInAgentRuntime.java:72-74`.
650
656
651
-
**Capability gaps:**
652
-
-`EmbabelAgentRuntime` does not advertise `TOOL_CALLING`: Embabel agents expose skills via their own `@Agent` API, not free-form tool calling. Source: `modules/embabel/src/main/kotlin/org/atmosphere/embabel/EmbabelAgentRuntime.kt`.
653
-
654
-
### Experimental
655
-
656
-
| Capability | Built-in | LangChain4j | Spring AI | ADK | Embabel | Koog | SK |
**Capability gaps:** AgentScope and Spring AI Alibaba do not declare
658
+
`TOOL_CALLING` or `TOOL_APPROVAL` because their current SDK surfaces do not
659
+
provide a native tool-dispatch loop that maps cleanly to Atmosphere's
660
+
`@AiTool` protocol. Spring AI Alibaba also omits `TOKEN_USAGE` because
661
+
`ReactAgent.call()` returns an `AssistantMessage` without usage metadata.
659
662
660
663
## Cross-Runtime Contract Tests (TCK)
661
664
@@ -688,7 +691,7 @@ Add `atmosphere-ai-test` as a test dependency and extend the base class:
688
691
</dependency>
689
692
```
690
693
691
-
The `RecordingSession` test double captures all events, text chunks, metadata, and errors for assertion. Currently enforced on: ADK, LangChain4j, Spring AI.
694
+
The `RecordingSession` test double captures all events, text chunks, metadata, and errors for assertion. The contract suite is implemented for all nine runtime adapters.
0 commit comments