@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
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { PermissionRefusal, permissionOriginal } from "./permission-control.js";
|
|
2
|
+
import { applyPermissionRulesSave, importPermissionRules, operatorPermissionRulesSource, parsePermissionRules, parsePermissionRulesSave, PermissionRulesRuntimeSync } from "./permission-rules.js";
|
|
3
|
+
import { copyJson, validateSparseConfig } from "./settings.js";
|
|
4
|
+
import { parseHostNativeCommands } from "./permission-native-command.js";
|
|
5
|
+
const entries = new WeakMap();
|
|
6
|
+
const claimed = new WeakSet();
|
|
7
|
+
const homes = new Map();
|
|
8
|
+
function imported(config, label, global) {
|
|
9
|
+
if (config.permissionControl?.rules === undefined)
|
|
10
|
+
return config;
|
|
11
|
+
const rules = parsePermissionRules(config.permissionControl.rules).map(rule => ({
|
|
12
|
+
...importPermissionRules([{ id: rule.id, action: rule.action, match: rule.match }], label, rule.revision)[0], revoked: rule.revoked
|
|
13
|
+
}));
|
|
14
|
+
return validateSparseConfig({ ...config, permissionControl: { ...config.permissionControl, rules } }, global);
|
|
15
|
+
}
|
|
16
|
+
/** Source checks complement in-process generation revocation; a serialized token is never authority. */
|
|
17
|
+
class SourceBoundRulesRuntime extends PermissionRulesRuntimeSync {
|
|
18
|
+
source;
|
|
19
|
+
refreshSource;
|
|
20
|
+
projection;
|
|
21
|
+
constructor(initial, revoke, source, refreshSource) {
|
|
22
|
+
super(initial, revoke);
|
|
23
|
+
this.source = source;
|
|
24
|
+
this.refreshSource = refreshSource;
|
|
25
|
+
}
|
|
26
|
+
async refresh() { await this.refreshSource(); return this.getPolicy(); }
|
|
27
|
+
status() {
|
|
28
|
+
const current = super.status();
|
|
29
|
+
let source;
|
|
30
|
+
try {
|
|
31
|
+
source = this.source();
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
if (current.state === "synced")
|
|
35
|
+
this.invalidate();
|
|
36
|
+
return Object.freeze({ ...super.status(), state: "unsynced" });
|
|
37
|
+
}
|
|
38
|
+
if (current.state === "synced" && current.savedRevision !== source.revision)
|
|
39
|
+
this.invalidate();
|
|
40
|
+
return Object.freeze({ ...super.status(), savedRevision: source.revision, restartRequired: source.policy.enabled !== current.mounted });
|
|
41
|
+
}
|
|
42
|
+
getPolicy() {
|
|
43
|
+
const policy = super.getPolicy();
|
|
44
|
+
try {
|
|
45
|
+
if (this.source().revision !== policy.revision)
|
|
46
|
+
throw new PermissionRefusal("stale");
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
this.invalidate();
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
if (this.projection?.snapshot !== policy)
|
|
53
|
+
this.projection = { snapshot: policy,
|
|
54
|
+
value: Object.freeze({ revision: policy.revision, policy: Object.freeze({ ...policy.policy, enabled: super.status().mounted }) }) };
|
|
55
|
+
return this.projection.value;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Canonical Rules RPC writes the global layer; native overrides remain independently owned. */
|
|
59
|
+
export class DeploymentPermissionRules {
|
|
60
|
+
ctx;
|
|
61
|
+
options;
|
|
62
|
+
runtime;
|
|
63
|
+
initial;
|
|
64
|
+
lifetime = new AbortController();
|
|
65
|
+
operatorWrites = new WeakMap();
|
|
66
|
+
nativeFiber;
|
|
67
|
+
registry;
|
|
68
|
+
busy = false;
|
|
69
|
+
refreshing;
|
|
70
|
+
constructor(ctx, options) {
|
|
71
|
+
this.ctx = ctx;
|
|
72
|
+
this.options = options;
|
|
73
|
+
this.nativeFiber = options.deployment.nativeEntry?.fiber;
|
|
74
|
+
this.registry = permissionOriginal(ctx.agents);
|
|
75
|
+
this.initial = this.snapshot();
|
|
76
|
+
this.runtime = new SourceBoundRulesRuntime(this.initial, options.revoke, () => this.snapshot(), () => this.refresh());
|
|
77
|
+
const deployment = options.deployment, entry = deployment.nativeEntry;
|
|
78
|
+
if (entry !== undefined) {
|
|
79
|
+
if (entry.fiber?.ctx.root !== ctx.root)
|
|
80
|
+
throw new PermissionRefusal("not-owned");
|
|
81
|
+
if (entries.has(entry))
|
|
82
|
+
throw new PermissionRefusal("unavailable");
|
|
83
|
+
}
|
|
84
|
+
const homeKey = process.platform === "win32" ? deployment.home.toLowerCase() : deployment.home;
|
|
85
|
+
const family = homes.get(homeKey) ?? new Set();
|
|
86
|
+
if ([...family].some(owner => owner.busy || owner.runtime.status().state === "updating"))
|
|
87
|
+
throw new PermissionRefusal("unavailable");
|
|
88
|
+
const remove = deployment.coordinateWrites({ global: async (request, config, assertAuthority, write) => {
|
|
89
|
+
const operator = this.operatorWrites.get(request);
|
|
90
|
+
const rulesInput = request.edits.some(edit => edit.path[0] === "permissionControl" && (edit.path.length === 1 || edit.path[1] === "rules"));
|
|
91
|
+
const candidate = operator !== undefined || !rulesInput ? config : imported(config, "global-settings", true);
|
|
92
|
+
return this.transaction([...family], async () => { assertAuthority(); return write(candidate); });
|
|
93
|
+
} });
|
|
94
|
+
if (entry !== undefined) {
|
|
95
|
+
entries.set(entry, this);
|
|
96
|
+
claimed.add(entry);
|
|
97
|
+
}
|
|
98
|
+
family.add(this);
|
|
99
|
+
homes.set(homeKey, family);
|
|
100
|
+
ctx.effect(() => () => {
|
|
101
|
+
this.lifetime.abort();
|
|
102
|
+
remove();
|
|
103
|
+
family.delete(this);
|
|
104
|
+
if (family.size === 0)
|
|
105
|
+
homes.delete(homeKey);
|
|
106
|
+
if (entry !== undefined)
|
|
107
|
+
entries.delete(entry);
|
|
108
|
+
this.runtime.retire();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
snapshot() {
|
|
112
|
+
this.lifetime.signal.throwIfAborted();
|
|
113
|
+
if (this.options.deployment.nativeEntry?.fiber !== this.nativeFiber)
|
|
114
|
+
throw new PermissionRefusal("unavailable");
|
|
115
|
+
const source = this.options.deployment.permissionSource();
|
|
116
|
+
return Object.freeze({ revision: source.revision, policy: source.policy });
|
|
117
|
+
}
|
|
118
|
+
assertWritable(root) {
|
|
119
|
+
this.lifetime.signal.throwIfAborted();
|
|
120
|
+
const registry = this.ctx.agents;
|
|
121
|
+
if (permissionOriginal(registry) !== this.registry || registry.get(root.id) !== root || root.session.id !== root.id || root.session.header.origin === "subagent"
|
|
122
|
+
|| !registry.roots().includes(root) || registry.list().some(owner => owner !== root && registry.isOwnedBy(root.id, owner)))
|
|
123
|
+
throw new PermissionRefusal("not-owned");
|
|
124
|
+
this.options.assertWritable(root);
|
|
125
|
+
}
|
|
126
|
+
check(authority) {
|
|
127
|
+
authority.signal.throwIfAborted();
|
|
128
|
+
authority.assertCurrent();
|
|
129
|
+
this.assertWritable(authority.root);
|
|
130
|
+
}
|
|
131
|
+
async read(authority) {
|
|
132
|
+
this.check(authority);
|
|
133
|
+
await this.refresh();
|
|
134
|
+
this.check(authority);
|
|
135
|
+
const snapshot = this.snapshot();
|
|
136
|
+
if (this.runtime.status().state === "synced" && this.runtime.status().savedRevision !== snapshot.revision)
|
|
137
|
+
this.runtime.invalidate();
|
|
138
|
+
this.check(authority);
|
|
139
|
+
return snapshot;
|
|
140
|
+
}
|
|
141
|
+
async save(request, authority) {
|
|
142
|
+
this.check(authority);
|
|
143
|
+
request = parsePermissionRulesSave(request);
|
|
144
|
+
const source = this.options.deployment.permissionSource();
|
|
145
|
+
if (request.expectedRevision !== source.revision)
|
|
146
|
+
throw new PermissionRefusal("stale");
|
|
147
|
+
if (Object.keys(source.profile.permissionControl ?? {}).some(key => key !== "enabled")) {
|
|
148
|
+
const error = new PermissionRefusal("unavailable");
|
|
149
|
+
error.message = "Native profile overrides the global permission policy; edit or unset that native override first.";
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
const proposed = applyPermissionRulesSave({ revision: source.revision, policy: source.policy }, request, operatorPermissionRulesSource(authority));
|
|
153
|
+
const edits = Object.entries(request.changes ?? {}).map(([key, value]) => ({ op: "set", path: ["permissionControl", key], value }));
|
|
154
|
+
if (request.upsert !== undefined || request.revoke !== undefined)
|
|
155
|
+
edits.push({ op: "set", path: ["permissionControl", "rules"], value: proposed.rules });
|
|
156
|
+
const write = { expectedRevision: source.globalRevision, edits };
|
|
157
|
+
this.operatorWrites.set(write, authority);
|
|
158
|
+
try {
|
|
159
|
+
await this.options.deployment.saveGlobal(write, () => {
|
|
160
|
+
this.check(authority);
|
|
161
|
+
const current = this.options.deployment.permissionSource();
|
|
162
|
+
if (current.revision !== source.revision)
|
|
163
|
+
throw new PermissionRefusal("stale");
|
|
164
|
+
});
|
|
165
|
+
this.check(authority);
|
|
166
|
+
return { snapshot: this.snapshot(), runtime: this.runtime.status() };
|
|
167
|
+
}
|
|
168
|
+
finally {
|
|
169
|
+
this.operatorWrites.delete(write);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
notify = async (snapshot) => {
|
|
173
|
+
this.lifetime.signal.throwIfAborted();
|
|
174
|
+
await this.options.notify(snapshot);
|
|
175
|
+
this.lifetime.signal.throwIfAborted();
|
|
176
|
+
if (this.snapshot().revision !== snapshot.revision)
|
|
177
|
+
throw new PermissionRefusal("stale");
|
|
178
|
+
};
|
|
179
|
+
/** Host recovery re-reads storage and never revives a former signal or grant. */
|
|
180
|
+
async reconcile() {
|
|
181
|
+
if (this.busy)
|
|
182
|
+
throw new PermissionRefusal("stale");
|
|
183
|
+
if (this.runtime.status().state === "synced")
|
|
184
|
+
this.runtime.invalidate();
|
|
185
|
+
await this.runtime.recover(undefined, this.snapshot(), this.notify);
|
|
186
|
+
}
|
|
187
|
+
/** Next actual consumption observes disk/native edits without requiring a UI save. */
|
|
188
|
+
async refresh() {
|
|
189
|
+
this.lifetime.signal.throwIfAborted();
|
|
190
|
+
if (this.refreshing !== undefined)
|
|
191
|
+
return this.refreshing;
|
|
192
|
+
if (this.runtime.status().state === "synced")
|
|
193
|
+
return;
|
|
194
|
+
if (this.busy)
|
|
195
|
+
throw new PermissionRefusal("unavailable");
|
|
196
|
+
const refreshing = this.reconcile();
|
|
197
|
+
this.refreshing = refreshing;
|
|
198
|
+
try {
|
|
199
|
+
await refreshing;
|
|
200
|
+
this.lifetime.signal.throwIfAborted();
|
|
201
|
+
}
|
|
202
|
+
finally {
|
|
203
|
+
if (this.refreshing === refreshing)
|
|
204
|
+
this.refreshing = undefined;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
async synchronize(updates, recovery) {
|
|
208
|
+
let rows;
|
|
209
|
+
try {
|
|
210
|
+
rows = [...updates].map(([owner, update]) => ({ owner, update, snapshot: owner.snapshot() }));
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
for (const owner of updates.keys())
|
|
214
|
+
owner.runtime.invalidate();
|
|
215
|
+
throw error;
|
|
216
|
+
}
|
|
217
|
+
const acknowledged = Promise.all(rows.map(row => row.owner.notify(row.snapshot))).then(() => {
|
|
218
|
+
for (const row of rows)
|
|
219
|
+
if (row.owner.snapshot().revision !== row.snapshot.revision)
|
|
220
|
+
throw new PermissionRefusal("stale");
|
|
221
|
+
});
|
|
222
|
+
const settled = await Promise.allSettled([acknowledged, ...rows.map(({ owner, update, snapshot }) => recovery
|
|
223
|
+
? owner.runtime.recover(update, snapshot, () => acknowledged) : owner.runtime.commit(update, snapshot, () => acknowledged))]);
|
|
224
|
+
const failures = [...new Set(settled.flatMap(result => result.status === "rejected" ? [result.reason] : []))];
|
|
225
|
+
if (failures.length)
|
|
226
|
+
throw new AggregateError(failures, "Permission configuration is not synchronized.");
|
|
227
|
+
}
|
|
228
|
+
async transaction(participants, write) {
|
|
229
|
+
for (const participant of participants) {
|
|
230
|
+
if (participant.busy)
|
|
231
|
+
throw new PermissionRefusal("stale");
|
|
232
|
+
if (participant.runtime.status().state !== "synced" || participant.runtime.status().savedRevision !== participant.snapshot().revision)
|
|
233
|
+
await participant.reconcile();
|
|
234
|
+
}
|
|
235
|
+
const updates = new Map();
|
|
236
|
+
const locked = new Set();
|
|
237
|
+
try {
|
|
238
|
+
let result;
|
|
239
|
+
try {
|
|
240
|
+
for (const participant of participants) {
|
|
241
|
+
if (participant.busy)
|
|
242
|
+
throw new PermissionRefusal("stale");
|
|
243
|
+
participant.busy = true;
|
|
244
|
+
locked.add(participant);
|
|
245
|
+
updates.set(participant, participant.runtime.begin(participant.snapshot().revision));
|
|
246
|
+
}
|
|
247
|
+
result = await write();
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
try {
|
|
251
|
+
await this.synchronize(updates, true);
|
|
252
|
+
}
|
|
253
|
+
catch (recovery) {
|
|
254
|
+
throw new AggregateError([error, recovery], "Permission write and authoritative recovery failed.");
|
|
255
|
+
}
|
|
256
|
+
throw error;
|
|
257
|
+
}
|
|
258
|
+
await this.synchronize(updates, false);
|
|
259
|
+
return result;
|
|
260
|
+
}
|
|
261
|
+
finally {
|
|
262
|
+
for (const participant of locked)
|
|
263
|
+
participant.busy = false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async editNative(editor, entry, change) {
|
|
267
|
+
await this.transaction([this], () => editor.edit(entry, (current, inherited) => {
|
|
268
|
+
const next = validateSparseConfig(change(current, inherited));
|
|
269
|
+
if (next.permissionControl?.nativeCommands !== undefined)
|
|
270
|
+
parseHostNativeCommands(next.permissionControl.nativeCommands);
|
|
271
|
+
if (JSON.stringify(next.permissionControl?.rules) === JSON.stringify(current.permissionControl && typeof current.permissionControl === "object" ? Reflect.get(current.permissionControl, "rules") : undefined))
|
|
272
|
+
return copyJson(next);
|
|
273
|
+
return copyJson(imported(next, "native-profile-settings", false));
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/** Install in the owned Core fiber with the public `agents` service injected. */
|
|
278
|
+
export function installDeploymentPermissionRules(ctx, options) {
|
|
279
|
+
return new DeploymentPermissionRules(ctx, options);
|
|
280
|
+
}
|
|
281
|
+
/** Scoped to the ordinary SettingsForms owner; never replaces a global instance or registry. */
|
|
282
|
+
export function permissionConfigEditorFacade(editor) {
|
|
283
|
+
const methods = new Map();
|
|
284
|
+
return new Proxy(editor, { get(target, key) {
|
|
285
|
+
if (key !== "edit") {
|
|
286
|
+
const value = Reflect.get(target, key, target);
|
|
287
|
+
if (typeof value !== "function")
|
|
288
|
+
return value;
|
|
289
|
+
const previous = methods.get(key);
|
|
290
|
+
if (previous?.original === value)
|
|
291
|
+
return previous.bound;
|
|
292
|
+
const bound = value.bind(target);
|
|
293
|
+
methods.set(key, { original: value, bound });
|
|
294
|
+
return bound;
|
|
295
|
+
}
|
|
296
|
+
return (entry, change) => {
|
|
297
|
+
const backend = entries.get(entry);
|
|
298
|
+
if (backend !== undefined)
|
|
299
|
+
return backend.editNative(target, entry, change);
|
|
300
|
+
if (claimed.has(entry))
|
|
301
|
+
return Promise.reject(new PermissionRefusal("unavailable"));
|
|
302
|
+
return target.edit(entry, change);
|
|
303
|
+
};
|
|
304
|
+
} });
|
|
305
|
+
}
|
|
306
|
+
//# sourceMappingURL=deployment-permission-rules.js.map
|
package/lib/dsh-home.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
const require = createRequire(import.meta.url);
|
|
3
|
+
// filesystem declares this public peer; incidental preset-registry resolution is not a contract.
|
|
4
|
+
const sdk = createRequire(require.resolve("@deepseek-ai/dsh-skill-filesystem"));
|
|
5
|
+
const home = sdk("@deepseek-ai/dsh-home-paths");
|
|
6
|
+
if (typeof home.resolveDshHome !== "function")
|
|
7
|
+
throw new Error("Deepwork requires the public rc.2 DSH home resolver");
|
|
8
|
+
/** Trusted host/fixture input only, never a model or RPC root argument. */
|
|
9
|
+
export const resolveDshHome = home.resolveDshHome;
|
|
10
|
+
//# sourceMappingURL=dsh-home.js.map
|
package/lib/dsh-types.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
get(): T;
|
|
3
|
-
watch?(callback: (next: T, prev: T) => void | Promise<void>): () => void;
|
|
4
|
-
}
|
|
5
|
-
export interface DshSettingsRegistry {
|
|
6
|
-
register<T>(namespace: string, schema: unknown, options: {
|
|
7
|
-
base: Partial<T>;
|
|
8
|
-
applies?: "live" | "restart";
|
|
9
|
-
}): SettingsScope<T>;
|
|
10
|
-
}
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
11
2
|
export interface DshSessionEvent {
|
|
12
3
|
type: string;
|
|
13
4
|
data?: unknown;
|
|
@@ -16,6 +7,8 @@ export interface DshSessionHeader {
|
|
|
16
7
|
cwd?: string;
|
|
17
8
|
agentPreset?: string;
|
|
18
9
|
origin?: string;
|
|
10
|
+
parentSession?: string;
|
|
11
|
+
delegationDepth?: number;
|
|
19
12
|
}
|
|
20
13
|
export interface DshSession {
|
|
21
14
|
readonly id?: string;
|
|
@@ -55,15 +48,14 @@ export interface DshAgentCreatedFrame {
|
|
|
55
48
|
source: "startup" | "resume" | "clear" | "compact";
|
|
56
49
|
signal?: AbortSignal;
|
|
57
50
|
}
|
|
58
|
-
export
|
|
51
|
+
export type DshLlmCallConfig = {
|
|
59
52
|
provider: string;
|
|
60
53
|
model: string;
|
|
61
54
|
reasoningEffort?: string;
|
|
62
55
|
temperature?: number;
|
|
63
56
|
maxTokens?: number;
|
|
64
|
-
stop?:
|
|
65
|
-
|
|
66
|
-
}
|
|
57
|
+
stop?: string[];
|
|
58
|
+
};
|
|
67
59
|
export interface DshLlmFailure {
|
|
68
60
|
readonly message: string;
|
|
69
61
|
readonly code: string;
|
|
@@ -73,28 +65,27 @@ export interface DshLlmFailure {
|
|
|
73
65
|
}
|
|
74
66
|
export interface DshEpochHeader {
|
|
75
67
|
config: DshLlmCallConfig;
|
|
76
|
-
[key: string]: unknown;
|
|
77
68
|
}
|
|
78
69
|
export interface DshReasoningEffortInfo {
|
|
79
70
|
id: string;
|
|
80
71
|
name: string;
|
|
81
|
-
[key: string]: unknown;
|
|
82
72
|
}
|
|
83
73
|
export interface DshModelReasoningInfo {
|
|
84
74
|
efforts: readonly DshReasoningEffortInfo[];
|
|
85
75
|
defaultEffort?: string;
|
|
86
|
-
[key: string]: unknown;
|
|
87
76
|
}
|
|
88
77
|
export interface DshResolvedModelInfo {
|
|
89
78
|
provider: string;
|
|
90
79
|
id: string;
|
|
91
80
|
name: string;
|
|
92
81
|
reasoning?: DshModelReasoningInfo;
|
|
93
|
-
[key: string]: unknown;
|
|
94
82
|
}
|
|
95
83
|
export interface DshLlmRuntime {
|
|
96
84
|
resolveModelInfo(provider: string, model: string, signal?: AbortSignal): Promise<DshResolvedModelInfo>;
|
|
97
85
|
resolveCallConfig?(config: DshLlmCallConfig, signal?: AbortSignal): Promise<DshLlmCallConfig>;
|
|
86
|
+
listProviders?(): readonly {
|
|
87
|
+
id: string;
|
|
88
|
+
}[];
|
|
98
89
|
}
|
|
99
90
|
export interface AgentRequestFrame {
|
|
100
91
|
agent: DshAgent;
|
|
@@ -163,28 +154,13 @@ export type DshGoalChangeEventData = {
|
|
|
163
154
|
};
|
|
164
155
|
clearedAt: number;
|
|
165
156
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
export interface DshSystemPromptSection {
|
|
171
|
-
name: string;
|
|
172
|
-
order: number;
|
|
173
|
-
interpolate?: boolean;
|
|
157
|
+
type NativePromptRegistry = Context["systemPrompt"];
|
|
158
|
+
export type DshSystemPromptContext = Pick<NonNullable<Parameters<NativePromptRegistry["assemble"]>[0]>, "scope" | "signal">;
|
|
159
|
+
export type DshSystemPromptSection = Omit<Parameters<NativePromptRegistry["section"]>[0], "text"> & {
|
|
174
160
|
text(context: DshSystemPromptContext): string;
|
|
175
|
-
}
|
|
161
|
+
};
|
|
176
162
|
export interface DshSystemPromptRegistry {
|
|
177
|
-
section(section: DshSystemPromptSection):
|
|
178
|
-
}
|
|
179
|
-
export interface DshPromptAssembly {
|
|
180
|
-
sections: Array<{
|
|
181
|
-
name: string;
|
|
182
|
-
text: string;
|
|
183
|
-
interpolate?: boolean;
|
|
184
|
-
}>;
|
|
185
|
-
contexts: unknown[];
|
|
186
|
-
tools: unknown[];
|
|
187
|
-
variables: Record<string, string | undefined>;
|
|
163
|
+
section(section: DshSystemPromptSection): ReturnType<NativePromptRegistry["section"]>;
|
|
188
164
|
}
|
|
189
165
|
export interface DshCommandInvocation {
|
|
190
166
|
agent: DshAgent;
|
|
@@ -207,27 +183,11 @@ export interface DshCommandsRegistry {
|
|
|
207
183
|
handler(invocation: DshCommandInvocation): DshCommandResult | Promise<DshCommandResult>;
|
|
208
184
|
}): unknown;
|
|
209
185
|
}
|
|
210
|
-
export
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
provider?: string;
|
|
216
|
-
resourceBase?: {
|
|
217
|
-
kind: "directory";
|
|
218
|
-
path: string;
|
|
219
|
-
} | {
|
|
220
|
-
kind: "opaque";
|
|
221
|
-
description: string;
|
|
222
|
-
};
|
|
223
|
-
invocation?: {
|
|
224
|
-
modelInvocable: boolean;
|
|
225
|
-
userInvocable: boolean;
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
export interface DshSkillRegistry {
|
|
229
|
-
register(skill: DshSkillRegistration): unknown;
|
|
230
|
-
}
|
|
186
|
+
export type DshSkillRegistry = Pick<Context["skills"], "registerProvider" | "snapshot" | "list" | "get">;
|
|
187
|
+
export type DshSkillRegistration = NonNullable<Awaited<ReturnType<DshSkillRegistry["get"]>>>;
|
|
188
|
+
export type DshSkillProvider = ReturnType<Parameters<DshSkillRegistry["registerProvider"]>[0]>;
|
|
189
|
+
export type DshSkillCandidate = Parameters<DshSkillProvider["get"]>[0];
|
|
190
|
+
export type DshSkillLookupOptions = Parameters<DshSkillProvider["list"]>[0];
|
|
231
191
|
export interface DshContentBlock {
|
|
232
192
|
type: string;
|
|
233
193
|
text?: string;
|
|
@@ -280,14 +240,6 @@ export interface DshToolRuntime {
|
|
|
280
240
|
get?(name: string): unknown;
|
|
281
241
|
}
|
|
282
242
|
export type DshEventListener = (...args: any[]) => any;
|
|
283
|
-
export interface DshInjectedServices {
|
|
284
|
-
settings?: DshSettingsRegistry;
|
|
285
|
-
skills?: DshSkillRegistry;
|
|
286
|
-
commands?: DshCommandsRegistry;
|
|
287
|
-
tools?: DshToolRuntime;
|
|
288
|
-
llm?: DshLlmRuntime;
|
|
289
|
-
[key: string]: unknown;
|
|
290
|
-
}
|
|
291
243
|
export interface PreStepFrame {
|
|
292
244
|
agent: DshAgent;
|
|
293
245
|
signal: AbortSignal;
|
|
@@ -300,17 +252,17 @@ export interface PreStepDecision {
|
|
|
300
252
|
export interface DshContext {
|
|
301
253
|
agents?: DshAgentsRegistry;
|
|
302
254
|
subagents?: import("./role-providers.js").DsmmSubagentRegistry;
|
|
303
|
-
settings?: DshSettingsRegistry;
|
|
304
255
|
systemPrompt?: DshSystemPromptRegistry;
|
|
305
256
|
skills?: DshSkillRegistry;
|
|
306
257
|
commands?: DshCommandsRegistry;
|
|
307
258
|
tools?: DshToolRuntime;
|
|
308
259
|
llm?: DshLlmRuntime;
|
|
260
|
+
dsmmRuntimeIntegration?: import("./runtime-integration.js").DsmmHostRuntimeIntegration;
|
|
309
261
|
get?<T = unknown>(name: string): T | undefined;
|
|
310
262
|
provide?(name: string, service: unknown): unknown;
|
|
311
263
|
plugin?(plugin: unknown, config?: unknown): PromiseLike<unknown>;
|
|
312
264
|
inject?(dependencies: string[], installer: (readyCtx: DshContext) => unknown): unknown;
|
|
313
|
-
effect?(callback: () =>
|
|
265
|
+
effect?(callback: () => () => void): unknown;
|
|
314
266
|
on?(event: "agent/request", listener: (frame: AgentRequestFrame, next: () => Promise<DshLlmCallConfig>) => Promise<DshLlmCallConfig>, options?: boolean | {
|
|
315
267
|
prepend?: boolean;
|
|
316
268
|
global?: boolean;
|
|
@@ -329,4 +281,5 @@ export interface DshContext {
|
|
|
329
281
|
warn(message: string, ...args: unknown[]): void;
|
|
330
282
|
};
|
|
331
283
|
}
|
|
284
|
+
export {};
|
|
332
285
|
//# sourceMappingURL=dsh-types.d.ts.map
|
package/lib/guards.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DshContext, DshPostToolDecision, DshPreToolDecision, DshToolExecution, DshToolExecutionResult } from "./dsh-types.js";
|
|
2
2
|
import type { DsmmSettings, DsmmSettingsGetter } from "./settings.js";
|
|
3
3
|
import type { DeepworkModeController } from "./state.js";
|
|
4
|
+
import type { DsmmRolePolicy } from "./role-policy.js";
|
|
4
5
|
export declare const DSMM_GUARD_PREFIX = "[dsmm safety]";
|
|
5
6
|
export declare function truncateTextMiddle(text: string, maxBytes: number, toolName: string): string;
|
|
6
7
|
export declare function isSafetyScopeActive(exec: DshToolExecution, settings: DsmmSettings, controller: DeepworkModeController): boolean;
|
|
7
|
-
export declare function decidePreToolExecution(exec: DshToolExecution, settings: DsmmSettings, controller: DeepworkModeController): DshPreToolDecision | undefined;
|
|
8
|
+
export declare function decidePreToolExecution(exec: DshToolExecution, settings: DsmmSettings, controller: DeepworkModeController, nativeFullAccess?: boolean): DshPreToolDecision | undefined;
|
|
8
9
|
export declare function decidePostToolExecution(exec: DshToolExecution, result: Readonly<DshToolExecutionResult>, decision: DshPostToolDecision, settings: DsmmSettings, controller: DeepworkModeController): DshPostToolDecision;
|
|
9
|
-
export declare function registerSafetyGuards(ctx: DshContext, controller: DeepworkModeController, getSettings: DsmmSettingsGetter): void;
|
|
10
|
+
export declare function registerSafetyGuards(ctx: DshContext, controller: DeepworkModeController, getSettings: DsmmSettingsGetter, rolePolicy?: DsmmRolePolicy): void;
|
|
10
11
|
//# sourceMappingURL=guards.d.ts.map
|
package/lib/guards.js
CHANGED
|
@@ -2,6 +2,10 @@ import { isDsmmRoleId } from "./roles.js";
|
|
|
2
2
|
import { resolveSelectedAgentPreset } from "./session-scope.js";
|
|
3
3
|
import { validatePlanMutation } from "./plan-validation.js";
|
|
4
4
|
import { classifyKnownGitWrite, classifyShellDialectViolation } from "./shell-command.js";
|
|
5
|
+
import { resolveAdmittedDsmmRole } from "./role-policy.js";
|
|
6
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
7
|
+
import { nativeStandingFullAccess } from "./permission-native-access.js";
|
|
8
|
+
import { DsmmProfileError } from "./profiles.js";
|
|
5
9
|
export const DSMM_GUARD_PREFIX = "[dsmm safety]";
|
|
6
10
|
const STRUCTURED_TODO_PATTERN = /^\[[^\]]+\]\s+\[[^\]]+\]\s+to\s+.+\s+-\s+expect\s+.+/u;
|
|
7
11
|
function asRecord(value) {
|
|
@@ -78,6 +82,10 @@ export function isSafetyScopeActive(exec, settings, controller) {
|
|
|
78
82
|
return false;
|
|
79
83
|
if (settings.guards.scope === "always")
|
|
80
84
|
return true;
|
|
85
|
+
if (!settings.modules.deepwork.enabled)
|
|
86
|
+
return false;
|
|
87
|
+
if (exec.agent !== undefined && resolveAdmittedDsmmRole(exec.agent, settings, false) !== undefined)
|
|
88
|
+
return true;
|
|
81
89
|
if (controller.active(exec.agent, settings.defaultActive))
|
|
82
90
|
return true;
|
|
83
91
|
return isDsmmRoleId(resolveSelectedAgentPreset(exec.agent?.session));
|
|
@@ -193,9 +201,11 @@ function todoDisciplineDecision(exec, settings) {
|
|
|
193
201
|
reason: `${DSMM_GUARD_PREFIX} todo content must use "[WHERE] [HOW] to [WHY] - expect [RESULT]": ${malformed.content}`
|
|
194
202
|
};
|
|
195
203
|
}
|
|
196
|
-
export function decidePreToolExecution(exec, settings, controller) {
|
|
204
|
+
export function decidePreToolExecution(exec, settings, controller, nativeFullAccess = false) {
|
|
197
205
|
if (!isSafetyScopeActive(exec, settings, controller))
|
|
198
206
|
return undefined;
|
|
207
|
+
if (nativeFullAccess)
|
|
208
|
+
return settings.guards.gitWriteGuard === "deny" ? gitWriteDecision(exec, settings) : undefined;
|
|
199
209
|
if (settings.guards.shellCommandSafety) {
|
|
200
210
|
const shell = shellSafetyDecision(exec);
|
|
201
211
|
if (shell !== undefined)
|
|
@@ -204,6 +214,8 @@ export function decidePreToolExecution(exec, settings, controller) {
|
|
|
204
214
|
const git = gitWriteDecision(exec, settings);
|
|
205
215
|
if (git !== undefined)
|
|
206
216
|
return git;
|
|
217
|
+
if (!settings.modules.deepwork.enabled)
|
|
218
|
+
return undefined;
|
|
207
219
|
if (settings.guards.planFormatValidation) {
|
|
208
220
|
const plan = validatePlanMutation(exec);
|
|
209
221
|
if (plan !== undefined)
|
|
@@ -221,7 +233,7 @@ export function decidePreToolExecution(exec, settings, controller) {
|
|
|
221
233
|
}
|
|
222
234
|
export function decidePostToolExecution(exec, result, decision, settings, controller) {
|
|
223
235
|
const truncation = settings.guards.toolOutputTruncation;
|
|
224
|
-
if (!truncation.enabled || !isSafetyScopeActive(exec, settings, controller))
|
|
236
|
+
if (!settings.modules.deepwork.enabled || !truncation.enabled || !isSafetyScopeActive(exec, settings, controller))
|
|
225
237
|
return decision;
|
|
226
238
|
if (result.isError || decision.kind !== "accept" || "value" in decision)
|
|
227
239
|
return decision;
|
|
@@ -234,9 +246,32 @@ export function decidePostToolExecution(exec, result, decision, settings, contro
|
|
|
234
246
|
content: [{ type: "text", text: truncateTextMiddle(text, truncation.maxInlineBytes, exec.name) }]
|
|
235
247
|
};
|
|
236
248
|
}
|
|
237
|
-
export function registerSafetyGuards(ctx, controller, getSettings) {
|
|
249
|
+
export function registerSafetyGuards(ctx, controller, getSettings, rolePolicy) {
|
|
250
|
+
const truncationLimits = new WeakMap();
|
|
251
|
+
const tools = ctx.get?.("tools");
|
|
252
|
+
if (rolePolicy !== undefined && tools !== undefined) {
|
|
253
|
+
const guard = tools.guard((execution) => execution.agent === undefined ? undefined : rolePolicy.toolDenial(execution.agent, execution.name, tools, execution));
|
|
254
|
+
ctx.effect?.(() => guard);
|
|
255
|
+
}
|
|
238
256
|
ctx.on?.("tools/pre-execute", async (exec, next) => {
|
|
239
|
-
const
|
|
257
|
+
const execution = exec;
|
|
258
|
+
const full = Context.is(ctx) && nativeStandingFullAccess(ctx, exec.agent);
|
|
259
|
+
rolePolicy?.captureToolExecution(execution, full);
|
|
260
|
+
const denied = exec.agent === undefined ? undefined : full ? rolePolicy?.toolBlacklistDenial(exec.agent, exec.name, execution) : rolePolicy?.preToolDenial(exec.agent, exec.name, undefined, execution);
|
|
261
|
+
if (denied !== undefined)
|
|
262
|
+
return { kind: "deny", reason: denied };
|
|
263
|
+
let settings;
|
|
264
|
+
try {
|
|
265
|
+
settings = getSettings(exec.agent);
|
|
266
|
+
}
|
|
267
|
+
catch (error) {
|
|
268
|
+
if (full && error instanceof DsmmProfileError && !["disposed", "not-owned", "cancelled"].includes(error.code))
|
|
269
|
+
return next();
|
|
270
|
+
throw error;
|
|
271
|
+
}
|
|
272
|
+
const decision = decidePreToolExecution(exec, settings, controller, full);
|
|
273
|
+
if (!full && settings.modules.deepwork.enabled && settings.guards.toolOutputTruncation.enabled && isSafetyScopeActive(exec, settings, controller))
|
|
274
|
+
truncationLimits.set(exec, settings.guards.toolOutputTruncation.maxInlineBytes);
|
|
240
275
|
if (decision === undefined)
|
|
241
276
|
return next();
|
|
242
277
|
if (decision.kind === "deny")
|
|
@@ -245,9 +280,12 @@ export function registerSafetyGuards(ctx, controller, getSettings) {
|
|
|
245
280
|
return downstream.kind === "allow" ? decision : downstream;
|
|
246
281
|
}, { prepend: true });
|
|
247
282
|
ctx.on?.("tools/post-execute", async (exec, result, next) => {
|
|
248
|
-
const settings = getSettings(exec.agent);
|
|
249
283
|
const decision = await next();
|
|
250
|
-
|
|
284
|
+
const limit = truncationLimits.get(exec);
|
|
285
|
+
if (limit === undefined || result.isError || decision.kind !== "accept" || "value" in decision)
|
|
286
|
+
return decision;
|
|
287
|
+
const text = allText(decision.content ?? result.content);
|
|
288
|
+
return text === undefined || utf8Bytes(text) <= limit ? decision : { ...decision, content: [{ type: "text", text: truncateTextMiddle(text, limit, exec.name) }] };
|
|
251
289
|
}, { prepend: true });
|
|
252
290
|
}
|
|
253
291
|
//# sourceMappingURL=guards.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { AgentLoop } from "@deepseek-ai/dsh-agent-loop";
|
|
3
|
+
import type { Config as AgentLoopConfig } from "@deepseek-ai/dsh-agent-loop";
|
|
4
|
+
import { DsmmAwareLlmRuntime } from "./host-llm.js";
|
|
5
|
+
import type { DsmmLlmHostOwner } from "./host-llm.js";
|
|
6
|
+
import type { DsmmPiAiOwnerOptions, DsmmPiAiProviderOwner } from "./native-pi-ai-wire.js";
|
|
7
|
+
export interface DsmmLlmColdStartupOptions {
|
|
8
|
+
/** Original validated declarative AgentLoop config, including all configured Agents. */
|
|
9
|
+
readonly agentLoop: AgentLoopConfig;
|
|
10
|
+
readonly provider: DsmmPiAiOwnerOptions;
|
|
11
|
+
/** Install routing/admission guards and return their exact live request owner before constructing the loop. */
|
|
12
|
+
readonly establish?: (ctx: Context, providers: DsmmPiAiProviderOwner) => Promise<DsmmLlmHostOwner>;
|
|
13
|
+
}
|
|
14
|
+
export interface DsmmLlmColdStartup {
|
|
15
|
+
/** Append to profileContext.overlays before readProfilePatches; Settings recomposition must see this same layer. Provider handoff remains explicit in the stock provider row. */
|
|
16
|
+
readonly patches: readonly [{
|
|
17
|
+
readonly id: "agent-loop";
|
|
18
|
+
readonly disabled: true;
|
|
19
|
+
}, {
|
|
20
|
+
readonly insert: readonly [{
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly config: DsmmPiAiOwnerOptions["config"];
|
|
24
|
+
}];
|
|
25
|
+
}];
|
|
26
|
+
/** Pass to the public dsh-app-boot prepare callback, before the standard profile entries mount. */
|
|
27
|
+
prepare(ctx: Context): Promise<void>;
|
|
28
|
+
/** Call after boot settlement. Missing dependencies are a startup refusal, never an implicit stock fallback. */
|
|
29
|
+
assertReady(): {
|
|
30
|
+
readonly loop: AgentLoop;
|
|
31
|
+
readonly llm: DsmmAwareLlmRuntime;
|
|
32
|
+
readonly provider: DsmmPiAiProviderOwner;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Host-only cold composition. The profile must disable its original agent-loop
|
|
37
|
+
* row and remove only this owner's routes from llm-pi-ai before mounting entries.
|
|
38
|
+
* The standard MAIN, registries, persistence and other provider owners remain mounted.
|
|
39
|
+
*/
|
|
40
|
+
export declare function createDsmmLlmColdStartup(options: DsmmLlmColdStartupOptions): DsmmLlmColdStartup;
|
|
41
|
+
//# sourceMappingURL=host-llm-startup.d.ts.map
|