Merge remote-tracking branch 'origin/main' into feat/slash-command-parity

# Conflicts:
#	frontend/src/components/schedules/RunDetailPanel.test.tsx
#	frontend/src/components/schedules/RunDetailPanel.tsx
#	frontend/src/pages/__tests__/SessionDetail.export.test.tsx
This commit is contained in:
Chris Scott committed 2026-10-02 19:52:28 -04:00
commit 91607a2531
86 files changed
+2967 -1238

No files matched your search

+4 -2
View File
@@ -63,6 +63,7 @@ The `path` is relative to the internal API base (for example `/settings` or `/re
GET /settings
PATCH /settings
GET /opencode-config
GET /opencode-config/effective
GET /opencode-config/mcp
PATCH /opencode-config
POST /assistant/reload
@@ -274,7 +275,7 @@ List the configured MCP servers with their stored shape, enabled state, and live
**GET `/api/internal/opencode-config/effective`**
Read the running server's configuration as `entries`: the configuration documents and discovery directories in precedence order, lowest first, each shaped as `{ type: 'document', path, info }` or `{ type: 'directory', path }`. Its `info` values are expanded for the running server, so never copy this response into a save. Secret values in `info` are replaced with `<redacted>`.
Read the configuration OpenCode resolves for the workspace location as `entries`: the configuration documents and discovery directories in precedence order, lowest first, each shaped as `{ type: 'document', path, info }` or `{ type: 'directory', path }`. Its `info` values are expanded for the running server, so never copy this response into a save. Secret values in `info` are replaced with `<redacted>`.
**Status Codes:**
- `200`: Effective configuration returned
@@ -311,7 +312,7 @@ Returns the refreshed redacted configuration. Semantic changes, including `mcp`,
**POST `/api/internal/assistant/reload`**
Reload the OpenCode server configuration, rebuilding every loaded location. Use this after editing `.opencode/agents/assistant.md` or `opencode.json` so changes take effect on the next message.
Reload the OpenCode server configuration, rebuilding every loaded location. Use this after editing `.opencode/agents/assistant.md` or `opencode.json` so changes take effect on the next message. Returns `400` with `validationIssues` when the OpenCode configuration is invalid.
**Rate Limiting:** 5 requests per minute per token. Returns `429 Too Many Requests` with `Retry-After` header when exceeded.
@@ -333,6 +334,7 @@ Reload the OpenCode server configuration, rebuilding every loaded location. Use
**Status Codes:**
- `200`: Assistant workspace reloaded
- `400`: OpenCode configuration is invalid (`validationIssues` in the body)
- `401`: Missing or invalid bearer token
- `429`: Rate limit exceeded
- `502`: Failed to reload (upstream OpenCode error)
+1 -1
View File
@@ -26,7 +26,7 @@ A notification is suppressed when a visible tab is already viewing the session t
The title is the action (`Run Command`, `Edit File`, `Question`, `Error`, `Session complete`) and the body is `<repo> · <detail>`, for example `oc-manager · pnpm test`. Bodies are truncated to 140 characters. Permission and question notifications stay on screen until dismissed; every notification carries the event timestamp and re-alerts when a newer event for the same session replaces it.
Clicking a notification opens the session that raised it (`/repos/<id>/sessions/<sessionId>`). The service worker prefers a tab already showing that session, then the focused tab, then any visible tab, and only that one tab navigates; with no tab open a new window is opened. Sessions running in OpenCode worktrees or opencode-forge loop worktrees resolve to their parent repository through the shared OpenCode project id, and Assistant sessions open with the `assistant=1` parameter the Assistant view requires.
Clicking a notification opens the session that raised it (`/repos/<id>/sessions/<sessionId>`). The exception is a **Session complete** or **Session error** event for a session started by a scheduled run: those open the run's report (`/schedules?scheduleTab=runs&runId=<runId>`) instead, landing on the run history rather than the raw session. The service worker prefers a tab already showing that session, then the focused tab, then any visible tab, and only that one tab navigates; with no tab open a new window is opened. Sessions running in OpenCode worktrees or opencode-forge loop worktrees resolve to their parent repository through the shared OpenCode project id, and Assistant sessions open with the `assistant=1` parameter the Assistant view requires.
## Browser Compatibility
+1 -1
View File
@@ -129,7 +129,7 @@ The configuration directory also holds `service.json`, where the Manager writes
- `grep` and `glob` whose absolute search path is the configuration directory or one of its ancestors;
- `external_directory` access to the configuration directory or one of its ancestors.
As a consequence, the host-side file tools cannot read the top-level configuration files (`opencode.json`, `opencode.jsonc`, `service.json`) while enforcement is on; agents read and change the OpenCode configuration through the `ocm` tool instead. The `skills` subdirectory is unaffected.
The denial is specific to `service.json`. A sibling configuration file such as `opencode.json` or `opencode.jsonc` is not denied for `read`, and the `grep`/`glob` check only matches an absolute search path that resolves to the configuration directory or an ancestor — a relative path is not matched. The `skills` subdirectory is unaffected.
## Enabling and Enforcement
+10 -4
View File
@@ -97,10 +97,10 @@ Connections are made at the run's directory, so they do not affect other session
Each scheduled run executes in a **throwaway git worktree** — an isolated working copy branched off the repository's base branch. This provides two key guarantees:
- **No side effects on the main working tree** — file changes, branch switches, and experimentations during the run are confined to the worktree.
- **Separate checkout** — ordinary checkout changes and branch switches happen in the run's worktree. A worktree is not a filesystem jail: shell commands may affect other accessible paths, including the main checkout.
- **Clean state per run** — every run starts from a fresh branch (`schedule/{jobId}/run-{runId}`) based off the latest remote state.
When the run completes or fails, the worktree is cleaned up automatically. The worktree is **never auto-pushed** — any changes an agent makes during a scheduled run stay local and are discarded after the run finishes. The real safety boundary is this disposal: modifications affect only the throwaway worktree and are not propagated back to the repository.
When the run completes or fails, finalization commits changed files locally to the run branch (`schedule/{jobId}/run-{runId}`), records the commit hash, and removes the worktree. A branch with a commit is retained; a branch without a commit is deleted. Manager does not automatically push these commits, but an agent with shell access can push explicitly. Deleting a run or clearing its history removes the run branch; it does not guarantee immediate erasure of Git objects or outputs saved elsewhere.
### Branch Configuration
@@ -116,7 +116,13 @@ Every schedule includes a **Permissions** section in the General tab. These sett
### Allow Access Outside the Working Directory
When **disabled** (the default), the agent's file operations are confined to the isolated worktree. Enable this if the schedule requires reading or writing files elsewhere on the system (e.g., accessing a shared configuration directory).
When **disabled** (the default), OpenCode's `external_directory` permission is denied. This blocks file-tool operations that request that permission; it is not comprehensive filesystem confinement. Enable this if the schedule requires file tools to access paths outside its working directory (e.g., a shared configuration directory).
This is a file-tool boundary, not a per-worktree jail for shell commands. A sandboxed `shell` command can read and write every project root mounted into the sandbox, including other repositories and worktrees; see [Agent Sandboxing](./sandboxing.md#mounts-and-secrets).
### Allow Questions
When **disabled** (the default), the agent's `question` tool is denied so an unattended run cannot stall waiting for an answer nobody is there to give. Enable it only when the run is supervised, since an unattended run that asks a question can stall waiting for an answer.
### Blocked Bash Commands
@@ -135,7 +141,7 @@ kill -9 *
killall *
```
These patterns prevent dangerous commands whose blast radius escapes the throwaway worktree. File-mutating commands (`rm -rf`, `git reset --hard`, etc.) are intentionally omitted because they only affect the disposable worktree.
These patterns prevent dangerous commands whose blast radius escapes the throwaway worktree. File-mutating commands (`rm -rf`, `git reset --hard`, etc.) are intentionally omitted because the worktree itself is disposable; a shell command can still reach paths outside the worktree, so treat the deny list as a guard against the worst host-level commands rather than a complete sandbox.
You can customize the deny list by adding or removing glob patterns. One pattern per line. Changes apply to all future runs of that schedule.
+1 -1
View File
@@ -38,4 +38,4 @@ If a pinned session is deleted (manually or by context cleanup), it is removed f
- Pinning is independent of session activity — a pinned session stays pinned even when new sessions push older ones out of the Recent view.
- The Pinned section supports any number of pinned sessions.
- Pinning is per-user and stored server-side, so it follows you across devices.
- Pinning is stored server-side in the Manager and is Manager-wide rather than per-user, so the same pins are shown on every device and browser.