@nevescloud/pip 2.11.2 → 3.1.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
CHANGED
|
@@ -20,6 +20,30 @@ const pip = createPip({
|
|
|
20
20
|
|
|
21
21
|
Or via npm: `npm install @nevescloud/pip`.
|
|
22
22
|
|
|
23
|
+
### Quickstart: bundle entries
|
|
24
|
+
|
|
25
|
+
Provider-named bundles re-export the three primitives most hosts compose, from a single import. Pick the brain you're wiring to:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
// Anthropic — Claude on /v1/messages
|
|
29
|
+
import { createPip, createRuntime, anthropic } from 'https://cdn.jsdelivr.net/npm/@nevescloud/pip@latest/bundle/anthropic';
|
|
30
|
+
|
|
31
|
+
const rt = createRuntime({ provider: anthropic({ model: 'claude-opus-4-7', apiKey: '…' }) });
|
|
32
|
+
const pip = createPip({ onSubmit: rt.onSubmit, onSlash: rt.onSlash, slashSource: rt.slashSource });
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
// OpenAI-compatible — OpenAI, GitHub Models, Together, Groq, OpenRouter, LM Studio, llama.cpp
|
|
37
|
+
import { createPip, createRuntime, openai } from 'https://cdn.jsdelivr.net/npm/@nevescloud/pip@latest/bundle/openai';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
// Local — in-browser inference via transformers.js + WebGPU (different shape: no runtime, renderer is host-driven)
|
|
42
|
+
import { createPip, createTransformersRenderer } from 'https://cdn.jsdelivr.net/npm/@nevescloud/pip@latest/bundle/local';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`pip/bundle` (no provider segment) is an alias for `pip/bundle/anthropic` — the default when you haven't picked a brain. Bundles are sugar over the layered files; hosts with a different brain shape (UI only, custom provider, in-browser model) import the granular files directly. See [CONSUMERS.md](../../CONSUMERS.md) for the full entry-point list.
|
|
46
|
+
|
|
23
47
|
## Options
|
|
24
48
|
|
|
25
49
|
| Key | Default | Notes |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Quickstart entry — pip wired to Anthropic in one import.
|
|
2
|
+
// Re-exports the three primitives most Anthropic hosts wire together.
|
|
3
|
+
// Layered files stay public; hosts that need a different brain shape
|
|
4
|
+
// import from pip-core / runtime / providers directly.
|
|
5
|
+
|
|
6
|
+
export { createPip } from '../pip-core.esm.js';
|
|
7
|
+
export { createRuntime } from '../runtime.esm.js';
|
|
8
|
+
export { anthropic } from '../providers/anthropic.esm.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Quickstart entry — pip wired to an in-browser model in one import.
|
|
2
|
+
// Re-exports the two primitives most local-renderer hosts compose.
|
|
3
|
+
// Different shape from bundle/anthropic and bundle/openai: there's no
|
|
4
|
+
// runtime here — the renderer is host-driven (one-shot generate),
|
|
5
|
+
// not part of the turn loop. Consumers shouldn't need to know which
|
|
6
|
+
// underlying library powers the renderer; that's why this entry exists.
|
|
7
|
+
|
|
8
|
+
export { createPip } from '../pip-core.esm.js';
|
|
9
|
+
export { createTransformersRenderer, splitThinking } from '../providers/local.esm.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Quickstart entry — pip wired to any OpenAI-compatible host in one import.
|
|
2
|
+
// Re-exports the three primitives. Works with OpenAI direct, GitHub Models,
|
|
3
|
+
// Together, Groq, OpenRouter, LM Studio, llama.cpp — anything speaking
|
|
4
|
+
// /chat/completions. Pass baseUrl to switch hosts.
|
|
5
|
+
|
|
6
|
+
export { createPip } from '../pip-core.esm.js';
|
|
7
|
+
export { createRuntime } from '../runtime.esm.js';
|
|
8
|
+
export { openai } from '../providers/openai.esm.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nevescloud/pip",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Floating assistant bubble + panel + chat runtime. ESM, no build.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "pip-core.esm.js",
|
|
@@ -8,13 +8,21 @@
|
|
|
8
8
|
".": "./pip-core.esm.js",
|
|
9
9
|
"./pip-core.esm.js": "./pip-core.esm.js",
|
|
10
10
|
"./runtime.esm.js": "./runtime.esm.js",
|
|
11
|
+
"./bundle": "./bundle/anthropic.esm.js",
|
|
12
|
+
"./bundle/anthropic": "./bundle/anthropic.esm.js",
|
|
13
|
+
"./bundle/anthropic.esm.js": "./bundle/anthropic.esm.js",
|
|
14
|
+
"./bundle/openai": "./bundle/openai.esm.js",
|
|
15
|
+
"./bundle/openai.esm.js": "./bundle/openai.esm.js",
|
|
16
|
+
"./bundle/local": "./bundle/local.esm.js",
|
|
17
|
+
"./bundle/local.esm.js": "./bundle/local.esm.js",
|
|
11
18
|
"./providers/anthropic.esm.js": "./providers/anthropic.esm.js",
|
|
12
19
|
"./providers/openai.esm.js": "./providers/openai.esm.js",
|
|
13
|
-
"./providers/
|
|
20
|
+
"./providers/local.esm.js": "./providers/local.esm.js"
|
|
14
21
|
},
|
|
15
22
|
"files": [
|
|
16
23
|
"pip-core.esm.js",
|
|
17
24
|
"runtime.esm.js",
|
|
25
|
+
"bundle/",
|
|
18
26
|
"providers/",
|
|
19
27
|
"README.md",
|
|
20
28
|
"LICENSE"
|