Skip to content
Closed
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
0a9fcc3
feat(cli): workspace-qualified extensions REST (daemon multi-workspace)
doudouOUC Jul 10, 2026
563a173
qwen: address PR review feedback (#6638)
doudouOUC Jul 10, 2026
59b2f88
qwen: address PR review feedback (#6638)
doudouOUC Jul 10, 2026
9dd2e92
qwen: address PR review feedback (#6638)
doudouOUC Jul 10, 2026
d6c3b70
feat(cli): add concurrent extension preparation
doudouOUC Jul 10, 2026
f3e76ff
fix(cli): remove redundant extension context build
doudouOUC Jul 10, 2026
40c9118
codex: address PR review feedback (#6638)
doudouOUC Jul 10, 2026
d47f4a7
codex: address PR review feedback (#6638)
doudouOUC Jul 10, 2026
d2c3e81
fix(cli): address extension review feedback
doudouOUC Jul 10, 2026
4ff8c18
merge: resolve conflicts with origin/main for PR #6638
qwen-code-dev-bot Jul 11, 2026
db259e7
fix(extensions): address final review feedback
doudouOUC Jul 11, 2026
8d9db32
fix(extensions): address latest review feedback
doudouOUC Jul 11, 2026
c6d4c83
codex: address PR review feedback (#6638)
doudouOUC Jul 11, 2026
3c1cede
fix(core): reject links in npm extension archives
doudouOUC Jul 11, 2026
f34fbb8
fix(core): limit npm extension archive downloads
doudouOUC Jul 11, 2026
e8e5f84
fix(extensions): address review follow-ups
doudouOUC Jul 11, 2026
113f896
fix(extensions): address latest review feedback
doudouOUC Jul 11, 2026
3067e51
chore: merge main into workspace extension branch
doudouOUC Jul 11, 2026
8e25074
chore: merge latest main into extension branch
doudouOUC Jul 11, 2026
6cff963
fix(extensions): release rejected operation slots
doudouOUC Jul 11, 2026
15004ea
fix(extensions): address operation review feedback
doudouOUC Jul 11, 2026
c1cae5e
fix(extensions): align archive handling contracts
doudouOUC Jul 11, 2026
2643a3a
fix(extensions): preserve watcher generation state
doudouOUC Jul 11, 2026
21207cc
docs(extensions): align management contracts
doudouOUC Jul 11, 2026
2904340
fix(sdk): bound extension operation polls
doudouOUC Jul 12, 2026
1e26633
test(core): cover forged prepared commits
doudouOUC Jul 12, 2026
5658cb3
test(core): assert activation generation increment
doudouOUC Jul 12, 2026
44afb9c
fix(extensions): close archive and polling gaps
doudouOUC Jul 12, 2026
1654fa5
fix(cli): retry suppressed extension generations
doudouOUC Jul 12, 2026
96f80ec
test(cli): cover archive URL extension updates
doudouOUC Jul 12, 2026
b60129c
fix(sdk): preserve unbounded operation waits
doudouOUC Jul 12, 2026
cce3571
fix(core): share npm redirect download deadline
doudouOUC Jul 12, 2026
85387ec
fix(core): preserve extension reload diagnostics
doudouOUC Jul 12, 2026
a9aea07
fix(core): preserve installed Claude plugin paths
doudouOUC Jul 12, 2026
25ccbc1
fix(cli): return committed activation state
doudouOUC Jul 12, 2026
ab3496f
fix(cli): preserve extension preparation errors
doudouOUC Jul 12, 2026
5f23e58
fix(core): validate extension setting env vars
doudouOUC Jul 12, 2026
59ab121
fix(cli): target extension reconciliation
doudouOUC Jul 12, 2026
abde5b4
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
b81c7be
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
1e57061
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
83cb011
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
6b61cbb
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
f5ee95d
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
9c5bb7c
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
65e50f0
test(cli): cover resultless legacy commit warnings
doudouOUC Jul 12, 2026
bee57c8
fix(cli): retain suppressed extension generations
doudouOUC Jul 12, 2026
abffbc3
fix(cli): record legacy runtime reconciliation
doudouOUC Jul 12, 2026
e7cf348
fix(cli): validate extension clients by runtime
doudouOUC Jul 12, 2026
d92f71c
fix(cli): record workspace activation refresh
doudouOUC Jul 12, 2026
85f9c35
test(cli): stop extension reconcilers after cases
doudouOUC Jul 12, 2026
19885ce
fix(cli): resolve global runtimes at reconciliation
doudouOUC Jul 12, 2026
0ed83ab
fix(cli): reconcile newly registered runtimes
doudouOUC Jul 12, 2026
adb59a4
fix(cli): prevent overlapping runtime reconciliation
doudouOUC Jul 12, 2026
774975f
fix(cli): dispose late runtime apps during shutdown
doudouOUC Jul 12, 2026
cb38bdc
fix(core): keep projection repair best effort
doudouOUC Jul 12, 2026
9183308
fix(core): preserve committed store results
doudouOUC Jul 12, 2026
2566f1f
fix(core): quarantine corrupt store journals
doudouOUC Jul 12, 2026
7a1679d
fix(core): harden npm download redirects
doudouOUC Jul 12, 2026
420a5df
fix(extensions): address review edge cases
doudouOUC Jul 12, 2026
04640a5
merge(serve): reconcile extension_management_v2 with origin/main work…
qwen-code-dev-bot Jul 12, 2026
7f07ad7
chore: merge upstream main into extension management
doudouOUC Jul 12, 2026
60c8596
chore: reconcile concurrent upstream merges
doudouOUC Jul 12, 2026
4f34aa3
fix(extensions): honor cancellation between preparation stages
doudouOUC Jul 12, 2026
c0fbc57
fix(extensions): retry prepared cleanup failures
doudouOUC Jul 12, 2026
4ab8a71
test(extensions): cover committed artifact recovery boundary
doudouOUC Jul 12, 2026
8e3f2e8
fix(serve): release extension refresh queue on timeout
doudouOUC Jul 12, 2026
6f38769
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
8249a65
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
d557154
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
f524413
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
ec653f9
fix: address extension review feedback
doudouOUC Jul 12, 2026
9fa98ca
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
2f5e496
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
c1c6199
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
4d55a5c
codex: address PR review feedback (#6638)
doudouOUC Jul 12, 2026
bd8c4d2
fix(core): reconcile extension store compatibility state
doudouOUC Jul 12, 2026
2c7c08d
fix(core): bound npm redirects and isolate extension tests
doudouOUC Jul 12, 2026
8893d3a
fix(core): make extension uninstall store-authoritative
doudouOUC Jul 12, 2026
ea1d112
fix(core): defer prepared extension secret mutations
doudouOUC Jul 12, 2026
4549a39
fix(core): validate staged extensions before commit
doudouOUC Jul 12, 2026
47b575e
fix(core): enforce public extension network policy
doudouOUC Jul 12, 2026
4029e5a
fix(core): handle extension response failures
doudouOUC Jul 13, 2026
eaf6e7a
fix(extensions): surface committed refresh warnings
doudouOUC Jul 13, 2026
ba9fa61
fix(cli): guard timer unref calls
doudouOUC Jul 13, 2026
a81fe71
fix(extensions): release commit lane after durable writes
doudouOUC Jul 13, 2026
5437ecc
test(serve): update mutation callback assertions
doudouOUC Jul 13, 2026
bb93910
fix(serve): refresh live extension instructions
doudouOUC Jul 13, 2026
0bf9de6
fix(extensions): address latest review feedback
doudouOUC Jul 13, 2026
7077c24
fix(extensions): address follow-up review findings
doudouOUC Jul 13, 2026
b3a8623
fix(extensions): address remaining activation feedback
doudouOUC Jul 13, 2026
31e1b4a
fix(serve): preserve preparation queue status
doudouOUC Jul 13, 2026
20c44fa
fix(extensions): enforce network request deadlines
doudouOUC Jul 13, 2026
f1d9ab2
docs(serve): clarify single-workspace capabilities
doudouOUC Jul 13, 2026
d8242a7
fix(extensions): guard deferred settings commit
doudouOUC Jul 13, 2026
330d1e6
fix(extensions): cancel archive extraction
doudouOUC Jul 13, 2026
e70ab39
fix(extensions): harden refresh recovery
doudouOUC Jul 13, 2026
d5ebf30
fix(serve): serialize extension reconciliation
doudouOUC Jul 13, 2026
c215581
fix(extensions): address post-commit review feedback
doudouOUC Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 186 additions & 0 deletions docs/design/extension-management-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Extension Management V2

## Status

This design extends daemon protocol `v1` under the additive
`extension_management_v2` capability. The already-published
`workspace_extensions` capability and `/workspace/extensions/*` routes remain
available as a primary-workspace compatibility adapter.

## Resource model

An installed extension is one user-level artifact in `QWEN_HOME/extensions`.
Activation is policy, not a second copy of that artifact:

1. An exact workspace override (`enabled` or `disabled`).
2. An internal exact `inherit` mask created while migrating legacy path rules.
3. An ordered V1 path rule.
4. The global default.

Workspace identity uses the daemon's canonical workspace path. A workspace
route selects an existing runtime by workspace id first and canonical cwd
second. Reads are allowed for untrusted runtimes; activation changes, refresh,
and workspace-scoped install require a trusted target. Global mutation uses the
normal daemon mutation authentication and install consent, not the trust state
of whichever workspace initiated the request.

## Store and transaction boundary

`ExtensionStore` is the only writer of final extension directories and V2
activation state. `ExtensionManager` remains the workspace-facing facade, but
CLI, TUI, auto-update, daemon, and SDK-backed operations delegate mutations to
the store.

The layout is:

```text
~/.qwen/
├── extensions/
└── extension-store/
├── lock
├── state.json
├── state.previous.json
├── staging/
├── rollback/
└── transactions/
```

The store and artifacts share a filesystem so artifact swaps are directory
renames. An in-process mutex and a `proper-lockfile` lock serialize commits
across all V2-aware processes. Every mutation re-reads state while holding the
lock and increments a monotonic generation, preventing lost updates.

Install/update preparation happens outside the final artifact directory. The
commit writes a `prepared` journal, moves the old artifact to rollback, moves
staging into place, and atomically writes `state.json`. That state rename is the
commit point. Before it, recovery rolls back; after it, recovery only completes
projection and cleanup. A committed policy is never rolled back because one
runtime refresh failed.

Store files use owner-only permissions and atomic no-follow writes. Extension
ids, direct-child artifact paths, transaction paths, and names are validated.
Failures are reported with credential-redacted sources.

## V1 migration and downgrade projection

The first V2-aware process imports ordered rules from
`extension-enablement.json` without materializing the current set of registered
workspaces as exact overrides. V2 writes a compatible projection after each
state commit and stores its hash in `state.json`.

If hashes differ, modification order decides the recovery direction: an older
projection is repaired from authoritative V2 state; a projection modified after
V2 state is treated as a sequential write by a downgraded binary and is
re-imported with a new generation. Concurrent V1 and V2 writers sharing one
`QWEN_HOME` are intentionally unsupported.

Clearing a public workspace override normally deletes the exact record. If an
older path rule would then change the effective value, the store writes an
internal `inherit` mask so DELETE still means “inherit the global default.”

## Daemon API

The global surface is:

```text
GET /extensions
POST /extensions/install
POST /extensions/check-updates
POST /extensions/:extensionId/update
DELETE /extensions/:extensionId
PUT /extensions/:extensionId/activation
GET /extensions/operations/:operationId
```

Install requires explicit consent and initial activation:

```ts
type InitialActivation =
| { scope: 'user' }
| { scope: 'workspace'; workspaceId: string };
```

The daemon install endpoint accepts Git, GitHub Release, and npm sources.
Local/link remains a local CLI feature. Update preserves the extension id,
manifest name, settings, and activation policy. “Already current” is a
successful `updated: false` result. Uninstall is idempotent and removes both the
artifact and policy.

The workspace projection is:

```text
GET /workspaces/:workspace/extensions
PUT /workspaces/:workspace/extensions/:extensionId/activation
DELETE /workspaces/:workspace/extensions/:extensionId/activation
POST /workspaces/:workspace/extensions/refresh
```

It intentionally has no workspace artifact mutation routes. Projection entries
Comment thread
doudouOUC marked this conversation as resolved.
Resolved
include default, exact workspace value, effective value, and source. Desired
generation and locally applied generation are top-level response fields.

Potentially slow mutations return `202`, `Location`, and `Retry-After`. The
operation record is daemon-local memory, retains at most 100 terminal records,
and can disappear on restart. Catalog/store recovery is authoritative. SDK
polling timeout stops polling only; it never cancels accepted work.

The daemon admits at most 10 unfinished extension operations. A daemon-wide
FIFO preparation queue runs at most two downloads, extractions, conversions,
or single-extension update checks at once. Install and update use an explicit
`prepare -> commit/dispose` lifecycle: preparation owns only staging files and
does not change the store, cache, or runtime. Prepared mutations enter a
separate single-concurrency FIFO commit queue in the order preparation
finishes. Activation and uninstall enter only the commit queue; check-updates
enters only the preparation queue. Manual refresh is serialized through the
commit queue. The commit lane is released after the store commit and settings
commit; extension reload, manager runtime refresh, prepared-file cleanup, and
daemon runtime reconciliation run outside it. These post-commit steps do not
occupy either slot, so later commits may proceed while an earlier generation is
being applied or cleaned up.

The preparation deadline starts when an operation first acquires a preparation
slot, not while it waits. Abort is propagated to network operations. A started
task continues to occupy its slot until its underlying promise settles even if
it ignores abort. Commit is not cancellable. Prepared updates carry the target
artifact generation: unrelated extension or activation changes safely rebase,
while a stale update of the same artifact fails with `extension_conflict`.

## Runtime reconciliation

A successful commit invalidates local status and refreshes affected runtimes.
Global artifact/default changes reconcile all runtimes in this daemon; an exact
workspace override reconciles only its target. Runtime reconciliation refreshes
extension and skill caches, extension tools, hierarchical memory, active chat
system instructions, and available commands. Per-workspace generation
coalescing means applying generation N also satisfies waiters for older
generations; a late lower-generation refresh therefore cannot move the applied
generation backwards. Partial refresh failure or post-commit reload/cleanup
failure produces `succeeded_with_warnings` with workspace-specific or commit
diagnostics, without rolling back the artifact.

The extension file watcher observes only `extension-store/state.json` for
policy generation and continues to observe installed/linked extension content
for command, skill, agent, hook, and MCP changes. A 30-second generation poll
repairs missed filesystem events and bounds convergence for other daemons that
share the store.

## Compatibility

`workspace_extensions` remains the capability for the existing singular
surface. Its handlers call the same manager/coordinator and adapt responses:
project activation becomes a primary workspace override; user activation keeps
the legacy rule-clearing behavior; global mutation reconciles every local
runtime. The legacy operation endpoint maps V2 warning completion back to the
published legacy refresh-error status.

Clients must check `extension_management_v2`; neither daemon mode nor another
workspace capability implies this API. The abandoned
`workspace_qualified_extensions` proposal is not part of the protocol.

## Non-goals

- Per-workspace artifact copies.
- A daemon registry or remote acknowledgement protocol.
- User cancellation of accepted operations.
- Concurrent old-binary and V2-aware writes to one `QWEN_HOME`.
- Removing the V1 adapter before a future protocol-v2 migration.
4 changes: 3 additions & 1 deletion docs/developers/daemon/11-capabilities-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The `Map` stores membership and predicate together. Adding a new conditional tag

Baseline tags are not present in the `Map` and are advertised unconditionally. This is intentionally represented by absence rather than by a separate Set.

### 75 tags (v1, grouped by domain)
### v1 tags, grouped by domain

Foundation: `health`, `daemon_status`, `capabilities`.

Expand All @@ -108,6 +108,8 @@ Permissions: `session_permission_vote`, `permission_vote`, **`permission_mediati

Workspace read-only snapshots: `workspace_mcp`, `workspace_skills`, `workspace_providers`, `workspace_env`, `workspace_preflight`, `workspace_hooks`, `workspace_extensions`.

Extension management: `extension_management_v2` adds the global `/extensions/*` catalog/mutation/operation contract and the workspace activation projection. It is separate from the published `workspace_extensions` compatibility surface and from `workspace_qualified_rest_core`.

Workspace mutation (Wave 4+): `workspace_memory`, `workspace_agents`, `workspace_agent_generate`, `workspace_tool_toggle`, **`workspace_settings`** (conditional), `workspace_permissions`, `workspace_init`, `workspace_github_setup`, `workspace_trust`, `workspace_mcp_restart`, `workspace_mcp_manage`, `workspace_file_read`, `workspace_file_bytes`, `workspace_file_write`, **`workspace_reload`** (conditional).

MCP guardrails: **`mcp_guardrails`** (`modes: ['warn', 'enforce']`), `mcp_guardrail_events`, `mcp_server_runtime_mutation`, **`mcp_workspace_pool`** (conditional), **`mcp_pool_restart`** (conditional).
Expand Down
156 changes: 155 additions & 1 deletion docs/developers/qwen-serve-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ registry. Clients **must** gate UI off `features`, not off `mode` (per design
'workspace_hooks', 'session_hooks', 'workspace_extensions',
'session_branch', 'rate_limit', 'workspace_reload',
'multi_workspace_sessions', 'persistent_workspace_registration',
'workspace_qualified_rest_core', 'workspace_persisted_transcript',
'workspace_qualified_rest_core', 'extension_management_v2',
'workspace_persisted_transcript',
'client_mcp_over_ws', 'cdp_tunnel_over_ws', 'browser_automation_mcp']
```

Expand Down Expand Up @@ -241,6 +242,159 @@ When `workspace_qualified_rest_core` is advertised, the same file surface is als

The same tag also exposes workspace-qualified project-agent CRUD at `/workspaces/:workspace/agents` and `/workspaces/:workspace/agents/:agentType`. These plural routes only read or mutate project-level agents for the selected workspace; `global` and `user` scope requests return `400 { code: "global_scope_not_supported_for_workspace_route" }`. Workspace-less `/workspace/agents` routes retain their existing primary-workspace behavior and remain the only REST surface for user-level agent scope.

`extension_management_v2` advertises a user-level extension catalog and mutation surface at `/extensions/*`, plus workspace activation projections at `/workspaces/:workspace/extensions/*`. Artifacts are global; workspace routes expose only projection reads, exact activation overrides, and runtime refresh. Reads may target an untrusted registered workspace, while activation, refresh, and workspace-scoped install require a trusted target. Slow mutations use daemon-local operations at `/extensions/operations/:operationId`; store generation, not operation history, is authoritative across restart and across daemons. The published `workspace_extensions` capability and `/workspace/extensions/*` routes remain a primary-workspace compatibility adapter. Clients must preflight `extension_management_v2` and must not infer it from daemon mode or `workspace_qualified_rest_core`.
Comment thread
doudouOUC marked this conversation as resolved.
Resolved

### Extension Management V2 wire contract

All routes use the daemon bearer authentication rules above. `X-Qwen-Client-Id` is optional for the V2 mutation routes; when supplied, it must identify a client registered with one of the mutation's target workspace runtimes. `:extensionId` is the lowercase 64-hex extension identity. `:workspace` resolves as an exact workspace id first and otherwise as a URL-encoded absolute cwd after canonicalization.

| Method and path | Success |
| ------------------------------------------------------------------ | --------------------------------------------------------------------------- |
| `GET /extensions` | `200` global artifact catalog |
| `PUT /extensions/:extensionId/activation` | `202` global default-activation operation |
| `POST /extensions/install` | `202` install operation |
| `POST /extensions/check-updates` | `202` update-check operation |
| `POST /extensions/:extensionId/update` | `202` update operation |
| `DELETE /extensions/:extensionId` | `202` uninstall operation, or idempotent `204` when the extension is absent |
| `GET /extensions/operations/:operationId` | `200` operation snapshot |
| `GET /workspaces/:workspace/extensions` | `200` workspace activation projection |
| `PUT /workspaces/:workspace/extensions/:extensionId/activation` | `202` exact workspace-activation operation |
| `DELETE /workspaces/:workspace/extensions/:extensionId/activation` | `202` clear-override operation |
| `POST /workspaces/:workspace/extensions/refresh` | `202` runtime-refresh operation |

The global catalog response is:

```json
{
"v": 1,
"generation": 12,
"extensions": [
{
"id": "<64 lowercase hex characters>",
"name": "demo",
"version": "1.2.3",
"installType": "npm",
"defaultActivation": "enabled",
"workspaceOverrideCount": 1
}
]
}
```

`installType` is omitted when no install metadata is available. `defaultActivation` is `enabled` or `disabled`. `workspaceOverrideCount` excludes stored `inherit` entries.

The workspace projection response is:

```json
{
"v": 1,
"workspaceId": "workspace-id",
"workspaceCwd": "/absolute/workspace",
"trusted": true,
"desiredGeneration": 12,
"appliedGeneration": 11,
"extensions": [
{
"extensionId": "<64 lowercase hex characters>",
"name": "demo",
"version": "1.2.3",
"defaultActivation": "enabled",
"workspaceActivation": "disabled",
"effectiveActivation": "disabled",
"activationSource": "workspace_override"
}
]
}
```

`workspaceActivation` is `enabled`, `disabled`, or `null` for inheritance. `activationSource` is `default`, `workspace_override`, `legacy_path_rule`, or `cli_override`. `desiredGeneration` is the durable store generation; `appliedGeneration` is the latest generation the controller recorded as applied to that workspace runtime and can temporarily lag.

Install requires explicit consent and an initial activation:

```json
{
"source": "@scope/demo",
"consent": true,
"activation": { "scope": "user" },
"ref": "optional-git-ref",
"autoUpdate": true,
"allowPreRelease": false,
"registry": "https://registry.npmjs.org"
}
```

For workspace-only initial activation use `{ "scope": "workspace", "workspaceId": "target-workspace-id" }`; the target must exist and be trusted. Daemon installs accept GitHub, Git, and npm sources. `ref` does not apply to npm, and `registry` applies only to npm. `ref`, `autoUpdate`, `allowPreRelease`, and `registry` are optional.

Global and workspace activation `PUT` requests use the same body:

```json
{ "state": "enabled" }
```

`state` is `enabled` or `disabled`. Update, uninstall, check-updates, clear-activation, and refresh requests have no required body.

Every accepted asynchronous mutation returns:

```http
HTTP/1.1 202 Accepted
Location: /extensions/operations/<operation-id>
Retry-After: 1
Content-Type: application/json

{"accepted":true,"operationId":"<operation-id>"}
```

Workspace-qualified mutations use the same global `/extensions/operations/:operationId` polling path. Operation history is process-local, keeps only a bounded number of terminal entries, and is lost on daemon restart; clients must re-read the catalog or workspace projection and compare generations when an operation id disappears.

An operation snapshot has this shape:

```json
{
"v": 1,
"operationId": "<operation-id>",
"operation": "install",
"status": "running",
"phase": "preparing",
"createdAt": 1750000000000,
"updatedAt": 1750000000100,
"source": "owner/repository",
"name": "demo"
}
```

`status` transitions from `queued` to `running`, then to `succeeded`, `succeeded_with_warnings`, or `failed`. While running, `phase` is `preparing`, `committing`, or `reconciling`. Terminal success may include `result` with `status` equal to `installed`, `enabled`, `disabled`, `updated`, `uninstalled`, `checked`, or `refreshed`; reconciliation results can additionally contain `refreshed`, `failed`, and `error`. Update checks return `result.states`, keyed by extension name, with values such as `checking for updates`, `update available`, `up to date`, `not updatable`, or `error`.

A durable commit followed by incomplete cleanup or runtime reconciliation is not reported as a failed mutation. It returns `succeeded_with_warnings` and preserves the committed result:

```json
{
"v": 1,
"operationId": "<operation-id>",
"operation": "activation",
"status": "succeeded_with_warnings",
"createdAt": 1750000000000,
"updatedAt": 1750000000200,
"result": {
"status": "disabled",
"name": "demo",
"refreshed": 1,
"failed": 1
},
"warnings": [
{
"workspaceId": "workspace-id",
"workspaceCwd": "/absolute/workspace",
"code": "reconcile_slow",
"error": "Runtime reconciliation took 31000ms."
}
]
}
```

Warning `workspaceId` and `code` are optional; `workspaceCwd` and `error` are always present. Clients should display warnings, refresh their catalog/projection, and must not retry the durable mutation blindly.

Validation and authorization failures are synchronous HTTP errors using `{ "error": "...", "code": "..." }` when a stable code exists. Important cases are `400 invalid_extension_id`, `400 invalid_extension_activation`, `400 workspace_mismatch`, `403 untrusted_workspace`, `404 extension_operation_not_found`, and `429 extension_queue_full`. Install validation also returns `400` for invalid source/ref/registry options, missing consent, or missing/invalid initial activation. A mutation that fails after `202` is represented, while retained in operation history, with `status: "failed"`, `error`, and an optional stable `code`; common codes include `extension_prepare_timeout` and `extension_conflict`. HTTP `404` for an operation does not imply rollback because operation history is not durable.

`daemon_status` advertises `GET /daemon/status`, the consolidated read-only
operator diagnostic snapshot documented below.

Expand Down
Loading
Loading