@dsmm/dsmm 0.1.9 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -58
- package/agent-presets/dsmm-builder/agent.cordis.yml +91 -186
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +120 -17
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +72 -17
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +169 -0
- package/agent-presets/dsmm-coding/preset.yml +3 -0
- package/agent-presets/dsmm-complex/agent.cordis.yml +154 -0
- package/agent-presets/dsmm-complex/preset.yml +3 -0
- package/agent-presets/dsmm-creative/agent.cordis.yml +122 -15
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +179 -0
- package/agent-presets/dsmm-cross-cutting/preset.yml +3 -0
- package/agent-presets/dsmm-deep/agent.cordis.yml +189 -0
- package/agent-presets/dsmm-deep/preset.yml +3 -0
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +72 -17
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +168 -0
- package/agent-presets/dsmm-documenting/preset.yml +3 -0
- package/agent-presets/dsmm-frontend/agent.cordis.yml +161 -0
- package/agent-presets/dsmm-frontend/preset.yml +3 -0
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +153 -0
- package/agent-presets/dsmm-hard-reasoning/preset.yml +3 -0
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +72 -17
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +127 -0
- package/agent-presets/dsmm-normal-task/preset.yml +3 -0
- package/agent-presets/dsmm-oracle/agent.cordis.yml +109 -15
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +109 -15
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +174 -190
- package/agent-presets/dsmm-orchestrator/preset.yml +1 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +102 -16
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +134 -15
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +132 -0
- package/agent-presets/dsmm-quick/preset.yml +3 -0
- package/agent-presets/dsmm-research/agent.cordis.yml +156 -0
- package/agent-presets/dsmm-research/preset.yml +3 -0
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +108 -16
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/cordis.patch.yml +1 -5
- package/docs/agent-presets.md +48 -15
- package/docs/compatibility.md +58 -68
- package/docs/deferred-native-approval-risk.md +19 -0
- package/docs/design.md +43 -2
- package/docs/lsp.md +12 -12
- package/docs/migration-from-ocmm.md +10 -2
- package/docs/model-routing.md +84 -59
- package/docs/native-permissions.md +35 -0
- package/docs/profiles.md +43 -64
- package/docs/releasing.md +159 -8
- package/docs/roadmap.md +77 -17
- package/docs/runtime-recovery.md +12 -0
- package/docs/safety-guards.md +7 -3
- package/docs/settings-status.md +46 -40
- package/docs/skill-sync.md +89 -14
- package/lib/child-admission-contract.d.ts +37 -0
- package/lib/child-admission-contract.js +2 -0
- package/lib/child-admission.d.ts +42 -0
- package/lib/child-admission.js +162 -0
- package/lib/child-capture.d.ts +81 -0
- package/lib/child-capture.js +203 -0
- package/lib/child-evidence.d.ts +17 -0
- package/lib/child-evidence.js +43 -0
- package/lib/client/ChildrenPanel.d.ts +43 -0
- package/lib/client/ChildrenPanel.js +82 -0
- package/lib/client/DeploymentPage.d.ts +18 -0
- package/lib/client/DeploymentPage.js +127 -0
- package/lib/client/EditableChoice.d.ts +17 -0
- package/lib/client/EditableChoice.js +49 -0
- package/lib/client/PermissionsPanel.d.ts +14 -0
- package/lib/client/PermissionsPanel.js +46 -0
- package/lib/client/ProfilesSection.js +32 -15
- package/lib/client/RoleAvailability.d.ts +7 -0
- package/lib/client/RoleAvailability.js +19 -0
- package/lib/client/SessionProfiles.js +27 -9
- package/lib/client/StructuredEditor.js +15 -7
- package/lib/client/children-controller.d.ts +98 -0
- package/lib/client/children-controller.js +296 -0
- package/lib/client/children-locales.d.ts +367 -0
- package/lib/client/children-locales.js +69 -0
- package/lib/client/controller.d.ts +6 -1
- package/lib/client/controller.js +14 -8
- package/lib/client/deployment-controller.d.ts +50 -0
- package/lib/client/deployment-controller.js +193 -0
- package/lib/client/deployment-data.d.ts +17 -0
- package/lib/client/deployment-data.js +138 -0
- package/lib/client/deployment-locales.d.ts +70 -0
- package/lib/client/deployment-locales.js +81 -0
- package/lib/client/diagnostics.d.ts +14 -0
- package/lib/client/diagnostics.js +53 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +145 -1
- package/lib/client/locales.d.ts +58 -0
- package/lib/client/locales.js +38 -18
- package/lib/client/permission-client.d.ts +16 -0
- package/lib/client/permission-client.js +38 -0
- package/lib/client/permission-controller.d.ts +62 -0
- package/lib/client/permission-controller.js +149 -0
- package/lib/client/permission-locales.d.ts +114 -0
- package/lib/client/permission-locales.js +75 -0
- package/lib/client/plugins-contract.d.ts +27 -0
- package/lib/client/plugins-contract.js +2 -0
- package/lib/client/session-labels.js +4 -4
- package/lib/client/structured.js +19 -5
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +36 -0
- package/lib/client.js +6724 -1604
- package/lib/commands.js +3 -0
- package/lib/config-file-store.d.ts +23 -0
- package/lib/config-file-store.js +67 -0
- package/lib/core-permission-authority.d.ts +18 -0
- package/lib/core-permission-authority.js +255 -0
- package/lib/core-permissions.d.ts +8 -0
- package/lib/core-permissions.js +33 -0
- package/lib/delivery-authority.d.ts +68 -0
- package/lib/delivery-authority.js +260 -0
- package/lib/deployment-config.d.ts +60 -0
- package/lib/deployment-config.js +205 -0
- package/lib/deployment-permission-rules.d.ts +55 -0
- package/lib/deployment-permission-rules.js +306 -0
- package/lib/dsh-home.d.ts +3 -0
- package/lib/dsh-home.js +10 -0
- package/lib/dsh-types.d.ts +22 -69
- package/lib/guards.d.ts +3 -2
- package/lib/guards.js +44 -6
- package/lib/host-llm-startup.d.ts +41 -0
- package/lib/host-llm-startup.js +65 -0
- package/lib/host-llm.d.ts +92 -0
- package/lib/host-llm.js +325 -0
- package/lib/index.d.ts +23 -5
- package/lib/index.js +383 -40
- package/lib/legacy-child-policy.d.ts +51 -0
- package/lib/legacy-child-policy.js +123 -0
- package/lib/legacy-read-composition.d.ts +20 -0
- package/lib/legacy-read-composition.js +144 -0
- package/lib/legacy-read-contracts.d.ts +157 -0
- package/lib/legacy-read-contracts.js +39 -0
- package/lib/legacy-read-host.d.ts +19 -0
- package/lib/legacy-read-host.js +67 -0
- package/lib/legacy-read-integration.d.ts +121 -0
- package/lib/legacy-read-integration.js +522 -0
- package/lib/legacy-read-proxy.d.ts +26 -0
- package/lib/legacy-read-proxy.js +237 -0
- package/lib/live-pi-ai-owner.d.ts +18 -0
- package/lib/live-pi-ai-owner.js +144 -0
- package/lib/llm-runtime.d.ts +11 -0
- package/lib/llm-runtime.js +21 -0
- package/lib/lsp.d.ts +13 -0
- package/lib/lsp.js +60 -0
- package/lib/managed-settings.d.ts +5 -0
- package/lib/managed-settings.js +14 -0
- package/lib/mode.js +42 -47
- package/lib/model-parameter-policy.d.ts +11 -0
- package/lib/model-parameter-policy.js +27 -0
- package/lib/model-routing.js +33 -19
- package/lib/modules.d.ts +35 -0
- package/lib/modules.js +37 -0
- package/lib/native-child-evidence.d.ts +42 -0
- package/lib/native-child-evidence.js +133 -0
- package/lib/native-pi-ai-wire.d.ts +37 -0
- package/lib/native-pi-ai-wire.js +261 -0
- package/lib/native-scope.d.ts +9 -0
- package/lib/native-scope.js +20 -0
- package/lib/permission-bash.d.ts +6 -0
- package/lib/permission-bash.js +7 -0
- package/lib/permission-control.d.ts +73 -0
- package/lib/permission-control.js +205 -0
- package/lib/permission-controller.d.ts +68 -0
- package/lib/permission-controller.js +317 -0
- package/lib/permission-errors.d.ts +7 -0
- package/lib/permission-errors.js +21 -0
- package/lib/permission-fs-search.d.ts +5 -0
- package/lib/permission-fs-search.js +7 -0
- package/lib/permission-fs.d.ts +5 -0
- package/lib/permission-fs.js +7 -0
- package/lib/permission-native-access.d.ts +11 -0
- package/lib/permission-native-access.js +6 -0
- package/lib/permission-native-command.d.ts +10 -0
- package/lib/permission-native-command.js +93 -0
- package/lib/permission-native-rules.d.ts +75 -0
- package/lib/permission-native-rules.js +278 -0
- package/lib/permission-pwsh.d.ts +6 -0
- package/lib/permission-pwsh.js +7 -0
- package/lib/permission-remote.d.ts +26 -0
- package/lib/permission-remote.js +53 -0
- package/lib/permission-rpc.d.ts +29 -0
- package/lib/permission-rpc.js +152 -0
- package/lib/permission-rules.d.ts +115 -0
- package/lib/permission-rules.js +256 -0
- package/lib/permission-settings.d.ts +45 -0
- package/lib/permission-settings.js +48 -0
- package/lib/permission-shell.d.ts +38 -0
- package/lib/permission-shell.js +150 -0
- package/lib/permission-web.d.ts +5 -0
- package/lib/permission-web.js +7 -0
- package/lib/plan-validation.js +6 -44
- package/lib/preset-materializer.js +2 -0
- package/lib/preset-registry.d.ts +1 -1
- package/lib/preset-registry.js +38 -24
- package/lib/preset-skills.d.ts +4 -1
- package/lib/preset-skills.js +60 -19
- package/lib/profile-diagnostics.d.ts +45 -0
- package/lib/profile-diagnostics.js +148 -0
- package/lib/profile-locale.d.ts +3 -0
- package/lib/profile-locale.js +2 -0
- package/lib/profile-remote.d.ts +22 -0
- package/lib/profile-remote.js +344 -27
- package/lib/profile-rpc.d.ts +25 -1
- package/lib/profile-rpc.js +143 -3
- package/lib/profile-runtime.d.ts +63 -0
- package/lib/profile-runtime.js +496 -77
- package/lib/profile-store.d.ts +56 -1
- package/lib/profile-store.js +377 -111
- package/lib/profile-types.d.ts +125 -1
- package/lib/profile-types.js +1 -0
- package/lib/profiles.d.ts +16 -2
- package/lib/profiles.js +156 -79
- package/lib/prompt-content.d.ts +25 -0
- package/lib/prompt-content.js +27 -0
- package/lib/prompts.d.ts +45 -4
- package/lib/prompts.js +157 -43
- package/lib/recovery-policy.js +20 -7
- package/lib/role-control-remote.d.ts +38 -0
- package/lib/role-control-remote.js +211 -0
- package/lib/role-control-rpc.d.ts +51 -0
- package/lib/role-control-rpc.js +377 -0
- package/lib/role-control-types.d.ts +92 -0
- package/lib/role-control-types.js +8 -0
- package/lib/role-invocation.d.ts +47 -0
- package/lib/role-invocation.js +135 -0
- package/lib/role-llm-runtime.d.ts +17 -0
- package/lib/role-llm-runtime.js +62 -0
- package/lib/role-llm.d.ts +31 -0
- package/lib/role-llm.js +66 -0
- package/lib/role-policy.d.ts +92 -0
- package/lib/role-policy.js +601 -0
- package/lib/role-providers.d.ts +7 -3
- package/lib/role-providers.js +74 -46
- package/lib/role-routing.d.ts +11 -2
- package/lib/role-routing.js +42 -25
- package/lib/role-runs.d.ts +135 -0
- package/lib/role-runs.js +304 -0
- package/lib/role-subagents.d.ts +63 -4
- package/lib/role-subagents.js +299 -47
- package/lib/roles.d.ts +20 -9
- package/lib/roles.js +87 -216
- package/lib/route-json.d.ts +19 -0
- package/lib/route-json.js +129 -0
- package/lib/routing-policy.d.ts +2 -0
- package/lib/routing-policy.js +12 -2
- package/lib/runtime-integration.d.ts +112 -0
- package/lib/runtime-integration.js +784 -0
- package/lib/runtime-recovery.js +34 -13
- package/lib/session-scope.js +2 -0
- package/lib/settings.d.ts +116 -14
- package/lib/settings.js +455 -149
- package/lib/skills.d.ts +24 -9
- package/lib/skills.js +114 -35
- package/lib/state.d.ts +10 -6
- package/lib/state.js +48 -49
- package/lib/status.d.ts +35 -1
- package/lib/status.js +58 -17
- package/lib/subagent-runtime.d.ts +45 -0
- package/lib/subagent-runtime.js +131 -0
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +112 -45
- package/patches/subagent-runtime.yml +15 -0
- package/prompts/deepseek-flash.md +1 -1
- package/prompts/deepseek-v4-pro.md +2 -2
- package/prompts/deepwork.md +153 -20
- package/prompts/source/agents/clarifier.md +47 -0
- package/prompts/source/agents/orchestrator.md +72 -0
- package/prompts/source/agents/plan-critic.md +29 -0
- package/prompts/source/agents/planner.md +21 -0
- package/prompts/source/agents/reviewer.md +23 -0
- package/prompts/source/catalog.json +548 -0
- package/prompts/source/category/coding.md +46 -0
- package/prompts/source/category/complex.md +29 -0
- package/prompts/source/category/creative.md +40 -0
- package/prompts/source/category/cross-cutting.md +54 -0
- package/prompts/source/category/deep.md +64 -0
- package/prompts/source/category/documenting.md +68 -0
- package/prompts/source/category/frontend.md +38 -0
- package/prompts/source/category/hard-reasoning.md +53 -0
- package/prompts/source/category/normal-task.md +27 -0
- package/prompts/source/category/quick.md +34 -0
- package/prompts/source/category/research.md +58 -0
- package/prompts/source/deepwork/claude-opus-5.md +28 -0
- package/prompts/source/deepwork/codex.md +9 -0
- package/prompts/source/deepwork/default.md +136 -0
- package/prompts/source/deepwork/gemini.md +191 -0
- package/prompts/source/deepwork/glm.md +263 -0
- package/prompts/source/deepwork/gpt.md +49 -0
- package/prompts/source/deepwork/kimi-k27.md +13 -0
- package/prompts/source/deepwork/planner.md +44 -0
- package/prompts/source/deepwork/swe-2.md +13 -0
- package/prompts/source/manifest.json +3233 -0
- package/prompts/source/shared/dsh-host-contract.md +8 -0
- package/prompts/source/shared/locale.md +8 -0
- package/prompts/source/shared/shell-safety.md +7 -0
- package/prompts/source/terminal/builder.md +13 -0
- package/prompts/source/terminal/clarifier.md +41 -0
- package/prompts/source/terminal/code-search.md +39 -0
- package/prompts/source/terminal/coding.md +41 -0
- package/prompts/source/terminal/complex.md +43 -0
- package/prompts/source/terminal/creative.md +41 -0
- package/prompts/source/terminal/cross-cutting.md +43 -0
- package/prompts/source/terminal/deep.md +43 -0
- package/prompts/source/terminal/doc-search.md +39 -0
- package/prompts/source/terminal/documenting.md +41 -0
- package/prompts/source/terminal/frontend.md +41 -0
- package/prompts/source/terminal/hard-reasoning.md +41 -0
- package/prompts/source/terminal/media-reader.md +39 -0
- package/prompts/source/terminal/normal-task.md +41 -0
- package/prompts/source/terminal/oracle-2nd.md +53 -0
- package/prompts/source/terminal/oracle.md +53 -0
- package/prompts/source/terminal/orchestrator.md +26 -0
- package/prompts/source/terminal/plan-critic.md +41 -0
- package/prompts/source/terminal/planner.md +42 -0
- package/prompts/source/terminal/quick.md +39 -0
- package/prompts/source/terminal/research.md +39 -0
- package/prompts/source/terminal/reviewer.md +53 -0
- package/scripts/cold-profile-composition.mjs +329 -0
- package/scripts/cold-profile-sources.mjs +238 -0
- package/scripts/migrate-cold-profile.mjs +315 -0
- package/skills/ast-grep/LICENSE +21 -0
- package/skills/ast-grep/README.md +138 -0
- package/skills/ast-grep/SKILL.md +287 -0
- package/skills/ast-grep/SOURCE +1 -0
- package/skills/ast-grep/install.ps1 +235 -0
- package/skills/ast-grep/install.sh +286 -0
- package/skills/ast-grep/references/cli.md +233 -0
- package/skills/ast-grep/references/install.md +168 -0
- package/skills/ast-grep/references/patterns.md +149 -0
- package/skills/ast-grep/references/pitfalls.md +305 -0
- package/skills/ast-grep/references/recipes.md +404 -0
- package/skills/ast-grep/references/sgconfig.md +250 -0
- package/skills/ast-grep/references/yaml-rules.md +511 -0
- package/skills/ast-grep/scripts/ast_grep_helper.py +760 -0
- package/skills/ast-grep/tests/smoke.ps1 +129 -0
- package/skills/ast-grep/tests/smoke.sh +212 -0
- package/skills/ast-grep/tests/test_resolver.py +154 -0
- package/skills/brainstorming/SKILL.md +123 -9
- package/skills/coding-agent-sessions/LICENSE-UPSTREAM.md +82 -0
- package/skills/coding-agent-sessions/NOTICE.md +24 -0
- package/skills/coding-agent-sessions/SKILL.md +147 -0
- package/skills/coding-agent-sessions/agents/openai.yaml +4 -0
- package/skills/coding-agent-sessions/pyrightconfig.json +5 -0
- package/skills/coding-agent-sessions/references/all-platforms.md +77 -0
- package/skills/coding-agent-sessions/references/claude.md +34 -0
- package/skills/coding-agent-sessions/references/codex.md +32 -0
- package/skills/coding-agent-sessions/references/opencode.md +45 -0
- package/skills/coding-agent-sessions/references/senpi.md +29 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +104 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
- package/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
- package/skills/coding-agent-sessions/scripts/tests/test_agent_sessions.py +322 -0
- package/skills/coding-agent-sessions/scripts/tests/test_aside_scanner.py +131 -0
- package/skills/coding-agent-sessions/scripts/tests/test_cli_contract.py +126 -0
- package/skills/coding-agent-sessions/scripts/tests/test_extended_scanners.py +262 -0
- package/skills/coding-agent-sessions/scripts/tests/test_optional_sqlite_scanners.py +79 -0
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -0
- package/skills/debugging/SKILL.md +130 -4
- package/skills/debugging/references/logging.md +2 -0
- package/skills/debugging/references/methodology/00-setup.md +16 -62
- package/skills/debugging/references/methodology/02-investigate.md +11 -5
- package/skills/debugging/references/methodology/03-flaky-triage.md +6 -4
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +6 -16
- package/skills/debugging/references/methodology/05-escalate.md +2 -0
- package/skills/debugging/references/methodology/06-fix.md +8 -6
- package/skills/debugging/references/methodology/08-qa.md +7 -5
- package/skills/debugging/references/methodology/09-cleanup.md +16 -152
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +7 -18
- package/skills/debugging/references/runtimes/bundled-js-binary.md +3 -16
- package/skills/debugging/references/runtimes/go.md +2 -0
- package/skills/debugging/references/runtimes/native-binary.md +11 -54
- package/skills/debugging/references/runtimes/node.md +6 -15
- package/skills/debugging/references/runtimes/python.md +5 -15
- package/skills/debugging/references/runtimes/rust.md +4 -18
- package/skills/debugging/references/scripts/dap.test.mjs +539 -0
- package/skills/debugging/references/scripts/fixture-adapter.mjs +164 -0
- package/skills/debugging/references/tools/dap.md +4 -2
- package/skills/debugging/references/tools/ghidra.md +6 -15
- package/skills/debugging/references/tools/playwright-cli.md +5 -15
- package/skills/debugging/references/tools/pwndbg.md +2 -0
- package/skills/debugging/references/tools/pwntools.md +6 -16
- package/skills/dispatching-parallel-agents/SKILL.md +96 -7
- package/skills/frontend/.frontend-materialized.json +856 -0
- package/skills/frontend/ATTRIBUTION.md +37 -0
- package/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/skills/frontend/LICENSE-taste-skill.txt +21 -0
- package/skills/frontend/LICENSE-ui-ux-pro-max.txt +21 -0
- package/skills/frontend/SKILL.md +145 -0
- package/skills/frontend/references/design/README.md +256 -0
- package/skills/frontend/references/design/_INDEX.md +206 -0
- package/skills/frontend/references/design/airbnb.md +393 -0
- package/skills/frontend/references/design/airtable.md +92 -0
- package/skills/frontend/references/design/apple.md +250 -0
- package/skills/frontend/references/design/aside.md +211 -0
- package/skills/frontend/references/design/binance.md +348 -0
- package/skills/frontend/references/design/bmw.md +183 -0
- package/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/skills/frontend/references/design/bugatti.md +271 -0
- package/skills/frontend/references/design/cal.md +262 -0
- package/skills/frontend/references/design/claude.md +315 -0
- package/skills/frontend/references/design/clay.md +307 -0
- package/skills/frontend/references/design/clickhouse.md +284 -0
- package/skills/frontend/references/design/clone-from-url.md +69 -0
- package/skills/frontend/references/design/cohere.md +269 -0
- package/skills/frontend/references/design/coinbase.md +132 -0
- package/skills/frontend/references/design/composio.md +310 -0
- package/skills/frontend/references/design/cursor.md +312 -0
- package/skills/frontend/references/design/design-system-architecture.md +250 -0
- package/skills/frontend/references/design/elevenlabs.md +268 -0
- package/skills/frontend/references/design/expo.md +284 -0
- package/skills/frontend/references/design/ferrari.md +317 -0
- package/skills/frontend/references/design/figma.md +223 -0
- package/skills/frontend/references/design/framer.md +249 -0
- package/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/skills/frontend/references/design/hashicorp.md +281 -0
- package/skills/frontend/references/design/ibm.md +335 -0
- package/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/skills/frontend/references/design/imagegen-frontend-web.md +987 -0
- package/skills/frontend/references/design/interaction-skill.md +52 -0
- package/skills/frontend/references/design/intercom.md +149 -0
- package/skills/frontend/references/design/kraken.md +128 -0
- package/skills/frontend/references/design/lamborghini.md +291 -0
- package/skills/frontend/references/design/linear.app.md +370 -0
- package/skills/frontend/references/design/lovable.md +301 -0
- package/skills/frontend/references/design/mastercard.md +368 -0
- package/skills/frontend/references/design/meta.md +369 -0
- package/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/skills/frontend/references/design/minimax.md +260 -0
- package/skills/frontend/references/design/mintlify.md +329 -0
- package/skills/frontend/references/design/miro.md +111 -0
- package/skills/frontend/references/design/mistral.ai.md +264 -0
- package/skills/frontend/references/design/mongodb.md +269 -0
- package/skills/frontend/references/design/nike.md +366 -0
- package/skills/frontend/references/design/notion.md +312 -0
- package/skills/frontend/references/design/nvidia.md +296 -0
- package/skills/frontend/references/design/ollama.md +270 -0
- package/skills/frontend/references/design/opencode.ai.md +284 -0
- package/skills/frontend/references/design/output-skill.md +49 -0
- package/skills/frontend/references/design/pinterest.md +233 -0
- package/skills/frontend/references/design/playstation.md +367 -0
- package/skills/frontend/references/design/posthog.md +259 -0
- package/skills/frontend/references/design/raycast.md +271 -0
- package/skills/frontend/references/design/react-dev-tooling-skill.md +232 -0
- package/skills/frontend/references/design/redesign-skill.md +178 -0
- package/skills/frontend/references/design/renault.md +314 -0
- package/skills/frontend/references/design/replicate.md +264 -0
- package/skills/frontend/references/design/resend.md +306 -0
- package/skills/frontend/references/design/revolut.md +188 -0
- package/skills/frontend/references/design/runwayml.md +247 -0
- package/skills/frontend/references/design/sanity.md +360 -0
- package/skills/frontend/references/design/sentry.md +265 -0
- package/skills/frontend/references/design/shopify.md +353 -0
- package/skills/frontend/references/design/soft-skill.md +98 -0
- package/skills/frontend/references/design/spacex.md +197 -0
- package/skills/frontend/references/design/spotify.md +249 -0
- package/skills/frontend/references/design/starbucks.md +583 -0
- package/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/skills/frontend/references/design/stitch-skill.md +184 -0
- package/skills/frontend/references/design/stripe.md +325 -0
- package/skills/frontend/references/design/supabase.md +258 -0
- package/skills/frontend/references/design/superhuman.md +255 -0
- package/skills/frontend/references/design/taste-skill.md +1206 -0
- package/skills/frontend/references/design/tesla.md +289 -0
- package/skills/frontend/references/design/theverge.md +342 -0
- package/skills/frontend/references/design/together.ai.md +266 -0
- package/skills/frontend/references/design/uber.md +298 -0
- package/skills/frontend/references/design/vercel.md +313 -0
- package/skills/frontend/references/design/vodafone.md +426 -0
- package/skills/frontend/references/design/voltagent.md +326 -0
- package/skills/frontend/references/design/warp.md +256 -0
- package/skills/frontend/references/design/webflow.md +95 -0
- package/skills/frontend/references/design/wired.md +281 -0
- package/skills/frontend/references/design/wise.md +176 -0
- package/skills/frontend/references/design/x.ai.md +260 -0
- package/skills/frontend/references/design/zapier.md +331 -0
- package/skills/frontend/references/perfection/README.md +264 -0
- package/skills/frontend/references/perfection/react-perf-tooling.md +234 -0
- package/skills/frontend/references/ui-ux-db/README.md +659 -0
- package/skills/frontend/references/ui-ux-db/data/app-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/skills/frontend/references/ui-ux-db/data/colors.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/google-fonts.csv +1924 -0
- package/skills/frontend/references/ui-ux-db/data/icons.csv +106 -0
- package/skills/frontend/references/ui-ux-db/data/landing.csv +35 -0
- package/skills/frontend/references/ui-ux-db/data/products.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/angular.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/laravel.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/threejs.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/skills/frontend/references/ui-ux-db/data/styles.csv +85 -0
- package/skills/frontend/references/ui-ux-db/data/typography.csv +74 -0
- package/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/scripts/core.py +262 -0
- package/skills/frontend/references/ui-ux-db/scripts/design_system.py +1148 -0
- package/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/skills/git-master/SKILL.md +115 -0
- package/skills/git-master/agents/openai.yaml +13 -0
- package/skills/init-deep/SKILL.md +282 -0
- package/skills/receiving-code-review/SKILL.md +117 -7
- package/skills/remove-ai-slops/SKILL.md +160 -8
- package/skills/requesting-code-review/SKILL.md +98 -3
- package/skills/requesting-code-review/code-reviewer.md +59 -0
- package/skills/subagent-driven-development/SKILL.md +179 -6
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +23 -0
- package/skills/subagent-driven-development/implementer-prompt.md +87 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +37 -0
- package/skills/using-git-worktrees/SKILL.md +144 -0
- package/skills/writing-plans/SKILL.md +126 -7
- package/skills/writing-plans/plan-document-reviewer-prompt.md +47 -0
package/lib/index.js
CHANGED
|
@@ -1,23 +1,41 @@
|
|
|
1
|
+
import { Context, symbols } from "@deepseek-ai/cordis";
|
|
1
2
|
import { registerDeepworkCommand, registerDsmmStatusCommand } from "./commands.js";
|
|
2
3
|
import { registerSafetyGuards } from "./guards.js";
|
|
3
4
|
import { registerDeepworkPrompt } from "./mode.js";
|
|
5
|
+
import { registerAgentSkills } from "./preset-skills.js";
|
|
4
6
|
import { registerModelRouting } from "./model-routing.js";
|
|
5
7
|
import { registerRuntimeRecovery } from "./runtime-recovery.js";
|
|
6
8
|
import { reconcileRolePresets, resolveManagedPresetRoot } from "./preset-materializer.js";
|
|
7
|
-
import { registerHeadlessRoleTools } from "./role-subagents.js";
|
|
9
|
+
import { registerHeadlessRoleTools, registerNativeSubagentControls } from "./role-subagents.js";
|
|
8
10
|
import { registerRolePresets } from "./preset-registry.js";
|
|
9
11
|
import { registerRoleProviders } from "./role-providers.js";
|
|
12
|
+
import { DsmmRolePolicy } from "./role-policy.js";
|
|
13
|
+
import { registerLspRuntime } from "./lsp.js";
|
|
10
14
|
import { createProfileRuntime } from "./profile-runtime.js";
|
|
11
|
-
import {
|
|
12
|
-
import { DSMM_CONFIG_SCHEMA, registerSettings } from "./settings.js";
|
|
13
|
-
import { DeepworkModeController } from "./state.js";
|
|
15
|
+
import { DsmmProfilesHost, registerConfigRpc } from "./profile-rpc.js";
|
|
16
|
+
import { DSMM_CONFIG_SCHEMA, DSMM_NATIVE_CONFIG_SCHEMA, registerSettings } from "./settings.js";
|
|
17
|
+
import { DeepworkModeController, isDeepworkActive } from "./state.js";
|
|
14
18
|
import DsmmSessionPersistence from "./session-persistence.js";
|
|
15
19
|
import { isAbsolute } from "node:path";
|
|
16
20
|
import { createHash, randomUUID } from "node:crypto";
|
|
17
21
|
import { DsmmProfileError } from "./profiles.js";
|
|
22
|
+
import { DsmmDeploymentConfig } from "./deployment-config.js";
|
|
23
|
+
import { agentForScope } from "./native-scope.js";
|
|
24
|
+
import { resolveSelectedAgentPreset, sessionEvents } from "./session-scope.js";
|
|
25
|
+
import { projectDsmmModules } from "./modules.js";
|
|
26
|
+
import { scopeLifetime } from "./delivery-authority.js";
|
|
27
|
+
import { admittedAgentContext, classifyDsmmAgent, integrateSubagentRuntime, managedAgentContext, publicProfileRuntime, registerRoleControlContribution, registerRuntimeGuidance, runtimeAdmissionView } from "./runtime-integration.js";
|
|
28
|
+
import { LegacyReadUnavailable } from "./legacy-read-contracts.js";
|
|
29
|
+
import { createCorePermissionAuthority } from "./core-permission-authority.js";
|
|
30
|
+
import { nativeStandingFullAccess } from "./permission-native-access.js";
|
|
31
|
+
import { installCorePermissions } from "./core-permissions.js";
|
|
18
32
|
export const name = "dsmm";
|
|
19
|
-
export const inject = ["profileContext"];
|
|
20
|
-
|
|
33
|
+
export const inject = ["profileContext", "agents"];
|
|
34
|
+
// Direct public Config calls keep the complete plain flat ABI. Native Cordis
|
|
35
|
+
// consumes the same object's Standard Schema protocol for sparse volatile refs.
|
|
36
|
+
export const Config = new Proxy(DSMM_NATIVE_CONFIG_SCHEMA, {
|
|
37
|
+
apply(_target, _receiver, args) { return DSMM_CONFIG_SCHEMA(args[0] ?? {}); }
|
|
38
|
+
});
|
|
21
39
|
export { DSMM_ROLE_IDS, DSMM_ROLES, isDsmmRoleId, renderAgentCordis, renderPresetMetadata } from "./roles.js";
|
|
22
40
|
export { DSMM_MANAGED_PRESET_MARKER, materializeRolePresets, reconcileRolePresets, resolveManagedPresetRoot } from "./preset-materializer.js";
|
|
23
41
|
export { DSMM_GUARD_PREFIX, decidePostToolExecution, decidePreToolExecution, isSafetyScopeActive, registerSafetyGuards, truncateTextMiddle } from "./guards.js";
|
|
@@ -33,8 +51,46 @@ export { DSMM_STATUS_COMMAND, registerDsmmStatusCommand } from "./commands.js";
|
|
|
33
51
|
export { DSMM_STATUS_VERSION, createDsmmStatusSnapshot, formatDsmmStatus } from "./status.js";
|
|
34
52
|
export { DSMM_SKILL_NAMES, DEFAULT_DSMM_SETTINGS, MVP_SKILL_NAMES, isRoleEnabled, resolveConfig, resolveRoleRouting, registerSettings } from "./settings.js";
|
|
35
53
|
export { createProfileRuntime, DsmmProfileRuntime } from "./profile-runtime.js";
|
|
54
|
+
export { resolveDshHome } from "./dsh-home.js";
|
|
55
|
+
export { DsmmDeploymentConfig, parseGlobalConfig, editGlobalConfig } from "./deployment-config.js";
|
|
56
|
+
export { DSMM_MODULE_DESCRIPTORS, deepworkEnabled, projectDeepworkModule } from "./modules.js";
|
|
36
57
|
export { DEEPWORK_MODE_EVENT, DeepworkModeController, hasOpenTurn, isDeepworkActive } from "./state.js";
|
|
37
|
-
export
|
|
58
|
+
export { DsmmNativeLlmRuntime } from "./llm-runtime.js";
|
|
59
|
+
/** Experimental Host collaborators are programmatic only; serialized settings cannot authenticate them. */
|
|
60
|
+
export function createDsmmHostPlugin(startup) {
|
|
61
|
+
if (startup.experimentalLegacyRead !== undefined) {
|
|
62
|
+
const host = startup.experimentalLegacyRead.startup;
|
|
63
|
+
if (host === null || typeof host !== "object" || [host.captureClosedComposition, host.resolveReadBindings, host.acquireCallContext,
|
|
64
|
+
host.reportAuditFault, host.reportRetirementFault, host.revoke].some(callback => typeof callback !== "function"))
|
|
65
|
+
throw new DsmmProfileError("unavailable", "Legacy read startup requires actual Host composition, FS, turn and audit collaborators.");
|
|
66
|
+
}
|
|
67
|
+
return { name, Config, inject: startup.experimentalLegacyRead === undefined ? inject : [...inject, "subagents"],
|
|
68
|
+
apply(ctx, config = {}) { return apply(ctx, config, startup); } };
|
|
69
|
+
}
|
|
70
|
+
export function apply(ctx, config = {}, hostStartup = {}) {
|
|
71
|
+
if (!Context.is(ctx)) {
|
|
72
|
+
if (hostStartup.experimentalLegacyRead !== undefined)
|
|
73
|
+
throw new DsmmProfileError("unavailable", "Legacy read requires a real cold native Host.");
|
|
74
|
+
return applyConfigured(ctx, config, undefined, undefined, hostStartup);
|
|
75
|
+
}
|
|
76
|
+
if (hostStartup.experimentalLegacyRead !== undefined && (ctx.get("dsmmProfileRuntime") !== undefined || runtimeAdmissionView(ctx).deliveryFenceReady))
|
|
77
|
+
throw new LegacyReadUnavailable("lifetime-unavailable");
|
|
78
|
+
const deployment = new DsmmDeploymentConfig(ctx, config);
|
|
79
|
+
return deployment.readDesired().then((startup) => applyConfigured(ctx, config, deployment, startup, hostStartup));
|
|
80
|
+
}
|
|
81
|
+
function applyConfigured(ctx, config, deployment, startup, hostStartup = {}) {
|
|
82
|
+
// Volatile desired saves retain live realms. An ordinary Loader remount must
|
|
83
|
+
// not replace already-admitted Agent policy/skill realms, including busy Agents.
|
|
84
|
+
if (Context.is(ctx) && ctx.fiber.entry !== undefined) {
|
|
85
|
+
const native = ctx;
|
|
86
|
+
const owner = ctx.fiber.entry;
|
|
87
|
+
native.on("loader/patch-context", (entry, next) => {
|
|
88
|
+
if (entry === owner && (native.get("agents")?.list().length ?? 0) > 0) {
|
|
89
|
+
throw new Error("dsmm deployment Config requires restart while Agents are admitted; runtime mode/profile changes use idle maintenance instead");
|
|
90
|
+
}
|
|
91
|
+
next();
|
|
92
|
+
}, { global: true });
|
|
93
|
+
}
|
|
38
94
|
const storage = config.sessionPersistence;
|
|
39
95
|
if (storage !== undefined) {
|
|
40
96
|
if (storage === null || typeof storage !== "object" || typeof storage.root !== "string" || !isAbsolute(storage.root)
|
|
@@ -42,34 +98,64 @@ export function apply(ctx, config = {}) {
|
|
|
42
98
|
|| storage.compression !== undefined && !["zstd", "none"].includes(storage.compression)) {
|
|
43
99
|
throw new Error("Deepwork sessionPersistence must preserve an explicit absolute native root and compression");
|
|
44
100
|
}
|
|
45
|
-
if (
|
|
46
|
-
throw new Error("Deepwork sessionPersistence requires native
|
|
47
|
-
|
|
101
|
+
if (!Context.is(ctx))
|
|
102
|
+
throw new Error("Deepwork sessionPersistence requires a native Cordis Context");
|
|
103
|
+
const native = ctx;
|
|
104
|
+
if (native.get("sessionPersistence") !== undefined)
|
|
48
105
|
throw new Error("Disable the exact existing JSONL entry at startup before enabling Deepwork sessionPersistence; live replacement is refused");
|
|
49
|
-
const fiber =
|
|
50
|
-
|
|
51
|
-
throw new Error("Deepwork sessionPersistence startup registration failed");
|
|
52
|
-
return fiber.await().then(() => applyRuntime(ctx, config));
|
|
106
|
+
const fiber = native.plugin(DsmmSessionPersistence, storage);
|
|
107
|
+
return fiber.await().then(() => applyRuntime(ctx, config, deployment, startup, hostStartup));
|
|
53
108
|
}
|
|
54
|
-
return applyRuntime(ctx, config);
|
|
109
|
+
return applyRuntime(ctx, config, deployment, startup, hostStartup);
|
|
55
110
|
}
|
|
56
|
-
function applyRuntime(ctx, config) {
|
|
57
|
-
const
|
|
111
|
+
function applyRuntime(ctx, config, deployment, startup, hostStartup = {}) {
|
|
112
|
+
const native = Context.is(ctx) ? ctx : undefined;
|
|
113
|
+
const lifetime = new AbortController();
|
|
114
|
+
if (native !== undefined)
|
|
115
|
+
scopeLifetime(native, "dsmm: revoke Core startup and admission", () => lifetime.abort());
|
|
116
|
+
let permissionOwner;
|
|
117
|
+
const getMountedPermission = () => {
|
|
118
|
+
if (native === undefined || lifetime.signal.aborted)
|
|
119
|
+
return null;
|
|
120
|
+
const current = native.get("dsmmPermissionController");
|
|
121
|
+
if (current === undefined || (Reflect.get(current, symbols.original) ?? current) !== permissionOwner)
|
|
122
|
+
return null;
|
|
123
|
+
return current?.rules.status().mounted ?? null;
|
|
124
|
+
};
|
|
125
|
+
let rootAdmissionsInitialized = false;
|
|
126
|
+
const completedRootAdmissions = new WeakSet();
|
|
127
|
+
let rolePolicy;
|
|
128
|
+
const controlledParent = (agent) => {
|
|
129
|
+
if (classifyDsmmAgent(agent) === "dsmm")
|
|
130
|
+
return true;
|
|
131
|
+
if (agent.session.header?.origin === "subagent")
|
|
132
|
+
return false;
|
|
133
|
+
// A pending parent admission cannot establish native-child eligibility.
|
|
134
|
+
if (!rootAdmissionsInitialized && !completedRootAdmissions.has(agent))
|
|
135
|
+
return true;
|
|
136
|
+
const settings = getBoundSettings(agent);
|
|
137
|
+
return settings.modules.deepwork.enabled && isDeepworkActive(sessionEvents(agent.session), settings.defaultActive, resolveSelectedAgentPreset(agent.session));
|
|
138
|
+
};
|
|
139
|
+
if (native !== undefined) {
|
|
140
|
+
ctx = managedAgentContext(native, controlledParent);
|
|
141
|
+
}
|
|
142
|
+
const validatingRootModule = new WeakMap();
|
|
143
|
+
const controller = new DeepworkModeController(ctx, (agent) => validatingRootModule.get(agent) ?? getBoundSettings(agent).modules.deepwork.enabled);
|
|
58
144
|
let runtime;
|
|
59
145
|
let profileInitialization;
|
|
60
146
|
let requiresNativeProfiles = ctx.get !== undefined;
|
|
61
|
-
const requireProfileAdmission = () => {
|
|
62
|
-
if (requiresNativeProfiles && runtime === undefined) {
|
|
147
|
+
const requireProfileAdmission = (agent) => {
|
|
148
|
+
if (agent !== undefined && requiresNativeProfiles && runtime === undefined) {
|
|
63
149
|
throw new DsmmProfileError("unavailable", "Native Deepwork profile admission is not ready. No provider request or tool work is allowed.");
|
|
64
150
|
}
|
|
65
151
|
};
|
|
66
152
|
const getBoundSettings = (agent) => {
|
|
67
|
-
requireProfileAdmission();
|
|
153
|
+
requireProfileAdmission(agent);
|
|
68
154
|
return runtime?.getSettings(agent) ?? getSettings();
|
|
69
155
|
};
|
|
70
156
|
const deploymentAdmissions = new WeakMap();
|
|
71
157
|
getBoundSettings.admission = (agent) => {
|
|
72
|
-
requireProfileAdmission();
|
|
158
|
+
requireProfileAdmission(agent);
|
|
73
159
|
const nativeAdmission = runtime?.getSettings.admission?.(agent);
|
|
74
160
|
if (nativeAdmission !== undefined)
|
|
75
161
|
return nativeAdmission;
|
|
@@ -81,56 +167,313 @@ function applyRuntime(ctx, config) {
|
|
|
81
167
|
}
|
|
82
168
|
return admission;
|
|
83
169
|
};
|
|
170
|
+
getBoundSettings.moduleStates = (agent) => {
|
|
171
|
+
requireProfileAdmission(agent);
|
|
172
|
+
return runtime?.getSettings.moduleStates?.(agent) ?? projectDsmmModules(getSettings(), startup, getBoundSettings.admission(agent), false, getMountedPermission);
|
|
173
|
+
};
|
|
174
|
+
getBoundSettings.subagentRuntime = () => native === undefined
|
|
175
|
+
? { binding: "unavailable", deliveryFenceReady: false, restartRequired: true, reason: "explicit-composition-required" }
|
|
176
|
+
: runtimeAdmissionView(native);
|
|
177
|
+
rolePolicy = new DsmmRolePolicy(ctx, getBoundSettings, controller);
|
|
178
|
+
const assertDwDelivery = (agent) => {
|
|
179
|
+
if (rolePolicy.identity(agent).role === undefined)
|
|
180
|
+
return;
|
|
181
|
+
const integration = native?.get("dsmmRuntimeIntegration");
|
|
182
|
+
if (integration === undefined || !integration.runtime.authority.view().deliveryFenceReady)
|
|
183
|
+
throw new DsmmProfileError("unavailable", "Deepwork execution requires its live delivery fence.");
|
|
184
|
+
return integration.bridge.authority.acquireParentTicket(agent);
|
|
185
|
+
};
|
|
84
186
|
const getSettings = registerSettings(ctx, config, {
|
|
187
|
+
...(startup === undefined ? {} : { resolved: startup.settings }),
|
|
85
188
|
install(readyCtx, getReadySettings) {
|
|
189
|
+
const startupMounted = getReadySettings().modules.deepwork.enabled;
|
|
190
|
+
// The global editor belongs to core, not profile/DW installation success.
|
|
191
|
+
if (deployment !== undefined) {
|
|
192
|
+
readyCtx.provide?.("dsmmDeploymentConfig", deployment);
|
|
193
|
+
readyCtx.inject?.(["typert"], (rpcCtx) => {
|
|
194
|
+
registerConfigRpc(rpcCtx, deployment, getReadySettings(), () => runtime, startup?.sources, getMountedPermission);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
86
197
|
const install = (installCtx, settingsGetter) => {
|
|
87
|
-
|
|
198
|
+
if (startupMounted) {
|
|
199
|
+
registerDeepworkPrompt(installCtx, controller, settingsGetter, { section: startup === undefined ? config.section : startup.profile.section ?? startup.global.section });
|
|
200
|
+
registerAgentSkills(installCtx, controller, settingsGetter);
|
|
201
|
+
}
|
|
88
202
|
const installCommands = (commandCtx) => {
|
|
89
|
-
|
|
90
|
-
|
|
203
|
+
if (startupMounted)
|
|
204
|
+
registerDeepworkCommand(commandCtx, controller, settingsGetter);
|
|
205
|
+
// Status projects live substrate readiness without replacing the exact
|
|
206
|
+
// immutable admission reference used by authority and providers.
|
|
207
|
+
const statusSettings = Object.assign(((agent) => settingsGetter(agent)), settingsGetter);
|
|
208
|
+
statusSettings.admission = agent => ({ ...getBoundSettings.admission(agent), subagentRuntime: getBoundSettings.subagentRuntime() });
|
|
209
|
+
registerDsmmStatusCommand(commandCtx, controller, statusSettings);
|
|
91
210
|
};
|
|
92
211
|
if (installCtx.get !== undefined && installCtx.inject !== undefined)
|
|
93
212
|
installCtx.inject(["commands"], installCommands);
|
|
94
213
|
else
|
|
95
214
|
installCommands(installCtx);
|
|
96
|
-
|
|
215
|
+
if (!startupMounted)
|
|
216
|
+
return;
|
|
97
217
|
// Standing compositions are deployment-only and never replaced on a
|
|
98
218
|
// runtime profile selection. All routes are read from Agent bindings.
|
|
99
|
-
registerRolePresets(installCtx, getReadySettings);
|
|
100
219
|
const settings = getReadySettings();
|
|
101
|
-
const root = resolveManagedPresetRoot(settings);
|
|
220
|
+
const root = resolveManagedPresetRoot(settings, deployment === undefined ? process.env : { ...process.env, DSH_HOME: deployment.home });
|
|
102
221
|
if (root !== undefined)
|
|
103
222
|
reconcileRolePresets({ root, settings });
|
|
104
223
|
};
|
|
105
224
|
if (readyCtx.get === undefined) {
|
|
225
|
+
registerRolePresets(readyCtx, getReadySettings);
|
|
106
226
|
install(readyCtx, getReadySettings);
|
|
227
|
+
if (startupMounted)
|
|
228
|
+
registerRoleProviders(readyCtx, getReadySettings, getReadySettings, rolePolicy);
|
|
107
229
|
return;
|
|
108
230
|
}
|
|
109
231
|
requiresNativeProfiles = true;
|
|
110
232
|
const installProfiles = async (profileCtx) => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const
|
|
233
|
+
if (native === undefined)
|
|
234
|
+
throw new Error("dsmm native profiles require the actual Cordis Host scope");
|
|
235
|
+
const hostCtx = profileCtx;
|
|
236
|
+
profileCtx = managedAgentContext(hostCtx, controlledParent);
|
|
237
|
+
if (startupMounted) {
|
|
238
|
+
await registerLspRuntime(profileCtx, { ...getReadySettings().lsp, enabled: false }, getBoundSettings);
|
|
239
|
+
}
|
|
240
|
+
// Standing definitions must exist before initialize audits retained
|
|
241
|
+
// Agents. A missing optional registry still installs later from this
|
|
242
|
+
// same frozen startup getter, without blocking unrelated Hosts.
|
|
243
|
+
const presets = registerRolePresets(profileCtx, getReadySettings);
|
|
244
|
+
if (profileCtx.get?.("agentPresets") !== undefined)
|
|
245
|
+
await presets;
|
|
246
|
+
const integration = await integrateSubagentRuntime(hostCtx, getReadySettings(), rolePolicy, () => runtime, hostStartup);
|
|
247
|
+
lifetime.signal.throwIfAborted();
|
|
248
|
+
if (hostStartup.experimentalLegacyRead !== undefined && integration === undefined)
|
|
249
|
+
throw new DsmmProfileError("unavailable", "Legacy read requires the explicit cold DSMM runtime composition.");
|
|
250
|
+
if (startupMounted && hostCtx.get("subagents") !== undefined) {
|
|
251
|
+
// The actual registry exists now. Alias registration is synchronous and
|
|
252
|
+
// does not wait on a policy-ready provider, avoiding a startup cycle.
|
|
253
|
+
registerRoleProviders({ get: hostCtx.get.bind(hostCtx), effect: callback => hostCtx.effect(() => callback() ?? (() => { })) }, getBoundSettings, getReadySettings, rolePolicy);
|
|
254
|
+
}
|
|
255
|
+
const retainedChildren = profileCtx.get("agents").list().filter(agent => agent.session.header?.origin === "subagent");
|
|
256
|
+
const manager = await createProfileRuntime(profileCtx, getReadySettings(), { modeController: controller,
|
|
257
|
+
getMountedPermission, deferRetainedChildren: integration !== undefined,
|
|
258
|
+
...(startup === undefined ? {} : { startup }), ...(deployment === undefined ? {} : { readDesired: () => deployment.readDesired() }),
|
|
259
|
+
...(integration === undefined ? {} : { childAuthority: integration.bridge.authority, childAuthorityOwner: integration.owner,
|
|
260
|
+
childAdmission: integration.bridge.childAdmission, childCapturePersistence: hostCtx.get("sessionPersistence") === undefined ? "resident" : "durable" }),
|
|
261
|
+
validateRootRole: (agent, admission) => {
|
|
262
|
+
// Candidate identity validation precedes publication. Its mode check
|
|
263
|
+
// must not recursively demand the not-yet-bound live admission.
|
|
264
|
+
validatingRootModule.set(agent, admission.settings.modules.deepwork.enabled);
|
|
265
|
+
try {
|
|
266
|
+
rolePolicy.validateRootRole(agent, admission);
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
validatingRootModule.delete(agent);
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
onAdmissionGuardsInstalled: async (initializing) => {
|
|
273
|
+
runtime = initializing;
|
|
274
|
+
integration?.onAdmissionGuardsInstalled();
|
|
275
|
+
// Native descendants are filtered from their direct parent's actual
|
|
276
|
+
// admission, including a preselected named profile, not startup mode.
|
|
277
|
+
for (const root of hostCtx.agents.roots()) {
|
|
278
|
+
const agent = root;
|
|
279
|
+
await initializing.completeAdmission(agent, undefined, startup);
|
|
280
|
+
completedRootAdmissions.add(agent);
|
|
281
|
+
}
|
|
282
|
+
rootAdmissionsInitialized = true;
|
|
283
|
+
if (integration?.legacyRead !== undefined) {
|
|
284
|
+
profileCtx.on?.("agent/created", async ({ agent, signal }) => {
|
|
285
|
+
await integration.afterChildAdmission(agent, signal);
|
|
286
|
+
}, { global: true });
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
subagentCapabilities: {
|
|
290
|
+
backgroundJobs: profileCtx.get?.("jobs") !== undefined,
|
|
291
|
+
continuable: profileCtx.get?.("sessionPersistence") !== undefined && profileCtx.get?.("sessionQuery") !== undefined
|
|
292
|
+
&& profileCtx.get?.("subagents")?.getProvider("spawn")?.prepareContinuable !== undefined
|
|
293
|
+
} });
|
|
294
|
+
runtime = manager;
|
|
295
|
+
lifetime.signal.throwIfAborted();
|
|
296
|
+
// Retained controlled children enroll only after their awaited admission
|
|
297
|
+
// in the Core-dependent continuation; ordinary Core startup stays independent.
|
|
298
|
+
const admittedCtx = admittedAgentContext(profileCtx, manager);
|
|
299
|
+
install(admittedCtx, getBoundSettings);
|
|
300
|
+
registerRuntimeGuidance(admittedCtx, getBoundSettings, rolePolicy);
|
|
301
|
+
const published = publicProfileRuntime(manager, hostCtx, integration?.legacyRead === undefined ? undefined : integration);
|
|
302
|
+
profileCtx.provide?.("dsmmProfileRuntime", published);
|
|
303
|
+
if (integration !== undefined) {
|
|
304
|
+
hostCtx.provide("dsmmRuntimeIntegration", integration);
|
|
305
|
+
hostCtx.inject(["dsmmCoreLlmOwner"], async (continuationCtx) => {
|
|
306
|
+
const continuation = new AbortController();
|
|
307
|
+
scopeLifetime(continuationCtx, "dsmm: cancel DW startup continuation", () => continuation.abort());
|
|
308
|
+
return integration.continueStartup(async (signal) => {
|
|
309
|
+
const visited = new Set();
|
|
310
|
+
const admit = async (agent) => {
|
|
311
|
+
signal.throwIfAborted();
|
|
312
|
+
lifetime.signal.throwIfAborted();
|
|
313
|
+
if (visited.has(agent))
|
|
314
|
+
return;
|
|
315
|
+
visited.add(agent);
|
|
316
|
+
const parent = hostCtx.agents.list().find(parent => parent !== agent && hostCtx.agents.isOwnedBy(agent.id, parent));
|
|
317
|
+
if (parent !== undefined)
|
|
318
|
+
await admit(parent);
|
|
319
|
+
if (parent !== undefined && classifyDsmmAgent(agent) === "native" && !controlledParent(parent))
|
|
320
|
+
return;
|
|
321
|
+
await manager.completeAdmission(agent, signal, startup);
|
|
322
|
+
await integration.afterChildAdmission(agent, signal);
|
|
323
|
+
};
|
|
324
|
+
for (const agent of retainedChildren)
|
|
325
|
+
if (hostCtx.agents.get(agent.id) === agent)
|
|
326
|
+
await admit(agent);
|
|
327
|
+
signal.throwIfAborted();
|
|
328
|
+
lifetime.signal.throwIfAborted();
|
|
329
|
+
await registerNativeSubagentControls(profileCtx);
|
|
330
|
+
signal.throwIfAborted();
|
|
331
|
+
lifetime.signal.throwIfAborted();
|
|
332
|
+
await registerHeadlessRoleTools(admittedAgentContext(profileCtx, manager), controller, getBoundSettings, rolePolicy, integration);
|
|
333
|
+
signal.throwIfAborted();
|
|
334
|
+
lifetime.signal.throwIfAborted();
|
|
335
|
+
hostCtx.inject(["typert"], scope => integration.registerControls(scope));
|
|
336
|
+
}, AbortSignal.any([lifetime.signal, continuation.signal]));
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
else
|
|
340
|
+
registerRoleControlContribution(hostCtx);
|
|
114
341
|
profileCtx.inject?.(["typert"], (rpcCtx) => {
|
|
115
|
-
|
|
342
|
+
new DsmmProfilesHost(rpcCtx, published);
|
|
116
343
|
});
|
|
117
|
-
install(profileCtx, runtime.getSettings);
|
|
118
344
|
};
|
|
119
345
|
if (readyCtx.inject !== undefined) {
|
|
120
|
-
|
|
121
|
-
|
|
346
|
+
profileInitialization = new Promise((resolve, reject) => {
|
|
347
|
+
const fiber = readyCtx.inject(["profileContext"], async (profileCtx) => {
|
|
348
|
+
try {
|
|
349
|
+
await installProfiles(profileCtx);
|
|
350
|
+
resolve();
|
|
351
|
+
}
|
|
352
|
+
catch (error) {
|
|
353
|
+
reject(error);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
scopeLifetime(fiber.ctx, "dsmm: cancel Core profile initialization", () => reject(new DsmmProfileError("unavailable", "Core profile initialization was disposed.")));
|
|
357
|
+
});
|
|
122
358
|
}
|
|
123
359
|
else
|
|
124
360
|
throw new Error("dsmm native profiles require asynchronous profileContext injection");
|
|
125
361
|
}
|
|
126
362
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
363
|
+
if (getSettings().modules.deepwork.enabled) {
|
|
364
|
+
registerRuntimeRecovery(ctx, controller, getBoundSettings);
|
|
365
|
+
registerModelRouting(ctx, controller, getBoundSettings);
|
|
366
|
+
}
|
|
367
|
+
if (ctx.get !== undefined) {
|
|
368
|
+
ctx.on?.("system-prompt/assemble", async (_assembly, options, next) => {
|
|
369
|
+
const agent = agentForScope(ctx, options.scope);
|
|
370
|
+
if (agent !== undefined)
|
|
371
|
+
rolePolicy.assertModuleAdmission(agent);
|
|
372
|
+
return next();
|
|
373
|
+
}, { prepend: true, global: true });
|
|
374
|
+
ctx.on?.("agent/request", async (frame, next) => {
|
|
375
|
+
rolePolicy.assertModuleAdmission(frame.agent);
|
|
376
|
+
assertDwDelivery(frame.agent);
|
|
377
|
+
return next();
|
|
378
|
+
}, { prepend: true, global: true });
|
|
379
|
+
ctx.on?.("tools/execute", async (exec, next) => {
|
|
380
|
+
if (exec.agent === undefined)
|
|
381
|
+
return next();
|
|
382
|
+
return rolePolicy.duringToolExecution(exec, next);
|
|
383
|
+
}, { global: true });
|
|
384
|
+
}
|
|
385
|
+
registerSafetyGuards(ctx, controller, getBoundSettings, ctx.get === undefined ? undefined : rolePolicy);
|
|
386
|
+
if (native === undefined)
|
|
387
|
+
return profileInitialization;
|
|
388
|
+
native.inject(["tools"], scope => {
|
|
389
|
+
managedAgentContext(scope, controlledParent).on("tools/pre-execute", (exec, next) => rolePolicy.beforeToolDecision(async () => {
|
|
390
|
+
if (exec.agent !== undefined && !nativeStandingFullAccess(scope, exec.agent)) {
|
|
391
|
+
rolePolicy.assertModuleAdmission(exec.agent);
|
|
392
|
+
assertDwDelivery(exec.agent);
|
|
393
|
+
}
|
|
394
|
+
return next();
|
|
395
|
+
}), { prepend: true, global: true });
|
|
396
|
+
managedAgentContext(scope, controlledParent).get("tools").guard(exec => {
|
|
397
|
+
rolePolicy.assertToolExecution(exec);
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
if (deployment !== undefined) {
|
|
401
|
+
const permissions = createCorePermissionAuthority(native, { getSettings: getBoundSettings, rolePolicy, signal: lifetime.signal });
|
|
402
|
+
native.inject(["tools"], scope => {
|
|
403
|
+
const installed = installCorePermissions(scope, deployment, permissions.authority, permissions.assertWritable);
|
|
404
|
+
const identity = Reflect.get(installed, symbols.original) ?? installed;
|
|
405
|
+
scopeLifetime(scope, "dsmm: release mounted permission projection", () => { if (permissionOwner === identity)
|
|
406
|
+
permissionOwner = undefined; }, () => { permissionOwner = identity; });
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
return Promise.resolve(profileInitialization).then(() => {
|
|
410
|
+
lifetime.signal.throwIfAborted();
|
|
411
|
+
const owner = { async admit(frame) {
|
|
412
|
+
const agent = frame.agent;
|
|
413
|
+
frame.signal.throwIfAborted();
|
|
414
|
+
lifetime.signal.throwIfAborted();
|
|
415
|
+
if (frame.agent.session.header.origin === "subagent" && classifyDsmmAgent(frame.agent) === "native") {
|
|
416
|
+
const registry = native.agents;
|
|
417
|
+
const parents = registry.list().filter(parent => parent !== frame.agent && registry.isOwnedBy(frame.agent.id, parent));
|
|
418
|
+
if (registry.get(frame.agent.id) !== frame.agent || parents.length !== 1
|
|
419
|
+
|| frame.agent.session.header.parentSession !== parents[0].id)
|
|
420
|
+
throw new DsmmProfileError("not-owned", "The native child lost its physical owner.");
|
|
421
|
+
if (!controlledParent(parents[0]))
|
|
422
|
+
return undefined;
|
|
423
|
+
}
|
|
424
|
+
rolePolicy.assertModuleAdmission(agent);
|
|
425
|
+
const admission = getBoundSettings.admission(agent);
|
|
426
|
+
const permissions = native.get("dsmmPermissionController");
|
|
427
|
+
const full = nativeStandingFullAccess(native, frame.agent);
|
|
428
|
+
if (!full && admission.settings.permissionControl.enabled && permissions === undefined)
|
|
429
|
+
throw new DsmmProfileError("unavailable", "Core permission authority is not ready.");
|
|
430
|
+
if (!full)
|
|
431
|
+
await permissions?.rules.refresh();
|
|
432
|
+
frame.signal.throwIfAborted();
|
|
433
|
+
lifetime.signal.throwIfAborted();
|
|
434
|
+
const permissionIdentity = permissions === undefined ? undefined : Reflect.get(permissions, symbols.original) ?? permissions;
|
|
435
|
+
const permissionRevision = full ? undefined : permissions?.rules.getPolicy().revision;
|
|
436
|
+
const permissionSignal = full ? undefined : permissions?.rules.signal;
|
|
437
|
+
const bindPermission = (captured) => {
|
|
438
|
+
if (full)
|
|
439
|
+
return captured;
|
|
440
|
+
const signal = AbortSignal.any([captured.signal, ...permissionSignal === undefined ? [] : [permissionSignal]]);
|
|
441
|
+
const assertCurrent = () => {
|
|
442
|
+
signal.throwIfAborted();
|
|
443
|
+
captured.assertCurrent();
|
|
444
|
+
const current = native.get("dsmmPermissionController");
|
|
445
|
+
if ((current === undefined ? undefined : Reflect.get(current, symbols.original) ?? current) !== permissionIdentity
|
|
446
|
+
|| current?.rules.getPolicy().revision !== permissionRevision
|
|
447
|
+
|| current?.rules.signal !== permissionSignal)
|
|
448
|
+
throw new DsmmProfileError("not-owned", "LLM permission revision changed.");
|
|
449
|
+
};
|
|
450
|
+
assertCurrent();
|
|
451
|
+
return Object.freeze({ ...captured, signal, assertCurrent });
|
|
452
|
+
};
|
|
453
|
+
if (rolePolicy.identity(agent).role !== undefined) {
|
|
454
|
+
const integration = native.get("dsmmRuntimeIntegration");
|
|
455
|
+
if (integration?.runtime.authority.view().deliveryFenceReady !== true)
|
|
456
|
+
throw new DsmmProfileError("unavailable", "Deepwork requests require the live delivery fence.");
|
|
457
|
+
const admitted = await integration.admitLlmRequest(frame.agent, frame.signal);
|
|
458
|
+
if (admitted === undefined)
|
|
459
|
+
throw new DsmmProfileError("not-owned", "Deepwork request lost its role admission.");
|
|
460
|
+
return bindPermission(admitted);
|
|
461
|
+
}
|
|
462
|
+
const signal = AbortSignal.any([frame.signal, lifetime.signal]);
|
|
463
|
+
const assertCurrent = () => {
|
|
464
|
+
signal.throwIfAborted();
|
|
465
|
+
rolePolicy.assertModuleAdmission(agent);
|
|
466
|
+
if (native.get("dsmmCoreLlmOwner") !== owner || getBoundSettings.admission(agent) !== admission)
|
|
467
|
+
throw new DsmmProfileError("not-owned", "Core LLM admission changed.");
|
|
468
|
+
};
|
|
469
|
+
assertCurrent();
|
|
470
|
+
return bindPermission(Object.freeze({ agent: frame.agent, admission, capture: admission, epoch: admission.epoch, signal, assertCurrent }));
|
|
471
|
+
} };
|
|
472
|
+
native.provide("dsmmCoreLlmOwner", owner);
|
|
473
|
+
});
|
|
132
474
|
}
|
|
133
475
|
// Cordis Loader introspects this object's Config/inject; a bare function loses
|
|
134
476
|
// the exported schema and may pass null where required DSMM defaults belong.
|
|
135
|
-
|
|
477
|
+
// Method-form apply keeps Cordis on its awaited callback, not constructor, path.
|
|
478
|
+
export default { name, inject, Config, apply(ctx, config = {}) { return apply(ctx, config); } };
|
|
136
479
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { ToolDefinition, ToolExecution, ToolGuard, ToolRuntime } from "@deepseek-ai/dsh-tools";
|
|
3
|
+
import type { ChildAdmissionLimitation, ChildEvidenceField, LegacyChildEvidence } from "./child-capture.js";
|
|
4
|
+
import type { DsmmProfileAdmission, DsmmSettings } from "./settings.js";
|
|
5
|
+
import type { LegacyReadCompositionLease } from "./legacy-read-contracts.js";
|
|
6
|
+
import type { LegacyReadProxy } from "./legacy-read-proxy.js";
|
|
7
|
+
export interface LegacyToolCapability {
|
|
8
|
+
readonly kind: "read" | "child-report" | "write" | "shell" | "delegation" | "other";
|
|
9
|
+
/** Stable native definition identity; name alone does not prove parameter permissions. */
|
|
10
|
+
readonly definition: ToolDefinition;
|
|
11
|
+
/** Exact schema/argument contract is audited by the Host/B collaborator, never inferred from a name. */
|
|
12
|
+
assertArguments(arguments_: unknown): void;
|
|
13
|
+
/** A read is admitted only inside the real registered proxy's leased native invocation. */
|
|
14
|
+
readonly operation?: LegacyReadOperationCapability;
|
|
15
|
+
}
|
|
16
|
+
export interface LegacyReadOperationCapability {
|
|
17
|
+
readonly parent: Agent;
|
|
18
|
+
readonly child: Agent;
|
|
19
|
+
readonly definition: ToolDefinition;
|
|
20
|
+
assertLeasedOperation(exec: Readonly<ToolExecution>): void;
|
|
21
|
+
}
|
|
22
|
+
/** Process-local glue for the trusted startup adapter, never a permission-query or wire grant. */
|
|
23
|
+
export declare function createLegacyReadOperationCapability(proxy: LegacyReadProxy, leaseFor: (exec: Readonly<ToolExecution>) => LegacyReadCompositionLease | undefined): LegacyReadOperationCapability;
|
|
24
|
+
export interface LegacyCapabilityCollaborators {
|
|
25
|
+
classifyTool(name: string, tools: ToolRuntime, child: Agent): LegacyToolCapability | undefined;
|
|
26
|
+
/** Exact direct-parent reporting authority only; read permission is decided by the real parent pipeline. */
|
|
27
|
+
assertParentReport?(parent: Agent, child: Agent, arguments_: unknown, definition: ToolDefinition, evidence: LegacyChildEvidence): void;
|
|
28
|
+
/** Older report collaborators may use this spelling. It is NEVER consulted for read. */
|
|
29
|
+
assertParentTool?(parent: Agent, name: string, arguments_: unknown, definition: ToolDefinition): void;
|
|
30
|
+
/** Trusted cold Host inventory of the actual registered child guard; never a permission grant. */
|
|
31
|
+
onGuardInstalled?(child: Agent, guard: ToolGuard): void;
|
|
32
|
+
}
|
|
33
|
+
export interface LegacyToolDenial {
|
|
34
|
+
readonly field: ChildEvidenceField;
|
|
35
|
+
readonly code: ChildAdmissionLimitation["code"];
|
|
36
|
+
}
|
|
37
|
+
/** A restrictive current admission, explicitly NOT a reconstruction of the original settings or epoch. */
|
|
38
|
+
export declare function createConservativeLegacyAdmission(raw: LegacyChildEvidence, parent: DsmmProfileAdmission, nativeSubstrate: DsmmSettings): DsmmProfileAdmission;
|
|
39
|
+
/** Body-before guard for the proven read subset and the native child -> direct-parent report path. */
|
|
40
|
+
export declare class LegacyChildToolPolicy {
|
|
41
|
+
private readonly evidence;
|
|
42
|
+
private readonly parent;
|
|
43
|
+
private readonly child;
|
|
44
|
+
private readonly collaborators;
|
|
45
|
+
constructor(evidence: LegacyChildEvidence, parent: Agent, child: Agent, collaborators: LegacyCapabilityCollaborators);
|
|
46
|
+
denial(name: string, arguments_: unknown, tools: ToolRuntime, exec?: Readonly<ToolExecution>): LegacyToolDenial | undefined;
|
|
47
|
+
assertTool(name: string, arguments_: unknown, tools: ToolRuntime, exec?: Readonly<ToolExecution>): void;
|
|
48
|
+
}
|
|
49
|
+
/** Scoped monotonic native guard; denied bodies never execute, including locally registered tools. */
|
|
50
|
+
export declare function installLegacyChildToolPolicy(evidence: LegacyChildEvidence, parent: Agent, child: Agent, collaborators: LegacyCapabilityCollaborators): () => void;
|
|
51
|
+
//# sourceMappingURL=legacy-child-policy.d.ts.map
|