@sage-protocol/pi-adapter 0.2.0 → 0.2.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sage-protocol/pi-adapter",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Sage Protocol MCP integration for pi coding agent",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,6 +30,7 @@
30
30
  "build": "tsc -p tsconfig.build.json",
31
31
  "dev": "tsc -p tsconfig.build.json --watch",
32
32
  "clean": "rm -rf dist",
33
+ "typecheck": "tsc -p tsconfig.build.json --noEmit",
33
34
  "test": "vitest --run",
34
35
  "prepublishOnly": "npm run clean && npm run build"
35
36
  },
@@ -37,7 +38,7 @@
37
38
  "@sinclair/typebox": "^0.34.0"
38
39
  },
39
40
  "peerDependencies": {
40
- "@mariozechner/pi-coding-agent": "^0.55.0"
41
+ "@mariozechner/pi-coding-agent": ">=0.61.0 <0.65.0"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/node": "^24.0.0",
@@ -4,7 +4,9 @@ description: >
4
4
  Pi adapter bridge for Sage Protocol. Search and activate prompt packs, libraries,
5
5
  and governance tools via the sage_search, sage_execute, sage_status MCP tools.
6
6
  Use when: building something new (search first), managing prompts/libraries,
7
- DAO governance, bounties, chat rooms, or needing web search.
7
+ DAO governance, bounties, chat rooms, or needing web search. Don't use when:
8
+ the task is only local file editing or standard shell work with no Sage routing,
9
+ library, governance, or external-search need.
8
10
  ---
9
11
 
10
12
  # Sage Protocol Skill
@@ -64,8 +66,8 @@ sage_search({ domain: "prompts", action: "search", params: { query: "your task"
64
66
  **2. Inspect** — Read full details before activating.
65
67
 
66
68
  ```json
67
- sage_search({ domain: "skills", action: "get", params: { key: "skill-key" } })
68
- sage_search({ domain: "prompts", action: "get", params: { key: "prompt-key" } })
69
+ sage_execute({ domain: "skills", action: "get", params: { key: "skill-key" } })
70
+ sage_execute({ domain: "prompts", action: "get", params: { key: "prompt-key" } })
69
71
  ```
70
72
 
71
73
  **3. Activate** — Load skills that match the task.
@@ -103,6 +105,71 @@ Proactively search Sage when:
103
105
 
104
106
  ---
105
107
 
108
+ ## Recommended Pi Setup
109
+
110
+ Keep pi thin and let Sage own routing behavior.
111
+
112
+ Recommended `.pi/settings.json` shape in a local monorepo:
113
+
114
+ ```json
115
+ {
116
+ "packages": [
117
+ "../packages/sage-pi-adapter",
118
+ {
119
+ "source": "../packages/sage-pi-export",
120
+ "skills": ["skills/*/SKILL.md"],
121
+ "extensions": [],
122
+ "prompts": [],
123
+ "themes": []
124
+ },
125
+ {
126
+ "source": "npm:oh-pi",
127
+ "extensions": ["!**"]
128
+ }
129
+ ],
130
+ "skills": [
131
+ "-../.agents/skills/frontend-design/SKILL.md",
132
+ "-~/.pi/agent/skills/prompt-builder/SKILL.md",
133
+ "-~/.pi/agent/skills/sage/SKILL.md",
134
+ "-~/.pi/agent/skills/sage-codebase/SKILL.md"
135
+ ],
136
+ "enableSkillCommands": true
137
+ }
138
+ ```
139
+
140
+ Mental model:
141
+
142
+ - pi/OpenClaw = transport and tool surface
143
+ - `sage` = base router skill
144
+ - thin entrypoint library = recurring session-entry behavior layer
145
+ - peer libraries = specialized review, critique, or domain augmentation
146
+
147
+ Discovery rule:
148
+
149
+ - prefer the curated `packages/sage-pi-export` package for Pi
150
+ - avoid broad runtime roots like `~/.local/share/sage/skills` unless you explicitly want Pi to validate installed, versioned, and backup skill directories too
151
+
152
+ Authoring and distribution model:
153
+
154
+ - repo-authored skills and entrypoint definitions are the authoring source
155
+ - on-chain libraries are the shared distribution and sync/pull surface
156
+ - local sync is development convenience, not the product center
157
+
158
+ Dispatch rule:
159
+
160
+ - entrypoint behaviors should compose stable Sage-owned dependency skills by key instead of duplicating their bodies
161
+ - examples of dependency-surface dispatch targets: `code-review`, `ceo-plan-review`, `vc-office-hours` from `sage-review-foundations`
162
+
163
+ Export rule:
164
+
165
+ - author real skills under `packages/sage/skills/`
166
+ - declare the Pi-visible subset in `packages/sage/pi-export.manifest.json`
167
+ - materialize `packages/sage-pi-export/skills/` with `node scripts/util/sync-sage-pi-export.mjs`
168
+
169
+ Do not encode long-lived routing policy into the harness when a Sage skill or library can own it.
170
+
171
+ ---
172
+
106
173
  ## Bash CLI Quick Reference
107
174
 
108
175
  Use bash fallback when MCP tools are unavailable or for commands not covered by tools.