pi-poolside 1.0.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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -0
  3. package/index.ts +51 -0
  4. package/package.json +22 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Park Kiyong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # pi-poolside
2
+
3
+ Poolside AI provider extension for [Pi](https://github.com/earendil-works/pi-coding-agent).
4
+
5
+ Registers [Poolside](https://poolside.ai) as an OpenAI-compatible provider so you can pick its models from Pi's `/model` selector.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @parkiyong/pi-poolside
11
+ ```
12
+
13
+ Pi auto-loads installed packages that declare a `pi.extensions` entry, so no extra wiring is needed.
14
+
15
+ ## Auth
16
+
17
+ Export your Poolside API key before launching Pi:
18
+
19
+ ```bash
20
+ export POOLSIDE_API_KEY=...
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Inside Pi, run:
26
+
27
+ ```text
28
+ /model
29
+ ```
30
+
31
+ and pick one of:
32
+
33
+ - `poolside/laguna-m.1` — Laguna M.1
34
+ - `poolside/laguna-xs.2` — Laguna XS.2
35
+
36
+ Both are registered with `reasoning: true` and a 131K context window placeholder.
37
+
38
+ ## Configuration notes
39
+
40
+ The extension targets:
41
+
42
+ - Base URL: `https://inference.poolside.ai/v1`
43
+ - API style: `openai-completions`
44
+ - Auth: bearer header via `POOLSIDE_API_KEY`
45
+ - `max_tokens` field name forced via `compat.maxTokensField`
46
+
47
+ `contextWindow`, `maxTokens` and `cost` are **conservative placeholders**. Update them in `index.ts` to match the limits and pricing Poolside publishes for your account.
48
+
49
+ ## Adding or updating models
50
+
51
+ Edit the `models` array in [`index.ts`](./index.ts). Each entry follows Pi's provider model schema (`id`, `name`, `reasoning`, `input`, `cost`, `contextWindow`, `maxTokens`, `compat`).
52
+
53
+ ## License
54
+
55
+ [MIT](./LICENSE)
package/index.ts ADDED
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Poolside Provider Extension
3
+ *
4
+ * Registers Poolside (https://poolside.ai) as an OpenAI-compatible provider.
5
+ *
6
+ * Auth:
7
+ * export POOLSIDE_API_KEY=...
8
+ *
9
+ * Then `/model` and pick poolside/laguna-m.1 or poolside/laguna-xs.2.
10
+ *
11
+ * NOTE: contextWindow, maxTokens and cost are conservative placeholders.
12
+ * Update them with the values Poolside publishes for your account.
13
+ */
14
+
15
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
16
+
17
+ export default function (pi: ExtensionAPI) {
18
+ pi.registerProvider("poolside", {
19
+ name: "Poolside",
20
+ baseUrl: "https://inference.poolside.ai/v1",
21
+ apiKey: "POOLSIDE_API_KEY",
22
+ api: "openai-completions",
23
+ authHeader: true,
24
+ models: [
25
+ {
26
+ id: "laguna-m.1",
27
+ name: "Laguna M.1",
28
+ reasoning: true,
29
+ input: ["text"],
30
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
31
+ contextWindow: 131100,
32
+ maxTokens: 8192,
33
+ compat: {
34
+ maxTokensField: "max_tokens",
35
+ },
36
+ },
37
+ {
38
+ id: "laguna-xs.2",
39
+ name: "Laguna XS.2",
40
+ reasoning: true,
41
+ input: ["text"],
42
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
43
+ contextWindow: 131100,
44
+ maxTokens: 8192,
45
+ compat: {
46
+ maxTokensField: "max_tokens",
47
+ },
48
+ },
49
+ ],
50
+ });
51
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "pi-poolside",
3
+ "version": "1.0.0",
4
+ "description": "Poolside AI provider extension for Pi - registers Poolside models as OpenAI-compatible provider",
5
+ "keywords": ["pi-package", "pi", "pi-extension", "poolside", "ai-provider", "free"],
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/parkiyong/pi-poolside.git"
11
+ },
12
+ "homepage": "https://github.com/parkiyong/pi-poolside",
13
+ "bugs": {
14
+ "url": "https://github.com/parkiyong/pi-poolside/issues"
15
+ },
16
+ "pi": {
17
+ "extensions": ["./index.ts"]
18
+ },
19
+ "peerDependencies": {
20
+ "@earendil-works/pi-coding-agent": "*"
21
+ }
22
+ }