Commit 50a2d9d
feat(pi): package scaffold and MCP registration (PF-3852) (#40)
Adds the `@tiny-fish/pi` package manifest so the Pi coding agent can install
TinyFish with `pi install npm:@tiny-fish/pi`. Skills land in the next commit;
this is the registration surface only.
Three decisions worth reviewing here, all verified against pi 0.84.4 and
pi-mcp-adapter 2.32.1:
| Field | Why |
|---|---|
| `directTools` | The adapter routes everything through a single `mcp` proxy tool by default (`direct-tools.ts:182-205`). Without this the package registers zero visible tools. Eight named rather than `true`, matching what the skills call and the adapter's own 5-20 guidance; the other ~11 stay reachable via the proxy. |
| `X-API-Key: "${TINYFISH_API_KEY}"` | Key-only. Any `headers` key disables the adapter's OAuth auto-detect (`mcp-auth-flow.ts:1075`), so this route has no browser sign-in. Deliberate; the CLI route covers OAuth. |
| no `type: "http"` | `ServerEntry` has no `type` field, only `httpTransport`. A bare `url` already means HTTP. |
Note the interpolation form: `${TINYFISH_API_KEY}`, not the `${VAR:-}` default
syntax the Claude plugin uses. The adapter's regex is `/\$\{(\w+)\}/`, which
does not match a trailing `:-`, so that form would ship as a literal header.
`X-TF-Client-Name`/`X-TF-Client-Version` follow the convention in the root
README. The MCP route does not read them today — it reads only
`x-tf-request-origin`, while the client-name headers are consumed by the v1 REST
routes — so they are inert for now and carried for when it does. Verified they
do not disturb the connection: a live session still authenticates and returns
results with them present.
Because the version is hardcoded there, it duplicates package.json's with
nothing keeping the two in step, and a release would silently keep reporting the
previous version. Guarded by a new `pi-versions-match` job in
plugin-manifests-ci.yml, the same shape as the existing marketplace check;
negative-tested by bumping package.json and confirming the job fails.
The MCP URL carries no attribution params. `connectSourceSchema` has no value
meaning "shipped inside a package", and `connect_attempt_id` is an install-level
UUID — one baked into a tarball would be identical for every install, collapsing
the whole population into a single attempt. Matches what claude/ and grok/ ship.
Claude-Session: https://claude.ai/code/session_01CBf5rnVYQYcxE8bLjfQuUP
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 6c40641 commit 50a2d9d
5 files changed
Lines changed: 110 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments