@dsmm/dsmm 0.1.9 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -58
- package/agent-presets/dsmm-builder/agent.cordis.yml +91 -186
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +120 -17
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +72 -17
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +169 -0
- package/agent-presets/dsmm-coding/preset.yml +3 -0
- package/agent-presets/dsmm-complex/agent.cordis.yml +154 -0
- package/agent-presets/dsmm-complex/preset.yml +3 -0
- package/agent-presets/dsmm-creative/agent.cordis.yml +122 -15
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +179 -0
- package/agent-presets/dsmm-cross-cutting/preset.yml +3 -0
- package/agent-presets/dsmm-deep/agent.cordis.yml +189 -0
- package/agent-presets/dsmm-deep/preset.yml +3 -0
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +72 -17
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +168 -0
- package/agent-presets/dsmm-documenting/preset.yml +3 -0
- package/agent-presets/dsmm-frontend/agent.cordis.yml +161 -0
- package/agent-presets/dsmm-frontend/preset.yml +3 -0
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +153 -0
- package/agent-presets/dsmm-hard-reasoning/preset.yml +3 -0
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +72 -17
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +127 -0
- package/agent-presets/dsmm-normal-task/preset.yml +3 -0
- package/agent-presets/dsmm-oracle/agent.cordis.yml +109 -15
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +109 -15
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +174 -190
- package/agent-presets/dsmm-orchestrator/preset.yml +1 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +102 -16
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +134 -15
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +132 -0
- package/agent-presets/dsmm-quick/preset.yml +3 -0
- package/agent-presets/dsmm-research/agent.cordis.yml +156 -0
- package/agent-presets/dsmm-research/preset.yml +3 -0
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +108 -16
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/cordis.patch.yml +1 -5
- package/docs/agent-presets.md +48 -15
- package/docs/compatibility.md +58 -68
- package/docs/deferred-native-approval-risk.md +19 -0
- package/docs/design.md +43 -2
- package/docs/lsp.md +12 -12
- package/docs/migration-from-ocmm.md +10 -2
- package/docs/model-routing.md +84 -59
- package/docs/native-permissions.md +35 -0
- package/docs/profiles.md +43 -64
- package/docs/releasing.md +159 -8
- package/docs/roadmap.md +77 -17
- package/docs/runtime-recovery.md +12 -0
- package/docs/safety-guards.md +7 -3
- package/docs/settings-status.md +46 -40
- package/docs/skill-sync.md +89 -14
- package/lib/child-admission-contract.d.ts +37 -0
- package/lib/child-admission-contract.js +2 -0
- package/lib/child-admission.d.ts +42 -0
- package/lib/child-admission.js +162 -0
- package/lib/child-capture.d.ts +81 -0
- package/lib/child-capture.js +203 -0
- package/lib/child-evidence.d.ts +17 -0
- package/lib/child-evidence.js +43 -0
- package/lib/client/ChildrenPanel.d.ts +43 -0
- package/lib/client/ChildrenPanel.js +82 -0
- package/lib/client/DeploymentPage.d.ts +18 -0
- package/lib/client/DeploymentPage.js +127 -0
- package/lib/client/EditableChoice.d.ts +17 -0
- package/lib/client/EditableChoice.js +49 -0
- package/lib/client/PermissionsPanel.d.ts +14 -0
- package/lib/client/PermissionsPanel.js +46 -0
- package/lib/client/ProfilesSection.js +32 -15
- package/lib/client/RoleAvailability.d.ts +7 -0
- package/lib/client/RoleAvailability.js +19 -0
- package/lib/client/SessionProfiles.js +27 -9
- package/lib/client/StructuredEditor.js +15 -7
- package/lib/client/children-controller.d.ts +98 -0
- package/lib/client/children-controller.js +296 -0
- package/lib/client/children-locales.d.ts +367 -0
- package/lib/client/children-locales.js +69 -0
- package/lib/client/controller.d.ts +6 -1
- package/lib/client/controller.js +14 -8
- package/lib/client/deployment-controller.d.ts +50 -0
- package/lib/client/deployment-controller.js +193 -0
- package/lib/client/deployment-data.d.ts +17 -0
- package/lib/client/deployment-data.js +138 -0
- package/lib/client/deployment-locales.d.ts +70 -0
- package/lib/client/deployment-locales.js +81 -0
- package/lib/client/diagnostics.d.ts +14 -0
- package/lib/client/diagnostics.js +53 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +145 -1
- package/lib/client/locales.d.ts +58 -0
- package/lib/client/locales.js +38 -18
- package/lib/client/permission-client.d.ts +16 -0
- package/lib/client/permission-client.js +38 -0
- package/lib/client/permission-controller.d.ts +62 -0
- package/lib/client/permission-controller.js +149 -0
- package/lib/client/permission-locales.d.ts +114 -0
- package/lib/client/permission-locales.js +75 -0
- package/lib/client/plugins-contract.d.ts +27 -0
- package/lib/client/plugins-contract.js +2 -0
- package/lib/client/session-labels.js +4 -4
- package/lib/client/structured.js +19 -5
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +36 -0
- package/lib/client.js +6724 -1604
- package/lib/commands.js +3 -0
- package/lib/config-file-store.d.ts +23 -0
- package/lib/config-file-store.js +67 -0
- package/lib/core-permission-authority.d.ts +18 -0
- package/lib/core-permission-authority.js +255 -0
- package/lib/core-permissions.d.ts +8 -0
- package/lib/core-permissions.js +33 -0
- package/lib/delivery-authority.d.ts +68 -0
- package/lib/delivery-authority.js +260 -0
- package/lib/deployment-config.d.ts +60 -0
- package/lib/deployment-config.js +205 -0
- package/lib/deployment-permission-rules.d.ts +55 -0
- package/lib/deployment-permission-rules.js +306 -0
- package/lib/dsh-home.d.ts +3 -0
- package/lib/dsh-home.js +10 -0
- package/lib/dsh-types.d.ts +22 -69
- package/lib/guards.d.ts +3 -2
- package/lib/guards.js +44 -6
- package/lib/host-llm-startup.d.ts +41 -0
- package/lib/host-llm-startup.js +65 -0
- package/lib/host-llm.d.ts +92 -0
- package/lib/host-llm.js +325 -0
- package/lib/index.d.ts +23 -5
- package/lib/index.js +383 -40
- package/lib/legacy-child-policy.d.ts +51 -0
- package/lib/legacy-child-policy.js +123 -0
- package/lib/legacy-read-composition.d.ts +20 -0
- package/lib/legacy-read-composition.js +144 -0
- package/lib/legacy-read-contracts.d.ts +157 -0
- package/lib/legacy-read-contracts.js +39 -0
- package/lib/legacy-read-host.d.ts +19 -0
- package/lib/legacy-read-host.js +67 -0
- package/lib/legacy-read-integration.d.ts +121 -0
- package/lib/legacy-read-integration.js +522 -0
- package/lib/legacy-read-proxy.d.ts +26 -0
- package/lib/legacy-read-proxy.js +237 -0
- package/lib/live-pi-ai-owner.d.ts +18 -0
- package/lib/live-pi-ai-owner.js +144 -0
- package/lib/llm-runtime.d.ts +11 -0
- package/lib/llm-runtime.js +21 -0
- package/lib/lsp.d.ts +13 -0
- package/lib/lsp.js +60 -0
- package/lib/managed-settings.d.ts +5 -0
- package/lib/managed-settings.js +14 -0
- package/lib/mode.js +42 -47
- package/lib/model-parameter-policy.d.ts +11 -0
- package/lib/model-parameter-policy.js +27 -0
- package/lib/model-routing.js +33 -19
- package/lib/modules.d.ts +35 -0
- package/lib/modules.js +37 -0
- package/lib/native-child-evidence.d.ts +42 -0
- package/lib/native-child-evidence.js +133 -0
- package/lib/native-pi-ai-wire.d.ts +37 -0
- package/lib/native-pi-ai-wire.js +261 -0
- package/lib/native-scope.d.ts +9 -0
- package/lib/native-scope.js +20 -0
- package/lib/permission-bash.d.ts +6 -0
- package/lib/permission-bash.js +7 -0
- package/lib/permission-control.d.ts +73 -0
- package/lib/permission-control.js +205 -0
- package/lib/permission-controller.d.ts +68 -0
- package/lib/permission-controller.js +317 -0
- package/lib/permission-errors.d.ts +7 -0
- package/lib/permission-errors.js +21 -0
- package/lib/permission-fs-search.d.ts +5 -0
- package/lib/permission-fs-search.js +7 -0
- package/lib/permission-fs.d.ts +5 -0
- package/lib/permission-fs.js +7 -0
- package/lib/permission-native-access.d.ts +11 -0
- package/lib/permission-native-access.js +6 -0
- package/lib/permission-native-command.d.ts +10 -0
- package/lib/permission-native-command.js +93 -0
- package/lib/permission-native-rules.d.ts +75 -0
- package/lib/permission-native-rules.js +278 -0
- package/lib/permission-pwsh.d.ts +6 -0
- package/lib/permission-pwsh.js +7 -0
- package/lib/permission-remote.d.ts +26 -0
- package/lib/permission-remote.js +53 -0
- package/lib/permission-rpc.d.ts +29 -0
- package/lib/permission-rpc.js +152 -0
- package/lib/permission-rules.d.ts +115 -0
- package/lib/permission-rules.js +256 -0
- package/lib/permission-settings.d.ts +45 -0
- package/lib/permission-settings.js +48 -0
- package/lib/permission-shell.d.ts +38 -0
- package/lib/permission-shell.js +150 -0
- package/lib/permission-web.d.ts +5 -0
- package/lib/permission-web.js +7 -0
- package/lib/plan-validation.js +6 -44
- package/lib/preset-materializer.js +2 -0
- package/lib/preset-registry.d.ts +1 -1
- package/lib/preset-registry.js +38 -24
- package/lib/preset-skills.d.ts +4 -1
- package/lib/preset-skills.js +60 -19
- package/lib/profile-diagnostics.d.ts +45 -0
- package/lib/profile-diagnostics.js +148 -0
- package/lib/profile-locale.d.ts +3 -0
- package/lib/profile-locale.js +2 -0
- package/lib/profile-remote.d.ts +22 -0
- package/lib/profile-remote.js +344 -27
- package/lib/profile-rpc.d.ts +25 -1
- package/lib/profile-rpc.js +143 -3
- package/lib/profile-runtime.d.ts +63 -0
- package/lib/profile-runtime.js +496 -77
- package/lib/profile-store.d.ts +56 -1
- package/lib/profile-store.js +377 -111
- package/lib/profile-types.d.ts +125 -1
- package/lib/profile-types.js +1 -0
- package/lib/profiles.d.ts +16 -2
- package/lib/profiles.js +156 -79
- package/lib/prompt-content.d.ts +25 -0
- package/lib/prompt-content.js +27 -0
- package/lib/prompts.d.ts +45 -4
- package/lib/prompts.js +157 -43
- package/lib/recovery-policy.js +20 -7
- package/lib/role-control-remote.d.ts +38 -0
- package/lib/role-control-remote.js +211 -0
- package/lib/role-control-rpc.d.ts +51 -0
- package/lib/role-control-rpc.js +377 -0
- package/lib/role-control-types.d.ts +92 -0
- package/lib/role-control-types.js +8 -0
- package/lib/role-invocation.d.ts +47 -0
- package/lib/role-invocation.js +135 -0
- package/lib/role-llm-runtime.d.ts +17 -0
- package/lib/role-llm-runtime.js +62 -0
- package/lib/role-llm.d.ts +31 -0
- package/lib/role-llm.js +66 -0
- package/lib/role-policy.d.ts +92 -0
- package/lib/role-policy.js +601 -0
- package/lib/role-providers.d.ts +7 -3
- package/lib/role-providers.js +74 -46
- package/lib/role-routing.d.ts +11 -2
- package/lib/role-routing.js +42 -25
- package/lib/role-runs.d.ts +135 -0
- package/lib/role-runs.js +304 -0
- package/lib/role-subagents.d.ts +63 -4
- package/lib/role-subagents.js +299 -47
- package/lib/roles.d.ts +20 -9
- package/lib/roles.js +87 -216
- package/lib/route-json.d.ts +19 -0
- package/lib/route-json.js +129 -0
- package/lib/routing-policy.d.ts +2 -0
- package/lib/routing-policy.js +12 -2
- package/lib/runtime-integration.d.ts +112 -0
- package/lib/runtime-integration.js +784 -0
- package/lib/runtime-recovery.js +34 -13
- package/lib/session-scope.js +2 -0
- package/lib/settings.d.ts +116 -14
- package/lib/settings.js +455 -149
- package/lib/skills.d.ts +24 -9
- package/lib/skills.js +114 -35
- package/lib/state.d.ts +10 -6
- package/lib/state.js +48 -49
- package/lib/status.d.ts +35 -1
- package/lib/status.js +58 -17
- package/lib/subagent-runtime.d.ts +45 -0
- package/lib/subagent-runtime.js +131 -0
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +112 -45
- package/patches/subagent-runtime.yml +15 -0
- package/prompts/deepseek-flash.md +1 -1
- package/prompts/deepseek-v4-pro.md +2 -2
- package/prompts/deepwork.md +153 -20
- package/prompts/source/agents/clarifier.md +47 -0
- package/prompts/source/agents/orchestrator.md +72 -0
- package/prompts/source/agents/plan-critic.md +29 -0
- package/prompts/source/agents/planner.md +21 -0
- package/prompts/source/agents/reviewer.md +23 -0
- package/prompts/source/catalog.json +548 -0
- package/prompts/source/category/coding.md +46 -0
- package/prompts/source/category/complex.md +29 -0
- package/prompts/source/category/creative.md +40 -0
- package/prompts/source/category/cross-cutting.md +54 -0
- package/prompts/source/category/deep.md +64 -0
- package/prompts/source/category/documenting.md +68 -0
- package/prompts/source/category/frontend.md +38 -0
- package/prompts/source/category/hard-reasoning.md +53 -0
- package/prompts/source/category/normal-task.md +27 -0
- package/prompts/source/category/quick.md +34 -0
- package/prompts/source/category/research.md +58 -0
- package/prompts/source/deepwork/claude-opus-5.md +28 -0
- package/prompts/source/deepwork/codex.md +9 -0
- package/prompts/source/deepwork/default.md +136 -0
- package/prompts/source/deepwork/gemini.md +191 -0
- package/prompts/source/deepwork/glm.md +263 -0
- package/prompts/source/deepwork/gpt.md +49 -0
- package/prompts/source/deepwork/kimi-k27.md +13 -0
- package/prompts/source/deepwork/planner.md +44 -0
- package/prompts/source/deepwork/swe-2.md +13 -0
- package/prompts/source/manifest.json +3233 -0
- package/prompts/source/shared/dsh-host-contract.md +8 -0
- package/prompts/source/shared/locale.md +8 -0
- package/prompts/source/shared/shell-safety.md +7 -0
- package/prompts/source/terminal/builder.md +13 -0
- package/prompts/source/terminal/clarifier.md +41 -0
- package/prompts/source/terminal/code-search.md +39 -0
- package/prompts/source/terminal/coding.md +41 -0
- package/prompts/source/terminal/complex.md +43 -0
- package/prompts/source/terminal/creative.md +41 -0
- package/prompts/source/terminal/cross-cutting.md +43 -0
- package/prompts/source/terminal/deep.md +43 -0
- package/prompts/source/terminal/doc-search.md +39 -0
- package/prompts/source/terminal/documenting.md +41 -0
- package/prompts/source/terminal/frontend.md +41 -0
- package/prompts/source/terminal/hard-reasoning.md +41 -0
- package/prompts/source/terminal/media-reader.md +39 -0
- package/prompts/source/terminal/normal-task.md +41 -0
- package/prompts/source/terminal/oracle-2nd.md +53 -0
- package/prompts/source/terminal/oracle.md +53 -0
- package/prompts/source/terminal/orchestrator.md +26 -0
- package/prompts/source/terminal/plan-critic.md +41 -0
- package/prompts/source/terminal/planner.md +42 -0
- package/prompts/source/terminal/quick.md +39 -0
- package/prompts/source/terminal/research.md +39 -0
- package/prompts/source/terminal/reviewer.md +53 -0
- package/scripts/cold-profile-composition.mjs +329 -0
- package/scripts/cold-profile-sources.mjs +238 -0
- package/scripts/migrate-cold-profile.mjs +315 -0
- package/skills/ast-grep/LICENSE +21 -0
- package/skills/ast-grep/README.md +138 -0
- package/skills/ast-grep/SKILL.md +287 -0
- package/skills/ast-grep/SOURCE +1 -0
- package/skills/ast-grep/install.ps1 +235 -0
- package/skills/ast-grep/install.sh +286 -0
- package/skills/ast-grep/references/cli.md +233 -0
- package/skills/ast-grep/references/install.md +168 -0
- package/skills/ast-grep/references/patterns.md +149 -0
- package/skills/ast-grep/references/pitfalls.md +305 -0
- package/skills/ast-grep/references/recipes.md +404 -0
- package/skills/ast-grep/references/sgconfig.md +250 -0
- package/skills/ast-grep/references/yaml-rules.md +511 -0
- package/skills/ast-grep/scripts/ast_grep_helper.py +760 -0
- package/skills/ast-grep/tests/smoke.ps1 +129 -0
- package/skills/ast-grep/tests/smoke.sh +212 -0
- package/skills/ast-grep/tests/test_resolver.py +154 -0
- package/skills/brainstorming/SKILL.md +123 -9
- package/skills/coding-agent-sessions/LICENSE-UPSTREAM.md +82 -0
- package/skills/coding-agent-sessions/NOTICE.md +24 -0
- package/skills/coding-agent-sessions/SKILL.md +147 -0
- package/skills/coding-agent-sessions/agents/openai.yaml +4 -0
- package/skills/coding-agent-sessions/pyrightconfig.json +5 -0
- package/skills/coding-agent-sessions/references/all-platforms.md +77 -0
- package/skills/coding-agent-sessions/references/claude.md +34 -0
- package/skills/coding-agent-sessions/references/codex.md +32 -0
- package/skills/coding-agent-sessions/references/opencode.md +45 -0
- package/skills/coding-agent-sessions/references/senpi.md +29 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +104 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
- package/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
- package/skills/coding-agent-sessions/scripts/tests/test_agent_sessions.py +322 -0
- package/skills/coding-agent-sessions/scripts/tests/test_aside_scanner.py +131 -0
- package/skills/coding-agent-sessions/scripts/tests/test_cli_contract.py +126 -0
- package/skills/coding-agent-sessions/scripts/tests/test_extended_scanners.py +262 -0
- package/skills/coding-agent-sessions/scripts/tests/test_optional_sqlite_scanners.py +79 -0
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -0
- package/skills/debugging/SKILL.md +130 -4
- package/skills/debugging/references/logging.md +2 -0
- package/skills/debugging/references/methodology/00-setup.md +16 -62
- package/skills/debugging/references/methodology/02-investigate.md +11 -5
- package/skills/debugging/references/methodology/03-flaky-triage.md +6 -4
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +6 -16
- package/skills/debugging/references/methodology/05-escalate.md +2 -0
- package/skills/debugging/references/methodology/06-fix.md +8 -6
- package/skills/debugging/references/methodology/08-qa.md +7 -5
- package/skills/debugging/references/methodology/09-cleanup.md +16 -152
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +7 -18
- package/skills/debugging/references/runtimes/bundled-js-binary.md +3 -16
- package/skills/debugging/references/runtimes/go.md +2 -0
- package/skills/debugging/references/runtimes/native-binary.md +11 -54
- package/skills/debugging/references/runtimes/node.md +6 -15
- package/skills/debugging/references/runtimes/python.md +5 -15
- package/skills/debugging/references/runtimes/rust.md +4 -18
- package/skills/debugging/references/scripts/dap.test.mjs +539 -0
- package/skills/debugging/references/scripts/fixture-adapter.mjs +164 -0
- package/skills/debugging/references/tools/dap.md +4 -2
- package/skills/debugging/references/tools/ghidra.md +6 -15
- package/skills/debugging/references/tools/playwright-cli.md +5 -15
- package/skills/debugging/references/tools/pwndbg.md +2 -0
- package/skills/debugging/references/tools/pwntools.md +6 -16
- package/skills/dispatching-parallel-agents/SKILL.md +96 -7
- package/skills/frontend/.frontend-materialized.json +856 -0
- package/skills/frontend/ATTRIBUTION.md +37 -0
- package/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/skills/frontend/LICENSE-taste-skill.txt +21 -0
- package/skills/frontend/LICENSE-ui-ux-pro-max.txt +21 -0
- package/skills/frontend/SKILL.md +145 -0
- package/skills/frontend/references/design/README.md +256 -0
- package/skills/frontend/references/design/_INDEX.md +206 -0
- package/skills/frontend/references/design/airbnb.md +393 -0
- package/skills/frontend/references/design/airtable.md +92 -0
- package/skills/frontend/references/design/apple.md +250 -0
- package/skills/frontend/references/design/aside.md +211 -0
- package/skills/frontend/references/design/binance.md +348 -0
- package/skills/frontend/references/design/bmw.md +183 -0
- package/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/skills/frontend/references/design/bugatti.md +271 -0
- package/skills/frontend/references/design/cal.md +262 -0
- package/skills/frontend/references/design/claude.md +315 -0
- package/skills/frontend/references/design/clay.md +307 -0
- package/skills/frontend/references/design/clickhouse.md +284 -0
- package/skills/frontend/references/design/clone-from-url.md +69 -0
- package/skills/frontend/references/design/cohere.md +269 -0
- package/skills/frontend/references/design/coinbase.md +132 -0
- package/skills/frontend/references/design/composio.md +310 -0
- package/skills/frontend/references/design/cursor.md +312 -0
- package/skills/frontend/references/design/design-system-architecture.md +250 -0
- package/skills/frontend/references/design/elevenlabs.md +268 -0
- package/skills/frontend/references/design/expo.md +284 -0
- package/skills/frontend/references/design/ferrari.md +317 -0
- package/skills/frontend/references/design/figma.md +223 -0
- package/skills/frontend/references/design/framer.md +249 -0
- package/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/skills/frontend/references/design/hashicorp.md +281 -0
- package/skills/frontend/references/design/ibm.md +335 -0
- package/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/skills/frontend/references/design/imagegen-frontend-web.md +987 -0
- package/skills/frontend/references/design/interaction-skill.md +52 -0
- package/skills/frontend/references/design/intercom.md +149 -0
- package/skills/frontend/references/design/kraken.md +128 -0
- package/skills/frontend/references/design/lamborghini.md +291 -0
- package/skills/frontend/references/design/linear.app.md +370 -0
- package/skills/frontend/references/design/lovable.md +301 -0
- package/skills/frontend/references/design/mastercard.md +368 -0
- package/skills/frontend/references/design/meta.md +369 -0
- package/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/skills/frontend/references/design/minimax.md +260 -0
- package/skills/frontend/references/design/mintlify.md +329 -0
- package/skills/frontend/references/design/miro.md +111 -0
- package/skills/frontend/references/design/mistral.ai.md +264 -0
- package/skills/frontend/references/design/mongodb.md +269 -0
- package/skills/frontend/references/design/nike.md +366 -0
- package/skills/frontend/references/design/notion.md +312 -0
- package/skills/frontend/references/design/nvidia.md +296 -0
- package/skills/frontend/references/design/ollama.md +270 -0
- package/skills/frontend/references/design/opencode.ai.md +284 -0
- package/skills/frontend/references/design/output-skill.md +49 -0
- package/skills/frontend/references/design/pinterest.md +233 -0
- package/skills/frontend/references/design/playstation.md +367 -0
- package/skills/frontend/references/design/posthog.md +259 -0
- package/skills/frontend/references/design/raycast.md +271 -0
- package/skills/frontend/references/design/react-dev-tooling-skill.md +232 -0
- package/skills/frontend/references/design/redesign-skill.md +178 -0
- package/skills/frontend/references/design/renault.md +314 -0
- package/skills/frontend/references/design/replicate.md +264 -0
- package/skills/frontend/references/design/resend.md +306 -0
- package/skills/frontend/references/design/revolut.md +188 -0
- package/skills/frontend/references/design/runwayml.md +247 -0
- package/skills/frontend/references/design/sanity.md +360 -0
- package/skills/frontend/references/design/sentry.md +265 -0
- package/skills/frontend/references/design/shopify.md +353 -0
- package/skills/frontend/references/design/soft-skill.md +98 -0
- package/skills/frontend/references/design/spacex.md +197 -0
- package/skills/frontend/references/design/spotify.md +249 -0
- package/skills/frontend/references/design/starbucks.md +583 -0
- package/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/skills/frontend/references/design/stitch-skill.md +184 -0
- package/skills/frontend/references/design/stripe.md +325 -0
- package/skills/frontend/references/design/supabase.md +258 -0
- package/skills/frontend/references/design/superhuman.md +255 -0
- package/skills/frontend/references/design/taste-skill.md +1206 -0
- package/skills/frontend/references/design/tesla.md +289 -0
- package/skills/frontend/references/design/theverge.md +342 -0
- package/skills/frontend/references/design/together.ai.md +266 -0
- package/skills/frontend/references/design/uber.md +298 -0
- package/skills/frontend/references/design/vercel.md +313 -0
- package/skills/frontend/references/design/vodafone.md +426 -0
- package/skills/frontend/references/design/voltagent.md +326 -0
- package/skills/frontend/references/design/warp.md +256 -0
- package/skills/frontend/references/design/webflow.md +95 -0
- package/skills/frontend/references/design/wired.md +281 -0
- package/skills/frontend/references/design/wise.md +176 -0
- package/skills/frontend/references/design/x.ai.md +260 -0
- package/skills/frontend/references/design/zapier.md +331 -0
- package/skills/frontend/references/perfection/README.md +264 -0
- package/skills/frontend/references/perfection/react-perf-tooling.md +234 -0
- package/skills/frontend/references/ui-ux-db/README.md +659 -0
- package/skills/frontend/references/ui-ux-db/data/app-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/skills/frontend/references/ui-ux-db/data/colors.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/google-fonts.csv +1924 -0
- package/skills/frontend/references/ui-ux-db/data/icons.csv +106 -0
- package/skills/frontend/references/ui-ux-db/data/landing.csv +35 -0
- package/skills/frontend/references/ui-ux-db/data/products.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/angular.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/laravel.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/threejs.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/skills/frontend/references/ui-ux-db/data/styles.csv +85 -0
- package/skills/frontend/references/ui-ux-db/data/typography.csv +74 -0
- package/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/scripts/core.py +262 -0
- package/skills/frontend/references/ui-ux-db/scripts/design_system.py +1148 -0
- package/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/skills/git-master/SKILL.md +115 -0
- package/skills/git-master/agents/openai.yaml +13 -0
- package/skills/init-deep/SKILL.md +282 -0
- package/skills/receiving-code-review/SKILL.md +117 -7
- package/skills/remove-ai-slops/SKILL.md +160 -8
- package/skills/requesting-code-review/SKILL.md +98 -3
- package/skills/requesting-code-review/code-reviewer.md +59 -0
- package/skills/subagent-driven-development/SKILL.md +179 -6
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +23 -0
- package/skills/subagent-driven-development/implementer-prompt.md +87 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +37 -0
- package/skills/using-git-worktrees/SKILL.md +144 -0
- package/skills/writing-plans/SKILL.md +126 -7
- package/skills/writing-plans/plan-document-reviewer-prompt.md +47 -0
package/lib/profile-remote.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { DSMM_RATE_LIMIT_BOUNDS, normalizeRateLimitOverrides, normalizeRateLimitPolicy, normalizeRoutingStrategy } from "./routing-policy.js";
|
|
2
|
+
import { DSMM_MODULE_DESCRIPTORS } from "./modules.js";
|
|
3
|
+
import { parseModelParameterPolicy } from "./model-parameter-policy.js";
|
|
4
|
+
import { DSMM_ROUTE_SOURCES } from "./profile-types.js";
|
|
5
|
+
import { diagnostic, isSafeDiagnosticField, PROFILE_DIAGNOSTIC_REASONS } from "./profile-diagnostics.js";
|
|
6
|
+
import { normalizeModelRouteJson } from "./route-json.js";
|
|
2
7
|
const errorCodes = new Set(["validation", "conflict", "not-found", "lock-timeout", "unsafe-path", "io", "activation", "corrupt-selection", "limit", "busy", "maintenance", "disposed", "not-owned", "unavailable", "cancelled"]);
|
|
3
8
|
const idPattern = /^[a-z0-9][a-z0-9_-]{0,63}$/u;
|
|
4
9
|
const revisionPattern = /^[a-f0-9]{64}$/u;
|
|
5
|
-
const rolePattern = /^dsmm-(?:orchestrator|planner|plan-critic|builder|reviewer|oracle|oracle-2nd|creative|code-search|doc-search|clarifier|media-reader)$/u;
|
|
10
|
+
const rolePattern = /^dsmm-(?:orchestrator|planner|plan-critic|builder|reviewer|oracle|oracle-2nd|creative|code-search|doc-search|clarifier|media-reader|frontend|hard-reasoning|research|quick|coding|normal-task|complex|deep|documenting|cross-cutting)$/u;
|
|
6
11
|
/** Shared wire grammar for native codec validation and local form feedback. */
|
|
7
12
|
export function isProfileId(value) {
|
|
8
13
|
return typeof value === "string" && idPattern.test(value)
|
|
@@ -48,13 +53,6 @@ function integer(value, field, maximum = Number.MAX_SAFE_INTEGER) {
|
|
|
48
53
|
fail(field);
|
|
49
54
|
return value;
|
|
50
55
|
}
|
|
51
|
-
function routeText(value, field, maximum) {
|
|
52
|
-
const result = text(value, field, maximum);
|
|
53
|
-
if (result.trim() === "" || /[\u0000-\u001f\u007f]/u.test(result)
|
|
54
|
-
|| new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(new TextEncoder().encode(result)) !== result)
|
|
55
|
-
fail(field);
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
56
|
function role(value) {
|
|
59
57
|
if (typeof value !== "string" || !rolePattern.test(value))
|
|
60
58
|
fail("role");
|
|
@@ -63,6 +61,8 @@ function role(value) {
|
|
|
63
61
|
function object(value, required, optional = []) {
|
|
64
62
|
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
65
63
|
fail("object");
|
|
64
|
+
if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null || Object.getOwnPropertySymbols(value).length || Object.values(Object.getOwnPropertyDescriptors(value)).some(property => !Object.hasOwn(property, "value") || !property.enumerable))
|
|
65
|
+
fail("object");
|
|
66
66
|
const result = value;
|
|
67
67
|
if (Object.keys(result).some((key) => !required.includes(key) && !optional.includes(key))
|
|
68
68
|
|| required.some((key) => !Object.hasOwn(result, key)))
|
|
@@ -72,16 +72,78 @@ function object(value, required, optional = []) {
|
|
|
72
72
|
function optional(value, key, parse) {
|
|
73
73
|
return Object.hasOwn(value, key) ? { [key]: parse(value[key]) } : {};
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const item = object(value, ["code", "message"], ["field"]);
|
|
75
|
+
export function parseProfileErrorInfo(value) {
|
|
76
|
+
const item = object(value, ["code", "message"], ["field", "reason", "location"]);
|
|
77
77
|
const code = text(item.code, "code");
|
|
78
78
|
if (!errorCodes.has(code))
|
|
79
79
|
fail("code");
|
|
80
|
-
|
|
80
|
+
const reason = item.reason === undefined ? undefined : text(item.reason, "reason", 64);
|
|
81
|
+
if (reason !== undefined && (!Object.hasOwn(PROFILE_DIAGNOSTIC_REASONS, reason) || reason === "blank-label"))
|
|
82
|
+
fail("reason");
|
|
83
|
+
const field = item.field === undefined ? undefined : diagnosticField(item.field);
|
|
84
|
+
return { code: code, message: reason === undefined ? text(item.message, "message", 4096) : `${field ?? "document"}: ${diagnostic(reason, field ?? "document").reason}`,
|
|
85
|
+
...(field === undefined ? {} : { field }), ...(reason === undefined ? {} : { reason: reason }), ...optional(item, "location", diagnosticPosition) };
|
|
86
|
+
}
|
|
87
|
+
const errorInfo = parseProfileErrorInfo;
|
|
88
|
+
function diagnosticField(value) { if (!isSafeDiagnosticField(value))
|
|
89
|
+
fail("field"); return value; }
|
|
90
|
+
function diagnosticPosition(value) {
|
|
91
|
+
const item = object(value, ["offset", "length", "line", "column"]);
|
|
92
|
+
const result = { offset: integer(item.offset, "offset", 128 * 1024), length: integer(item.length, "length", 128 * 1024), line: integer(item.line, "line", 128 * 1024 + 1), column: integer(item.column, "column", 128 * 1024 + 1) };
|
|
93
|
+
if (result.line < 1 || result.column < 1 || result.offset + result.length > 128 * 1024)
|
|
94
|
+
fail("location");
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
export function parseProfileDiagnostic(value) {
|
|
98
|
+
const row = object(value, ["severity", "code", "field", "reason"], ["location"]);
|
|
99
|
+
if (typeof row.code !== "string" || !Object.hasOwn(PROFILE_DIAGNOSTIC_REASONS, row.code))
|
|
100
|
+
fail("diagnostic code");
|
|
101
|
+
const result = diagnostic(row.code, diagnosticField(row.field));
|
|
102
|
+
if (row.severity !== result.severity || row.reason !== result.reason)
|
|
103
|
+
fail("diagnostic severity/reason");
|
|
104
|
+
return { ...result, ...optional(row, "location", diagnosticPosition) };
|
|
105
|
+
}
|
|
106
|
+
function warnings(value) {
|
|
107
|
+
if (!Array.isArray(value) || value.length > 1)
|
|
108
|
+
fail("warnings");
|
|
109
|
+
return value.map(value => {
|
|
110
|
+
const result = parseProfileDiagnostic(value);
|
|
111
|
+
if (result.severity !== "warning" || result.code !== "blank-label" || result.field !== "label")
|
|
112
|
+
fail("warning");
|
|
113
|
+
return result;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export function parseRoleAvailability(value) {
|
|
117
|
+
const row = object(value, ["id", "required", "startupAvailable", "deploymentEnabled", "admitted", "source", "capture"], ["requiredReason", "namedEnabled", "reason"]);
|
|
118
|
+
if (typeof row.source !== "string" || !["defaults", "global", "profile", "named-session"].includes(row.source) || typeof row.capture !== "string" || !["startup", "deployment", "named-session"].includes(row.capture))
|
|
119
|
+
fail("role source/capture");
|
|
120
|
+
if (row.reason !== undefined && (typeof row.reason !== "string" || !["module-off", "deployment-disabled", "startup-unavailable", "profile-disabled", "required-role", "current-root-disabled"].includes(row.reason)))
|
|
121
|
+
fail("role reason");
|
|
122
|
+
if (row.requiredReason !== undefined && (typeof row.requiredReason !== "string" || !["deepwork-planning", "legacy-review"].includes(row.requiredReason)))
|
|
123
|
+
fail("requiredReason");
|
|
124
|
+
return { id: role(row.id), required: boolean(row.required, "required"), startupAvailable: boolean(row.startupAvailable, "startupAvailable"), deploymentEnabled: boolean(row.deploymentEnabled, "deploymentEnabled"), admitted: boolean(row.admitted, "admitted"), source: row.source, capture: row.capture,
|
|
125
|
+
...optional(row, "namedEnabled", value => boolean(value, "namedEnabled")), ...(row.reason === undefined ? {} : { reason: row.reason }), ...(row.requiredReason === undefined ? {} : { requiredReason: row.requiredReason }) };
|
|
126
|
+
}
|
|
127
|
+
function roleAvailabilityList(value) {
|
|
128
|
+
if (!Array.isArray(value) || value.length > 22)
|
|
129
|
+
fail("roles");
|
|
130
|
+
const result = value.map(parseRoleAvailability);
|
|
131
|
+
if (new Set(result.map(role => role.id)).size !== result.length)
|
|
132
|
+
fail("roles");
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
export function parseSubagentRuntimeAdmissionView(value) {
|
|
136
|
+
const row = object(value, ["binding", "deliveryFenceReady", "restartRequired"], ["reason"]);
|
|
137
|
+
if (typeof row.binding !== "string" || !["stock", "dsmm", "unavailable"].includes(row.binding) || row.reason !== undefined && (typeof row.reason !== "string" || !["explicit-composition-required", "duplicate-provider", "authority-not-ready"].includes(row.reason)))
|
|
138
|
+
fail("subagentRuntime");
|
|
139
|
+
const ready = boolean(row.deliveryFenceReady, "deliveryFenceReady");
|
|
140
|
+
if (ready && (row.binding !== "dsmm" || row.reason !== undefined))
|
|
141
|
+
fail("subagentRuntime readiness");
|
|
142
|
+
return { binding: row.binding, deliveryFenceReady: ready, restartRequired: boolean(row.restartRequired, "restartRequired"), ...(row.reason === undefined ? {} : { reason: row.reason }) };
|
|
81
143
|
}
|
|
82
144
|
function readResult(value) {
|
|
83
|
-
const item = object(value, ["id", "revision", "content"], ["label"]);
|
|
84
|
-
return { id: id(item.id), revision: revision(item.revision), content: content(item.content), ...optional(item, "label", (input) => text(input, "label", 120)) };
|
|
145
|
+
const item = object(value, ["id", "revision", "content"], ["label", "warnings"]);
|
|
146
|
+
return { id: id(item.id), revision: revision(item.revision), content: content(item.content), ...optional(item, "label", (input) => text(input, "label", 120)), ...optional(item, "warnings", warnings) };
|
|
85
147
|
}
|
|
86
148
|
function content(value) {
|
|
87
149
|
const result = text(value, "content", 128 * 1024);
|
|
@@ -90,24 +152,25 @@ function content(value) {
|
|
|
90
152
|
return result;
|
|
91
153
|
}
|
|
92
154
|
function snapshot(value) {
|
|
93
|
-
const item = object(value, ["profiles", "selectedId", "appliedRevision", "selectionRevision"], ["selectionError", "roles", "editorDefaults"]);
|
|
155
|
+
const item = object(value, ["profiles", "selectedId", "appliedRevision", "selectionRevision"], ["selectionError", "roles", "editorDefaults", "origin", "readOnly", "writeRestriction", "selectedWarnings"]);
|
|
94
156
|
if (!Array.isArray(item.profiles) || item.profiles.length > 128)
|
|
95
157
|
fail("profiles");
|
|
96
158
|
return {
|
|
97
159
|
profiles: item.profiles.map((input) => {
|
|
98
|
-
const row = object(input, ["id", "revision"], ["label", "error"]);
|
|
99
|
-
return { id: text(row.id, "id", 64), revision: row.revision === null ? null : revision(row.revision), ...optional(row, "label", (input) => text(input, "label", 120)), ...optional(row, "error", errorInfo) };
|
|
160
|
+
const row = object(input, ["id", "revision"], ["label", "error", "warnings"]);
|
|
161
|
+
return { id: text(row.id, "id", 64), revision: row.revision === null ? null : revision(row.revision), ...optional(row, "label", (input) => text(input, "label", 120)), ...optional(row, "error", errorInfo), ...optional(row, "warnings", warnings) };
|
|
100
162
|
}),
|
|
101
163
|
selectedId: item.selectedId === null ? null : id(item.selectedId),
|
|
102
164
|
appliedRevision: item.appliedRevision === null ? null : revision(item.appliedRevision),
|
|
103
165
|
selectionRevision: item.selectionRevision === "unavailable" && Object.hasOwn(item, "selectionError") ? "unavailable" : selectionRevision(item.selectionRevision),
|
|
104
166
|
...optional(item, "selectionError", errorInfo),
|
|
167
|
+
...optional(item, "selectedWarnings", warnings),
|
|
105
168
|
...optional(item, "roles", (input) => {
|
|
106
|
-
if (!Array.isArray(input) || input.length >
|
|
169
|
+
if (!Array.isArray(input) || input.length > 22)
|
|
107
170
|
fail("roles");
|
|
108
171
|
const result = input.map((value) => {
|
|
109
|
-
const row = object(value, ["id", "label", "enabled"], ["runtimePolicy"]);
|
|
110
|
-
return { id: role(row.id), label: text(row.label, "label", 120), enabled: boolean(row.enabled, "enabled"), ...optional(row, "runtimePolicy", (input) => {
|
|
172
|
+
const row = object(value, ["id", "label", "enabled"], ["runtimePolicy", "availability"]);
|
|
173
|
+
return { id: role(row.id), label: text(row.label, "label", 120), enabled: boolean(row.enabled, "enabled"), ...optional(row, "availability", parseRoleAvailability), ...optional(row, "runtimePolicy", (input) => {
|
|
111
174
|
const policy = object(input, [], ["strategy", "rateLimit"]);
|
|
112
175
|
return { ...optional(policy, "strategy", normalizeRoutingStrategy), ...optional(policy, "rateLimit", normalizeRateLimitOverrides) };
|
|
113
176
|
}) };
|
|
@@ -117,6 +180,10 @@ function snapshot(value) {
|
|
|
117
180
|
return result;
|
|
118
181
|
}),
|
|
119
182
|
...optional(item, "editorDefaults", runtimePolicy),
|
|
183
|
+
...optional(item, "origin", (input) => { if (typeof input !== "string" || !["central", "legacy", "explicit"].includes(input))
|
|
184
|
+
fail("origin"); return input; }),
|
|
185
|
+
...optional(item, "readOnly", (input) => boolean(input, "readOnly")),
|
|
186
|
+
...optional(item, "writeRestriction", (input) => text(input, "writeRestriction", 1024)),
|
|
120
187
|
};
|
|
121
188
|
}
|
|
122
189
|
function rateLimit(value) {
|
|
@@ -140,19 +207,56 @@ function rolePolicy(value) {
|
|
|
140
207
|
};
|
|
141
208
|
}
|
|
142
209
|
function modelRoute(value) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
210
|
+
return normalizeModelRouteJson(value);
|
|
211
|
+
}
|
|
212
|
+
function initialRoleRoute(value) {
|
|
213
|
+
const row = object(value, ["status"], ["source", "route", "reason"]);
|
|
214
|
+
if (row.status === "known") {
|
|
215
|
+
object(row, ["status", "source", "route"]);
|
|
216
|
+
if (row.source !== "invocation-capture")
|
|
217
|
+
fail("initialRoute source");
|
|
218
|
+
return { status: "known", source: "invocation-capture", route: modelRoute(row.route) };
|
|
219
|
+
}
|
|
220
|
+
object(row, ["status", "reason"]);
|
|
221
|
+
if (row.status !== "unknown" || row.reason !== "missing-invocation-capture")
|
|
222
|
+
fail("initialRoute reason");
|
|
223
|
+
return { status: "unknown", reason: "missing-invocation-capture" };
|
|
224
|
+
}
|
|
225
|
+
function liveRoleRoute(value) {
|
|
226
|
+
const row = object(value, ["status"], ["source", "route", "reason"]);
|
|
227
|
+
if (row.status === "known") {
|
|
228
|
+
object(row, ["status", "source", "route"]);
|
|
229
|
+
if (row.source !== "own-native-request-header")
|
|
230
|
+
fail("liveRoute source");
|
|
231
|
+
return { status: "known", source: "own-native-request-header", route: modelRoute(row.route) };
|
|
232
|
+
}
|
|
233
|
+
object(row, ["status", "reason"]);
|
|
234
|
+
if (row.status !== "unknown" || typeof row.reason !== "string" || !["no-own-request-header", "invalid-own-request-header", "not-observed"].includes(row.reason))
|
|
235
|
+
fail("liveRoute reason");
|
|
236
|
+
return { status: "unknown", reason: row.reason };
|
|
237
|
+
}
|
|
238
|
+
export function parseDsmmRoleRouteComparison(value) {
|
|
239
|
+
const row = object(jsonData(value), ["childId", "initialRoute", "liveRoute"]);
|
|
240
|
+
return { childId: sessionId(row.childId), initialRoute: initialRoleRoute(row.initialRoute), liveRoute: liveRoleRoute(row.liveRoute) };
|
|
241
|
+
}
|
|
242
|
+
export function parseDsmmInvocationView(value) {
|
|
243
|
+
const row = object(jsonData(value), ["role", "label", "level", "routeSource", "mode"], ["route", "runId", "childId", "jobId", "routeComparison"]);
|
|
244
|
+
if (typeof row.level !== "string" || !["normal", "low", "high", "max"].includes(row.level) || !DSMM_ROUTE_SOURCES.includes(row.routeSource) || typeof row.mode !== "string" || !["one-shot", "continuable"].includes(row.mode))
|
|
245
|
+
fail("invocation");
|
|
246
|
+
const target = role(row.role);
|
|
247
|
+
if (target === "dsmm-orchestrator")
|
|
248
|
+
fail("invocation target");
|
|
249
|
+
const routeComparison = Object.hasOwn(row, "routeComparison") ? parseDsmmRoleRouteComparison(row.routeComparison) : undefined;
|
|
250
|
+
if (routeComparison !== undefined && (!Object.hasOwn(row, "childId") || routeComparison.childId !== row.childId))
|
|
251
|
+
fail("invocation routeComparison childId");
|
|
252
|
+
return { role: target, label: text(row.label, "label", 120), level: row.level, routeSource: row.routeSource, mode: row.mode, ...optional(row, "route", modelRoute), ...optional(row, "runId", sessionId), ...optional(row, "childId", sessionId), ...optional(row, "jobId", sessionId), ...(routeComparison === undefined ? {} : { routeComparison }) };
|
|
149
253
|
}
|
|
150
254
|
function selectionState(value) {
|
|
151
255
|
const item = object(value, ["selectedId", "appliedRevision", "selectionRevision"]);
|
|
152
256
|
return { selectedId: item.selectedId === null ? null : id(item.selectedId), appliedRevision: item.appliedRevision === null ? null : revision(item.appliedRevision), selectionRevision: selectionRevision(item.selectionRevision) };
|
|
153
257
|
}
|
|
154
258
|
function sessionSnapshot(value) {
|
|
155
|
-
const item = object(value, ["sessionId", "globalDefault", "selection", "scope", "admissionEpoch", "switchAllowed"], ["admittedSelection", "switchUnavailableReason", "rolePolicy", "profileModel", "deepwork"]);
|
|
259
|
+
const item = object(value, ["sessionId", "globalDefault", "selection", "scope", "admissionEpoch", "switchAllowed"], ["admittedSelection", "switchUnavailableReason", "rolePolicy", "profileModel", "deepwork", "modules", "configuration", "warnings", "roles", "subagentRuntime"]);
|
|
156
260
|
if (typeof item.scope !== "string" || !["global-default", "session-override", "deployment-baseline"].includes(item.scope))
|
|
157
261
|
fail("scope");
|
|
158
262
|
return {
|
|
@@ -166,6 +270,11 @@ function sessionSnapshot(value) {
|
|
|
166
270
|
}),
|
|
167
271
|
...optional(item, "rolePolicy", rolePolicy),
|
|
168
272
|
...optional(item, "profileModel", modelRoute),
|
|
273
|
+
...optional(item, "modules", moduleStates),
|
|
274
|
+
...optional(item, "configuration", admissionView),
|
|
275
|
+
...optional(item, "warnings", warnings),
|
|
276
|
+
...optional(item, "roles", roleAvailabilityList),
|
|
277
|
+
...optional(item, "subagentRuntime", parseSubagentRuntimeAdmissionView),
|
|
169
278
|
...optional(item, "deepwork", (input) => {
|
|
170
279
|
const mode = object(input, ["active", "explicit", "locked", "revision"]);
|
|
171
280
|
return { active: boolean(mode.active, "active"), explicit: boolean(mode.explicit, "explicit"), locked: boolean(mode.locked, "locked"), revision: revision(mode.revision) };
|
|
@@ -195,15 +304,223 @@ function modeSelectRequest(value) {
|
|
|
195
304
|
return { sessionId: sessionId(item.sessionId), active: boolean(item.active, "active"), expectedModeRevision: revision(item.expectedModeRevision), expectedAdmissionEpoch: revision(item.expectedAdmissionEpoch) };
|
|
196
305
|
}
|
|
197
306
|
function codec(symbol, parse) {
|
|
198
|
-
return { mode: "strict", typeSymbol: `@dsmm/dsmm#${symbol}`, create: () => ({ parse }) };
|
|
307
|
+
return { mode: "strict", typeSymbol: `@dsmm/dsmm#${symbol}`, create: () => ({ parse: value => parse(jsonData(value)) }) };
|
|
199
308
|
}
|
|
200
309
|
function descriptor(method, result, parameter) {
|
|
201
310
|
return { id: `@dsmm/dsmm#dsmmProfiles/${method}`, service: "dsmmProfiles", namespace: "dsmmProfiles", method, invocation: { kind: "direct" }, parameters: parameter === undefined ? [] : [{ name: parameter.name, wire: parameter.name, source: "json", codec: parameter.codec }], result };
|
|
202
311
|
}
|
|
312
|
+
function jsonData(value, depth = 0, active = new Set()) {
|
|
313
|
+
if (depth > 32)
|
|
314
|
+
fail("JSON depth");
|
|
315
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
316
|
+
return value;
|
|
317
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
318
|
+
return value;
|
|
319
|
+
if (typeof value !== "object" || value === null || active.has(value))
|
|
320
|
+
fail("JSON value");
|
|
321
|
+
if (Array.isArray(value) ? Object.getPrototypeOf(value) !== Array.prototype : Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null)
|
|
322
|
+
fail("JSON object");
|
|
323
|
+
if (Object.getOwnPropertySymbols(value).length)
|
|
324
|
+
fail("JSON symbols");
|
|
325
|
+
const properties = Object.getOwnPropertyDescriptors(value);
|
|
326
|
+
for (const [key, property] of Object.entries(properties)) {
|
|
327
|
+
if (Array.isArray(value) && key === "length")
|
|
328
|
+
continue;
|
|
329
|
+
if (!Object.hasOwn(property, "value") || !property.enumerable || Array.isArray(value) && !/^(0|[1-9][0-9]*)$/u.test(key))
|
|
330
|
+
fail("JSON property");
|
|
331
|
+
}
|
|
332
|
+
if (Array.isArray(value) && Object.keys(value).length !== value.length)
|
|
333
|
+
fail("JSON array holes");
|
|
334
|
+
active.add(value);
|
|
335
|
+
const result = Array.isArray(value) ? value.map((child) => jsonData(child, depth + 1, active)) : Object.fromEntries(Object.entries(value).map(([key, child]) => {
|
|
336
|
+
if (["__proto__", "prototype", "constructor"].includes(key))
|
|
337
|
+
fail("JSON key");
|
|
338
|
+
return [key, jsonData(child, depth + 1, active)];
|
|
339
|
+
}));
|
|
340
|
+
active.delete(value);
|
|
341
|
+
return result;
|
|
342
|
+
}
|
|
343
|
+
function globalSnapshot(value) {
|
|
344
|
+
const row = object(value, ["config", "revision"]);
|
|
345
|
+
object(row.config, [], Object.keys(row.config));
|
|
346
|
+
return { config: jsonData(row.config), revision: selectionRevision(row.revision) };
|
|
347
|
+
}
|
|
348
|
+
function admissionView(value) {
|
|
349
|
+
const row = object(value, ["settings", "sources", "captures", "restartRequired", "named"], ["modelParameterPolicy"]);
|
|
350
|
+
object(row.settings, [], Object.keys(row.settings));
|
|
351
|
+
for (const key of ["sources", "captures"]) {
|
|
352
|
+
const map = object(row[key], [], Object.keys(row[key]));
|
|
353
|
+
for (const [path, value] of Object.entries(map)) {
|
|
354
|
+
if (path.startsWith("lsp.env."))
|
|
355
|
+
fail("private environment field");
|
|
356
|
+
text(value, key, 128);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (!Array.isArray(row.restartRequired) || row.restartRequired.length > 256)
|
|
360
|
+
fail("restartRequired");
|
|
361
|
+
const named = row.named === null ? null : object(row.named, ["id", "revision"]);
|
|
362
|
+
return { ...optional(row, "modelParameterPolicy", value => parseModelParameterPolicy(jsonData(value))), settings: readOnlySettingsData(row.settings), sources: jsonData(row.sources),
|
|
363
|
+
captures: jsonData(row.captures), restartRequired: row.restartRequired.map(value => text(value, "field", 256)),
|
|
364
|
+
named: named === null ? null : { id: id(named.id), revision: revision(named.revision) } };
|
|
365
|
+
}
|
|
366
|
+
function readOnlySettingsData(value) {
|
|
367
|
+
const settings = jsonData(value);
|
|
368
|
+
const configured = (value) => { if (value !== "" && value !== "<configured>")
|
|
369
|
+
fail("private configured value"); };
|
|
370
|
+
if (settings.lsp !== undefined) {
|
|
371
|
+
const lsp = object(settings.lsp, ["enabled", "serverName", "command", "args", "cwd", "env", "toolCallTimeoutMs", "failOnStartupError"]);
|
|
372
|
+
configured(lsp.command);
|
|
373
|
+
configured(lsp.cwd);
|
|
374
|
+
if (!Array.isArray(lsp.args) || lsp.args.some(value => value !== "<configured>"))
|
|
375
|
+
fail("private arguments");
|
|
376
|
+
const env = object(lsp.env, [], Object.keys(lsp.env));
|
|
377
|
+
for (const [key, value] of Object.entries(env))
|
|
378
|
+
if (!/^variable-[1-9][0-9]*$/u.test(key) || value !== "<redacted>")
|
|
379
|
+
fail("private environment");
|
|
380
|
+
}
|
|
381
|
+
if (settings.presets !== undefined) {
|
|
382
|
+
const presets = object(settings.presets, ["materialize"], ["root", "plannerRootEnabled"]);
|
|
383
|
+
if (Object.hasOwn(presets, "plannerRootEnabled"))
|
|
384
|
+
boolean(presets.plannerRootEnabled, "presets.plannerRootEnabled");
|
|
385
|
+
if (presets.root !== undefined && presets.root !== "<configured>")
|
|
386
|
+
fail("private directory");
|
|
387
|
+
}
|
|
388
|
+
if (settings.runtimeRecovery !== undefined) {
|
|
389
|
+
const recovery = object(settings.runtimeRecovery, ["enabled", "retryOnStatusCodes", "retryOnCodes", "fallbackRoutes", "maxFallbackAttempts", "idleContinuation"]);
|
|
390
|
+
const idle = object(recovery.idleContinuation, ["enabled", "maxContinuations", "prompt"]);
|
|
391
|
+
configured(idle.prompt);
|
|
392
|
+
}
|
|
393
|
+
return settings;
|
|
394
|
+
}
|
|
395
|
+
function editorSnapshot(value) {
|
|
396
|
+
const row = object(value, ["entryId", "namespace", "hostProfileKey", "global", "globalRevision", "profile", "nativeRevision", "nativeFormRevision", "nativeForm", "desired", "sources", "startup", "defaults", "schema", "nextRoot", "modules"], ["startupSources"]);
|
|
397
|
+
const result = jsonData(row);
|
|
398
|
+
text(row.entryId, "entryId", 256);
|
|
399
|
+
if (row.namespace !== null)
|
|
400
|
+
text(row.namespace, "namespace", 256);
|
|
401
|
+
revision(row.hostProfileKey);
|
|
402
|
+
selectionRevision(row.globalRevision);
|
|
403
|
+
revision(row.nativeRevision);
|
|
404
|
+
if (row.nativeFormRevision !== null)
|
|
405
|
+
integer(row.nativeFormRevision, "nativeFormRevision");
|
|
406
|
+
for (const key of ["global", "profile", "desired", "sources", "startup", "defaults", "schema"])
|
|
407
|
+
object(row[key], [], Object.keys(row[key]));
|
|
408
|
+
if (row.nativeForm !== null)
|
|
409
|
+
object(row.nativeForm, ["base", "user"]);
|
|
410
|
+
if (row.nextRoot !== null)
|
|
411
|
+
result.nextRoot = admissionView(row.nextRoot);
|
|
412
|
+
result.desired = readOnlySettingsData(row.desired);
|
|
413
|
+
result.startup = readOnlySettingsData(row.startup);
|
|
414
|
+
result.schema = schemaNode(row.schema);
|
|
415
|
+
for (const map of [result.sources, result.startupSources]) {
|
|
416
|
+
if (map === undefined)
|
|
417
|
+
continue;
|
|
418
|
+
object(map, [], Object.keys(map));
|
|
419
|
+
for (const [path, value] of Object.entries(map)) {
|
|
420
|
+
if (path.startsWith("lsp.env."))
|
|
421
|
+
fail("private environment field");
|
|
422
|
+
text(value, "source", 128);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
result.modules = moduleStates(row.modules);
|
|
426
|
+
return result;
|
|
427
|
+
}
|
|
428
|
+
function schemaNode(value) {
|
|
429
|
+
const row = object(value, ["type"], ["fields", "inner", "alternatives", "value", "min", "max", "step", "required", "keys", "nonempty", "additionalProperties"]);
|
|
430
|
+
if (typeof row.type !== "string" || !["object", "dict", "array", "union", "const", "string", "number", "boolean"].includes(row.type))
|
|
431
|
+
fail("schema type");
|
|
432
|
+
const node = { type: row.type };
|
|
433
|
+
if (row.fields !== undefined)
|
|
434
|
+
node.fields = Object.fromEntries(Object.entries(object(row.fields, [], Object.keys(row.fields))).map(([key, child]) => [key, schemaNode(child)]));
|
|
435
|
+
if (row.inner !== undefined)
|
|
436
|
+
node.inner = schemaNode(row.inner);
|
|
437
|
+
if (row.alternatives !== undefined) {
|
|
438
|
+
if (!Array.isArray(row.alternatives))
|
|
439
|
+
fail("schema alternatives");
|
|
440
|
+
node.alternatives = row.alternatives.map(schemaNode);
|
|
441
|
+
}
|
|
442
|
+
if (Object.hasOwn(row, "value")) {
|
|
443
|
+
if (!["string", "number", "boolean"].includes(typeof row.value))
|
|
444
|
+
fail("schema value");
|
|
445
|
+
node.value = row.value;
|
|
446
|
+
}
|
|
447
|
+
for (const key of ["min", "max", "step"])
|
|
448
|
+
if (row[key] !== undefined) {
|
|
449
|
+
if (typeof row[key] !== "number" || !Number.isFinite(row[key]))
|
|
450
|
+
fail("schema bound");
|
|
451
|
+
node[key] = row[key];
|
|
452
|
+
}
|
|
453
|
+
if (row.required !== undefined)
|
|
454
|
+
node.required = boolean(row.required, "schema required");
|
|
455
|
+
if (row.nonempty !== undefined) {
|
|
456
|
+
if (row.type !== "string")
|
|
457
|
+
fail("schema nonempty");
|
|
458
|
+
node.nonempty = boolean(row.nonempty, "schema nonempty");
|
|
459
|
+
}
|
|
460
|
+
if (Object.hasOwn(row, "additionalProperties")) {
|
|
461
|
+
if (row.type !== "object" || row.additionalProperties !== "json")
|
|
462
|
+
fail("schema additionalProperties");
|
|
463
|
+
node.additionalProperties = "json";
|
|
464
|
+
}
|
|
465
|
+
if (row.keys !== undefined) {
|
|
466
|
+
if (row.type !== "dict" || !Array.isArray(row.keys) || row.keys.length > 64)
|
|
467
|
+
fail("schema keys");
|
|
468
|
+
node.keys = row.keys.map(key => text(key, "schema key", 128));
|
|
469
|
+
}
|
|
470
|
+
return node;
|
|
471
|
+
}
|
|
472
|
+
function globalSaveRequest(value) {
|
|
473
|
+
const row = object(value, ["expectedRevision", "edits"]);
|
|
474
|
+
if (!Array.isArray(row.edits) || row.edits.length > 128)
|
|
475
|
+
fail("edits");
|
|
476
|
+
return { expectedRevision: selectionRevision(row.expectedRevision), edits: row.edits.map((value) => {
|
|
477
|
+
const edit = object(value, ["op", "path"], ["value"]);
|
|
478
|
+
if (!Array.isArray(edit.path) || edit.path.length < 1 || edit.path.length > 8)
|
|
479
|
+
fail("field path");
|
|
480
|
+
const path = edit.path.map((part) => { const key = text(part, "field", 128); if (!/^[a-zA-Z][a-zA-Z0-9_-]*$/u.test(key) || ["constructor", "prototype", "__proto__"].includes(key))
|
|
481
|
+
fail("field"); return key; });
|
|
482
|
+
if (edit.op === "unset" && !Object.hasOwn(edit, "value"))
|
|
483
|
+
return { op: "unset", path };
|
|
484
|
+
if (edit.op !== "set" || !Object.hasOwn(edit, "value"))
|
|
485
|
+
fail("edit");
|
|
486
|
+
return { op: "set", path, value: jsonData(edit.value) };
|
|
487
|
+
}) };
|
|
488
|
+
}
|
|
489
|
+
function configDescriptor(method, parameter) {
|
|
490
|
+
return { id: `@dsmm/dsmm#dsmmConfig/${method}`, service: "dsmmConfig", namespace: "dsmmConfig", method, invocation: { kind: "direct" },
|
|
491
|
+
parameters: parameter === undefined ? [] : [{ name: "request", wire: "request", source: "json", codec: parameter }], result: codec("GlobalConfigSnapshot", globalSnapshot) };
|
|
492
|
+
}
|
|
493
|
+
function moduleStates(value) {
|
|
494
|
+
if (!Array.isArray(value) || value.length !== DSMM_MODULE_DESCRIPTORS.length)
|
|
495
|
+
fail("modules");
|
|
496
|
+
const ids = new Set();
|
|
497
|
+
return value.map((value) => {
|
|
498
|
+
const row = object(value, ["descriptor", "hostBundleEnabled", "desired", "startupMounted", "admitted", "nextRoot", "reason", "pending"]);
|
|
499
|
+
const descriptor = object(row.descriptor, ["id", "label", "key"]);
|
|
500
|
+
const known = DSMM_MODULE_DESCRIPTORS.find(known => known.id === descriptor.id);
|
|
501
|
+
if (known === undefined || descriptor.label !== known.label || descriptor.key !== known.key || row.hostBundleEnabled !== "unknown" || ids.has(known.id))
|
|
502
|
+
fail("module descriptor");
|
|
503
|
+
ids.add(known.id);
|
|
504
|
+
const desired = object(row.desired, ["enabled", "source", "capture"]), next = object(row.nextRoot, ["admitted", "reason"]);
|
|
505
|
+
if (typeof desired.source !== "string" || !["defaults", "global", "profile"].includes(desired.source) || typeof desired.capture !== "string" || !["current-global", "admission", "startup"].includes(desired.capture)
|
|
506
|
+
|| ![null, "global-disabled", "restart-required"].includes(next.reason)
|
|
507
|
+
|| ![null, "global-disabled", "restart-required", "captured-off"].includes(row.reason))
|
|
508
|
+
fail("module state");
|
|
509
|
+
return { descriptor: { ...known }, hostBundleEnabled: "unknown",
|
|
510
|
+
desired: { enabled: boolean(desired.enabled, "desired.enabled"), source: desired.source, capture: desired.capture },
|
|
511
|
+
startupMounted: row.startupMounted === null ? null : boolean(row.startupMounted, "startupMounted"), admitted: row.admitted === null ? null : boolean(row.admitted, "admitted"),
|
|
512
|
+
nextRoot: { admitted: next.admitted === null ? null : boolean(next.admitted, "nextRoot.admitted"), reason: next.reason },
|
|
513
|
+
reason: row.reason, pending: boolean(row.pending, "pending") };
|
|
514
|
+
});
|
|
515
|
+
}
|
|
203
516
|
/** Explicit strict Host contract; no SRC fallback or browser-supplied authority. */
|
|
204
517
|
export const TYPERT_REMOTE = {
|
|
205
518
|
package: "@dsmm/dsmm",
|
|
206
519
|
descriptors: [
|
|
520
|
+
configDescriptor("describe"),
|
|
521
|
+
configDescriptor("save", codec("GlobalConfigSaveRequest", globalSaveRequest)),
|
|
522
|
+
{ ...configDescriptor("describeModules"), result: codec("DsmmModuleStateArray", moduleStates) },
|
|
523
|
+
{ ...configDescriptor("describeSettings"), result: codec("DeploymentEditorSnapshot", editorSnapshot) },
|
|
207
524
|
{
|
|
208
525
|
...descriptor("selectMode", codec("SessionProfileSnapshot", sessionSnapshot)),
|
|
209
526
|
parameters: [
|
package/lib/profile-rpc.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import type { Context } from "@deepseek-ai/cordis";
|
|
|
2
2
|
import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
3
3
|
import type { ProfileReadResult, ProfileSaveRequest, ProfileSelectRequest, ProfileSnapshot, SessionModeSelectRequest, SessionProfileSelectRequest, SessionProfileSnapshot } from "./profile-types.js";
|
|
4
4
|
import type { DshAgent } from "./dsh-types.js";
|
|
5
|
+
import type { DsmmDeploymentConfig, GlobalConfigSaveRequest, GlobalConfigSnapshot } from "./deployment-config.js";
|
|
6
|
+
import type { DsmmModuleState, DsmmMountedPermissionGetter } from "./modules.js";
|
|
7
|
+
import type { DsmmSettings } from "./settings.js";
|
|
8
|
+
import type { DeploymentEditorSnapshot } from "./profile-types.js";
|
|
9
|
+
import type { DsmmProfileRuntime } from "./profile-runtime.js";
|
|
5
10
|
export interface ProfilesBackend {
|
|
6
11
|
describe(): Promise<ProfileSnapshot>;
|
|
7
12
|
read(id: string): Promise<ProfileReadResult>;
|
|
@@ -27,11 +32,30 @@ export declare class DsmmProfilesHost extends TypertRemoteService {
|
|
|
27
32
|
selectSession(sessionId: string, request: SessionProfileSelectRequest): Promise<SessionProfileSnapshot>;
|
|
28
33
|
selectMode(sessionId: string, request: SessionModeSelectRequest): Promise<SessionProfileSnapshot>;
|
|
29
34
|
}
|
|
35
|
+
/** A peer is not write authority. Require the public local, writable Host carrier. */
|
|
36
|
+
export declare function assertLocalSettingsOperator(ctx: Context): void;
|
|
37
|
+
export declare class DsmmConfigHost extends TypertRemoteService {
|
|
38
|
+
private readonly backend;
|
|
39
|
+
private readonly startup?;
|
|
40
|
+
private readonly runtime?;
|
|
41
|
+
private readonly startupSources?;
|
|
42
|
+
private readonly getMountedPermission?;
|
|
43
|
+
private readonly lifetime;
|
|
44
|
+
constructor(ctx: Context, backend: DsmmDeploymentConfig, startup?: DsmmSettings | undefined, runtime?: (() => DsmmProfileRuntime | undefined) | undefined, startupSources?: Record<string, string> | undefined, getMountedPermission?: DsmmMountedPermissionGetter | undefined);
|
|
45
|
+
private captureReadAuthority;
|
|
46
|
+
describeSettings(): Promise<DeploymentEditorSnapshot>;
|
|
47
|
+
describe(): Promise<GlobalConfigSnapshot>;
|
|
48
|
+
describeModules(): Promise<DsmmModuleState[]>;
|
|
49
|
+
save(request: GlobalConfigSaveRequest): Promise<GlobalConfigSnapshot>;
|
|
50
|
+
}
|
|
30
51
|
declare module "@deepseek-ai/cordis" {
|
|
31
52
|
interface Context {
|
|
32
53
|
dsmmProfiles: DsmmProfilesHost;
|
|
54
|
+
dsmmConfig: DsmmConfigHost;
|
|
33
55
|
}
|
|
34
56
|
}
|
|
35
57
|
/** The caller supplies the owned injection fiber; withdrawal stays native. */
|
|
36
|
-
export declare function registerProfilesRpc(ctx: Context, backend: ProfilesBackend): DsmmProfilesHost;
|
|
58
|
+
export declare function registerProfilesRpc(ctx: Context, backend: ProfilesBackend, deployment?: DsmmDeploymentConfig): DsmmProfilesHost;
|
|
59
|
+
/** Core-owned injection; works without any DW or profile business service. */
|
|
60
|
+
export declare function registerConfigRpc(ctx: Context, deployment: DsmmDeploymentConfig, startup: DsmmSettings, runtime?: () => DsmmProfileRuntime | undefined, startupSources?: Record<string, string>, getMountedPermission?: DsmmMountedPermissionGetter): DsmmConfigHost;
|
|
37
61
|
//# sourceMappingURL=profile-rpc.d.ts.map
|