Archived
feat: add OMP runtime support
This commit is contained in:
+70
-11
@@ -81,7 +81,7 @@
|
||||
<p>
|
||||
PI WEB configuration covers the machine-local and project-local settings you usually need: bind address,
|
||||
trusted development-host settings, UI preferences, plugin enablement, file-explorer path access, upload
|
||||
limits, and session-daemon tools.
|
||||
limits, agent runtime selection, and session-daemon tools.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -96,6 +96,7 @@
|
||||
<a href="#project-config">Project config</a>
|
||||
<a href="#keys">Config matrix</a>
|
||||
<a href="#path-access">External path access</a>
|
||||
<a href="#agent-runtime">Agent runtime</a>
|
||||
<a href="#session-tools">Session tools</a>
|
||||
<a href="#completion-tools">Completion tools</a>
|
||||
</aside>
|
||||
@@ -128,13 +129,16 @@
|
||||
</div>
|
||||
<p>
|
||||
Environment overrides include <code>PI_WEB_HOST</code>, <code>PI_WEB_PORT</code> / <code>PORT</code>,
|
||||
<code>PI_WEB_ALLOWED_HOSTS</code>, <code>PI_WEB_MAX_UPLOAD_BYTES</code>, <code>PI_WEB_SPAWN_SESSIONS</code>,
|
||||
and <code>PI_WEB_SUBSESSIONS</code>.
|
||||
<code>PI_WEB_ALLOWED_HOSTS</code>, <code>PI_WEB_MAX_UPLOAD_BYTES</code>, <code>PI_WEB_AGENT_COMMAND</code>,
|
||||
<code>PI_WEB_AGENT_DIR</code>, <code>PI_WEB_AGENT_SESSION_DIR</code>, <code>PI_CODING_AGENT_DIR</code>,
|
||||
<code>PI_CODING_AGENT_SESSION_DIR</code>, <code>OMP_CODING_AGENT_DIR</code>,
|
||||
<code>OMP_CODING_AGENT_SESSION_DIR</code>, <code>PI_WEB_SPAWN_SESSIONS</code>, and
|
||||
<code>PI_WEB_SUBSESSIONS</code>.
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>host</code> / <code>port</code>: restart the web/API service or process.</li>
|
||||
<li><code>maxUploadBytes</code>: restart both the web/API process and the session daemon.</li>
|
||||
<li><code>spawnSessions</code> / <code>subsessions</code>: restart the session daemon.</li>
|
||||
<li><code>agent.command</code> / <code>agent.dir</code> / <code>spawnSessions</code> / <code>subsessions</code>: restart the session daemon.</li>
|
||||
<li><code>pathAccess</code>: applies on the next request; existing file views may need a browser refresh.</li>
|
||||
<li><code>plugins</code>: reload the browser tab after changing plugin enablement.</li>
|
||||
<li><code>shortcuts</code>: saved settings apply in the browser after config refresh/save.</li>
|
||||
@@ -160,6 +164,10 @@
|
||||
"allowedPaths": ["~/SDKs", "/opt/reference"]
|
||||
},
|
||||
"maxUploadBytes": 67108864,
|
||||
"agent": {
|
||||
"command": "omp",
|
||||
"dir": "~/.omp/agent"
|
||||
},
|
||||
"spawnSessions": true,
|
||||
"subsessions": false,
|
||||
"plugins": {
|
||||
@@ -262,6 +270,22 @@
|
||||
<td>Not supported locally</td>
|
||||
<td>Restart web/API and session daemon</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Agent CLI command</td>
|
||||
<td><code>agent.command</code></td>
|
||||
<td><code>PI_WEB_AGENT_COMMAND</code></td>
|
||||
<td>Global/session daemon</td>
|
||||
<td>Not supported locally</td>
|
||||
<td>Restart session daemon; affects doctor/status/update checks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Agent state directory</td>
|
||||
<td><code>agent.dir</code></td>
|
||||
<td><code>PI_WEB_AGENT_DIR</code>, <code>PI_CODING_AGENT_DIR</code>, <code>OMP_CODING_AGENT_DIR</code></td>
|
||||
<td>Global/session daemon</td>
|
||||
<td>Not supported locally</td>
|
||||
<td>Restart session daemon; affects auth, models, settings, and sessions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Agent can spawn sessions</td>
|
||||
<td><code>spawnSessions</code></td>
|
||||
@@ -368,18 +392,18 @@
|
||||
<td>Restart web/API; advanced state override</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pi session storage directory</td>
|
||||
<td>Agent session storage directory</td>
|
||||
<td>—</td>
|
||||
<td><code>PI_CODING_AGENT_SESSION_DIR</code></td>
|
||||
<td>Pi/session daemon env</td>
|
||||
<td><code>PI_WEB_AGENT_SESSION_DIR</code>, <code>PI_CODING_AGENT_SESSION_DIR</code>, <code>OMP_CODING_AGENT_SESSION_DIR</code></td>
|
||||
<td>Session daemon env</td>
|
||||
<td>Not supported locally</td>
|
||||
<td>Restart session daemon; follows Pi session priority</td>
|
||||
<td>Restart session daemon; env-only session storage override</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pi agent config directory</td>
|
||||
<td>Agent config directory</td>
|
||||
<td>—</td>
|
||||
<td><code>PI_CODING_AGENT_DIR</code></td>
|
||||
<td>Pi/Web/API/session daemon env</td>
|
||||
<td><code>PI_WEB_AGENT_DIR</code>, <code>PI_CODING_AGENT_DIR</code>, <code>OMP_CODING_AGENT_DIR</code></td>
|
||||
<td>Web/API + session daemon env</td>
|
||||
<td>Not supported locally</td>
|
||||
<td>Restart services</td>
|
||||
</tr>
|
||||
@@ -420,6 +444,41 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="agent-runtime">
|
||||
<h2>Agent runtime</h2>
|
||||
<p>
|
||||
<code>agent.command</code> controls which Pi-compatible CLI PI WEB checks in doctor/status/update flows.
|
||||
It defaults to <code>pi</code>; set it to <code>omp</code> when this machine should use Oh My Pi.
|
||||
</p>
|
||||
<p>
|
||||
<code>agent.dir</code> controls which compatible agent state directory PI WEB reads for auth providers,
|
||||
model settings, settings, and session metadata. It defaults to the selected agent's conventional
|
||||
directory (<code>~/.pi/agent</code> for <code>pi</code>, <code>~/.omp/agent</code> for <code>omp</code>).
|
||||
</p>
|
||||
<div class="code-card">
|
||||
<pre><code>{
|
||||
"agent": {
|
||||
"command": "omp",
|
||||
"dir": "~/.omp/agent"
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
<p>
|
||||
Environment variables take precedence over the config file. <code>PI_WEB_AGENT_COMMAND</code> selects the
|
||||
command, <code>PI_WEB_AGENT_DIR</code> sets the state directory for any command, and command-specific
|
||||
variables such as <code>OMP_CODING_AGENT_DIR</code> are honored when the selected command is <code>omp</code>.
|
||||
</p>
|
||||
<p>
|
||||
Session directory overrides are environment-only. Set <code>PI_WEB_AGENT_SESSION_DIR</code> or the selected
|
||||
command's session variable (for example <code>OMP_CODING_AGENT_SESSION_DIR</code>) when you need to override
|
||||
session storage separately from <code>agent.dir</code>.
|
||||
</p>
|
||||
<div class="callout warning">
|
||||
Restart the session daemon after changing agent settings. The web/API process can display the new config
|
||||
immediately, but active session runtime ownership is intentionally long-lived.
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="session-tools">
|
||||
<h2>Session daemon tools</h2>
|
||||
<h3><code>spawnSessions</code></h3>
|
||||
|
||||
+32
-5
@@ -1,6 +1,6 @@
|
||||
# PI WEB configuration reference
|
||||
|
||||
PI WEB configuration covers the machine-local and project-local settings you usually need: the web/API bind address, trusted development-host settings, UI preferences, plugin enablement, file-explorer path access, manual upload defaults, upload limits, and session-daemon tools.
|
||||
PI WEB configuration covers the machine-local and project-local settings you usually need: the web/API bind address, trusted development-host settings, UI preferences, plugin enablement, file-explorer path access, manual upload defaults, upload limits, agent runtime selection, and session-daemon tools.
|
||||
|
||||
This file is the markdown reference for agents and package consumers. The website page is <https://pi-web.dev/config>.
|
||||
|
||||
@@ -25,13 +25,13 @@ defaults → global config file → environment overrides
|
||||
|
||||
Supported project-local settings are then applied for that project's workspaces. For upload defaults, `<project>/.pi-web/config.json` overrides the global value.
|
||||
|
||||
Environment overrides include `PI_WEB_HOST`, `PI_WEB_PORT` / `PORT`, `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_MAX_UPLOAD_BYTES`, `PI_WEB_SPAWN_SESSIONS`, and `PI_WEB_SUBSESSIONS`.
|
||||
Environment overrides include `PI_WEB_HOST`, `PI_WEB_PORT` / `PORT`, `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_MAX_UPLOAD_BYTES`, `PI_WEB_AGENT_COMMAND`, `PI_WEB_AGENT_DIR`, `PI_WEB_AGENT_SESSION_DIR`, `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR`, `OMP_CODING_AGENT_DIR`, `OMP_CODING_AGENT_SESSION_DIR`, `PI_WEB_SPAWN_SESSIONS`, and `PI_WEB_SUBSESSIONS`.
|
||||
|
||||
Process restarts depend on the key:
|
||||
|
||||
- `host` / `port`: restart the web/API service or process.
|
||||
- `maxUploadBytes`: restart both the web/API process and the session daemon.
|
||||
- `spawnSessions` / `subsessions`: restart the session daemon.
|
||||
- `agent.command` / `agent.dir` / `spawnSessions` / `subsessions`: restart the session daemon.
|
||||
- `pathAccess`: applies on the next request; existing file views may need a browser refresh.
|
||||
- `uploads.defaultFolder`: applies to newly opened Files upload dialogs and new direct drag/drop batches after config/workspace refresh.
|
||||
- `plugins`: reload the browser tab after changing plugin enablement.
|
||||
@@ -50,6 +50,10 @@ Process restarts depend on the key:
|
||||
"defaultFolder": ".pi-web/uploads"
|
||||
},
|
||||
"maxUploadBytes": 67108864,
|
||||
"agent": {
|
||||
"command": "omp",
|
||||
"dir": "~/.omp/agent"
|
||||
},
|
||||
"spawnSessions": true,
|
||||
"subsessions": false,
|
||||
"plugins": {
|
||||
@@ -99,6 +103,8 @@ Rows with JSON key `—` are runtime-only environment variables, not config-file
|
||||
| External filesystem roots | `pathAccess.allowedPaths` | — | Global + project | **Merges**: global roots first, then project roots; duplicates removed | Next file request; refresh existing views if needed |
|
||||
| Manual file upload default folder | `uploads.defaultFolder` | — | Global + project | **Overrides**: project value wins for workspaces in that project; otherwise global/default applies | New Upload dialogs and direct drag/drop batches after config/workspace refresh |
|
||||
| Upload/body limit | `maxUploadBytes` | `PI_WEB_MAX_UPLOAD_BYTES` | Global | Not supported locally | Restart web/API and session daemon |
|
||||
| Agent CLI command | `agent.command` | `PI_WEB_AGENT_COMMAND` | Global/session daemon | Not supported locally | Restart session daemon; affects doctor/status/update checks |
|
||||
| Agent state directory | `agent.dir` | `PI_WEB_AGENT_DIR`, `PI_CODING_AGENT_DIR`, `OMP_CODING_AGENT_DIR` | Global/session daemon | Not supported locally | Restart session daemon; affects auth, models, settings, and sessions |
|
||||
| Agent can spawn sessions | `spawnSessions` | `PI_WEB_SPAWN_SESSIONS` | Global/session daemon | Not supported locally | Restart session daemon |
|
||||
| Tracked subsessions (beta) | `subsessions` | `PI_WEB_SUBSESSIONS` | Global/session daemon | Not supported locally; also requires `spawnSessions` | Restart session daemon |
|
||||
| Plugin enablement/settings | `plugins.<id>.enabled`, `plugins.<id>.settings` | — | Global | Not core local config; plugins may read their own project files | Reload browser tab |
|
||||
@@ -113,8 +119,8 @@ Rows with JSON key `—` are runtime-only environment variables, not config-file
|
||||
| Web-to-daemon URL | — | `PI_WEB_SESSIOND_URL` | Web/API env | Not supported locally | Restart web/API |
|
||||
| Projects storage file | — | `PI_WEB_PROJECTS_FILE` | Web/API + session daemon env | Not supported locally | Restart services; advanced state override |
|
||||
| Remote machines storage file | — | `PI_WEB_MACHINES_FILE` | Web/API env | Not supported locally | Restart web/API; advanced state override |
|
||||
| Pi session storage directory | — | `PI_CODING_AGENT_SESSION_DIR` | Pi/session daemon env | Not supported locally | Restart session daemon; follows Pi session priority |
|
||||
| Pi agent config directory | — | `PI_CODING_AGENT_DIR` | Pi/Web/API/session daemon env | Not supported locally | Restart services |
|
||||
| Agent session storage directory | — | `PI_WEB_AGENT_SESSION_DIR`, `PI_CODING_AGENT_SESSION_DIR`, `OMP_CODING_AGENT_SESSION_DIR` | Session daemon env | Not supported locally | Restart session daemon; env-only session storage override |
|
||||
| Agent config directory | — | `PI_WEB_AGENT_DIR`, `PI_CODING_AGENT_DIR`, `OMP_CODING_AGENT_DIR` | Web/API + session daemon env | Not supported locally | Restart services |
|
||||
| Skip update checks | — | `PI_WEB_SKIP_VERSION_CHECK`, `PI_WEB_OFFLINE`, `PI_SKIP_VERSION_CHECK`, `PI_OFFLINE` | Web/API env | Not supported locally | Restart web/API after env changes |
|
||||
|
||||
## Key details
|
||||
@@ -160,6 +166,27 @@ For machine federation, current remote PI WEB servers return `workspace.effectiv
|
||||
|
||||
The per-request size limit is still controlled by `maxUploadBytes` / `PI_WEB_MAX_UPLOAD_BYTES`.
|
||||
|
||||
### Agent runtime selection
|
||||
|
||||
`agent.command` controls which Pi-compatible CLI PI WEB checks in doctor/status/update flows. It defaults to `pi`; set it to `omp` when this machine should use Oh My Pi.
|
||||
|
||||
`agent.dir` controls which compatible agent state directory PI WEB reads for auth providers, model settings, settings, and session metadata. It defaults to the selected agent's conventional directory (`~/.pi/agent` for `pi`, `~/.omp/agent` for `omp`).
|
||||
|
||||
```json
|
||||
{
|
||||
"agent": {
|
||||
"command": "omp",
|
||||
"dir": "~/.omp/agent"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Environment variables take precedence over the config file. `PI_WEB_AGENT_COMMAND` selects the command, `PI_WEB_AGENT_DIR` sets the state directory for any command, and command-specific variables such as `OMP_CODING_AGENT_DIR` are honored when the selected command is `omp`.
|
||||
|
||||
Session directory overrides are environment-only. Set `PI_WEB_AGENT_SESSION_DIR` or the selected command's session variable (for example `OMP_CODING_AGENT_SESSION_DIR`) when you need to override session storage separately from `agent.dir`.
|
||||
|
||||
Restart the session daemon after changing agent settings. The web/API process can display the new config immediately, but active session runtime ownership is intentionally long-lived.
|
||||
|
||||
### Session daemon tools
|
||||
|
||||
`spawnSessions` controls whether agents receive the `spawn_session` tool. It defaults to `true`; set it to `false` if you do not want an agent to start independent PI WEB sessions.
|
||||
|
||||
Reference in New Issue
Block a user