@dsmm/dsmm 0.1.9 → 0.2.0
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 +40 -24
- package/agent-presets/dsmm-builder/agent.cordis.yml +1949 -39
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +436 -14
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +588 -0
- package/agent-presets/dsmm-coding/preset.yml +3 -0
- package/agent-presets/dsmm-complex/agent.cordis.yml +1140 -0
- package/agent-presets/dsmm-complex/preset.yml +3 -0
- package/agent-presets/dsmm-creative/agent.cordis.yml +536 -12
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1163 -0
- package/agent-presets/dsmm-cross-cutting/preset.yml +3 -0
- package/agent-presets/dsmm-deep/agent.cordis.yml +1173 -0
- package/agent-presets/dsmm-deep/preset.yml +3 -0
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +581 -0
- package/agent-presets/dsmm-documenting/preset.yml +3 -0
- package/agent-presets/dsmm-frontend/agent.cordis.yml +580 -0
- package/agent-presets/dsmm-frontend/preset.yml +3 -0
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +572 -0
- package/agent-presets/dsmm-hard-reasoning/preset.yml +3 -0
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +546 -0
- package/agent-presets/dsmm-normal-task/preset.yml +3 -0
- package/agent-presets/dsmm-oracle/agent.cordis.yml +421 -12
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +421 -12
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +2023 -43
- package/agent-presets/dsmm-orchestrator/preset.yml +1 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +416 -13
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +462 -13
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +119 -0
- package/agent-presets/dsmm-quick/preset.yml +3 -0
- package/agent-presets/dsmm-research/agent.cordis.yml +141 -0
- package/agent-presets/dsmm-research/preset.yml +3 -0
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +420 -13
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/cordis.patch.yml +1 -5
- package/docs/agent-presets.md +64 -15
- package/docs/compatibility.md +61 -13
- package/docs/design.md +41 -0
- package/docs/lsp.md +12 -2
- package/docs/migration-from-ocmm.md +8 -0
- package/docs/profiles.md +41 -15
- package/docs/releasing.md +78 -8
- package/docs/roadmap.md +6 -0
- package/docs/runtime-recovery.md +12 -0
- package/docs/safety-guards.md +7 -3
- package/docs/settings-status.md +148 -7
- package/docs/skill-sync.md +52 -14
- package/lib/client/DeploymentPage.d.ts +18 -0
- package/lib/client/DeploymentPage.js +120 -0
- package/lib/client/ProfilesSection.js +4 -2
- package/lib/client/deployment-controller.d.ts +50 -0
- package/lib/client/deployment-controller.js +193 -0
- package/lib/client/deployment-data.d.ts +16 -0
- package/lib/client/deployment-data.js +109 -0
- package/lib/client/deployment-locales.d.ts +66 -0
- package/lib/client/deployment-locales.js +72 -0
- package/lib/client/index.js +50 -0
- package/lib/client/locales.d.ts +4 -0
- package/lib/client/locales.js +4 -2
- package/lib/client/plugins-contract.d.ts +27 -0
- package/lib/client/plugins-contract.js +2 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +16 -0
- package/lib/client.js +1048 -29
- 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/deployment-config.d.ts +37 -0
- package/lib/deployment-config.js +184 -0
- package/lib/dsh-home.d.ts +3 -0
- package/lib/dsh-home.js +10 -0
- package/lib/dsh-types.d.ts +12 -65
- package/lib/guards.d.ts +2 -1
- package/lib/guards.js +19 -2
- package/lib/index.d.ts +8 -1
- package/lib/index.js +115 -25
- package/lib/lsp.d.ts +13 -0
- package/lib/lsp.js +60 -0
- package/lib/mode.js +42 -47
- package/lib/model-routing.js +5 -2
- package/lib/modules.d.ts +27 -0
- package/lib/modules.js +21 -0
- package/lib/native-scope.d.ts +9 -0
- package/lib/native-scope.js +20 -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 +7 -4
- package/lib/preset-skills.d.ts +4 -1
- package/lib/preset-skills.js +60 -19
- package/lib/profile-remote.d.ts +14 -0
- package/lib/profile-remote.js +197 -4
- package/lib/profile-rpc.d.ts +24 -1
- package/lib/profile-rpc.js +139 -1
- package/lib/profile-runtime.d.ts +24 -0
- package/lib/profile-runtime.js +177 -33
- package/lib/profile-store.d.ts +45 -1
- package/lib/profile-store.js +236 -102
- package/lib/profile-types.d.ts +55 -0
- package/lib/prompt-content.d.ts +25 -0
- package/lib/prompt-content.js +27 -0
- package/lib/prompts.d.ts +8 -2
- package/lib/prompts.js +46 -34
- package/lib/role-policy.d.ts +51 -0
- package/lib/role-policy.js +224 -0
- package/lib/role-providers.d.ts +6 -2
- package/lib/role-providers.js +72 -39
- package/lib/role-subagents.d.ts +6 -2
- package/lib/role-subagents.js +187 -48
- package/lib/roles.d.ts +16 -4
- package/lib/roles.js +86 -186
- package/lib/runtime-recovery.js +16 -5
- package/lib/session-scope.js +2 -0
- package/lib/settings.d.ts +69 -1
- package/lib/settings.js +262 -91
- 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 +25 -0
- package/lib/status.js +47 -9
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +19 -2
- package/prompts/deepwork.md +144 -20
- package/prompts/source/agents/clarifier.md +45 -0
- package/prompts/source/agents/orchestrator.md +63 -0
- package/prompts/source/agents/plan-critic.md +25 -0
- package/prompts/source/agents/planner.md +19 -0
- package/prompts/source/agents/reviewer.md +17 -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 +38 -0
- package/prompts/source/category/cross-cutting.md +52 -0
- package/prompts/source/category/deep.md +62 -0
- package/prompts/source/category/documenting.md +62 -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 +56 -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 +129 -0
- package/prompts/source/deepwork/gemini.md +184 -0
- package/prompts/source/deepwork/glm.md +256 -0
- package/prompts/source/deepwork/gpt.md +43 -0
- package/prompts/source/deepwork/kimi-k27.md +13 -0
- package/prompts/source/deepwork/planner.md +41 -0
- package/prompts/source/deepwork/swe-2.md +13 -0
- package/prompts/source/manifest.json +3118 -0
- package/prompts/source/shared/dsh-host-contract.md +6 -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/skills/ast-grep/LICENSE +21 -0
- package/skills/ast-grep/README.md +138 -0
- package/skills/ast-grep/SKILL.md +284 -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 +102 -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 +144 -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 +125 -4
- package/skills/debugging/references/logging.md +2 -0
- package/skills/debugging/references/methodology/00-setup.md +2 -0
- package/skills/debugging/references/methodology/02-investigate.md +8 -2
- package/skills/debugging/references/methodology/03-flaky-triage.md +3 -1
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +4 -2
- package/skills/debugging/references/methodology/05-escalate.md +2 -0
- package/skills/debugging/references/methodology/06-fix.md +2 -0
- package/skills/debugging/references/methodology/08-qa.md +2 -0
- package/skills/debugging/references/methodology/09-cleanup.md +2 -0
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +4 -2
- package/skills/debugging/references/runtimes/bundled-js-binary.md +2 -0
- package/skills/debugging/references/runtimes/go.md +2 -0
- package/skills/debugging/references/runtimes/native-binary.md +2 -0
- package/skills/debugging/references/runtimes/node.md +2 -0
- package/skills/debugging/references/runtimes/python.md +2 -0
- package/skills/debugging/references/runtimes/rust.md +2 -0
- 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 +3 -1
- package/skills/debugging/references/tools/ghidra.md +2 -0
- package/skills/debugging/references/tools/playwright-cli.md +2 -0
- package/skills/debugging/references/tools/pwndbg.md +2 -0
- package/skills/debugging/references/tools/pwntools.md +2 -0
- package/skills/dispatching-parallel-agents/SKILL.md +94 -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 +142 -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 +112 -0
- package/skills/git-master/agents/openai.yaml +13 -0
- package/skills/init-deep/SKILL.md +279 -0
- package/skills/receiving-code-review/SKILL.md +112 -7
- package/skills/remove-ai-slops/SKILL.md +159 -8
- package/skills/requesting-code-review/SKILL.md +96 -3
- package/skills/requesting-code-review/code-reviewer.md +47 -0
- package/skills/subagent-driven-development/SKILL.md +176 -6
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +23 -0
- package/skills/subagent-driven-development/implementer-prompt.md +69 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +32 -0
- package/skills/using-git-worktrees/SKILL.md +141 -0
- package/skills/writing-plans/SKILL.md +121 -7
- package/skills/writing-plans/plan-document-reviewer-prompt.md +38 -0
package/lib/preset-registry.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getTraceable } from "@deepseek-ai/cordis";
|
|
2
2
|
import { DSMM_ROLES, DSMM_ROLE_IDS, isRootRole, rolePluginRows } from "./roles.js";
|
|
3
3
|
import { enabledSkillNames } from "./skills.js";
|
|
4
|
+
import { allowedRoleChildren, readonlyRoleTool, roleFromToolName } from "./role-policy.js";
|
|
4
5
|
/** Declare roles to DSH 0.2's native registry; directories are not discovery inputs. */
|
|
5
6
|
export function registerRolePresets(ctx, getSettings) {
|
|
6
7
|
const install = async (readyCtx) => {
|
|
@@ -9,7 +10,7 @@ export function registerRolePresets(ctx, getSettings) {
|
|
|
9
10
|
if (registry === undefined)
|
|
10
11
|
throw new Error("dsmm requires the native DSH agentPresets registry");
|
|
11
12
|
const settings = getSettings();
|
|
12
|
-
const enabled = DSMM_ROLE_IDS.filter((id) => settings.roles[id]);
|
|
13
|
+
const enabled = DSMM_ROLE_IDS.filter((id) => settings.modules.deepwork.enabled && settings.roles[id]);
|
|
13
14
|
const active = DSMM_ROLES.filter((role) => isRootRole(role) && enabled.includes(role.id));
|
|
14
15
|
const disposers = [];
|
|
15
16
|
try {
|
|
@@ -55,8 +56,10 @@ export function registerRolePresets(ctx, getSettings) {
|
|
|
55
56
|
const disposeGuard = tools.guard((execution) => {
|
|
56
57
|
if (execution.agent !== agent || !isReadonlyRole(registry.composedPreset(agent.ctx)))
|
|
57
58
|
return undefined;
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
const role = registry.composedPreset(agent.ctx);
|
|
60
|
+
const target = roleFromToolName(execution.name);
|
|
61
|
+
return target === undefined ? readonlyRoleTool(execution.name, settings) ? undefined : "dsmm read-only role does not permit this tool"
|
|
62
|
+
: allowedRoleChildren(role).includes(target) && settings.roles[target] ? undefined : "dsmm read-only role does not permit this delegation";
|
|
60
63
|
});
|
|
61
64
|
states.set(agent, { role: selected, disposeGuard, pending: true });
|
|
62
65
|
restrictedAgents.add(agent);
|
|
@@ -116,7 +119,7 @@ export function registerRolePresets(ctx, getSettings) {
|
|
|
116
119
|
}
|
|
117
120
|
};
|
|
118
121
|
if (ctx.inject !== undefined) {
|
|
119
|
-
ctx.inject(["agentPresets"], install);
|
|
122
|
+
return Promise.resolve(ctx.inject(["agentPresets"], install)).then(() => undefined);
|
|
120
123
|
}
|
|
121
124
|
else if (ctx.get?.("agentPresets") !== undefined || ctx.agentPresets !== undefined) {
|
|
122
125
|
void install(ctx).catch((error) => ctx.logger?.warn(`dsmm native preset registration failed: ${String(error)}`));
|
package/lib/preset-skills.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import Schema from "@deepseek-ai/schemastery";
|
|
2
2
|
import type { DshContext } from "./dsh-types.js";
|
|
3
3
|
import type { DsmmSkillName } from "./skills.js";
|
|
4
|
+
import type { DsmmSettingsGetter } from "./settings.js";
|
|
5
|
+
import type { DeepworkModeController } from "./state.js";
|
|
4
6
|
export declare const name = "dsmm/preset-skills";
|
|
5
|
-
export declare const inject: readonly [
|
|
7
|
+
export declare const inject: readonly [];
|
|
6
8
|
export interface PresetSkillsConfig {
|
|
7
9
|
skills?: DsmmSkillName[];
|
|
8
10
|
}
|
|
9
11
|
export declare const Config: Schema<PresetSkillsConfig>;
|
|
10
12
|
export declare function apply(ctx: DshContext, config?: PresetSkillsConfig): void;
|
|
13
|
+
export declare function registerAgentSkills(ctx: DshContext, controller: DeepworkModeController, getSettings: DsmmSettingsGetter): void;
|
|
11
14
|
export default apply;
|
|
12
15
|
//# sourceMappingURL=preset-skills.d.ts.map
|
package/lib/preset-skills.js
CHANGED
|
@@ -1,28 +1,69 @@
|
|
|
1
1
|
import Schema from "@deepseek-ai/schemastery";
|
|
2
|
-
import {
|
|
2
|
+
import { getTraceable } from "@deepseek-ai/cordis";
|
|
3
|
+
import { DSMM_SKILL_NAMES, registerBundledSkills } from "./skills.js";
|
|
4
|
+
import { nativeAgentContext, scopeParentOf } from "./native-scope.js";
|
|
3
5
|
export const name = "dsmm/preset-skills";
|
|
4
|
-
export const inject = [
|
|
5
|
-
const SKILL_NAME_SCHEMA = Schema.union(
|
|
6
|
-
Schema.const("brainstorming"),
|
|
7
|
-
Schema.const("writing-plans"),
|
|
8
|
-
Schema.const("requesting-code-review"),
|
|
9
|
-
Schema.const("receiving-code-review"),
|
|
10
|
-
Schema.const("subagent-driven-development"),
|
|
11
|
-
Schema.const("dispatching-parallel-agents"),
|
|
12
|
-
Schema.const("remove-ai-slops")
|
|
13
|
-
]);
|
|
6
|
+
export const inject = [];
|
|
7
|
+
const SKILL_NAME_SCHEMA = Schema.union(DSMM_SKILL_NAMES.map((name) => Schema.const(name)));
|
|
14
8
|
export const Config = Schema.object({
|
|
15
9
|
skills: Schema.array(SKILL_NAME_SCHEMA).default([...DSMM_SKILL_NAMES])
|
|
16
10
|
});
|
|
17
11
|
export function apply(ctx, config = {}) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
// Retain the published 0.1.9 Cordis entry shape for older callers. Current
|
|
13
|
+
// generated presets do not consume it; this hook registers no skills.
|
|
14
|
+
// The main entry calls registerAgentSkills below for real Agent mounts.
|
|
15
|
+
}
|
|
16
|
+
export function registerAgentSkills(ctx, controller, getSettings) {
|
|
17
|
+
const mounted = new Map();
|
|
18
|
+
const remove = (agent) => { mounted.get(agent)?.provider.dispose(); mounted.delete(agent); };
|
|
19
|
+
const reconcile = (agent) => {
|
|
20
|
+
const agentCtx = nativeAgentContext(agent);
|
|
21
|
+
const presets = ctx.get?.("agentPresets");
|
|
22
|
+
const raw = presets?.serviceFor(agent, "skills") ?? agentCtx.get("skills");
|
|
23
|
+
const previous = mounted.get(agent), parent = scopeParentOf(agent);
|
|
24
|
+
const settings = getSettings(agent);
|
|
25
|
+
if (!settings.modules.deepwork.enabled || !controller.active(agent, settings.defaultActive)) {
|
|
26
|
+
remove(agent);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (raw === undefined)
|
|
30
|
+
throw new Error("dsmm active skills require the native skill registry; no prompt-body fallback is available");
|
|
31
|
+
if (previous?.parent === parent && previous?.registry === raw) {
|
|
32
|
+
previous.provider.invalidate();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
remove(agent);
|
|
36
|
+
const registry = getTraceable(agentCtx, raw);
|
|
37
|
+
const provider = registerBundledSkills(agentCtx, registry, { agent, controller, getSettings });
|
|
38
|
+
mounted.set(agent, { parent, registry: raw, provider });
|
|
39
|
+
};
|
|
40
|
+
const stopMode = controller.watch(reconcile);
|
|
41
|
+
const created = ctx.on?.("agent/created", ({ agent }) => reconcile(agent), { global: true });
|
|
42
|
+
const selected = ctx.on?.("agent-preset/selected", (id) => {
|
|
43
|
+
const agent = ctx.get?.("agents")?.get(id);
|
|
44
|
+
if (agent !== undefined) {
|
|
45
|
+
remove(agent);
|
|
46
|
+
reconcile(agent);
|
|
47
|
+
}
|
|
48
|
+
}, { global: true });
|
|
49
|
+
const disposed = ctx.on?.("agent/disposed", ({ agent }) => remove(agent), { global: true });
|
|
50
|
+
const modeEvent = ctx.on?.("session/event", (session, event) => {
|
|
51
|
+
if (event.type !== "deepwork/mode")
|
|
52
|
+
return;
|
|
53
|
+
const agent = ctx.get?.("agents")?.list().find((agent) => agent.session === session);
|
|
54
|
+
if (agent !== undefined)
|
|
55
|
+
reconcile(agent);
|
|
56
|
+
}, { global: true });
|
|
57
|
+
ctx.effect?.(() => () => {
|
|
58
|
+
stopMode();
|
|
59
|
+
for (const stop of [created, selected, disposed, modeEvent])
|
|
60
|
+
if (typeof stop === "function")
|
|
61
|
+
stop();
|
|
62
|
+
for (const agent of [...mounted.keys()])
|
|
63
|
+
remove(agent);
|
|
64
|
+
});
|
|
65
|
+
for (const agent of ctx.get?.("agents")?.list() ?? [])
|
|
66
|
+
reconcile(agent);
|
|
26
67
|
}
|
|
27
68
|
export default apply;
|
|
28
69
|
//# sourceMappingURL=preset-skills.js.map
|
package/lib/profile-remote.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { RemoteResult, TypertRemoteContribution } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
2
|
import type { TypertContribution } from "@deepseek-ai/dsh-typert-registry";
|
|
3
3
|
import type { ProfileErrorInfo, ProfileReadResult, ProfileSaveRequest, ProfileSelectRequest, ProfileSnapshot, SessionModeSelectRequest, SessionProfileSelectRequest, SessionProfileSnapshot } from "./profile-types.js";
|
|
4
|
+
import type { GlobalConfigSaveRequest, GlobalConfigSnapshot } from "./deployment-config.js";
|
|
5
|
+
import type { DsmmModuleState } from "./modules.js";
|
|
6
|
+
import type { DeploymentEditorSnapshot } from "./profile-types.js";
|
|
7
|
+
export interface DsmmConfigRemote {
|
|
8
|
+
describe(): Promise<RemoteResult<GlobalConfigSnapshot>>;
|
|
9
|
+
save(request: GlobalConfigSaveRequest): Promise<RemoteResult<GlobalConfigSnapshot>>;
|
|
10
|
+
describeModules(): Promise<RemoteResult<DsmmModuleState[]>>;
|
|
11
|
+
describeSettings(): Promise<RemoteResult<DeploymentEditorSnapshot>>;
|
|
12
|
+
}
|
|
4
13
|
export interface DsmmProfilesRemote {
|
|
5
14
|
describe(): Promise<RemoteResult<ProfileSnapshot>>;
|
|
6
15
|
read(id: string): Promise<RemoteResult<ProfileReadResult>>;
|
|
@@ -12,6 +21,10 @@ export interface DsmmProfilesRemote {
|
|
|
12
21
|
}
|
|
13
22
|
declare module "@deepseek-ai/dsh-typert-protocol/types" {
|
|
14
23
|
interface TypertRemoteMap {
|
|
24
|
+
"dsmmConfig/describe": () => Promise<RemoteResult<GlobalConfigSnapshot>>;
|
|
25
|
+
"dsmmConfig/save": (request: GlobalConfigSaveRequest) => Promise<RemoteResult<GlobalConfigSnapshot>>;
|
|
26
|
+
"dsmmConfig/describeModules": () => Promise<RemoteResult<DsmmModuleState[]>>;
|
|
27
|
+
"dsmmConfig/describeSettings": DsmmConfigRemote["describeSettings"];
|
|
15
28
|
"dsmmProfiles/describe": DsmmProfilesRemote["describe"];
|
|
16
29
|
"dsmmProfiles/read": DsmmProfilesRemote["read"];
|
|
17
30
|
"dsmmProfiles/save": DsmmProfilesRemote["save"];
|
|
@@ -22,6 +35,7 @@ declare module "@deepseek-ai/dsh-typert-protocol/types" {
|
|
|
22
35
|
}
|
|
23
36
|
interface TypertRemoteNamespaceMap {
|
|
24
37
|
dsmmProfiles: DsmmProfilesRemote;
|
|
38
|
+
dsmmConfig: DsmmConfigRemote;
|
|
25
39
|
}
|
|
26
40
|
interface RemoteErrorDetailsMap {
|
|
27
41
|
"dsmm-profiles/refused": ProfileErrorInfo;
|
package/lib/profile-remote.js
CHANGED
|
@@ -2,7 +2,7 @@ import { DSMM_RATE_LIMIT_BOUNDS, normalizeRateLimitOverrides, normalizeRateLimit
|
|
|
2
2
|
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
3
|
const idPattern = /^[a-z0-9][a-z0-9_-]{0,63}$/u;
|
|
4
4
|
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;
|
|
5
|
+
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
6
|
/** Shared wire grammar for native codec validation and local form feedback. */
|
|
7
7
|
export function isProfileId(value) {
|
|
8
8
|
return typeof value === "string" && idPattern.test(value)
|
|
@@ -90,7 +90,7 @@ function content(value) {
|
|
|
90
90
|
return result;
|
|
91
91
|
}
|
|
92
92
|
function snapshot(value) {
|
|
93
|
-
const item = object(value, ["profiles", "selectedId", "appliedRevision", "selectionRevision"], ["selectionError", "roles", "editorDefaults"]);
|
|
93
|
+
const item = object(value, ["profiles", "selectedId", "appliedRevision", "selectionRevision"], ["selectionError", "roles", "editorDefaults", "origin", "readOnly", "writeRestriction"]);
|
|
94
94
|
if (!Array.isArray(item.profiles) || item.profiles.length > 128)
|
|
95
95
|
fail("profiles");
|
|
96
96
|
return {
|
|
@@ -103,7 +103,7 @@ function snapshot(value) {
|
|
|
103
103
|
selectionRevision: item.selectionRevision === "unavailable" && Object.hasOwn(item, "selectionError") ? "unavailable" : selectionRevision(item.selectionRevision),
|
|
104
104
|
...optional(item, "selectionError", errorInfo),
|
|
105
105
|
...optional(item, "roles", (input) => {
|
|
106
|
-
if (!Array.isArray(input) || input.length >
|
|
106
|
+
if (!Array.isArray(input) || input.length > 22)
|
|
107
107
|
fail("roles");
|
|
108
108
|
const result = input.map((value) => {
|
|
109
109
|
const row = object(value, ["id", "label", "enabled"], ["runtimePolicy"]);
|
|
@@ -117,6 +117,10 @@ function snapshot(value) {
|
|
|
117
117
|
return result;
|
|
118
118
|
}),
|
|
119
119
|
...optional(item, "editorDefaults", runtimePolicy),
|
|
120
|
+
...optional(item, "origin", (input) => { if (!["central", "legacy", "explicit"].includes(String(input)))
|
|
121
|
+
fail("origin"); return input; }),
|
|
122
|
+
...optional(item, "readOnly", (input) => boolean(input, "readOnly")),
|
|
123
|
+
...optional(item, "writeRestriction", (input) => text(input, "writeRestriction", 1024)),
|
|
120
124
|
};
|
|
121
125
|
}
|
|
122
126
|
function rateLimit(value) {
|
|
@@ -152,7 +156,7 @@ function selectionState(value) {
|
|
|
152
156
|
return { selectedId: item.selectedId === null ? null : id(item.selectedId), appliedRevision: item.appliedRevision === null ? null : revision(item.appliedRevision), selectionRevision: selectionRevision(item.selectionRevision) };
|
|
153
157
|
}
|
|
154
158
|
function sessionSnapshot(value) {
|
|
155
|
-
const item = object(value, ["sessionId", "globalDefault", "selection", "scope", "admissionEpoch", "switchAllowed"], ["admittedSelection", "switchUnavailableReason", "rolePolicy", "profileModel", "deepwork"]);
|
|
159
|
+
const item = object(value, ["sessionId", "globalDefault", "selection", "scope", "admissionEpoch", "switchAllowed"], ["admittedSelection", "switchUnavailableReason", "rolePolicy", "profileModel", "deepwork", "modules", "configuration"]);
|
|
156
160
|
if (typeof item.scope !== "string" || !["global-default", "session-override", "deployment-baseline"].includes(item.scope))
|
|
157
161
|
fail("scope");
|
|
158
162
|
return {
|
|
@@ -166,6 +170,8 @@ function sessionSnapshot(value) {
|
|
|
166
170
|
}),
|
|
167
171
|
...optional(item, "rolePolicy", rolePolicy),
|
|
168
172
|
...optional(item, "profileModel", modelRoute),
|
|
173
|
+
...optional(item, "modules", moduleStates),
|
|
174
|
+
...optional(item, "configuration", admissionView),
|
|
169
175
|
...optional(item, "deepwork", (input) => {
|
|
170
176
|
const mode = object(input, ["active", "explicit", "locked", "revision"]);
|
|
171
177
|
return { active: boolean(mode.active, "active"), explicit: boolean(mode.explicit, "explicit"), locked: boolean(mode.locked, "locked"), revision: revision(mode.revision) };
|
|
@@ -200,10 +206,197 @@ function codec(symbol, parse) {
|
|
|
200
206
|
function descriptor(method, result, parameter) {
|
|
201
207
|
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
208
|
}
|
|
209
|
+
function jsonData(value, depth = 0, active = new Set()) {
|
|
210
|
+
if (depth > 32)
|
|
211
|
+
fail("JSON depth");
|
|
212
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
213
|
+
return value;
|
|
214
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
215
|
+
return value;
|
|
216
|
+
if (typeof value !== "object" || value === null || active.has(value))
|
|
217
|
+
fail("JSON value");
|
|
218
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null)
|
|
219
|
+
fail("JSON object");
|
|
220
|
+
active.add(value);
|
|
221
|
+
const result = Array.isArray(value) ? value.map((child) => jsonData(child, depth + 1, active)) : Object.fromEntries(Object.entries(value).map(([key, child]) => {
|
|
222
|
+
if (["__proto__", "prototype", "constructor"].includes(key))
|
|
223
|
+
fail("JSON key");
|
|
224
|
+
return [key, jsonData(child, depth + 1, active)];
|
|
225
|
+
}));
|
|
226
|
+
active.delete(value);
|
|
227
|
+
return result;
|
|
228
|
+
}
|
|
229
|
+
function globalSnapshot(value) {
|
|
230
|
+
const row = object(value, ["config", "revision"]);
|
|
231
|
+
object(row.config, [], Object.keys(row.config));
|
|
232
|
+
return { config: jsonData(row.config), revision: selectionRevision(row.revision) };
|
|
233
|
+
}
|
|
234
|
+
function admissionView(value) {
|
|
235
|
+
const row = object(value, ["settings", "sources", "captures", "restartRequired", "named"]);
|
|
236
|
+
object(row.settings, [], Object.keys(row.settings));
|
|
237
|
+
for (const key of ["sources", "captures"]) {
|
|
238
|
+
const map = object(row[key], [], Object.keys(row[key]));
|
|
239
|
+
for (const [path, value] of Object.entries(map)) {
|
|
240
|
+
if (path.startsWith("lsp.env."))
|
|
241
|
+
fail("private environment field");
|
|
242
|
+
text(value, key, 128);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (!Array.isArray(row.restartRequired) || row.restartRequired.length > 256)
|
|
246
|
+
fail("restartRequired");
|
|
247
|
+
const named = row.named === null ? null : object(row.named, ["id", "revision"]);
|
|
248
|
+
return { settings: readOnlySettingsData(row.settings), sources: jsonData(row.sources),
|
|
249
|
+
captures: jsonData(row.captures), restartRequired: row.restartRequired.map(value => text(value, "field", 256)),
|
|
250
|
+
named: named === null ? null : { id: id(named.id), revision: revision(named.revision) } };
|
|
251
|
+
}
|
|
252
|
+
function readOnlySettingsData(value) {
|
|
253
|
+
const settings = jsonData(value);
|
|
254
|
+
const configured = (value) => { if (value !== "" && value !== "<configured>")
|
|
255
|
+
fail("private configured value"); };
|
|
256
|
+
if (settings.lsp !== undefined) {
|
|
257
|
+
const lsp = object(settings.lsp, ["enabled", "serverName", "command", "args", "cwd", "env", "toolCallTimeoutMs", "failOnStartupError"]);
|
|
258
|
+
configured(lsp.command);
|
|
259
|
+
configured(lsp.cwd);
|
|
260
|
+
if (!Array.isArray(lsp.args) || lsp.args.some(value => value !== "<configured>"))
|
|
261
|
+
fail("private arguments");
|
|
262
|
+
const env = object(lsp.env, [], Object.keys(lsp.env));
|
|
263
|
+
for (const [key, value] of Object.entries(env))
|
|
264
|
+
if (!/^variable-[1-9][0-9]*$/u.test(key) || value !== "<redacted>")
|
|
265
|
+
fail("private environment");
|
|
266
|
+
}
|
|
267
|
+
if (settings.presets !== undefined) {
|
|
268
|
+
const presets = object(settings.presets, ["materialize"], ["root"]);
|
|
269
|
+
if (presets.root !== undefined && presets.root !== "<configured>")
|
|
270
|
+
fail("private directory");
|
|
271
|
+
}
|
|
272
|
+
if (settings.runtimeRecovery !== undefined) {
|
|
273
|
+
const recovery = object(settings.runtimeRecovery, ["enabled", "retryOnStatusCodes", "retryOnCodes", "fallbackRoutes", "maxFallbackAttempts", "idleContinuation"]);
|
|
274
|
+
const idle = object(recovery.idleContinuation, ["enabled", "maxContinuations", "prompt"]);
|
|
275
|
+
configured(idle.prompt);
|
|
276
|
+
}
|
|
277
|
+
return settings;
|
|
278
|
+
}
|
|
279
|
+
function editorSnapshot(value) {
|
|
280
|
+
const row = object(value, ["entryId", "namespace", "hostProfileKey", "global", "globalRevision", "profile", "nativeRevision", "nativeFormRevision", "nativeForm", "desired", "sources", "startup", "defaults", "schema", "nextRoot", "modules"], ["startupSources"]);
|
|
281
|
+
const result = jsonData(row);
|
|
282
|
+
text(row.entryId, "entryId", 256);
|
|
283
|
+
if (row.namespace !== null)
|
|
284
|
+
text(row.namespace, "namespace", 256);
|
|
285
|
+
revision(row.hostProfileKey);
|
|
286
|
+
selectionRevision(row.globalRevision);
|
|
287
|
+
revision(row.nativeRevision);
|
|
288
|
+
if (row.nativeFormRevision !== null)
|
|
289
|
+
integer(row.nativeFormRevision, "nativeFormRevision");
|
|
290
|
+
for (const key of ["global", "profile", "desired", "sources", "startup", "defaults", "schema"])
|
|
291
|
+
object(row[key], [], Object.keys(row[key]));
|
|
292
|
+
if (row.nativeForm !== null)
|
|
293
|
+
object(row.nativeForm, ["base", "user"]);
|
|
294
|
+
if (row.nextRoot !== null)
|
|
295
|
+
result.nextRoot = admissionView(row.nextRoot);
|
|
296
|
+
result.desired = readOnlySettingsData(row.desired);
|
|
297
|
+
result.startup = readOnlySettingsData(row.startup);
|
|
298
|
+
result.schema = schemaNode(row.schema);
|
|
299
|
+
for (const map of [result.sources, result.startupSources]) {
|
|
300
|
+
if (map === undefined)
|
|
301
|
+
continue;
|
|
302
|
+
object(map, [], Object.keys(map));
|
|
303
|
+
for (const [path, value] of Object.entries(map)) {
|
|
304
|
+
if (path.startsWith("lsp.env."))
|
|
305
|
+
fail("private environment field");
|
|
306
|
+
text(value, "source", 128);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
result.modules = moduleStates(row.modules);
|
|
310
|
+
return result;
|
|
311
|
+
}
|
|
312
|
+
function schemaNode(value) {
|
|
313
|
+
const row = object(value, ["type"], ["fields", "inner", "alternatives", "value", "min", "max", "step", "required", "keys", "nonempty"]);
|
|
314
|
+
if (!["object", "dict", "array", "union", "const", "string", "number", "boolean"].includes(String(row.type)))
|
|
315
|
+
fail("schema type");
|
|
316
|
+
const node = { type: String(row.type) };
|
|
317
|
+
if (row.fields !== undefined)
|
|
318
|
+
node.fields = Object.fromEntries(Object.entries(object(row.fields, [], Object.keys(row.fields))).map(([key, child]) => [key, schemaNode(child)]));
|
|
319
|
+
if (row.inner !== undefined)
|
|
320
|
+
node.inner = schemaNode(row.inner);
|
|
321
|
+
if (row.alternatives !== undefined) {
|
|
322
|
+
if (!Array.isArray(row.alternatives))
|
|
323
|
+
fail("schema alternatives");
|
|
324
|
+
node.alternatives = row.alternatives.map(schemaNode);
|
|
325
|
+
}
|
|
326
|
+
if (Object.hasOwn(row, "value")) {
|
|
327
|
+
if (!["string", "number", "boolean"].includes(typeof row.value))
|
|
328
|
+
fail("schema value");
|
|
329
|
+
node.value = row.value;
|
|
330
|
+
}
|
|
331
|
+
for (const key of ["min", "max", "step"])
|
|
332
|
+
if (row[key] !== undefined) {
|
|
333
|
+
if (typeof row[key] !== "number" || !Number.isFinite(row[key]))
|
|
334
|
+
fail("schema bound");
|
|
335
|
+
node[key] = row[key];
|
|
336
|
+
}
|
|
337
|
+
if (row.required !== undefined)
|
|
338
|
+
node.required = boolean(row.required, "schema required");
|
|
339
|
+
if (row.nonempty !== undefined) {
|
|
340
|
+
if (row.type !== "string")
|
|
341
|
+
fail("schema nonempty");
|
|
342
|
+
node.nonempty = boolean(row.nonempty, "schema nonempty");
|
|
343
|
+
}
|
|
344
|
+
if (row.keys !== undefined) {
|
|
345
|
+
if (row.type !== "dict" || !Array.isArray(row.keys) || row.keys.length > 64)
|
|
346
|
+
fail("schema keys");
|
|
347
|
+
node.keys = row.keys.map(key => text(key, "schema key", 128));
|
|
348
|
+
}
|
|
349
|
+
return node;
|
|
350
|
+
}
|
|
351
|
+
function globalSaveRequest(value) {
|
|
352
|
+
const row = object(value, ["expectedRevision", "edits"]);
|
|
353
|
+
if (!Array.isArray(row.edits) || row.edits.length > 128)
|
|
354
|
+
fail("edits");
|
|
355
|
+
return { expectedRevision: selectionRevision(row.expectedRevision), edits: row.edits.map((value) => {
|
|
356
|
+
const edit = object(value, ["op", "path"], ["value"]);
|
|
357
|
+
if (!Array.isArray(edit.path) || edit.path.length < 1 || edit.path.length > 8)
|
|
358
|
+
fail("field path");
|
|
359
|
+
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))
|
|
360
|
+
fail("field"); return key; });
|
|
361
|
+
if (edit.op === "unset" && !Object.hasOwn(edit, "value"))
|
|
362
|
+
return { op: "unset", path };
|
|
363
|
+
if (edit.op !== "set" || !Object.hasOwn(edit, "value"))
|
|
364
|
+
fail("edit");
|
|
365
|
+
return { op: "set", path, value: jsonData(edit.value) };
|
|
366
|
+
}) };
|
|
367
|
+
}
|
|
368
|
+
function configDescriptor(method, parameter) {
|
|
369
|
+
return { id: `@dsmm/dsmm#dsmmConfig/${method}`, service: "dsmmConfig", namespace: "dsmmConfig", method, invocation: { kind: "direct" },
|
|
370
|
+
parameters: parameter === undefined ? [] : [{ name: "request", wire: "request", source: "json", codec: parameter }], result: codec("GlobalConfigSnapshot", globalSnapshot) };
|
|
371
|
+
}
|
|
372
|
+
function moduleStates(value) {
|
|
373
|
+
if (!Array.isArray(value) || value.length !== 1)
|
|
374
|
+
fail("modules");
|
|
375
|
+
return value.map((value) => {
|
|
376
|
+
const row = object(value, ["descriptor", "hostBundleEnabled", "desired", "startupMounted", "admitted", "nextRoot", "reason", "pending"]);
|
|
377
|
+
const descriptor = object(row.descriptor, ["id", "label", "key"]);
|
|
378
|
+
if (descriptor.id !== "deepwork" || descriptor.label !== "Deepwork" || descriptor.key !== "modules.deepwork.enabled" || row.hostBundleEnabled !== "unknown")
|
|
379
|
+
fail("module descriptor");
|
|
380
|
+
const desired = object(row.desired, ["enabled", "source", "capture"]), next = object(row.nextRoot, ["admitted", "reason"]);
|
|
381
|
+
if (!["defaults", "global"].includes(String(desired.source)) || !["current-global", "admission", "startup"].includes(String(desired.capture))
|
|
382
|
+
|| ![null, "global-disabled", "restart-required"].includes(next.reason)
|
|
383
|
+
|| ![null, "global-disabled", "restart-required", "captured-off"].includes(row.reason))
|
|
384
|
+
fail("module state");
|
|
385
|
+
return { descriptor: { id: "deepwork", label: "Deepwork", key: "modules.deepwork.enabled" }, hostBundleEnabled: "unknown",
|
|
386
|
+
desired: { enabled: boolean(desired.enabled, "desired.enabled"), source: desired.source, capture: desired.capture },
|
|
387
|
+
startupMounted: boolean(row.startupMounted, "startupMounted"), admitted: row.admitted === null ? null : boolean(row.admitted, "admitted"),
|
|
388
|
+
nextRoot: { admitted: boolean(next.admitted, "nextRoot.admitted"), reason: next.reason },
|
|
389
|
+
reason: row.reason, pending: boolean(row.pending, "pending") };
|
|
390
|
+
});
|
|
391
|
+
}
|
|
203
392
|
/** Explicit strict Host contract; no SRC fallback or browser-supplied authority. */
|
|
204
393
|
export const TYPERT_REMOTE = {
|
|
205
394
|
package: "@dsmm/dsmm",
|
|
206
395
|
descriptors: [
|
|
396
|
+
configDescriptor("describe"),
|
|
397
|
+
configDescriptor("save", codec("GlobalConfigSaveRequest", globalSaveRequest)),
|
|
398
|
+
{ ...configDescriptor("describeModules"), result: codec("DsmmModuleStateArray", moduleStates) },
|
|
399
|
+
{ ...configDescriptor("describeSettings"), result: codec("DeploymentEditorSnapshot", editorSnapshot) },
|
|
207
400
|
{
|
|
208
401
|
...descriptor("selectMode", codec("SessionProfileSnapshot", sessionSnapshot)),
|
|
209
402
|
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 } 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,29 @@ 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 lifetime;
|
|
43
|
+
constructor(ctx: Context, backend: DsmmDeploymentConfig, startup?: DsmmSettings | undefined, runtime?: (() => DsmmProfileRuntime | undefined) | undefined, startupSources?: Record<string, string> | undefined);
|
|
44
|
+
private captureReadAuthority;
|
|
45
|
+
describeSettings(): Promise<DeploymentEditorSnapshot>;
|
|
46
|
+
describe(): Promise<GlobalConfigSnapshot>;
|
|
47
|
+
describeModules(): Promise<DsmmModuleState[]>;
|
|
48
|
+
save(request: GlobalConfigSaveRequest): Promise<GlobalConfigSnapshot>;
|
|
49
|
+
}
|
|
30
50
|
declare module "@deepseek-ai/cordis" {
|
|
31
51
|
interface Context {
|
|
32
52
|
dsmmProfiles: DsmmProfilesHost;
|
|
53
|
+
dsmmConfig: DsmmConfigHost;
|
|
33
54
|
}
|
|
34
55
|
}
|
|
35
56
|
/** The caller supplies the owned injection fiber; withdrawal stays native. */
|
|
36
|
-
export declare function registerProfilesRpc(ctx: Context, backend: ProfilesBackend): DsmmProfilesHost;
|
|
57
|
+
export declare function registerProfilesRpc(ctx: Context, backend: ProfilesBackend, deployment?: DsmmDeploymentConfig): DsmmProfilesHost;
|
|
58
|
+
/** Core-owned injection; works without any DW or profile business service. */
|
|
59
|
+
export declare function registerConfigRpc(ctx: Context, deployment: DsmmDeploymentConfig, startup: DsmmSettings, runtime?: () => DsmmProfileRuntime | undefined, startupSources?: Record<string, string>): DsmmConfigHost;
|
|
37
60
|
//# sourceMappingURL=profile-rpc.d.ts.map
|
package/lib/profile-rpc.js
CHANGED
|
@@ -37,6 +37,9 @@ import { Remote, RemoteError, TypertRemoteService, remoteErrorOf } from "@deepse
|
|
|
37
37
|
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
38
38
|
import { TYPERT_HOST } from "./profile-remote.js";
|
|
39
39
|
import { DsmmProfileError, profileErrorInfo } from "./profiles.js";
|
|
40
|
+
import { projectDeepworkModule } from "./modules.js";
|
|
41
|
+
import { DEFAULT_DSMM_SETTINGS, deploymentEditorSchema } from "./settings.js";
|
|
42
|
+
import { readOnlySettings, readOnlySettingSources } from "./status.js";
|
|
40
43
|
/** Business service addressed only by native Typert Gateway invocations. */
|
|
41
44
|
let DsmmProfilesHost = (() => {
|
|
42
45
|
let _classSuper = TypertRemoteService;
|
|
@@ -191,10 +194,145 @@ let DsmmProfilesHost = (() => {
|
|
|
191
194
|
};
|
|
192
195
|
})();
|
|
193
196
|
export { DsmmProfilesHost };
|
|
197
|
+
/** A peer is not write authority. Require the public local, writable Host carrier. */
|
|
198
|
+
export function assertLocalSettingsOperator(ctx) {
|
|
199
|
+
const invocation = ctx.invocation;
|
|
200
|
+
const connection = ctx.get("connection");
|
|
201
|
+
const webServer = ctx.get("webServer");
|
|
202
|
+
const settings = ctx.get("settings");
|
|
203
|
+
if (invocation?.peer === undefined || connection?.operator !== invocation.peer
|
|
204
|
+
|| webServer?.host !== "127.0.0.1" || settings?.writable !== true) {
|
|
205
|
+
throw new DsmmProfileError("not-owned", "Global deployment edits require the authenticated operator of a local writable native Host.");
|
|
206
|
+
}
|
|
207
|
+
invocation.signal.throwIfAborted();
|
|
208
|
+
}
|
|
209
|
+
let DsmmConfigHost = (() => {
|
|
210
|
+
let _classSuper = TypertRemoteService;
|
|
211
|
+
let _instanceExtraInitializers = [];
|
|
212
|
+
let _describeSettings_decorators;
|
|
213
|
+
let _describe_decorators;
|
|
214
|
+
let _describeModules_decorators;
|
|
215
|
+
let _save_decorators;
|
|
216
|
+
return class DsmmConfigHost extends _classSuper {
|
|
217
|
+
static {
|
|
218
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
219
|
+
_describeSettings_decorators = [Remote];
|
|
220
|
+
_describe_decorators = [Remote];
|
|
221
|
+
_describeModules_decorators = [Remote];
|
|
222
|
+
_save_decorators = [Remote];
|
|
223
|
+
__esDecorate(this, null, _describeSettings_decorators, { kind: "method", name: "describeSettings", static: false, private: false, access: { has: obj => "describeSettings" in obj, get: obj => obj.describeSettings }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
224
|
+
__esDecorate(this, null, _describe_decorators, { kind: "method", name: "describe", static: false, private: false, access: { has: obj => "describe" in obj, get: obj => obj.describe }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
225
|
+
__esDecorate(this, null, _describeModules_decorators, { kind: "method", name: "describeModules", static: false, private: false, access: { has: obj => "describeModules" in obj, get: obj => obj.describeModules }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
226
|
+
__esDecorate(this, null, _save_decorators, { kind: "method", name: "save", static: false, private: false, access: { has: obj => "save" in obj, get: obj => obj.save }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
227
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
228
|
+
}
|
|
229
|
+
backend = __runInitializers(this, _instanceExtraInitializers);
|
|
230
|
+
startup;
|
|
231
|
+
runtime;
|
|
232
|
+
startupSources;
|
|
233
|
+
lifetime = new AbortController();
|
|
234
|
+
constructor(ctx, backend, startup, runtime, startupSources) {
|
|
235
|
+
super(ctx, "dsmmConfig");
|
|
236
|
+
this.backend = backend;
|
|
237
|
+
this.startup = startup;
|
|
238
|
+
this.runtime = runtime;
|
|
239
|
+
this.startupSources = startupSources;
|
|
240
|
+
ctx.effect(() => () => this.lifetime.abort());
|
|
241
|
+
}
|
|
242
|
+
captureReadAuthority() {
|
|
243
|
+
assertLocalSettingsOperator(this.ctx);
|
|
244
|
+
const connection = this.ctx.get("connection");
|
|
245
|
+
const owner = Reflect.get(connection, symbols.original) ?? connection;
|
|
246
|
+
const lifetime = this.lifetime.signal;
|
|
247
|
+
return () => {
|
|
248
|
+
if (lifetime.aborted)
|
|
249
|
+
throw new DsmmProfileError("disposed", "The deployment editor was disposed; no late read is allowed.");
|
|
250
|
+
assertLocalSettingsOperator(this.ctx);
|
|
251
|
+
const current = this.ctx.get("connection");
|
|
252
|
+
if ((Reflect.get(current, symbols.original) ?? current) !== owner)
|
|
253
|
+
throw new DsmmProfileError("not-owned", "The operator connection changed; refresh before reading.");
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
async describeSettings() {
|
|
257
|
+
try {
|
|
258
|
+
const assertAuthority = this.captureReadAuthority();
|
|
259
|
+
if (this.startup === undefined)
|
|
260
|
+
throw new DsmmProfileError("unavailable", "The startup capture is unavailable.");
|
|
261
|
+
const desired = await this.backend.readDesired();
|
|
262
|
+
assertAuthority();
|
|
263
|
+
const runtime = this.runtime?.() ?? this.ctx.get("dsmmProfileRuntime");
|
|
264
|
+
return { entryId: desired.entryId, namespace: desired.nativeNamespace ?? null, hostProfileKey: desired.hostProfileKey,
|
|
265
|
+
global: desired.global, globalRevision: desired.globalRevision,
|
|
266
|
+
profile: desired.profile, nativeRevision: desired.nativeRevision,
|
|
267
|
+
nativeFormRevision: desired.nativeFormRevision ?? null, nativeForm: desired.nativeForm === undefined ? null : { base: desired.nativeForm.base ?? null, user: desired.nativeForm.user ?? null },
|
|
268
|
+
desired: { ...readOnlySettings(desired.settings) }, sources: readOnlySettingSources(desired.sources),
|
|
269
|
+
startup: { ...readOnlySettings(this.startup) }, defaults: DEFAULT_DSMM_SETTINGS,
|
|
270
|
+
...(this.startupSources === undefined ? {} : { startupSources: readOnlySettingSources(this.startupSources) }),
|
|
271
|
+
schema: deploymentEditorSchema(), nextRoot: runtime?.previewDeployment(desired) ?? null,
|
|
272
|
+
modules: [projectDeepworkModule(this.startup, desired, undefined, true)] };
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
throw new RemoteError("dsmm-profiles/refused", "The Host refused the deployment operation.", profileErrorInfo(error));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
async describe() {
|
|
279
|
+
try {
|
|
280
|
+
const assertAuthority = this.captureReadAuthority();
|
|
281
|
+
const snapshot = await this.backend.readGlobal();
|
|
282
|
+
assertAuthority();
|
|
283
|
+
return snapshot;
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
throw new RemoteError("dsmm-profiles/refused", "The Host refused the deployment operation.", profileErrorInfo(error));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
async describeModules() {
|
|
290
|
+
try {
|
|
291
|
+
const assertAuthority = this.captureReadAuthority();
|
|
292
|
+
if (this.startup === undefined)
|
|
293
|
+
throw new DsmmProfileError("unavailable", "The startup module capture is unavailable.");
|
|
294
|
+
const desired = await this.backend.readDesired();
|
|
295
|
+
assertAuthority();
|
|
296
|
+
return [projectDeepworkModule(this.startup, desired, undefined, true)];
|
|
297
|
+
}
|
|
298
|
+
catch (error) {
|
|
299
|
+
throw new RemoteError("dsmm-profiles/refused", "The Host refused the deployment operation.", profileErrorInfo(error));
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
async save(request) {
|
|
303
|
+
try {
|
|
304
|
+
assertLocalSettingsOperator(this.ctx);
|
|
305
|
+
const connection = this.ctx.get("connection");
|
|
306
|
+
const owner = Reflect.get(connection, symbols.original) ?? connection;
|
|
307
|
+
const assertAuthority = () => {
|
|
308
|
+
if (this.lifetime.signal.aborted)
|
|
309
|
+
throw new DsmmProfileError("disposed", "The deployment editor was disposed; no late write is allowed.");
|
|
310
|
+
assertLocalSettingsOperator(this.ctx);
|
|
311
|
+
const current = this.ctx.get("connection");
|
|
312
|
+
if ((Reflect.get(current, symbols.original) ?? current) !== owner)
|
|
313
|
+
throw new DsmmProfileError("not-owned", "The operator connection changed; refresh before saving.");
|
|
314
|
+
};
|
|
315
|
+
return await this.backend.saveGlobal(request, assertAuthority);
|
|
316
|
+
}
|
|
317
|
+
catch (error) {
|
|
318
|
+
throw new RemoteError("dsmm-profiles/refused", "The Host refused the deployment operation.", profileErrorInfo(error));
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
})();
|
|
323
|
+
export { DsmmConfigHost };
|
|
194
324
|
/** The caller supplies the owned injection fiber; withdrawal stays native. */
|
|
195
|
-
export function registerProfilesRpc(ctx, backend) {
|
|
325
|
+
export function registerProfilesRpc(ctx, backend, deployment) {
|
|
196
326
|
const service = new DsmmProfilesHost(ctx, backend);
|
|
197
327
|
ctx.typert.register(TYPERT_HOST);
|
|
328
|
+
if (deployment !== undefined)
|
|
329
|
+
new DsmmConfigHost(ctx, deployment);
|
|
330
|
+
return service;
|
|
331
|
+
}
|
|
332
|
+
/** Core-owned injection; works without any DW or profile business service. */
|
|
333
|
+
export function registerConfigRpc(ctx, deployment, startup, runtime, startupSources) {
|
|
334
|
+
const service = new DsmmConfigHost(ctx, deployment, startup, runtime, startupSources);
|
|
335
|
+
ctx.typert.register(TYPERT_HOST);
|
|
198
336
|
return service;
|
|
199
337
|
}
|
|
200
338
|
//# sourceMappingURL=profile-rpc.js.map
|