@piagent/platform 1.2.15 → 1.2.17
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/CHANGELOG.md +25 -0
- package/README.md +3 -3
- package/docs/README.md +1 -1
- package/docs/command-reference-vietnamese.md +2 -2
- package/docs/distribution-standard.md +7 -7
- package/docs/model-options.md +1 -1
- package/docs/operator-manual-vietnamese.md +7 -7
- package/docs/release-install-policy.md +6 -6
- package/docs/security-threat-model.md +1 -1
- package/docs/team-onboarding.md +2 -2
- package/docs/vercel-docs-site.md +7 -5
- package/docs-site/architecture.html +12 -6
- package/docs-site/assets/docs.css +52 -1
- package/docs-site/assets/docs.js +4 -2
- package/docs-site/benchmark.html +12 -6
- package/docs-site/commands.html +12 -6
- package/docs-site/content/en/architecture.html +33 -0
- package/docs-site/content/en/benchmark.html +164 -0
- package/docs-site/content/en/commands.html +39 -0
- package/docs-site/content/en/context-engine.html +30 -0
- package/docs-site/content/en/index.html +85 -0
- package/docs-site/content/en/mcp-approval.html +74 -0
- package/docs-site/content/en/mcp-auth.html +57 -0
- package/docs-site/content/en/mcp-servers.html +91 -0
- package/docs-site/content/en/mcp.html +90 -0
- package/docs-site/content/en/permissions.html +19 -0
- package/docs-site/content/en/profiles.html +27 -0
- package/docs-site/content/en/quickstart.html +126 -0
- package/docs-site/content/en/runtime.html +27 -0
- package/docs-site/content/en/scope.html +45 -0
- package/docs-site/content/en/security.html +33 -0
- package/docs-site/content/en/team.html +14 -0
- package/docs-site/content/en/workflows.html +21 -0
- package/docs-site/content/quickstart.html +1 -1
- package/docs-site/context-engine.html +12 -6
- package/docs-site/en/architecture.html +166 -0
- package/docs-site/en/benchmark.html +297 -0
- package/docs-site/en/commands.html +172 -0
- package/docs-site/en/context-engine.html +163 -0
- package/docs-site/en/index.html +203 -0
- package/docs-site/en/mcp-approval.html +207 -0
- package/docs-site/en/mcp-auth.html +190 -0
- package/docs-site/en/mcp-servers.html +224 -0
- package/docs-site/en/mcp.html +223 -0
- package/docs-site/en/permissions.html +152 -0
- package/docs-site/en/profiles.html +160 -0
- package/docs-site/en/quickstart.html +259 -0
- package/docs-site/en/runtime.html +160 -0
- package/docs-site/en/scope.html +178 -0
- package/docs-site/en/security.html +166 -0
- package/docs-site/en/team.html +143 -0
- package/docs-site/en/workflows.html +154 -0
- package/docs-site/index.html +12 -6
- package/docs-site/mcp-approval.html +12 -6
- package/docs-site/mcp-auth.html +12 -6
- package/docs-site/mcp-servers.html +12 -6
- package/docs-site/mcp.html +12 -6
- package/docs-site/permissions.html +12 -6
- package/docs-site/profiles.html +12 -6
- package/docs-site/quickstart.html +13 -7
- package/docs-site/runtime.html +12 -6
- package/docs-site/scope.html +12 -6
- package/docs-site/security.html +12 -6
- package/docs-site/team.html +12 -6
- package/docs-site/workflows.html +12 -6
- package/package.json +1 -1
- package/packages/piagent-core/package.json +1 -1
- package/scripts/build-docs-site.mjs +224 -50
- package/scripts/configure-model-scope.sh +4 -4
- package/scripts/install-global.sh +1 -1
- package/scripts/setup.sh +2 -2
- package/scripts/verify-local.sh +7 -1
- package/scripts/verify-release-identity.mjs +15 -6
- package/templates/global/settings.json +2 -2
- package/templates/project/.pi/settings.json +1 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<section class="benchmark-summary" aria-labelledby="benchmark-verdict">
|
|
2
|
+
<div class="benchmark-verdict">
|
|
3
|
+
<div>
|
|
4
|
+
<p class="section-kicker">Production V1 · release evidence</p>
|
|
5
|
+
<h2 id="benchmark-verdict">Piagent scores 9.92/10</h2>
|
|
6
|
+
<p>It resolved all 54 tasks, maintained 10/10 Quality, Safety, and Reliability, and used 51.11% fewer fresh tokens than the <code>codex-cli</code> surface in paired measurement.</p>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="benchmark-verdict-score" aria-label="Overall score 9.92 out of 10">
|
|
9
|
+
<strong>9.92</strong>
|
|
10
|
+
<span>Overall / 10</span>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="benchmark-metrics" aria-label="Headline metrics">
|
|
15
|
+
<div class="benchmark-metric"><span>Tasks resolved</span><strong>54/54</strong><small>100% on both surfaces</small></div>
|
|
16
|
+
<div class="benchmark-metric"><span>Fresh tokens</span><strong>-51.11%</strong><small>paired geometric mean</small></div>
|
|
17
|
+
<div class="benchmark-metric"><span>Token wins</span><strong>47/54</strong><small><code>codex-cli</code> won 7 pairs</small></div>
|
|
18
|
+
<div class="benchmark-metric"><span>Infrastructure</span><strong>0 retries</strong><small>108 valid runs</small></div>
|
|
19
|
+
</div>
|
|
20
|
+
</section>
|
|
21
|
+
|
|
22
|
+
<section class="section">
|
|
23
|
+
<p class="section-kicker">Measurement configuration</p>
|
|
24
|
+
<h2 id="configuration">Same model, same tasks, automatic grading</h2>
|
|
25
|
+
<p class="section-lead">The suite runs Piagent and the <code>codex-cli</code> surface in separate clean workspaces with matching fixtures, generated variants, and hidden verifiers. Usage is parsed from agent JSONL rather than entered manually.</p>
|
|
26
|
+
<dl class="benchmark-facts">
|
|
27
|
+
<div><dt>Model</dt><dd><code>openai-codex/gpt-5.6-sol</code></dd></div>
|
|
28
|
+
<div><dt>Thinking</dt><dd><code>xhigh</code></dd></div>
|
|
29
|
+
<div><dt>Matrix</dt><dd>18 families × 3 repeats × 2 surfaces</dd></div>
|
|
30
|
+
<div><dt>Total sessions</dt><dd>108</dd></div>
|
|
31
|
+
<div><dt>Baseline</dt><dd><code>codex-cli</code> controlled mode</dd></div>
|
|
32
|
+
<div><dt>Duration</dt><dd>1 hour 49 minutes</dd></div>
|
|
33
|
+
</dl>
|
|
34
|
+
<div class="callout ok-callout">
|
|
35
|
+
<strong>Isolated control surface</strong>
|
|
36
|
+
<p><code>codex-cli</code> uses a temporary home per session and loads no global instructions, plugins, apps, browser, or multi-agent configuration. Both surfaces use the same model and thinking level with a 900-second timeout per session.</p>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
<section class="section">
|
|
41
|
+
<p class="section-kicker">Score bands</p>
|
|
42
|
+
<h2 id="scores">Token reduction does not trade away quality</h2>
|
|
43
|
+
<p class="section-lead">Overall is calculated only when quality, safety, reliability, and workflow gates all pass. The <code>codex-cli</code> surface is the baseline and does not receive the harness-specific Workflow or Overall score.</p>
|
|
44
|
+
<div class="benchmark-score-chart" role="img" aria-label="Piagent scores Quality 10, Safety 10, Reliability 10, Workflow 9.58, Efficiency 10, and Overall 9.92 out of 10">
|
|
45
|
+
<div class="benchmark-score-row"><span>Quality</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
|
|
46
|
+
<div class="benchmark-score-row"><span>Safety</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
|
|
47
|
+
<div class="benchmark-score-row"><span>Reliability</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
|
|
48
|
+
<div class="benchmark-score-row"><span>Workflow</span><div class="benchmark-track"><i style="--bar-size: 95.8%"></i></div><strong>9.58</strong></div>
|
|
49
|
+
<div class="benchmark-score-row"><span>Efficiency</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
|
|
50
|
+
<div class="benchmark-score-row overall"><span>Overall</span><div class="benchmark-track"><i style="--bar-size: 99.2%"></i></div><strong>9.92</strong></div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="table-wrap benchmark-table-wrap">
|
|
53
|
+
<table>
|
|
54
|
+
<thead><tr><th>Band</th><th>Piagent</th><th>codex-cli</th><th>Evidence</th></tr></thead>
|
|
55
|
+
<tbody>
|
|
56
|
+
<tr><td>Quality</td><td><strong>10.00</strong></td><td>10.00</td><td>48/48 source tasks passed hidden graders</td></tr>
|
|
57
|
+
<tr><td>Safety</td><td><strong>10.00</strong></td><td>10.00</td><td>54/54 sessions stayed in scope and emitted no forbidden output</td></tr>
|
|
58
|
+
<tr><td>Reliability</td><td><strong>10.00</strong></td><td>10.00</td><td>54/54 resolved across all 18 families</td></tr>
|
|
59
|
+
<tr><td>Workflow</td><td><strong>9.58</strong></td><td>n/a</td><td>Passed the 9.00 gate with every evidence gap disclosed</td></tr>
|
|
60
|
+
<tr><td>Efficiency</td><td><strong>10.00</strong></td><td>5.00 baseline</td><td>54 valid usage pairs with the same model and thinking</td></tr>
|
|
61
|
+
<tr><td>Overall</td><td><strong>9.92</strong></td><td>n/a</td><td>Quality 45%, reliability 15%, workflow 20%, efficiency 20%</td></tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</div>
|
|
65
|
+
</section>
|
|
66
|
+
|
|
67
|
+
<section class="section">
|
|
68
|
+
<p class="section-kicker">Tokens and tools</p>
|
|
69
|
+
<h2 id="tokens">Piagent uses less fresh context</h2>
|
|
70
|
+
<p class="section-lead">The bars show independent medians across 54 runs per surface. The Efficiency score does not divide these aggregate medians; it uses matched scenario-and-repeat ratios to avoid distortion from task size.</p>
|
|
71
|
+
<div class="benchmark-legend" aria-label="Chart legend">
|
|
72
|
+
<span><i class="piagent-swatch"></i>Piagent</span>
|
|
73
|
+
<span><i class="codex-swatch"></i>codex-cli</span>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="benchmark-usage-chart" aria-label="Median usage comparison between Piagent and codex-cli">
|
|
76
|
+
<div class="benchmark-usage-group">
|
|
77
|
+
<h3>Fresh tokens</h3>
|
|
78
|
+
<div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.88%"></i></div><strong>7,368</strong></div>
|
|
79
|
+
<div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>18,476</strong></div>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="benchmark-usage-group">
|
|
82
|
+
<h3>Input excluding cache</h3>
|
|
83
|
+
<div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 48.98%"></i></div><strong>6,801</strong></div>
|
|
84
|
+
<div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>13,885</strong></div>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="benchmark-usage-group">
|
|
87
|
+
<h3>Output</h3>
|
|
88
|
+
<div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.71%"></i></div><strong>913</strong></div>
|
|
89
|
+
<div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>2,299</strong></div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="benchmark-usage-group">
|
|
92
|
+
<h3>Tool calls</h3>
|
|
93
|
+
<div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 62.5%"></i></div><strong>5</strong></div>
|
|
94
|
+
<div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>8</strong></div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="table-wrap benchmark-table-wrap">
|
|
98
|
+
<table>
|
|
99
|
+
<thead><tr><th>Median per run</th><th>Piagent</th><th>codex-cli</th></tr></thead>
|
|
100
|
+
<tbody>
|
|
101
|
+
<tr><td>Input excluding cache</td><td><strong>6,801</strong></td><td>13,885</td></tr>
|
|
102
|
+
<tr><td>Output</td><td><strong>913</strong></td><td>2,299</td></tr>
|
|
103
|
+
<tr><td>Cache read</td><td><strong>7,680</strong></td><td>78,208</td></tr>
|
|
104
|
+
<tr><td>Reasoning included in output</td><td><strong>414</strong></td><td>592</td></tr>
|
|
105
|
+
<tr><td>Fresh tokens</td><td><strong>7,368</strong></td><td>18,476</td></tr>
|
|
106
|
+
<tr><td>Tool calls</td><td><strong>5</strong></td><td>8</td></tr>
|
|
107
|
+
<tr><td>Cost</td><td><strong>$0.059141</strong></td><td>n/a from Codex OAuth JSONL</td></tr>
|
|
108
|
+
</tbody>
|
|
109
|
+
</table>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="benchmark-paired">
|
|
112
|
+
<div class="benchmark-paired-head">
|
|
113
|
+
<div><span>Fresh-token pair wins</span><strong>47 Piagent · 7 codex-cli · 0 ties</strong></div>
|
|
114
|
+
<div><span>Median paired delta</span><strong>-7,870 tokens</strong></div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="benchmark-win-track" role="img" aria-label="Piagent won 47 of 54 pairs and codex-cli won 7">
|
|
117
|
+
<i class="piagent-win" style="--bar-size: 87.04%"></i>
|
|
118
|
+
<i class="codex-win" style="--bar-size: 12.96%"></i>
|
|
119
|
+
</div>
|
|
120
|
+
<p>Paired geometric mean ratio: <strong>0.4889</strong>. The 95% confidence interval is <strong>0.3809–0.6276</strong>, whose upper bound remains below the 1.0 baseline, so the token-saving claim is allowed. Across the full benchmark, Piagent used 529,932 fresh tokens versus 1,006,150 for <code>codex-cli</code>; recorded Piagent cost was $5.321.</p>
|
|
121
|
+
</div>
|
|
122
|
+
</section>
|
|
123
|
+
|
|
124
|
+
<section class="section">
|
|
125
|
+
<p class="section-kicker">Coverage</p>
|
|
126
|
+
<h2 id="coverage">Six domains with three families each</h2>
|
|
127
|
+
<div class="benchmark-categories">
|
|
128
|
+
<div><span>Backend</span><strong>10.00</strong><p>Authorization, money rounding, cache isolation</p></div>
|
|
129
|
+
<div><span>Frontend</span><strong>10.00</strong><p>Async response, Unicode search, pagination</p></div>
|
|
130
|
+
<div><span>Data</span><strong>10.00</strong><p>Quoted CSV, stable deduplication, schema migration</p></div>
|
|
131
|
+
<div><span>Platform</span><strong>10.00</strong><p>Config precedence, CLI parsing, workspace order</p></div>
|
|
132
|
+
<div><span>Reliability</span><strong>10.00</strong><p>Bounded retry, expiry, incident diagnosis</p></div>
|
|
133
|
+
<div><span>Security</span><strong>10.00</strong><p>Secret refusal, prompt injection, audit history</p></div>
|
|
134
|
+
</div>
|
|
135
|
+
</section>
|
|
136
|
+
|
|
137
|
+
<section class="section">
|
|
138
|
+
<p class="section-kicker">Provenance</p>
|
|
139
|
+
<h2 id="transparency">Interpret results within their measured scope</h2>
|
|
140
|
+
<div class="table-wrap benchmark-table-wrap">
|
|
141
|
+
<table>
|
|
142
|
+
<tbody>
|
|
143
|
+
<tr><th>Run</th><td><code>production-v1-20260802T153320Z-11f3d0</code></td></tr>
|
|
144
|
+
<tr><th>Suite digest</th><td><code>90a44ac4f5d4ec11772eac00f4f984d78c6962d116581ca29ab6b8760c8f9171</code></td></tr>
|
|
145
|
+
<tr><th>Runtime</th><td>Pi 0.82.0 · <code>codex-cli 0.146.0-alpha.9.2</code> · Node 24.11.1</td></tr>
|
|
146
|
+
<tr><th>Verdict</th><td><code>piagent-more-efficient</code> · every production gate passed</td></tr>
|
|
147
|
+
<tr><th>Release mapping</th><td>Measured on the candidate before metadata bump; the same logic shipped as v1.2.12.</td></tr>
|
|
148
|
+
</tbody>
|
|
149
|
+
</table>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="callout">
|
|
152
|
+
<strong>Limits of the conclusion</strong>
|
|
153
|
+
<p>This is a synthetic production benchmark built by the maintainer, not an independent benchmark proving that Piagent is better for every repository or model. The raw report remains private because its seed can reproduce synthetic secrets. Company-wide rollout should add a private held-out suite and real task reports.</p>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="command-grid">
|
|
156
|
+
<div class="command-card">
|
|
157
|
+
<header><span>Run the production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-sol --thinking xhigh">Copy</button></header>
|
|
158
|
+
<pre><code>piagent-benchmark --production \
|
|
159
|
+
--surfaces piagent,codex-cli \
|
|
160
|
+
--model openai-codex/gpt-5.6-sol \
|
|
161
|
+
--thinking xhigh</code></pre>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</section>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<section class="section">
|
|
2
|
+
<div class="grid cols-2">
|
|
3
|
+
<article class="card">
|
|
4
|
+
<h3 id="session-basics">Session basics</h3>
|
|
5
|
+
<div class="tag-list"><span class="tag">/login</span><span class="tag">/model</span><span class="tag">/commands</span><span class="tag">/piagent-status</span><span class="tag">/piagent-orchestration</span><span class="tag">/usage</span><span class="tag">/context preflight</span><span class="tag">/name</span><span class="tag">/fresh</span><span class="tag">/session</span></div>
|
|
6
|
+
<p>Set up a session, select a model, inspect profile, usage, or orchestration state, and decide whether a large task needs a fresh session.</p>
|
|
7
|
+
</article>
|
|
8
|
+
<article class="card">
|
|
9
|
+
<h3 id="project-profile">Project profile</h3>
|
|
10
|
+
<div class="tag-list"><span class="tag">/profile</span><span class="tag">/profile list</span><span class="tag">/profile auto</span><span class="tag">/profile setup</span><span class="tag">/profile tech</span><span class="tag">/profile tech setup</span><span class="tag">/profile fullstack</span><span class="tag">/profile be-fe</span></div>
|
|
11
|
+
<p>Apply a profile directly or use a deterministic selector for the profile and tech stack. Output stays compact and does not require model interpretation.</p>
|
|
12
|
+
</article>
|
|
13
|
+
<article class="card">
|
|
14
|
+
<h3 id="implementation-workflow">Implementation workflow</h3>
|
|
15
|
+
<div class="tag-list"><span class="tag">/workflow</span><span class="tag">/workflow task</span><span class="tag">/workflow plan</span><span class="tag">/workflow review</span><span class="tag">/workflow scout</span><span class="tag">/workflow discuss</span></div>
|
|
16
|
+
<p>Packages context loading, task contracts, implementation, verification evidence, and final handoff.</p>
|
|
17
|
+
</article>
|
|
18
|
+
<article class="card">
|
|
19
|
+
<h3 id="git-handoff">Git handoff</h3>
|
|
20
|
+
<div class="tag-list"><span class="tag">/workflow commit</span><span class="tag">/workflow pr</span><span class="tag">git status</span><span class="tag">git diff</span></div>
|
|
21
|
+
<p>There is no <span class="inline-code">/git</span> namespace. Commit and PR flows use workflow guards; pushes and broad staging such as <span class="inline-code">git add -A</span> require confirmation.</p>
|
|
22
|
+
</article>
|
|
23
|
+
<article class="card">
|
|
24
|
+
<h3 id="fresh-sessions">Fresh sessions</h3>
|
|
25
|
+
<div class="tag-list"><span class="tag">/fresh task</span><span class="tag">/fresh scout</span><span class="tag">/fresh be-to-fe</span></div>
|
|
26
|
+
<p>Start a clean workflow when the current context is heavy or belongs to a different task.</p>
|
|
27
|
+
</article>
|
|
28
|
+
<article class="card">
|
|
29
|
+
<h3 id="mcp">MCP</h3>
|
|
30
|
+
<div class="tag-list"><span class="tag">/mcp</span><span class="tag">piagent-mcp</span></div>
|
|
31
|
+
<p>Inspect and configure tool servers with the core, popular, or design presets.</p>
|
|
32
|
+
</article>
|
|
33
|
+
<article class="card">
|
|
34
|
+
<h3 id="subagents">Subagents</h3>
|
|
35
|
+
<div class="tag-list"><span class="tag">/subagents-doctor</span><span class="tag">/subagents-models</span><span class="tag">/subagents-fleet</span><span class="tag">/subagent-cost</span></div>
|
|
36
|
+
<p>Inspect runtime health, model routing, background runs, and cost. Daily work remains solo-first; subagents are reserved for independent scouting, planning, or review lanes.</p>
|
|
37
|
+
</article>
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<section class="section">
|
|
2
|
+
<div class="grid cols-3">
|
|
3
|
+
<article class="card"><h3 id="dynamic-tools">Task-driven tools</h3><p>Pi includes governance, policy, retrieval, knowledge, onboarding, or usage guidance in the prompt only when the task needs it. The runtime guard remains active in the background.</p></article>
|
|
4
|
+
<article class="card"><h3 id="local-index">Local index</h3><p>FTS5, symbols, and the import graph live under <span class="inline-code">.pi/piagent-state/context-engine/</span>. Storage is restricted to the current OS account; policy changes retry FTS rebuild and VACUUM until purging completes.</p></article>
|
|
5
|
+
<article class="card"><h3 id="ranked-context">Ranked context</h3><p>Explicit paths, lexical matches, symbols, Git signals, test relationships, positive feedback, and graph rank are combined before packing into a hard token budget.</p></article>
|
|
6
|
+
<article class="card"><h3 id="semantic-compact">Semantic compaction</h3><p>Preserves the goal, decisions, changed files, verification, and blockers. Removes repeated logs, source excerpts, and superseded plans.</p></article>
|
|
7
|
+
<article class="card"><h3 id="test-impact">Test impact</h3><p>Walks the import graph backward from changed files to suggest dependents and focused tests before running the full suite.</p></article>
|
|
8
|
+
<article class="card"><h3 id="agent-watch">Agent Watch</h3><p>Local events include session, model, thinking, tool surface, retrieval confidence, context-use ratio, and waste metrics without storing raw prompts or outputs a second time.</p></article>
|
|
9
|
+
</div>
|
|
10
|
+
</section>
|
|
11
|
+
|
|
12
|
+
<section class="section">
|
|
13
|
+
<div class="callout">
|
|
14
|
+
<strong>The index contains source bodies</strong>
|
|
15
|
+
<p>Protected paths and secret files are excluded. The directory uses mode <span class="inline-code">0700</span>; database, WAL, and SHM files use <span class="inline-code">0600</span>. Normal refresh uses SQLite core and FTS5 secure delete. Full FTS rebuild and VACUUM run only when exclusion policy changes or an interrupted purge must resume, not on every prompt or refresh.</p>
|
|
16
|
+
</div>
|
|
17
|
+
</section>
|
|
18
|
+
|
|
19
|
+
<section class="section">
|
|
20
|
+
<div class="command-grid">
|
|
21
|
+
<article class="command-card"><header><span>Inside Pi</span><button class="clip-btn" data-clip="/context index /context rebuild /context pack Fix invoice calculation /context impact /usage efficiency">Copy</button></header><pre><code>/context index
|
|
22
|
+
/context rebuild
|
|
23
|
+
/context pack Fix invoice calculation
|
|
24
|
+
/context impact
|
|
25
|
+
/usage efficiency</code></pre></article>
|
|
26
|
+
<article class="command-card"><header><span>From a terminal</span><button class="clip-btn" data-clip="piagent-context rebuild piagent-context pack "Fix invoice calculation" --tokens 4000 piagent-context efficiency">Copy</button></header><pre><code>piagent-context rebuild
|
|
27
|
+
piagent-context pack "Fix invoice calculation" --tokens 4000
|
|
28
|
+
piagent-context efficiency</code></pre></article>
|
|
29
|
+
</div>
|
|
30
|
+
</section>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<section class="hero">
|
|
2
|
+
<p class="eyebrow">Team operating docs</p>
|
|
3
|
+
<h1>A reusable Pi runtime for every project.</h1>
|
|
4
|
+
<p>
|
|
5
|
+
These docs bring installation, profiles, permissions, MCP, security, and workflows into one place. A new team member can find the right command, choose a safe mode, and understand the operating boundary without rebuilding the process in a prompt.
|
|
6
|
+
</p>
|
|
7
|
+
<div class="owner-strip" aria-label="Project information">
|
|
8
|
+
<span class="owner-label">Project links</span>
|
|
9
|
+
<a href="https://piagent.io.vn/en/" target="_blank" rel="noopener noreferrer">Docs · piagent.io.vn</a>
|
|
10
|
+
<a href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer">GitHub · Vt-mmm/piagent</a>
|
|
11
|
+
<a href="https://www.facebook.com/vinhtam0544/" target="_blank" rel="noopener noreferrer">Facebook · Vinh Tam</a>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="hero-actions">
|
|
14
|
+
<a class="button primary" href="/en/quickstart">Get started</a>
|
|
15
|
+
<a class="button" href="/en/commands">View commands</a>
|
|
16
|
+
<a class="button" href="/en/mcp">MCP</a>
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
<section class="section">
|
|
21
|
+
<h2 id="install">Install with two commands</h2>
|
|
22
|
+
<p>Requires Node.js <span class="inline-code">>=22.19.0</span>. Run these commands from the project you want to configure.</p>
|
|
23
|
+
<pre><code>npm install -g @piagent/platform
|
|
24
|
+
piagent-setup</code></pre>
|
|
25
|
+
<p><span class="inline-code">piagent-setup</span> installs the pinned Pi Coding Agent host, installs the Pi package, initializes the current directory, and runs doctor. It also installs the MCP baseline and subagents; skip them with <span class="inline-code">--no-mcp</span>, <span class="inline-code">--no-subagents</span>, or <span class="inline-code">--global-only</span>. See the <a href="/en/quickstart">Quickstart</a> for the complete flow.</p>
|
|
26
|
+
</section>
|
|
27
|
+
|
|
28
|
+
<section class="section">
|
|
29
|
+
<h2 id="where-to-start">Where to start</h2>
|
|
30
|
+
<div class="card-grid">
|
|
31
|
+
<a class="doc-card" href="/en/quickstart">
|
|
32
|
+
<span class="card-kicker">Get started</span>
|
|
33
|
+
<h3>Quickstart</h3>
|
|
34
|
+
<p>Install, open a repository, onboard context, choose a profile and permission mode, run the first task, and verify before handoff.</p>
|
|
35
|
+
</a>
|
|
36
|
+
<a class="doc-card" href="/en/scope">
|
|
37
|
+
<span class="card-kicker">Get started</span>
|
|
38
|
+
<h3>Platform scope</h3>
|
|
39
|
+
<p>Why this repository exists alongside general coding agents, and which operating concerns it owns.</p>
|
|
40
|
+
</a>
|
|
41
|
+
<a class="doc-card" href="/en/profiles">
|
|
42
|
+
<span class="card-kicker">Build</span>
|
|
43
|
+
<h3>Project profiles</h3>
|
|
44
|
+
<p>Choose the operating profile for a repository: protected paths, verification commands, and granted capabilities.</p>
|
|
45
|
+
</a>
|
|
46
|
+
<a class="doc-card" href="/en/mcp">
|
|
47
|
+
<span class="card-kicker">MCP</span>
|
|
48
|
+
<h3>MCP</h3>
|
|
49
|
+
<p>Four configuration layers, pinned presets, server management, authentication readiness, and repository approval gates.</p>
|
|
50
|
+
</a>
|
|
51
|
+
<a class="doc-card" href="/en/security">
|
|
52
|
+
<span class="card-kicker">Operate</span>
|
|
53
|
+
<h3>Security model</h3>
|
|
54
|
+
<p>A policy enforcement layer, not an OS sandbox, with explicit claims about what is and is not controlled.</p>
|
|
55
|
+
</a>
|
|
56
|
+
<a class="doc-card" href="/en/benchmark">
|
|
57
|
+
<span class="card-kicker">Operate</span>
|
|
58
|
+
<h3>Production benchmark</h3>
|
|
59
|
+
<p>Quality, safety, workflow, and token evidence from 108 sessions compared with the <code>codex-cli</code> surface.</p>
|
|
60
|
+
</a>
|
|
61
|
+
<a class="doc-card" href="/en/commands">
|
|
62
|
+
<span class="card-kicker">Build</span>
|
|
63
|
+
<h3>Command catalog</h3>
|
|
64
|
+
<p>Slash commands and terminal commands grouped by the job they perform.</p>
|
|
65
|
+
</a>
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
68
|
+
|
|
69
|
+
<section class="section">
|
|
70
|
+
<h2 id="doc-groups">Three documentation groups</h2>
|
|
71
|
+
<div class="split">
|
|
72
|
+
<div class="card">
|
|
73
|
+
<h3 id="get-started-group">Get started</h3>
|
|
74
|
+
<p>For first-time users: installation, quickstart, and where the platform fits alongside other agent CLIs.</p>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="card">
|
|
77
|
+
<h3 id="build-group">Build</h3>
|
|
78
|
+
<p>Daily operation: profiles, permissions, commands, workflows, and a dedicated MCP section for its broader command surface.</p>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="card">
|
|
81
|
+
<h3 id="operate-group">Operate</h3>
|
|
82
|
+
<p>For operators and reviewers: security boundaries, repository architecture, terminal tools, and the team operating standard.</p>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</section>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<section class="section">
|
|
2
|
+
<h2 id="problem">The problem</h2>
|
|
3
|
+
<p>A repository may include <span class="inline-code">.mcp.json</span> and <span class="inline-code">.pi/mcp.json</span>. Cloning an untrusted repository and opening a session must <strong>not</strong> grant its author a process on the operator's machine with the operator's credentials. Servers from those scopes remain unavailable until someone on the machine approves them.</p>
|
|
4
|
+
<pre><code>/piagent-mcp get internal # inspect first
|
|
5
|
+
/piagent-mcp approve internal # or reject, or reset</code></pre>
|
|
6
|
+
<p>In a terminal, omit the slash: <span class="inline-code">piagent-mcp get internal</span>. Both surfaces store the same decision in the same file.</p>
|
|
7
|
+
<p><span class="inline-code">approve</span> prints the definition before recording consent. Approving without reading is exactly what this gate is designed to prevent.</p>
|
|
8
|
+
</section>
|
|
9
|
+
|
|
10
|
+
<section class="section">
|
|
11
|
+
<h2 id="three-properties">Three properties</h2>
|
|
12
|
+
<div class="grid">
|
|
13
|
+
<div class="card"><h3 id="outside-repository">The decision lives outside the repository</h3><p>It is stored in <span class="inline-code">~/.pi/piagent-mcp-approvals.json</span>. If a repository could approve itself, the gate would not exist. A fork, rename, or second checkout starts at <span class="inline-code">pending</span>.</p></div>
|
|
14
|
+
<div class="card"><h3 id="digest-pinning">Pinned by digest</h3><p>Approval means consenting to <em>what the server runs</em>. Changing the command, URL, or arguments creates a new decision and returns the state to <span class="inline-code">approval-changed</span>.</p></div>
|
|
15
|
+
<div class="card"><h3 id="tool-call-enforcement">Enforced at tool call</h3><p>The guard handles both the proxy form (<span class="inline-code">mcp</span> with <span class="inline-code">input.server</span>) and direct tools. A proxy-only gate could be bypassed by enabling <span class="inline-code">directTools</span>.</p></div>
|
|
16
|
+
</div>
|
|
17
|
+
</section>
|
|
18
|
+
|
|
19
|
+
<section class="section">
|
|
20
|
+
<h2 id="limit">Limit</h2>
|
|
21
|
+
<div class="callout">
|
|
22
|
+
<strong>The gate cannot prevent connection establishment</strong>
|
|
23
|
+
<p>The adapter owns connections, so the extension cannot stop one from opening. It blocks <strong>every tool call</strong>, not the connection itself. The residual risk is the connection and any remote log that records it.</p>
|
|
24
|
+
</div>
|
|
25
|
+
<p>Servers in <span class="inline-code">global</span> and <span class="inline-code">pi-global</span> do not pass through this gate. A repository cannot place a server in those scopes, and asking users to approve their own machine configuration would add no security value.</p>
|
|
26
|
+
</section>
|
|
27
|
+
|
|
28
|
+
<section class="section">
|
|
29
|
+
<h2 id="imports">Servers supplied through <span class="inline-code">imports</span></h2>
|
|
30
|
+
<p>MCP configuration supports an <span class="inline-code">imports</span> key that reads server definitions from other tools. Imported servers are not directly declared in one of the four scopes, which creates another path around a naive approval gate.</p>
|
|
31
|
+
<p>Of the six import kinds, only <span class="inline-code">vscode</span> points to a path <strong>inside the project</strong>: <span class="inline-code">.vscode/mcp.json</span>. It travels with a clone and requires approval like any directly declared repository server.</p>
|
|
32
|
+
<div class="table-wrap">
|
|
33
|
+
<table>
|
|
34
|
+
<thead><tr><th>Situation</th><th>Handling</th></tr></thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
<tr><td>Any layer imports a repository-relative kind</td><td>The server requires approval even when the import is declared globally, because the loaded content still lives in the repository.</td></tr>
|
|
37
|
+
<tr><td>A repository scope imports any kind</td><td>The server requires approval because the repository selected what the machine should run.</td></tr>
|
|
38
|
+
<tr><td>A repository scope imports a format that cannot be read, such as Codex TOML</td><td>Block every tool call when that file exists. A present but unreadable source is not equivalent to an empty configuration.</td></tr>
|
|
39
|
+
<tr><td><span class="inline-code">remove</span>, <span class="inline-code">enable</span>, or <span class="inline-code">disable</span> targets an imported server</td><td>Reject the operation and name the actual file to edit. Rewriting another tool's configuration with the platform writer would corrupt ownership and format.</td></tr>
|
|
40
|
+
<tr><td>Repository configuration combines <span class="inline-code">directTools</span> with <span class="inline-code">toolPrefix: "none"</span></td><td>Block every tool call. Without a prefix, the server identity cannot be recovered for approval lookup, while blocking only the proxy would let the unprefixed direct tools pass.</td></tr>
|
|
41
|
+
</tbody>
|
|
42
|
+
</table>
|
|
43
|
+
</div>
|
|
44
|
+
<p><span class="inline-code">piagent-mcp doctor</span> names the importing file, its import kinds, unreadable layers, and import targets that exist but cannot be read. These states must not collapse into "no servers declared".</p>
|
|
45
|
+
<p>For full-block states, <span class="inline-code">doctor</span> and <span class="inline-code">list</span> explain the reason and exit 1, including <span class="inline-code">list --json</span>. Exit status answers whether MCP can operate, not whether the command printed rows. The guard, slash command, and CLI consume the same state.</p>
|
|
46
|
+
<p>The gate cache is scoped by project and recomputed when the signature of every file used by readers changes, including currently missing paths. This lets a newly created imported file or a personal global change become visible immediately.</p>
|
|
47
|
+
<p>The adapter merges <span class="inline-code">settings</span> across all four layers for the session. Therefore <span class="inline-code">directTools</span> in one file and <span class="inline-code">toolPrefix: "none"</span> in another still form the unsafe combination. The report identifies both files.</p>
|
|
48
|
+
<p>The <span class="inline-code">SCOPE</span> column names the layer that declared <span class="inline-code">imports</span>, not the location that defined the server. A server imported by global configuration may still require approval when its source is in the clone.</p>
|
|
49
|
+
</section>
|
|
50
|
+
|
|
51
|
+
<section class="section">
|
|
52
|
+
<h2 id="design-decisions">Design decisions</h2>
|
|
53
|
+
<div class="table-wrap">
|
|
54
|
+
<table>
|
|
55
|
+
<thead><tr><th>Decision</th><th>Reason</th></tr></thead>
|
|
56
|
+
<tbody>
|
|
57
|
+
<tr><td>Gate repository-supplied servers only</td><td>Only <span class="inline-code">.mcp.json</span> and <span class="inline-code">.pi/mcp.json</span> travel with a clone. User-owned machine configuration needs no repository consent.</td></tr>
|
|
58
|
+
<tr><td>Store decisions outside the repository</td><td><span class="inline-code">~/.pi/piagent-mcp-approvals.json</span> prevents a repository from approving itself.</td></tr>
|
|
59
|
+
<tr><td>Pin the definition digest</td><td>Consent applies to the exact command, arguments, and URL. A change returns the server to pending.</td></tr>
|
|
60
|
+
<tr><td>Preview the merged definition but hash the repository-owned fragment</td><td>The adapter merges duplicate IDs by key, so preview must show what will run. Hashing only the repository-controlled fragment prevents unrelated global edits from invalidating consent.</td></tr>
|
|
61
|
+
<tr><td>Block at <span class="inline-code">tool_call</span></td><td>Cover both proxy and direct tools without a bypass. Direct tools are traced through their configured server prefix.</td></tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</div>
|
|
65
|
+
<p>The ideal point would be before connection, but that requires owning the connection. Piagent chooses the furthest point it actually controls and states the residual risk explicitly.</p>
|
|
66
|
+
</section>
|
|
67
|
+
|
|
68
|
+
<section class="section">
|
|
69
|
+
<h2 id="migration">Migration</h2>
|
|
70
|
+
<div class="callout">
|
|
71
|
+
<strong>Projects with existing servers</strong>
|
|
72
|
+
<p>Servers already present in <span class="inline-code">.mcp.json</span> or <span class="inline-code">.pi/mcp.json</span> become <span class="inline-code">pending-approval</span> after update. Run <span class="inline-code">/piagent-mcp approve <name></span> once per project. Shipped templates are empty, so most projects are unaffected; session notices and doctor name every server requiring review.</p>
|
|
73
|
+
</div>
|
|
74
|
+
</section>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<section class="section">
|
|
2
|
+
<h2 id="no-token-storage">The platform does not store tokens</h2>
|
|
3
|
+
<p>MCP tokens already have an owner: OAuth belongs to <span class="inline-code">pi-mcp-adapter</span>. The adapter registers <span class="inline-code">/mcp</span> and <span class="inline-code">/mcp-auth</span> and owns storage, refresh, and revocation. A second credential store would only create another leak surface. The platform therefore <strong>detects and guides</strong>.</p>
|
|
4
|
+
<pre><code>/mcp-auth figma</code></pre>
|
|
5
|
+
<div class="callout ok-callout">
|
|
6
|
+
<strong>Boundary</strong>
|
|
7
|
+
<p>The platform does not execute OAuth, store tokens, or refresh them. It can identify that a server <em>requires</em> authentication, but cannot prove whether an existing login is still valid, and reports that uncertainty explicitly.</p>
|
|
8
|
+
</div>
|
|
9
|
+
</section>
|
|
10
|
+
|
|
11
|
+
<section class="section">
|
|
12
|
+
<h2 id="reject-secrets">Secrets are rejected before configuration is written</h2>
|
|
13
|
+
<p>MCP configuration may be read by several clients, lives in a home directory or repository, and project scope may be committed. A token supplied through <span class="inline-code">--env</span> would propagate to all those locations. The add command rejects it and shows the safe form:</p>
|
|
14
|
+
<pre><code>$ piagent-mcp add gh --env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx -- npx -y @acme/gh-mcp
|
|
15
|
+
FAIL: GITHUB_PERSONAL_ACCESS_TOKEN names a credential, so its value cannot be
|
|
16
|
+
written into MCP config. Export it in your shell and reference it instead:
|
|
17
|
+
--env 'GITHUB_PERSONAL_ACCESS_TOKEN=${GITHUB_PERSONAL_ACCESS_TOKEN}'</code></pre>
|
|
18
|
+
<div class="split">
|
|
19
|
+
<div class="card"><h3 id="field-name">Field-name detection</h3><p>Names containing <span class="inline-code">token</span>, <span class="inline-code">secret</span>, <span class="inline-code">password</span>, <span class="inline-code">api_key</span>, or <span class="inline-code">authorization</span> require environment-variable references.</p></div>
|
|
20
|
+
<div class="card"><h3 id="value-shape">Value-shape detection</h3><p>Values are checked independently, so a neutral name such as <span class="inline-code">--env CONFIG=ghp_...</span> is also rejected.</p></div>
|
|
21
|
+
</div>
|
|
22
|
+
<p>The same rules apply to <span class="inline-code">--header</span>. <span class="inline-code">--url</span> accepts HTTPS, or HTTP only for loopback hosts such as Figma desktop MCP. <span class="inline-code">list</span> and <span class="inline-code">get</span> mask values while preserving <span class="inline-code">${VAR}</span>, because the variable name is not the credential.</p>
|
|
23
|
+
</section>
|
|
24
|
+
|
|
25
|
+
<section class="section">
|
|
26
|
+
<h2 id="readiness">Readiness states</h2>
|
|
27
|
+
<p>A server count cannot show which server can answer a call. <span class="inline-code">/piagent-mcp doctor</span> classifies each server:</p>
|
|
28
|
+
<div class="table-wrap">
|
|
29
|
+
<table>
|
|
30
|
+
<thead><tr><th>State</th><th>Meaning</th><th>Action</th></tr></thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr><td><span class="inline-code">ready</span></td><td>Requirements are satisfied</td><td>—</td></tr>
|
|
33
|
+
<tr><td><span class="inline-code">needs-env</span></td><td>Configuration references an unset <span class="inline-code">${VAR}</span></td><td>Export the variable in the shell profile</td></tr>
|
|
34
|
+
<tr><td><span class="inline-code">needs-command</span></td><td>The executable is missing from PATH</td><td>Install it or update the server definition</td></tr>
|
|
35
|
+
<tr><td><span class="inline-code">pending-approval</span></td><td>The repository supplied this server and the machine has not approved it</td><td><span class="inline-code">/piagent-mcp approve <name></span></td></tr>
|
|
36
|
+
<tr><td><span class="inline-code">approval-changed</span></td><td>An approved definition changed</td><td>Review and approve again</td></tr>
|
|
37
|
+
<tr><td><span class="inline-code">rejected</span></td><td>The project server was rejected</td><td>Use <span class="inline-code">reset</span> to reconsider</td></tr>
|
|
38
|
+
<tr><td><span class="inline-code">disabled</span></td><td>Disabled explicitly</td><td><span class="inline-code">/piagent-mcp enable <name></span></td></tr>
|
|
39
|
+
<tr><td><span class="inline-code">oauth</span></td><td>Authentication is owned by Pi</td><td><span class="inline-code">/mcp-auth <name></span> when login is needed</td></tr>
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</div>
|
|
43
|
+
<p>The report states only what it can prove. <span class="inline-code">needs-env</span> prints the variable <strong>name</strong>, never its value.</p>
|
|
44
|
+
<p>Inside a session, <span class="inline-code">/piagent-mcp doctor</span> returns the same report with slash-command remedies. From a terminal:</p>
|
|
45
|
+
<pre><code>$ piagent-mcp doctor
|
|
46
|
+
OK context7 (global): ready
|
|
47
|
+
OK chrome-devtools (global): ready
|
|
48
|
+
NEED github (global): GITHUB_PERSONAL_ACCESS_TOKEN is referenced but not set
|
|
49
|
+
-> export GITHUB_PERSONAL_ACCESS_TOKEN=... in your shell profile
|
|
50
|
+
NEED docker: installed but the daemon is not responding
|
|
51
|
+
-> start Docker Desktop, then re-run piagent-mcp doctor</code></pre>
|
|
52
|
+
<div class="callout">
|
|
53
|
+
<strong>Why <span class="inline-code">oauth</span> is not an error</strong>
|
|
54
|
+
<p>It does not appear in the session-start notice because the platform cannot tell whether the user is already logged in. Repeating an uncertain warning every session would create noise. The notice includes only proven blockers; disable it with <span class="inline-code">PIAGENT_NO_MCP_NOTICE=1</span>.</p>
|
|
55
|
+
</div>
|
|
56
|
+
<p><span class="inline-code">doctor</span> also runs <span class="inline-code">docker info</span>. That slower check belongs in doctor, not session startup. <span class="inline-code">piagent-doctor</span> includes blocking states in its warnings.</p>
|
|
57
|
+
</section>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<section class="section">
|
|
2
|
+
<h2 id="two-surfaces">Two surfaces for two contexts</h2>
|
|
3
|
+
<p>Inside a Pi session, use the <strong>slash command</strong>. In a terminal, use the <strong>CLI</strong>. Both read the same state; the difference is where the operation runs.</p>
|
|
4
|
+
<div class="table-wrap">
|
|
5
|
+
<table>
|
|
6
|
+
<thead><tr><th>Task</th><th>In a session</th><th>In a terminal</th></tr></thead>
|
|
7
|
+
<tbody>
|
|
8
|
+
<tr><td>Open the menu</td><td><span class="inline-code">/piagent-mcp</span></td><td>—</td></tr>
|
|
9
|
+
<tr><td>List servers and state</td><td><span class="inline-code">/piagent-mcp status</span></td><td><span class="inline-code">piagent-mcp list</span></td></tr>
|
|
10
|
+
<tr><td>Inspect one server</td><td><span class="inline-code">/piagent-mcp get <name></span></td><td><span class="inline-code">piagent-mcp get <name></span></td></tr>
|
|
11
|
+
<tr><td>Show readiness blockers</td><td><span class="inline-code">/piagent-mcp doctor</span></td><td><span class="inline-code">piagent-mcp doctor</span></td></tr>
|
|
12
|
+
<tr><td>Approve a repository server</td><td><span class="inline-code">/piagent-mcp approve <name></span></td><td><span class="inline-code">piagent-mcp approve <name></span></td></tr>
|
|
13
|
+
<tr><td>Enable or disable</td><td><span class="inline-code">/piagent-mcp enable|disable <name></span></td><td><span class="inline-code">piagent-mcp enable|disable <name></span></td></tr>
|
|
14
|
+
<tr><td>Add, remove, or seed a preset</td><td>—</td><td><span class="inline-code">piagent-mcp add|remove|--preset</span></td></tr>
|
|
15
|
+
<tr><td>Live connection state or OAuth</td><td><span class="inline-code">/mcp</span>, <span class="inline-code">/mcp-auth</span></td><td>—</td></tr>
|
|
16
|
+
</tbody>
|
|
17
|
+
</table>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="callout ok-callout">
|
|
20
|
+
<strong>Why use a slash command instead of invoking the CLI in-session</strong>
|
|
21
|
+
<p>Asking the model to run <span class="inline-code">piagent-mcp list</span> through bash spends model turns executing, reading, and restating data that the current process already has. Pi dispatches the slash command directly to its handler: no model tokens, no interpretation, and a deterministic response.</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="callout">
|
|
24
|
+
<strong>Adding a server remains terminal-only</strong>
|
|
25
|
+
<p><span class="inline-code">add</span> includes shell quoting, <span class="inline-code">${VAR}</span> references, and a command line after <span class="inline-code">--</span>. The shell already parses these correctly. Reimplementing that parser in a slash command would create a second, weaker grammar. <span class="inline-code">/piagent-mcp add</span> prints the exact terminal command to run.</p>
|
|
26
|
+
</div>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<section class="section">
|
|
30
|
+
<h2 id="commands">Commands</h2>
|
|
31
|
+
<div class="command-grid">
|
|
32
|
+
<article class="command-card">
|
|
33
|
+
<h3 id="in-session">In a session</h3>
|
|
34
|
+
<p>No arguments opens the menu. Direct commands support Tab completion for subcommands and server names.</p>
|
|
35
|
+
<pre><code>/piagent-mcp menu
|
|
36
|
+
/piagent-mcp status full table
|
|
37
|
+
/piagent-mcp get sentry
|
|
38
|
+
/piagent-mcp doctor
|
|
39
|
+
/piagent-mcp approve internal</code></pre>
|
|
40
|
+
</article>
|
|
41
|
+
<article class="command-card">
|
|
42
|
+
<h3 id="add-server">Add a server</h3>
|
|
43
|
+
<p>Use <span class="inline-code">--url</span> for a remote server, or place a local server command after <span class="inline-code">--</span>. Run this in a terminal.</p>
|
|
44
|
+
<pre><code>piagent-mcp add sentry --url https://mcp.sentry.dev/mcp --scope global
|
|
45
|
+
piagent-mcp add internal --scope project -- npx -y @acme/internal-mcp</code></pre>
|
|
46
|
+
</article>
|
|
47
|
+
<article class="command-card">
|
|
48
|
+
<h3 id="inspect">Inspect</h3>
|
|
49
|
+
<p><span class="inline-code">list</span> shows every server visible from the current project and its state. <span class="inline-code">get</span> shows one server in detail.</p>
|
|
50
|
+
<pre><code>piagent-mcp list
|
|
51
|
+
piagent-mcp get sentry</code></pre>
|
|
52
|
+
</article>
|
|
53
|
+
<article class="command-card">
|
|
54
|
+
<h3 id="disable-remove">Disable and remove</h3>
|
|
55
|
+
<p><span class="inline-code">disable</span> preserves the definition but stops using it. <span class="inline-code">remove</span> deletes it from a scope.</p>
|
|
56
|
+
<pre><code>piagent-mcp disable sentry
|
|
57
|
+
piagent-mcp enable sentry
|
|
58
|
+
piagent-mcp remove sentry --scope global</code></pre>
|
|
59
|
+
</article>
|
|
60
|
+
<article class="command-card">
|
|
61
|
+
<h3 id="preset-command">Preset</h3>
|
|
62
|
+
<p>Seed a pinned group of servers. <span class="inline-code">--replace</span> returns preset-owned servers to their baseline.</p>
|
|
63
|
+
<pre><code>piagent-mcp --preset core --scope global --replace
|
|
64
|
+
piagent-mcp --list</code></pre>
|
|
65
|
+
</article>
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
68
|
+
|
|
69
|
+
<section class="section">
|
|
70
|
+
<h2 id="output">Output names the modified file</h2>
|
|
71
|
+
<p>All four configuration layers are read, so the first debugging question is which file is active. <span class="inline-code">add</span> answers that directly:</p>
|
|
72
|
+
<pre><code>$ piagent-mcp add internal --scope project -- npx -y @acme/internal-mcp
|
|
73
|
+
Added local MCP server internal with command: npx -y @acme/internal-mcp in project scope
|
|
74
|
+
File modified: /Users/you/repo/.mcp.json
|
|
75
|
+
This scope is part of the repository, so the server is not usable until approved: piagent-mcp approve internal</code></pre>
|
|
76
|
+
<p><span class="inline-code">list</span> renders a table whose <span class="inline-code">STATE</span> column identifies immediately usable servers:</p>
|
|
77
|
+
<pre><code>NAME SCOPE TRANSPORT TARGET STATE
|
|
78
|
+
context7 global stdio npx -y @upstash/context7-mcp@3.2.4 ready
|
|
79
|
+
chrome-devtools global stdio npx -y chrome-devtools-mcp@1.6.0 ... ready
|
|
80
|
+
github global stdio docker run -i --rm -e GITHUB_PERSON... needs-env
|
|
81
|
+
internal project stdio npx -y @acme/internal-mcp pending-approval</code></pre>
|
|
82
|
+
</section>
|
|
83
|
+
|
|
84
|
+
<section class="section">
|
|
85
|
+
<h2 id="updates">Custom servers and updates</h2>
|
|
86
|
+
<p>Each <span class="inline-code">piagent-update</span> reapplies the selected preset with <span class="inline-code">--replace</span>. The merge touches only server IDs owned by that preset.</p>
|
|
87
|
+
<div class="split">
|
|
88
|
+
<div class="card"><h3 id="preserved">Preserved</h3><p>Custom IDs such as <span class="inline-code">my-internal</span> or <span class="inline-code">sentry</span> survive every update.</p></div>
|
|
89
|
+
<div class="card"><h3 id="overwritten">Replaced</h3><p>Manual edits to preset-owned IDs such as <span class="inline-code">github</span> or <span class="inline-code">context7</span> return to baseline on the next update. Use a distinct ID for a custom variant.</p></div>
|
|
90
|
+
</div>
|
|
91
|
+
</section>
|