Repository navigation
feat: replace the component roster with preset-mode switches - #430
Merged
Merged
Conversation
Replace the seven-row component roster with eight rows that select the built-in agent preset each enhancement applies to, plus an independent dynamic-loading switch and an inverted compatibility fallback. - Add mode-minimal, mode-standard, mode-ptc and mode-cordis rows. Each publishes only for sessions composed from its preset: Standard and Cordis add resident OPS file tools and replace read/glob/grep, every mode replaces the Windows shell with ops_bash once its OPS counterpart is visible. - Add the compat row: while enabled, official tools stay exposed and no replacement is hidden; OPS tools remain published. - Keep dynamic loading independent of the mode rows and stop offering a mode's resident capabilities as discovery choices. - Export icon, locale and package metadata for every shipped component so the host renders the OPS artwork on all component rows. - Bump package, manifest and native crates to 0.5.0; derive the optional client carrier from the standard-mode row and document the migration. Validation: npm run build; validate-manifest 140 checks passed; node test/run.mjs 146 passed, 4 environment skips, 0 failed; check:size ok.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #429
What was wrong
./panel/icon,宿主只能为“启动数据检测”一行解析到 OPS 图标,其余组件行静默回退默认图。The change
mode-minimal/mode-standard/mode-ptc/mode-cordis/discovery/compat/panel/tui;旧shell/file/ptc/hide-official/background模块保留为 legacy 导出(已保存的旧行 override 会得到一条patch: entry ... not found启动警告),从cordis.patch.yml移除。src/modes/):mode-standard/mode-cordis:只对对应 preset 的 agent 在 agent scope 发布ops_inspect_local_file/ops_glob/ops_grep/ops_read_files/ops_result,并在 OPS 对端可见时隐藏官方read/glob/grep。pwsh/pwsh_persistent并发布ops_bash(仅当ops_bash可见;POSIX 保持宿主 bash)。mode-minimal:保留极简提示词,不发布 native 文件工具、不发布路由段。mode-ptc:对 PTC-only presentation 的 ptc preset 发布 PTC SDK API,仅替换 Windows shell。dsh-ops/compat启用时不隐藏任何官方工具(模式行已发布的 OPS 工具保留);关闭后重新隐藏。运行时切换通过 registry 事件立即生效。dsh-ops/discovery对所有 native 会话发布ops_discover_tools(含 Minimal),PTC-only 不发布;某模式行启用时其 resident 工具不再作为发现选项;未启用模式行时池中保留全部 advanced 工具。./<c>、./<c>/package.json、./<c>/locale/*.json、./<c>/icon;dsh-plugin.jsonx-components、x-prompt-sections、cordis.patch.yml同步为 8 行;包/清单/native crates 升到 0.5.0。dsh-ops#dsh-ops-mode-*),discovery 保持自有表单;carrier 迁移只切换 bundle 名,把 standard 行 name 改成包根dsh-ops(包根 entry 现在应用 standard 模式)。Validation
npm run build:通过(tsc + client bundle + 55 assets)。node scripts/validate-manifest.mjs:all 140 checks passed。npm run check:size:426 code files,均 ≤1000 行。node test/run.mjs(Windows 本机、规范门禁、无 DSH_OPS_REQUIRE_RUNTIME):146 suites passed, 4 skipped, 0 failed(4 个 skip 为环境性:linux-attributes/linux-shell 为 POSIX-only,tui-host/tui-native 缺 DSH_OPS_TUI_ROOT)。test/modes.test.mjs(8 checks,真实 bootHost + createScope/preset 桩):模式门控、官方替换/兼容模式恢复/dispose、cordis、discovery(minimal 始终注入、resident 不进发现池、PTC-only 不发布)、PTC 模式、预设切换接管。npm run build:ptc已按 0.5.0 重建并 stage,provenance 与 package version 一致;npm run build:bash-ipc已生成 Windows 受限 IPC 载荷(bash-ipc 套件 8/8 通过)。CI: 本 PR 由
pull_request触发 Cross-platform validation:https://github.com/T-Auto/dsh-ops/actions/runs/40453634594CI requiredpassed;validate-windows (win32-x64) / validate-posix (linux-x64, darwin-arm64) / validate-macos-intel / node-floor / source-size / tools-trial / workflow-lint 全部 pass;bench-smoke skipping(按仓库规则)。