Skip to content

feat: optimize installation for Pi#283

Merged
mksglu merged 2 commits intomksglu:nextfrom
h4rvey-g:feat/pi-package-manifest
Apr 14, 2026
Merged

feat: optimize installation for Pi#283
mksglu merged 2 commits intomksglu:nextfrom
h4rvey-g:feat/pi-package-manifest

Conversation

@h4rvey-g
Copy link
Copy Markdown
Contributor

Summary

  • add a Pi package manifest to context-mode
  • document Pi installation via npm install -g context-mode, pi install npm:context-mode, and packages
  • simplify Pi MCP configuration to use command: "context-mode"

Testing

  • verified npm tarball includes build/pi-extension.js, skills/, and start.mjs
  • verified local Pi can load the package from the repo root via the Pi package manifest
  • verified mcp.json works with command: "context-mode"
  • verified the Pi /ctx-stats output fix is present after rebasing onto latest main

@h4rvey-g h4rvey-g changed the base branch from main to next April 14, 2026 12:36
@mksglu
Copy link
Copy Markdown
Owner

mksglu commented Apr 14, 2026

Hi @h4rvey-g Please, can you remove bundle files in PR

@h4rvey-g h4rvey-g force-pushed the feat/pi-package-manifest branch from 26eda4f to 4cd7d91 Compare April 14, 2026 12:43
@h4rvey-g h4rvey-g force-pushed the feat/pi-package-manifest branch from 4cd7d91 to 84e8ab3 Compare April 14, 2026 12:44
@mksglu mksglu merged commit 09a0e76 into mksglu:next Apr 14, 2026
5 checks passed
sebastianbreguel added a commit to sebastianbreguel/context-mode that referenced this pull request Apr 14, 2026
…rity chain

The existing detect.test.ts covers env vars, clientInfo, and the
CONTEXT_MODE_PLATFORM override, but leaves the medium-confidence
config-dir branch (detect.ts:128-210, ~80 lines) completely untested.

Adds a new file that mocks `node:fs.existsSync` via `vi.mock` and
exercises each branch:

- 7 direct-home dirs: ~/.claude, ~/.gemini, ~/.codex, ~/.cursor,
  ~/.kiro, ~/.pi, ~/.openclaw
- 3 XDG dirs: ~/.config/kilo, ~/.config/opencode, ~/.config/zed
- Fallback to low-confidence claude-code when no dirs exist
- Priority locks: env var > config dir, CONTEXT_MODE_PLATFORM > config dir,
  ~/.claude > ~/.gemini ordering
- Env-var priority chain: CLAUDE > GEMINI > OPENCLAW > KILO, CODEX > CURSOR

Pi platform detection (now in-scope per mksglu#279, mksglu#283) gets its first
dedicated test. 18 new assertions, 0 runtime changes, 40 existing
detect tests unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants