Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ this package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Replace the `global.forceDefaultOpsPtc` switch with one explicit action: the row's detail page carries a **Make OPS (PTC) the default** button that writes `selectedDefault: ops-ptc` once and answers `applied`/`no-update`/`unavailable`/`failed`. Apply, remount and unload no longer write the default, so a preset chosen on the settings page is not overridden on the next apply, and a saved `global.forceDefaultOpsPtc` key still loads with no effect.
- 用一次显式操作取代 `global.forceDefaultOpsPtc` 开关:行详情页有一个「设为 OPS (PTC) 默认」按钮,点一次写 `selectedDefault: ops-ptc`,并回报 `applied`/`no-update`/`unavailable`/`failed`。apply、重挂载与卸载都不再改写默认,设置页选定的预设不会在下一次 apply 被覆盖;已保存的 `global.forceDefaultOpsPtc` 键仍可加载但不再生效。

- Unloading or disabling the `dsh-ops` row no longer strands `selectedDefault: ops-ptc`: when the live default still names the removed preset, the row lease restores the host's configured default. A default naming any other preset is never rewritten, and a missing or rejecting settings service reports the leftover instead of guessing (#928).
- 禁用或卸载 `dsh-ops` 行不再遗留 `selectedDefault: ops-ptc`:若当前默认仍指向被移除的预设,行级清理会恢复宿主配置的默认值;指向任何其他预设的选择绝不改写。settings 服务缺失或拒绝写入时会明确报告残留,不会猜测修复(#928)。
- Session Bash publication now deduplicates overlapping row ownership, carries queued registration identity to settlement, latches one failure per generation, and re-asserts authority at `turn/start`. This closes the append-reentry retry storm, duplicate-registration pair and interrupted-turn tool disappearance without weakening per-agent authority (#579, #842, #873).
- 会话 Bash 发布现在会对重叠行所有权去重,把排队注册的身份跟踪到结算,每代只报告一次失败,并在 `turn/start` 重新断言权限。修复 append 重入重试风暴、成对重复注册与中断回合后的工具消失,同时不削弱每个 agent 的权限边界(#579、#842、#873)。

## [0.5.5] — 2026-11-13 — Patch release

- A loader-less PTC scope no longer registers the configured `allowedTools` pool: with dynamic loading off nothing could ever select those APIs, and a host assembly without a step tool set declared all sixteen in `tools:sdk`. Resident publication, the default inspect + loader set and selection behavior are unchanged (#887).
Expand Down
28 changes: 15 additions & 13 deletions docs/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ bundle:
- **Pressing the button**: while the `ops-ptc` preset is registered, the plugin writes
`selectedDefault: ops-ptc` on `agent-preset-registry` — the same volatile field the Agent presets settings
page writes. That click is the only thing that overrides a manual choice.
- **Doing nothing**: nothing is written. Apply, a remount caused by saving another switch, and disabling the row
all leave the current default alone, so a preset picked on the settings page survives restarts.
- **Disabling or unloading the `dsh-ops` row**: releases the registration and leaves the default alone, even when
it names `ops-ptc`. Switch the default to another preset before removing the row, otherwise new sessions may
try to resolve a preset that no longer exists.
- **Doing nothing**: nothing is written. Apply and a remount caused by saving another switch leave the current
default alone, so a preset picked on the settings page survives restarts.
- **Disabling or unloading the `dsh-ops` row**: releases the registration, then checks the live default. If it still
names `ops-ptc`, the row lease restores the host's `config.default`; a default naming any other preset is never
rewritten. A missing or rejecting settings service reports the leftover and asks the operator to choose another
default instead of pretending the profile was repaired.
- The button answers with a status: `applied`, `no-update` (it is already the default), or `unavailable`/`failed`
with the reason — the preset is not registered, the host settings service is missing, or the write was rejected.
- The written value persists through the host settings layer into the profile's `cordis.patch.yml` (an
Expand All @@ -82,9 +83,9 @@ In the host picker the preset is named `OPS (PTC)` and described as

## Setting another default preset manually

`ops-ptc` becomes the default only through the button above (or the settings page). Nothing restores it
automatically, so pick another default before you disable or unload the row. Other default presets are still
decided by the host/operator:
`ops-ptc` becomes the default only through the button above (or the settings page). Removing the row restores the
host default only when the current selection is still `ops-ptc`; it never restores `ops-ptc` itself. Other default
presets are still decided by the host/operator:

- **Host Agent presets settings page**: picking an already registered preset such as `standard` or `ptc`
persists `selectedDefault`.
Expand All @@ -107,10 +108,11 @@ default comes from that profile's own composition.

### Risks and rollback

- **After pressing the button**: the choice is an ordinary settings-page selection, so it survives restarts. It
is not restored when the row is disabled or unloaded; pick another default before removing the row.
- **Before disabling or unloading**: set the default to another preset on the settings page. The plugin no longer
rewrites it, and new sessions otherwise try to resolve a preset that vanished with the row.
- **After pressing the button**: the choice is an ordinary settings-page selection, so it survives restarts. If the
row is removed while this choice is still active, the lease restores the host default instead of stranding it.
- **Before disabling or unloading**: no manual rewrite is required while the default is `ops-ptc`; the row handles
that case. A default belonging to another preset is left exactly as the operator chose it. If restoration cannot
be persisted, choose another default on the settings page after the warning.
- A missing fragment or a host upgrade that breaks parsing leaves the preset unavailable while the tools keep
working; the default preset stays untouched and the button reports `unavailable`. Regenerate the fragment and
restart the host to recover.
Expand All @@ -128,7 +130,7 @@ default comes from that profile's own composition.
| Compaction | official `compaction-basic` | official `compaction-basic` as well; no `dsh-compress-codex` |
| Batch-call guidance | none | `batchingGuidance`: defaults true in code and the packaged `ops-ptc` section, including legacy whole-row overrides that omit the section; explicit false disables it; one lesson at session start, then shape notices for root `run_code` programs (`bypass`/`plan`/`shape`, each latched per turn and re-armed by compliance) appended as `additionalContexts`; text in the editable `prompts/batching-guidance.md` |
| Single-row section | `ptc` | `ops-ptc` (same keys plus `batchingGuidance`) |
| Default preset | decided by the host/operator | set once by the detail page's button (`applied`/`no-update`); never forced or restored automatically |
| Default preset | decided by the host/operator | set once by the detail page's button (`applied`/`no-update`); never forced; unloading restores the host default only when the current selection is still `ops-ptc` |
| Ordering | order 2 | order 6, sorted after the official rows |

Having both modes over one tool surface is the point of the contrast arm: `ptc` keeps the official preset
Expand Down
4 changes: 4 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ collect [runtime evidence](windows-runtime-evidence.md) before assigning a cause

---

## Bash disappears or registration repeats during session changes

Session Bash publication is per agent and generation-aware. Overlapping consumers no longer register the same name twice, a queued registration updates the entry only when it settles, and one failed generation is reported once rather than retried in a synchronous storm. A `turn/start` event re-asserts the current authority, so an interrupted turn cannot leave `ops_bash` missing until an unrelated asynchronous event happens to arrive. If a name conflict is reported, capture that single warning and the following turn boundary rather than restarting the host repeatedly (#579, #842, #873).

## Installation and payloads

### `bash-win32-x64` is missing under `node_modules/@dsh-ops/`
Expand Down
4 changes: 4 additions & 0 deletions docs/常见问题.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Windows Low 完整性、MSYS 启动、杀软、heredoc 或审批问题,请先

---

## 会话切换时 Bash 消失或重复注册

会话 Bash 发布按 agent 与代次管理。重叠消费者不再重复注册同名工具;排队注册只有在结算后才更新条目;同一代失败只报告一次,不再同步重试形成风暴。`turn/start` 会重新断言当前权限,因此中断的回合不会让 `ops_bash` 一直缺席到某个无关异步事件出现。若看到名称冲突,保留那一次警告及随后的 turn 边界证据即可,不要反复重启宿主(#579、#842、#873)。

## 安装与载荷

### `node_modules/@dsh-ops/` 下没有 `bash-win32-x64`
Expand Down
20 changes: 11 additions & 9 deletions docs/预设与默认模式.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ node scripts/sync-preset-ops-ptc.mjs --source <ptc.patch.yml 或其目录> [--ou

- **按下按钮**:`ops-ptc` 预设已注册时,插件把 `agent-preset-registry` 的 `selectedDefault` 写成
`ops-ptc`——与设置页写的是同一个易变字段。只有这一次点击会覆盖手动选择。
- **什么都不做**:不写任何东西。apply、保存其它开关导致的重挂载、禁用该行都不会改当前默认,所以设置页选的
预设在重启后仍然是默认。
- **禁用/卸载 `dsh-ops` 行**:只释放预设注册,默认预设原样保留,即使它指向 `ops-ptc`。移除该行前请先把默认
切到别的预设,否则新会话可能解析一个已经不存在的预设。
- **什么都不做**:不写任何东西。apply、保存其它开关导致的重挂载都不会改当前默认,所以设置页选的预设
在重启后仍然是默认。
- **禁用/卸载 `dsh-ops` 行**:先释放预设注册,再检查当前默认。若仍指向 `ops-ptc`,行级清理会恢复宿主
`config.default`;若指向其他预设则绝不改写。settings 服务缺失或拒绝写入时会明确报告残留,要求操作者
另选默认,不会假装 profile 已修复。
- 按钮会回一个状态:`applied`、`no-update`(本来就是默认),或带原因的 `unavailable`/`failed`——预设未注册、
宿主 settings 服务缺失、写入被拒。
- 写入的值经宿主设置层持久化到 profile 的 `cordis.patch.yml`(`agent-preset-registry` 覆盖),重启后保持;
Expand All @@ -70,8 +71,8 @@ node scripts/sync-preset-ops-ptc.mjs --source <ptc.patch.yml 或其目录> [--ou

## 手动设置其他默认预设

`ops-ptc` 只能通过上面的按钮(或设置页)成为默认。插件不再自动回退它,所以禁用/卸载该行前请先把默认切到别的
预设。其他默认预设仍照常由宿主/操作者决定:
`ops-ptc` 只能通过上面的按钮(或设置页)成为默认。只有在当前选择仍是 `ops-ptc` 时,移除该行才会恢复宿主默认;
不会自动恢复成 `ops-ptc`。其他默认预设仍照常由宿主/操作者决定:

- **宿主「Agent 预设」设置页**:选择 `standard`、`ptc` 等任一已注册预设,持久化 `selectedDefault`。
- **profile patch 显式设置**(可粘贴到 `$DSH_HOME/profiles/<profile>/cordis.patch.yml`):
Expand All @@ -95,9 +96,10 @@ node scripts/sync-preset-ops-ptc.mjs --source <ptc.patch.yml 或其目录> [--ou
- **开关开启(默认)时**:禁用/卸载会先恢复默认再释放注册,正常路径不会留下指向已消失预设的默认;禁用后
重新启用插件,或在该开关关闭后用设置页选择你想要的默认即可。恢复失败只告警、不阻塞卸载,此时按下一
条处理。
- **按下按钮之后**:这就是一次普通的设置页选择,重启后保持;禁用或卸载该行时不会自动回退,移除行前请先换默认。
- **禁用/卸载之前**:先在设置页把默认切到别的预设。插件不再自动改写它,否则新会话会按当前定义解析一个随行消失的
预设而失败。
- **按下按钮之后**:这就是一次普通的设置页选择,重启后保持;若在该选择仍生效时移除行,清理会恢复宿主默认,
不会留下失效引用。
- **禁用/卸载之前**:当前默认是 `ops-ptc` 时无需手动改写,行会处理;属于其他预设的选择会原样保留。若恢复无法
持久化,请按警告在设置页另选默认。
- 片段缺失或宿主升级导致解析失败时,预设不可用但工具面照常工作;默认预设不受影响,按钮回报 `unavailable`。
重新生成片段并重启宿主即可恢复。
- 插件管理器里找不到 `ops-ptc` 预设行是设计如此,不要尝试手动新增声明;它由插件运行时提供。
Expand Down
Loading
Loading