@counterposition/skill-pi 0.73.0 → 0.74.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/package.json +1 -1
- package/skills/pi/SKILL.md +6 -5
- package/skills/pi/evals/evals.json +1 -1
- package/skills/pi/references/extensions.md +7 -7
- package/skills/pi/references/packages.md +5 -5
- package/skills/pi/references/patterns.md +2 -2
- package/skills/pi/references/providers.md +2 -2
- package/skills/pi/references/sdk.md +6 -6
package/package.json
CHANGED
package/skills/pi/SKILL.md
CHANGED
|
@@ -13,14 +13,15 @@ Pi's philosophy: **adapt Pi to your workflows, not the other way around**.
|
|
|
13
13
|
|
|
14
14
|
## Architecture
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Core packages on npm (source: [github.com/earendil-works/pi](https://github.com/earendil-works/pi)):
|
|
17
17
|
|
|
18
18
|
| Package | Purpose |
|
|
19
19
|
|---------|---------|
|
|
20
|
-
| `@
|
|
21
|
-
| `@
|
|
22
|
-
| `@
|
|
23
|
-
| `@
|
|
20
|
+
| `@earendil-works/pi-ai` | Unified LLM API across 20+ providers |
|
|
21
|
+
| `@earendil-works/pi-agent-core` | Agent runtime with tool execution and state |
|
|
22
|
+
| `@earendil-works/pi-tui` | Terminal UI components |
|
|
23
|
+
| `@earendil-works/pi-coding-agent` | CLI, extensions, skills, sessions, settings |
|
|
24
|
+
| `@earendil-works/pi-web-ui` | Web components for chat interfaces |
|
|
24
25
|
|
|
25
26
|
## File System Layout
|
|
26
27
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"expected_output": "A TypeScript extension file that hooks into tool_call events, checks for curl in bash commands, prompts via ctx.ui.select, and appends blocked commands to a log file. Should check ctx.hasUI and handle non-interactive mode.",
|
|
8
8
|
"files": [],
|
|
9
9
|
"assertions": [
|
|
10
|
-
"Uses correct ExtensionAPI import from @
|
|
10
|
+
"Uses correct ExtensionAPI import from @earendil-works/pi-coding-agent",
|
|
11
11
|
"Hooks into tool_call event (the correct event for intercepting tool calls)",
|
|
12
12
|
"Checks event.toolName === 'bash' before inspecting command",
|
|
13
13
|
"Tests for curl in the command string",
|
|
@@ -17,20 +17,20 @@ Use `pi -e ./my-extension.ts` or `pi --extension ...` for quick tests. Put stabl
|
|
|
17
17
|
## Common Imports
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
import type { ExtensionAPI } from "@
|
|
20
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
21
21
|
import { Type } from "typebox";
|
|
22
|
-
import { StringEnum } from "@
|
|
23
|
-
import { Text } from "@
|
|
22
|
+
import { StringEnum } from "@earendil-works/pi-ai";
|
|
23
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
- Use `typebox` (1.x) for schemas.
|
|
27
|
-
- Use `StringEnum` from `@
|
|
26
|
+
- Use `typebox` (1.x) for schemas.
|
|
27
|
+
- Use `StringEnum` from `@earendil-works/pi-ai` for Google-compatible string enums.
|
|
28
28
|
|
|
29
29
|
## Quick Start
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
|
-
import type { ExtensionAPI } from "@
|
|
33
|
-
import { Type } from "
|
|
32
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
33
|
+
import { Type } from "typebox";
|
|
34
34
|
|
|
35
35
|
export default function (pi: ExtensionAPI) {
|
|
36
36
|
pi.on("session_start", async (_event, ctx) => {
|
|
@@ -91,11 +91,11 @@ If there is no `pi` manifest, Pi auto-discovers:
|
|
|
91
91
|
|
|
92
92
|
- Normal runtime dependencies belong in `dependencies`
|
|
93
93
|
- Pi core libraries should be peer deps with `"*"` ranges:
|
|
94
|
-
- `@
|
|
95
|
-
- `@
|
|
96
|
-
- `@
|
|
97
|
-
- `@
|
|
98
|
-
- `typebox`
|
|
94
|
+
- `@earendil-works/pi-ai`
|
|
95
|
+
- `@earendil-works/pi-agent-core`
|
|
96
|
+
- `@earendil-works/pi-coding-agent`
|
|
97
|
+
- `@earendil-works/pi-tui`
|
|
98
|
+
- `typebox`
|
|
99
99
|
- Other Pi packages must be bundled explicitly
|
|
100
100
|
- Git package installs run `npm install --omit=dev` — runtime needs go in `dependencies`, not `devDependencies`
|
|
101
101
|
|
|
@@ -27,7 +27,7 @@ Practical recipes for extending Pi. Each pattern is a self-contained example.
|
|
|
27
27
|
Block dangerous bash commands with user confirmation:
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
|
-
import type { ExtensionAPI } from "@
|
|
30
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
31
31
|
|
|
32
32
|
export default function (pi: ExtensionAPI) {
|
|
33
33
|
const dangerous = [/\brm\s+(-rf?|--recursive)/i, /\bsudo\b/i, /\b(chmod|chown)\b.*777/i];
|
|
@@ -237,7 +237,7 @@ The Pi examples include an `interactive-shell.ts` extension that maintains a per
|
|
|
237
237
|
|
|
238
238
|
## TUI Components
|
|
239
239
|
|
|
240
|
-
Pi's TUI library (`@
|
|
240
|
+
Pi's TUI library (`@earendil-works/pi-tui`) provides:
|
|
241
241
|
|
|
242
242
|
- `Text` — Word-wrapped text
|
|
243
243
|
- `Box` — Padded container with border
|
|
@@ -34,10 +34,10 @@ Use `/logout` to clear stored OAuth credentials. Pi 0.71.0 removed built-in Goog
|
|
|
34
34
|
| OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
|
|
35
35
|
| Hugging Face | `HF_TOKEN` | `huggingface` |
|
|
36
36
|
| Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
|
|
37
|
+
| Together AI | `TOGETHER_API_KEY` | `together` |
|
|
37
38
|
| Kimi For Coding | `KIMI_API_KEY` | `kimi-coding` |
|
|
38
39
|
| MiniMax | `MINIMAX_API_KEY` | `minimax` |
|
|
39
40
|
| MiniMax (China) | `MINIMAX_CN_API_KEY` | `minimax-cn` |
|
|
40
|
-
| Moonshot | `MOONSHOT_API_KEY` | `moonshot` |
|
|
41
41
|
| Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
|
|
42
42
|
| Xiaomi MiMo Token Plan (CN/AMS/SGP) | `XIAOMI_TOKEN_PLAN_{CN,AMS,SGP}_API_KEY` | `xiaomi-token-plan-{cn,ams,sgp}` |
|
|
43
43
|
|
|
@@ -167,7 +167,7 @@ Common `api` values:
|
|
|
167
167
|
|
|
168
168
|
- `thinkingLevelMap` (Pi 0.72) replaces `compat.reasoningEffortMap`. Map pi levels (`off`/`minimal`/`low`/`medium`/`high`/`xhigh`) to provider values; use `null` to hide a level.
|
|
169
169
|
- `openRouterRouting` is forwarded as-is in the OpenRouter `provider` field (fallbacks, ZDR, ignore lists, throughput/latency).
|
|
170
|
-
- Advanced `compat` flags exist for proxy quirks (`cacheControlFormat`, `supportsLongCacheRetention`, `supportsEagerToolInputStreaming`, `sendSessionIdHeader`, `sendSessionAffinityHeaders`). See [
|
|
170
|
+
- Advanced `compat` flags exist for proxy quirks (`cacheControlFormat`, `supportsLongCacheRetention`, `supportsEagerToolInputStreaming`, `sendSessionIdHeader`, `sendSessionAffinityHeaders`). See [Pi `docs/models.md`](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/models.md) when a proxy rejects pi's defaults.
|
|
171
171
|
|
|
172
172
|
## Custom Providers via Extensions
|
|
173
173
|
|
|
@@ -5,7 +5,7 @@ The SDK embeds Pi in Node.js applications via `createAgentSession()`. Use `creat
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @earendil-works/pi-coding-agent
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
createAgentSession,
|
|
17
17
|
ModelRegistry,
|
|
18
18
|
SessionManager,
|
|
19
|
-
} from "@
|
|
19
|
+
} from "@earendil-works/pi-coding-agent";
|
|
20
20
|
|
|
21
21
|
const authStorage = AuthStorage.create();
|
|
22
22
|
const modelRegistry = ModelRegistry.create(authStorage);
|
|
@@ -50,8 +50,8 @@ import {
|
|
|
50
50
|
defineTool,
|
|
51
51
|
ModelRegistry,
|
|
52
52
|
SessionManager,
|
|
53
|
-
} from "@
|
|
54
|
-
import { getModel } from "@
|
|
53
|
+
} from "@earendil-works/pi-coding-agent";
|
|
54
|
+
import { getModel } from "@earendil-works/pi-ai";
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Core Options
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
createAgentSessionServices,
|
|
116
116
|
getAgentDir,
|
|
117
117
|
SessionManager,
|
|
118
|
-
} from "@
|
|
118
|
+
} from "@earendil-works/pi-coding-agent";
|
|
119
119
|
|
|
120
120
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({
|
|
121
121
|
cwd,
|
|
@@ -218,7 +218,7 @@ session.subscribe((event) => {
|
|
|
218
218
|
Use `defineTool()` when you want a reusable custom tool definition outside `pi.registerTool(...)`:
|
|
219
219
|
|
|
220
220
|
```typescript
|
|
221
|
-
import { defineTool } from "@
|
|
221
|
+
import { defineTool } from "@earendil-works/pi-coding-agent";
|
|
222
222
|
import { Type } from "typebox";
|
|
223
223
|
|
|
224
224
|
const myTool = defineTool({
|