llmist 2.2.0 → 2.4.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 +54 -9
- package/dist/{chunk-GANXNBIZ.js → chunk-6ZDUWO6N.js} +1029 -22
- package/dist/chunk-6ZDUWO6N.js.map +1 -0
- package/dist/{chunk-ZDNV7DDO.js → chunk-QFRVTS5F.js} +2 -2
- package/dist/cli.cjs +1507 -48
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +483 -31
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1025 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +2 -2
- package/dist/{mock-stream-wRfUqXx4.d.cts → mock-stream-BQcC2VCP.d.cts} +408 -1
- package/dist/{mock-stream-wRfUqXx4.d.ts → mock-stream-BQcC2VCP.d.ts} +408 -1
- package/dist/testing/index.cjs +1025 -18
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +1 -1
- package/package.json +11 -4
- package/dist/chunk-GANXNBIZ.js.map +0 -1
- /package/dist/{chunk-ZDNV7DDO.js.map → chunk-QFRVTS5F.js.map} +0 -0
package/README.md
CHANGED
|
@@ -5,23 +5,68 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/llmist)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
> **
|
|
8
|
+
> **Tools execute while the LLM streams. Any model. Clean API.**
|
|
9
9
|
|
|
10
10
|
> **⚠️ EARLY WORK IN PROGRESS** - This library is under active development. APIs may change without notice. Use in production at your own risk.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Most LLM libraries buffer the entire response before parsing tool calls. **llmist parses incrementally.**
|
|
13
|
+
|
|
14
|
+
Your gadgets (tools) fire the instant they're complete in the stream—giving your users immediate feedback. llmist implements its own function calling mechanism via a simple text-based block format. No JSON mode required. No native tool support needed. Works with OpenAI, Anthropic, and Gemini out of the box—extensible to any provider.
|
|
15
|
+
|
|
16
|
+
A fluent, async-first API lets you plug into any part of the agent loop. Fully typed. Composable. Your code stays clean.
|
|
13
17
|
|
|
14
18
|
---
|
|
15
19
|
|
|
16
20
|
## 🎯 Why llmist?
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<table>
|
|
23
|
+
<tr>
|
|
24
|
+
<td width="33%" valign="top">
|
|
25
|
+
|
|
26
|
+
### ⚡ Streaming Tool Execution
|
|
27
|
+
Gadgets execute the moment their block is parsed—not after the response completes. Real-time UX without buffering.
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Tool fires mid-stream
|
|
31
|
+
for await (const event of agent.run()) {
|
|
32
|
+
if (event.type === 'gadget_result')
|
|
33
|
+
updateUI(event.result); // Immediate
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
</td>
|
|
38
|
+
<td width="33%" valign="top">
|
|
39
|
+
|
|
40
|
+
### 🧩 Built-in Function Calling
|
|
41
|
+
llmist implements its own tool calling via a simple block format. No `response_format: json`. No native tool support needed. Works with any model from supported providers.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
!!!GADGET_START[Calculator]
|
|
45
|
+
!!!ARG[operation] add
|
|
46
|
+
!!!ARG[a] 15
|
|
47
|
+
!!!ARG[b] 23
|
|
48
|
+
!!!GADGET_END
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
*Markers are fully [configurable](./docs/BLOCK_FORMAT.md).*
|
|
52
|
+
|
|
53
|
+
</td>
|
|
54
|
+
<td width="33%" valign="top">
|
|
55
|
+
|
|
56
|
+
### 🔌 Composable Agent API
|
|
57
|
+
Fluent builder, async iterators, full TypeScript inference. Hook into any lifecycle point. Your code stays readable.
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
const answer = await LLMist.createAgent()
|
|
61
|
+
.withModel('sonnet')
|
|
62
|
+
.withGadgets(Calculator, Weather)
|
|
63
|
+
.withHooks(HookPresets.monitoring())
|
|
64
|
+
.askAndCollect('What is 15 + 23?');
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</td>
|
|
68
|
+
</tr>
|
|
69
|
+
</table>
|
|
25
70
|
|
|
26
71
|
---
|
|
27
72
|
|