diff --git a/.changeset/omp-agent-runtime.md b/.changeset/omp-agent-runtime.md new file mode 100644 index 0000000..c270f40 --- /dev/null +++ b/.changeset/omp-agent-runtime.md @@ -0,0 +1,5 @@ +--- +"@jmfederico/pi-web": minor +--- + +Add configurable Pi-compatible agent runtime settings so PI WEB can target Oh My Pi (`omp`) state, auth, sessions, diagnostics, and update checks. diff --git a/docs/config.html b/docs/config.html index 0062f9c..82d6f3a 100644 --- a/docs/config.html +++ b/docs/config.html @@ -81,7 +81,7 @@
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.
@@ -96,6 +96,7 @@ Project config Config matrix External path access + Agent runtime Session tools Completion tools @@ -128,13 +129,16 @@
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.
+ 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.
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.plugins: reload the browser tab after changing plugin enablement.shortcuts: saved settings apply in the browser after config refresh/save.agent.commandPI_WEB_AGENT_COMMANDagent.dirPI_WEB_AGENT_DIR, PI_CODING_AGENT_DIR, OMP_CODING_AGENT_DIRspawnSessionsPI_CODING_AGENT_SESSION_DIRPI_WEB_AGENT_SESSION_DIR, PI_CODING_AGENT_SESSION_DIR, OMP_CODING_AGENT_SESSION_DIRPI_CODING_AGENT_DIRPI_WEB_AGENT_DIR, PI_CODING_AGENT_DIR, OMP_CODING_AGENT_DIR
+ 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).
+
{
+ "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.
+
spawnSessionsEnter the API key for ${state.provider.name}. It will be stored by pi in auth.json.
Enter the API key for ${state.provider.name}. It will be stored in the configured agent auth.json.
${config?.path ?? "Unknown"}
omp to make doctor/update checks target Oh My Pi. The embedded session runtime remains PI WEB's SDK path, so this does not dynamically load a different agent implementation.
+ ~/.omp/agent, then restart the session daemon.
+ {
+async function getSessiondComponentStatus(daemon: PiWebStatusDaemon, options: PiWebStatusOptions = {}): Promise