@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,123 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
import { SubagentError } from "@deepseek-ai/dsh-subagent";
|
|
3
|
+
import { parseLegacyChildEvidence } from "./child-capture.js";
|
|
4
|
+
import { DSMM_ROLE_IDS } from "./roles.js";
|
|
5
|
+
import { copyJson, freezeSettings, resolveConfig } from "./settings.js";
|
|
6
|
+
const readOperations = new WeakSet();
|
|
7
|
+
/** Process-local glue for the trusted startup adapter, never a permission-query or wire grant. */
|
|
8
|
+
export function createLegacyReadOperationCapability(proxy, leaseFor) {
|
|
9
|
+
const { parent, child, definition } = proxy;
|
|
10
|
+
const capability = Object.freeze({ parent, child, definition, assertLeasedOperation(exec) {
|
|
11
|
+
const lease = leaseFor(exec);
|
|
12
|
+
if (lease === undefined || definition === proxy.nativeDefinition || exec.agent !== child || exec.name !== "read"
|
|
13
|
+
|| child.ctx.tools.get("read", child) !== definition || parent.ctx.tools.get("read", parent) !== proxy.nativeDefinition
|
|
14
|
+
|| lease.bindings.parent !== parent || lease.bindings.child !== child || lease.bindings.definition !== proxy.nativeDefinition
|
|
15
|
+
|| lease.ticket.parent !== parent)
|
|
16
|
+
throw new SubagentError("Legacy read requires the real proxy's leased invocation", "UNAUTHORIZED");
|
|
17
|
+
lease.assertActive();
|
|
18
|
+
} });
|
|
19
|
+
readOperations.add(capability);
|
|
20
|
+
return capability;
|
|
21
|
+
}
|
|
22
|
+
/** A restrictive current admission, explicitly NOT a reconstruction of the original settings or epoch. */
|
|
23
|
+
export function createConservativeLegacyAdmission(raw, parent, nativeSubstrate) {
|
|
24
|
+
const evidence = parseLegacyChildEvidence(raw);
|
|
25
|
+
if (!parent.settings.modules.deepwork.enabled || !parent.settings.roles[evidence.role])
|
|
26
|
+
throw new SubagentError("Current parent denies the legacy role", "UNAUTHORIZED");
|
|
27
|
+
const { locale: _locale, ...substrate } = copyJson(nativeSubstrate);
|
|
28
|
+
const settings = resolveConfig({ ...substrate,
|
|
29
|
+
modules: { deepwork: { enabled: true } },
|
|
30
|
+
roles: Object.fromEntries(DSMM_ROLE_IDS.map(role => [role, role === evidence.role])),
|
|
31
|
+
roleRouting: { [evidence.role]: { primary: evidence.route, fallbackRoutes: [] } },
|
|
32
|
+
defaultActive: evidence.active ?? false,
|
|
33
|
+
skills: Object.fromEntries(Object.keys(substrate.skills).map(skill => [skill, false])),
|
|
34
|
+
deepseekV4ProCalibration: "off", deepseekV4ProDefaultReasoningEffort: "off", deepseekFlashCalibration: "off", deepseekFlashDefaultReasoningEffort: "off",
|
|
35
|
+
workflow: { policy: "risk-based", strictGates: true, reviewCap: 0, finalReviewPolicy: "off" },
|
|
36
|
+
guards: { scope: "always", shellCommandSafety: true, gitWriteGuard: "deny" },
|
|
37
|
+
runtimeRecovery: { enabled: false, fallbackRoutes: [], idleContinuation: { enabled: false } },
|
|
38
|
+
subagents: { toolTopology: "per-role", allowRouteOverride: false, enableRunInBackground: false, backgroundMode: "continuable", maxDepth: evidence.depth },
|
|
39
|
+
});
|
|
40
|
+
return freezeSettings({ settings, profile: null, epoch: randomBytes(32).toString("hex"), scope: "deployment-baseline", childEvidence: {
|
|
41
|
+
mode: "legacy-conservative", parentAdmissionEpoch: parent.epoch, provenFields: evidence.provenFields, limitations: evidence.limitations
|
|
42
|
+
} });
|
|
43
|
+
}
|
|
44
|
+
/** Body-before guard for the proven read subset and the native child -> direct-parent report path. */
|
|
45
|
+
export class LegacyChildToolPolicy {
|
|
46
|
+
evidence;
|
|
47
|
+
parent;
|
|
48
|
+
child;
|
|
49
|
+
collaborators;
|
|
50
|
+
constructor(evidence, parent, child, collaborators) {
|
|
51
|
+
this.evidence = parseLegacyChildEvidence(evidence);
|
|
52
|
+
if (child.id !== evidence.childSessionId || parent.id !== evidence.parentSessionId || child.session.header.parentSession !== parent.id) {
|
|
53
|
+
throw new SubagentError("Legacy tools require exact child/direct-parent identity", "UNAUTHORIZED");
|
|
54
|
+
}
|
|
55
|
+
this.parent = parent;
|
|
56
|
+
this.child = child;
|
|
57
|
+
this.collaborators = collaborators;
|
|
58
|
+
}
|
|
59
|
+
denial(name, arguments_, tools, exec) {
|
|
60
|
+
const capability = this.collaborators.classifyTool(name, tools, this.child);
|
|
61
|
+
if (capability?.kind === "write")
|
|
62
|
+
return { field: "runtime-policy", code: "missing-evidence" };
|
|
63
|
+
if (capability?.kind === "shell")
|
|
64
|
+
return { field: "shell", code: "missing-evidence" };
|
|
65
|
+
if (capability?.kind === "delegation")
|
|
66
|
+
return { field: "delegation", code: "missing-evidence" };
|
|
67
|
+
if (capability === undefined || capability.kind === "other" || tools.get(name, this.child) !== capability.definition)
|
|
68
|
+
return { field: "tool-filter", code: "missing-evidence" };
|
|
69
|
+
if (capability.kind === "read" && (this.evidence.toolFilter?.allow === undefined || !this.evidence.toolFilter.allow.includes(name)
|
|
70
|
+
|| this.evidence.toolFilter.deny?.includes(name)))
|
|
71
|
+
return { field: "tool-filter", code: "missing-evidence" };
|
|
72
|
+
// The report collaborator must check the explicit destination against the exact direct parent.
|
|
73
|
+
try {
|
|
74
|
+
capability.assertArguments(arguments_);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return { field: "tool-filter", code: "missing-evidence" };
|
|
78
|
+
}
|
|
79
|
+
if (capability.kind === "read") {
|
|
80
|
+
const operation = capability.operation;
|
|
81
|
+
if (operation === undefined || !readOperations.has(operation) || operation.parent !== this.parent || operation.child !== this.child
|
|
82
|
+
|| operation.definition !== capability.definition || exec === undefined || exec.agent !== this.child || exec.name !== name
|
|
83
|
+
|| exec.arguments !== arguments_)
|
|
84
|
+
return { field: "tool-filter", code: "unverified" };
|
|
85
|
+
try {
|
|
86
|
+
operation.assertLeasedOperation(exec);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return { field: "tool-filter", code: "unverified" };
|
|
90
|
+
}
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
if (this.collaborators.assertParentReport !== undefined)
|
|
95
|
+
this.collaborators.assertParentReport(this.parent, this.child, arguments_, capability.definition, this.evidence);
|
|
96
|
+
else if (this.collaborators.assertParentTool !== undefined)
|
|
97
|
+
this.collaborators.assertParentTool(this.parent, name, arguments_, capability.definition);
|
|
98
|
+
else
|
|
99
|
+
throw new SubagentError("Legacy report requires exact parent authority", "UNAUTHORIZED");
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return { field: "tool-filter", code: "parent-denied" };
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
assertTool(name, arguments_, tools, exec) {
|
|
107
|
+
if (this.denial(name, arguments_, tools, exec) !== undefined)
|
|
108
|
+
throw new SubagentError("Legacy evidence does not authorize this tool capability", "UNAUTHORIZED");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** Scoped monotonic native guard; denied bodies never execute, including locally registered tools. */
|
|
112
|
+
export function installLegacyChildToolPolicy(evidence, parent, child, collaborators) {
|
|
113
|
+
const tools = child.ctx.get("tools");
|
|
114
|
+
if (tools === undefined)
|
|
115
|
+
throw new SubagentError("Legacy execution requires a native tool guard", "UNAUTHORIZED");
|
|
116
|
+
const policy = new LegacyChildToolPolicy(evidence, parent, child, collaborators);
|
|
117
|
+
const guard = exec => exec.agent !== child || policy.denial(exec.name, exec.arguments, tools, exec) !== undefined
|
|
118
|
+
? "Legacy child capability is not proven by its durable evidence" : undefined;
|
|
119
|
+
const release = tools.guard(guard);
|
|
120
|
+
collaborators.onGuardInstalled?.(child, guard);
|
|
121
|
+
return release;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=legacy-child-policy.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { LegacyChildEvidence } from "./child-capture.js";
|
|
3
|
+
import type { LegacyReadBindings, LegacyReadClosedSnapshot, LegacyReadCompositionLease, LegacyReadHostOwner } from "./legacy-read-contracts.js";
|
|
4
|
+
export interface LegacyReadComposition {
|
|
5
|
+
readonly owner: LegacyReadHostOwner;
|
|
6
|
+
view(): {
|
|
7
|
+
state: "off" | "ready" | "closed" | "disposed";
|
|
8
|
+
generation: number;
|
|
9
|
+
activeCalls: number;
|
|
10
|
+
reason?: string;
|
|
11
|
+
};
|
|
12
|
+
captureClosedComposition(): LegacyReadClosedSnapshot | undefined;
|
|
13
|
+
publishGeneration(snapshot: LegacyReadClosedSnapshot, expectedGeneration: number): void;
|
|
14
|
+
acquireLease(parent: Agent, child: Agent, evidence: LegacyChildEvidence, signal: AbortSignal): LegacyReadCompositionLease;
|
|
15
|
+
closeForChange(reason: string): Promise<void>;
|
|
16
|
+
closeForDispose(reason: string): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare function createLegacyReadComposition(owner: LegacyReadHostOwner): LegacyReadComposition;
|
|
19
|
+
export declare function assertLegacyReadBindings(lease: LegacyReadCompositionLease, current: LegacyReadBindings): void;
|
|
20
|
+
//# sourceMappingURL=legacy-read-composition.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { symbols } from "@deepseek-ai/cordis";
|
|
2
|
+
import { parseLegacyChildEvidence } from "./child-capture.js";
|
|
3
|
+
import { isLegacyReadHostOwner, LegacyReadUnavailable } from "./legacy-read-contracts.js";
|
|
4
|
+
function checkSnapshot(owner, snapshot) {
|
|
5
|
+
if (snapshot?.owner !== owner || snapshot.coverage !== "host-owned-complete" || snapshot.mutation !== "owner-coordinated"
|
|
6
|
+
|| snapshot.fidelity !== "canonical-value-content-contexts" || !["never-ask", "coordinated-turn"].includes(snapshot.approval)
|
|
7
|
+
|| !snapshot.scopes?.length || !snapshot.bindings?.length || !Array.isArray(snapshot.policies))
|
|
8
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
9
|
+
for (const scope of snapshot.scopes) {
|
|
10
|
+
if (!scope.ctx || !scope.key || !Array.isArray(scope.ancestors))
|
|
11
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
12
|
+
}
|
|
13
|
+
for (const policy of snapshot.policies) {
|
|
14
|
+
if (policy.semantics !== "audited-zero-or-once" || !policy.reference || !snapshot.scopes.some(scope => scope.ctx === policy.scope)
|
|
15
|
+
|| !Number.isSafeInteger(policy.order))
|
|
16
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
17
|
+
}
|
|
18
|
+
for (const binding of snapshot.bindings) {
|
|
19
|
+
if (!binding.mount || !binding.config || !binding.parentProvider || !binding.childProvider || !binding.parentWorld || !binding.childWorld
|
|
20
|
+
|| !binding.parentFs || !binding.childFs || binding.definition?.name !== "read"
|
|
21
|
+
|| !binding.caps || [binding.caps.limit, binding.caps.maxBytes, binding.caps.maxLineLength, binding.caps.streamMinSize].some(cap => !Number.isSafeInteger(cap) || cap < 1)
|
|
22
|
+
|| !snapshot.scopes.some(scope => scope.key === binding.parent) || !snapshot.scopes.some(scope => scope.key === binding.child)) {
|
|
23
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function createLegacyReadComposition(owner) {
|
|
28
|
+
if (!isLegacyReadHostOwner(owner))
|
|
29
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
30
|
+
let state = "off";
|
|
31
|
+
let generation = 0, reason, snapshot;
|
|
32
|
+
const lifetime = new AbortController();
|
|
33
|
+
const active = new Set();
|
|
34
|
+
const waiters = new Set();
|
|
35
|
+
let captures = new WeakSet();
|
|
36
|
+
const drain = () => active.size === 0 ? Promise.resolve() : new Promise(resolve => waiters.add(resolve));
|
|
37
|
+
const composition = {
|
|
38
|
+
owner,
|
|
39
|
+
view: () => ({ state, generation, activeCalls: active.size, ...(reason === undefined ? {} : { reason }) }),
|
|
40
|
+
captureClosedComposition() {
|
|
41
|
+
if (state === "ready" || state === "disposed" || active.size)
|
|
42
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
43
|
+
const captured = owner.captureClosedComposition();
|
|
44
|
+
if (captured !== undefined) {
|
|
45
|
+
checkSnapshot(owner, captured);
|
|
46
|
+
captures.add(captured);
|
|
47
|
+
}
|
|
48
|
+
return captured;
|
|
49
|
+
},
|
|
50
|
+
publishGeneration(next, expected) {
|
|
51
|
+
if (state === "ready" || state === "disposed" || active.size || generation !== expected || !captures.has(next))
|
|
52
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
53
|
+
checkSnapshot(owner, next);
|
|
54
|
+
// Copy attested inventory, retaining actual definition/service/policy identities.
|
|
55
|
+
snapshot = Object.freeze({ ...next, scopes: Object.freeze(next.scopes.map(scope => Object.freeze({ ...scope, ancestors: Object.freeze([...scope.ancestors]) }))),
|
|
56
|
+
policies: Object.freeze(next.policies.map(policy => Object.freeze({ ...policy }))), bindings: Object.freeze([...next.bindings]) });
|
|
57
|
+
captures.delete(next);
|
|
58
|
+
generation++;
|
|
59
|
+
state = "ready";
|
|
60
|
+
reason = undefined;
|
|
61
|
+
},
|
|
62
|
+
acquireLease(parent, child, rawEvidence, signal) {
|
|
63
|
+
if (state !== "ready" || snapshot === undefined)
|
|
64
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
65
|
+
signal.throwIfAborted();
|
|
66
|
+
const evidence = parseLegacyChildEvidence(rawEvidence);
|
|
67
|
+
if (parent === child || parent.id !== evidence.parentSessionId || child.id !== evidence.childSessionId
|
|
68
|
+
|| child.session.header.parentSession !== parent.id || parent.ctx.agents.get(parent.id) !== parent || child.ctx.agents.get(child.id) !== child
|
|
69
|
+
|| !child.ctx.agents.isOwnedBy(child.id, parent) || !evidence.toolFilter?.allow?.includes("read") || evidence.toolFilter.deny?.includes("read"))
|
|
70
|
+
throw new LegacyReadUnavailable("evidence-unavailable");
|
|
71
|
+
const acquiredGeneration = generation, acquiredSnapshot = snapshot;
|
|
72
|
+
const ticket = owner.acquireParentTicket(parent);
|
|
73
|
+
if (ticket.parent !== parent)
|
|
74
|
+
throw new LegacyReadUnavailable("evidence-unavailable");
|
|
75
|
+
owner.assertParentTicket(ticket);
|
|
76
|
+
const original = owner.resolveChildAdmission(parent, child, rawEvidence, ticket);
|
|
77
|
+
if (original.source !== "physical-old" || original.evidence !== rawEvidence || original.originalCapture !== undefined
|
|
78
|
+
|| !original.physicalRecords.length || !Object.isFrozen(original.admission))
|
|
79
|
+
throw new LegacyReadUnavailable("evidence-unavailable");
|
|
80
|
+
const bindings = snapshot.bindings.find(binding => binding.parent === parent && binding.child === child);
|
|
81
|
+
if (bindings === undefined)
|
|
82
|
+
throw new LegacyReadUnavailable("provenance-unavailable");
|
|
83
|
+
const merged = AbortSignal.any([signal, ticket.signal, original.childLifetime, lifetime.signal]);
|
|
84
|
+
merged.throwIfAborted();
|
|
85
|
+
if (state !== "ready" || generation !== acquiredGeneration || snapshot !== acquiredSnapshot)
|
|
86
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
87
|
+
let released = false;
|
|
88
|
+
const lease = Object.freeze({ owner, generation, signal: merged, ticket, bindings, approval: snapshot.approval,
|
|
89
|
+
assertActive() {
|
|
90
|
+
if (released || !active.has(lease))
|
|
91
|
+
throw new LegacyReadUnavailable("lifetime-unavailable");
|
|
92
|
+
merged.throwIfAborted();
|
|
93
|
+
owner.assertParentTicket(ticket);
|
|
94
|
+
},
|
|
95
|
+
release() {
|
|
96
|
+
if (released)
|
|
97
|
+
return;
|
|
98
|
+
released = true;
|
|
99
|
+
active.delete(lease);
|
|
100
|
+
if (!active.size) {
|
|
101
|
+
for (const resolve of waiters)
|
|
102
|
+
resolve();
|
|
103
|
+
waiters.clear();
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
active.add(lease);
|
|
108
|
+
return lease;
|
|
109
|
+
},
|
|
110
|
+
closeForChange(nextReason) {
|
|
111
|
+
captures = new WeakSet();
|
|
112
|
+
if (state !== "disposed") {
|
|
113
|
+
state = "closed";
|
|
114
|
+
reason = nextReason;
|
|
115
|
+
}
|
|
116
|
+
return drain();
|
|
117
|
+
},
|
|
118
|
+
closeForDispose(nextReason) {
|
|
119
|
+
captures = new WeakSet();
|
|
120
|
+
if (state !== "disposed") {
|
|
121
|
+
state = "disposed";
|
|
122
|
+
reason = nextReason;
|
|
123
|
+
try {
|
|
124
|
+
owner.revoke(nextReason);
|
|
125
|
+
}
|
|
126
|
+
finally {
|
|
127
|
+
lifetime.abort(nextReason);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return drain();
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
return composition;
|
|
134
|
+
}
|
|
135
|
+
export function assertLegacyReadBindings(lease, current) {
|
|
136
|
+
const expected = lease.bindings;
|
|
137
|
+
const original = (value) => value === undefined ? undefined : Reflect.get(value, symbols.original) ?? value;
|
|
138
|
+
if (current !== expected || current.parent.ctx.get("tools")?.get("read", current.parent) !== current.definition
|
|
139
|
+
|| original(current.child.ctx.get("fs")) !== original(current.childFs) || original(current.parent.ctx.get("fs")) !== original(current.parentFs)
|
|
140
|
+
|| current.parentProvider !== current.childProvider || current.parentWorld !== current.childWorld)
|
|
141
|
+
throw new LegacyReadUnavailable("provenance-unavailable");
|
|
142
|
+
lease.assertActive();
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=legacy-read-composition.js.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
3
|
+
import { HarnessError } from "@deepseek-ai/dsh-llm";
|
|
4
|
+
import type { ToolDefinition, ToolExecution, ToolExecutionResult } from "@deepseek-ai/dsh-tools";
|
|
5
|
+
import type { LegacyChildEvidence } from "./child-capture.js";
|
|
6
|
+
export type LegacyReadUnavailableCode = "composition-unavailable" | "evidence-unavailable" | "provenance-unavailable" | "target-unavailable" | "arguments-unavailable" | "approval-unavailable" | "audit-unavailable" | "lifetime-unavailable";
|
|
7
|
+
export declare class LegacyReadUnavailable extends HarnessError {
|
|
8
|
+
readonly code: LegacyReadUnavailableCode;
|
|
9
|
+
constructor(code: LegacyReadUnavailableCode);
|
|
10
|
+
}
|
|
11
|
+
export interface LegacyReadTarget {
|
|
12
|
+
readonly targetKey: unknown;
|
|
13
|
+
readonly displayPath: string;
|
|
14
|
+
}
|
|
15
|
+
/** Structural public FileSystem surface: no provider-private target decoding. */
|
|
16
|
+
export interface LegacyReadFileSystem {
|
|
17
|
+
resolve(path: string, options: {
|
|
18
|
+
cwd?: string;
|
|
19
|
+
signal: AbortSignal;
|
|
20
|
+
}): Promise<LegacyReadTarget>;
|
|
21
|
+
processPath(target: LegacyReadTarget): string;
|
|
22
|
+
processPathFromHostPath(path: string): string | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface LegacyReadBindings {
|
|
25
|
+
readonly parent: Agent;
|
|
26
|
+
readonly child: Agent;
|
|
27
|
+
readonly definition: ToolDefinition;
|
|
28
|
+
readonly mount: object;
|
|
29
|
+
readonly config: object;
|
|
30
|
+
readonly caps: {
|
|
31
|
+
readonly limit: number;
|
|
32
|
+
readonly maxBytes: number;
|
|
33
|
+
readonly maxLineLength: number;
|
|
34
|
+
readonly streamMinSize: number;
|
|
35
|
+
};
|
|
36
|
+
readonly parentFs: LegacyReadFileSystem;
|
|
37
|
+
readonly childFs: LegacyReadFileSystem;
|
|
38
|
+
readonly parentProvider: object;
|
|
39
|
+
readonly childProvider: object;
|
|
40
|
+
readonly parentWorld: object;
|
|
41
|
+
readonly childWorld: object;
|
|
42
|
+
}
|
|
43
|
+
export interface LegacyReadParentTicket {
|
|
44
|
+
readonly parent: Agent;
|
|
45
|
+
readonly owner: object;
|
|
46
|
+
readonly admission: object;
|
|
47
|
+
readonly parentEpoch: string;
|
|
48
|
+
readonly signal: AbortSignal;
|
|
49
|
+
}
|
|
50
|
+
export interface LegacyReadEvidenceBinding {
|
|
51
|
+
readonly evidence: LegacyChildEvidence;
|
|
52
|
+
readonly admission: object;
|
|
53
|
+
readonly source: "physical-old";
|
|
54
|
+
readonly physicalRecords: readonly object[];
|
|
55
|
+
/** A present original capture belongs to the captured path, never this proxy. */
|
|
56
|
+
readonly originalCapture?: never;
|
|
57
|
+
readonly childLifetime: AbortSignal;
|
|
58
|
+
}
|
|
59
|
+
export type LegacyReadStage = "pre" | "guard" | "around" | "post" | "project" | "finalization" | "filter";
|
|
60
|
+
export interface LegacyReadClosedSnapshot {
|
|
61
|
+
readonly owner: LegacyReadHostOwner;
|
|
62
|
+
readonly coverage: "host-owned-complete";
|
|
63
|
+
readonly scopes: readonly {
|
|
64
|
+
readonly ctx: Context;
|
|
65
|
+
readonly key: object;
|
|
66
|
+
readonly ancestors: readonly object[];
|
|
67
|
+
}[];
|
|
68
|
+
readonly policies: readonly {
|
|
69
|
+
readonly side: "parent" | "child" | "both";
|
|
70
|
+
readonly stage: LegacyReadStage;
|
|
71
|
+
readonly scope: Context;
|
|
72
|
+
readonly reference: object;
|
|
73
|
+
readonly order: number;
|
|
74
|
+
readonly semantics: "audited-zero-or-once" | "unknown" | "metadata-dependent" | "failure-content-dependent" | "context-dependent" | "ambiguous-transform" | "detached-retry" | "multiple-next";
|
|
75
|
+
}[];
|
|
76
|
+
readonly bindings: readonly LegacyReadBindings[];
|
|
77
|
+
readonly approval: "never-ask" | "coordinated-turn";
|
|
78
|
+
readonly fidelity: "canonical-value-content-contexts";
|
|
79
|
+
readonly mutation: "owner-coordinated";
|
|
80
|
+
}
|
|
81
|
+
export interface LegacyReadActualOutcomes {
|
|
82
|
+
readonly childExecution: Readonly<ToolExecution>;
|
|
83
|
+
readonly parentExecution?: {
|
|
84
|
+
readonly callId: string;
|
|
85
|
+
readonly rootCallId: string;
|
|
86
|
+
readonly parent: ToolExecution["token"];
|
|
87
|
+
};
|
|
88
|
+
readonly parentResult?: ToolExecutionResult;
|
|
89
|
+
readonly childResult: ToolExecutionResult;
|
|
90
|
+
}
|
|
91
|
+
declare const ownerBrand: unique symbol;
|
|
92
|
+
declare const compositionBrand: unique symbol;
|
|
93
|
+
declare const callBrand: unique symbol;
|
|
94
|
+
export interface LegacyReadCompositionLease {
|
|
95
|
+
readonly [compositionBrand]: true;
|
|
96
|
+
readonly owner: LegacyReadHostOwner;
|
|
97
|
+
readonly generation: number;
|
|
98
|
+
readonly signal: AbortSignal;
|
|
99
|
+
readonly ticket: LegacyReadParentTicket;
|
|
100
|
+
readonly bindings: LegacyReadBindings;
|
|
101
|
+
readonly approval: LegacyReadClosedSnapshot["approval"];
|
|
102
|
+
assertActive(): void;
|
|
103
|
+
release(): void;
|
|
104
|
+
}
|
|
105
|
+
export interface LegacyReadCallLease {
|
|
106
|
+
readonly [callBrand]: true;
|
|
107
|
+
readonly approval: {
|
|
108
|
+
readonly kind: "never-ask";
|
|
109
|
+
} | {
|
|
110
|
+
readonly kind: "coordinated-turn";
|
|
111
|
+
readonly turn: {
|
|
112
|
+
readonly parent: Agent;
|
|
113
|
+
readonly openTurnStartSeq: number;
|
|
114
|
+
};
|
|
115
|
+
readonly signal: AbortSignal;
|
|
116
|
+
/** Optional real child turn for local fences/dispatch; not proof of native caller lifetime or child approval support. */
|
|
117
|
+
readonly childTurn?: {
|
|
118
|
+
readonly child: Agent;
|
|
119
|
+
readonly openTurnStartSeq: number;
|
|
120
|
+
readonly signal: AbortSignal;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly signal: AbortSignal;
|
|
124
|
+
/** Check the real turn/audit route again after awaits and immediately before dispatch. */
|
|
125
|
+
assertAvailable(): void;
|
|
126
|
+
finish(outcomes: LegacyReadActualOutcomes): Promise<void>;
|
|
127
|
+
release(): void;
|
|
128
|
+
}
|
|
129
|
+
export interface LegacyReadHostOwnerCallbacks {
|
|
130
|
+
captureClosedComposition(): LegacyReadClosedSnapshot | undefined;
|
|
131
|
+
acquireParentTicket(parent: Agent): LegacyReadParentTicket;
|
|
132
|
+
assertParentTicket(ticket: LegacyReadParentTicket): void;
|
|
133
|
+
resolveChildAdmission(parent: Agent, child: Agent, evidence: LegacyChildEvidence, ticket: LegacyReadParentTicket): LegacyReadEvidenceBinding;
|
|
134
|
+
resolveReadBindings(parent: Agent, child: Agent, lease: LegacyReadCompositionLease): LegacyReadBindings;
|
|
135
|
+
/**
|
|
136
|
+
* Runs before downstream child pre/approval, and before target mapping or parent dispatch.
|
|
137
|
+
* exec remains the read-only native view with original child arguments and caller signal.
|
|
138
|
+
* Acquisition must consume lease.signal (caller/parent/child/composition revocation) and
|
|
139
|
+
* coordinate real turn leases before its own awaits. The returned lease covers the entire child pipeline,
|
|
140
|
+
* including child-only denial/cancel/error, whose actual outcomes have no parent execution.
|
|
141
|
+
* The owner cleans up resources if acquisition fails before it returns a branded lease.
|
|
142
|
+
*/
|
|
143
|
+
acquireCallContext(parent: Agent, child: Agent, exec: ToolExecution, lease: LegacyReadCompositionLease): Promise<LegacyReadCallLease>;
|
|
144
|
+
/** Synchronous admission/opaque-handle revocation BEFORE native drain. */
|
|
145
|
+
revoke(reason: string): void;
|
|
146
|
+
reportAuditFault(error: unknown, outcomes: LegacyReadActualOutcomes): void;
|
|
147
|
+
}
|
|
148
|
+
export interface LegacyReadHostOwner extends LegacyReadHostOwnerCallbacks {
|
|
149
|
+
readonly [ownerBrand]: true;
|
|
150
|
+
}
|
|
151
|
+
/** Trusted startup code only. Neither factory is a JSON/RPC attestation endpoint. */
|
|
152
|
+
export declare function createLegacyReadHostOwner(callbacks: LegacyReadHostOwnerCallbacks): LegacyReadHostOwner;
|
|
153
|
+
export declare function isLegacyReadHostOwner(owner: unknown): owner is LegacyReadHostOwner;
|
|
154
|
+
export declare function createLegacyReadCallLease(callbacks: Omit<LegacyReadCallLease, typeof callBrand>): LegacyReadCallLease;
|
|
155
|
+
export declare function isLegacyReadCallLease(lease: unknown): lease is LegacyReadCallLease;
|
|
156
|
+
export {};
|
|
157
|
+
//# sourceMappingURL=legacy-read-contracts.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HarnessError } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
export class LegacyReadUnavailable extends HarnessError {
|
|
3
|
+
code;
|
|
4
|
+
constructor(code) {
|
|
5
|
+
super(code, code);
|
|
6
|
+
this.code = code;
|
|
7
|
+
this.name = "LegacyReadUnavailable";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const owners = new WeakSet();
|
|
11
|
+
const callLeases = new WeakSet();
|
|
12
|
+
/** Trusted startup code only. Neither factory is a JSON/RPC attestation endpoint. */
|
|
13
|
+
export function createLegacyReadHostOwner(callbacks) {
|
|
14
|
+
const owner = Object.freeze({
|
|
15
|
+
captureClosedComposition: callbacks.captureClosedComposition.bind(callbacks),
|
|
16
|
+
acquireParentTicket: callbacks.acquireParentTicket.bind(callbacks),
|
|
17
|
+
assertParentTicket: callbacks.assertParentTicket.bind(callbacks),
|
|
18
|
+
resolveChildAdmission: callbacks.resolveChildAdmission.bind(callbacks),
|
|
19
|
+
resolveReadBindings: callbacks.resolveReadBindings.bind(callbacks),
|
|
20
|
+
acquireCallContext: callbacks.acquireCallContext.bind(callbacks),
|
|
21
|
+
revoke: callbacks.revoke.bind(callbacks),
|
|
22
|
+
reportAuditFault: callbacks.reportAuditFault.bind(callbacks),
|
|
23
|
+
});
|
|
24
|
+
owners.add(owner);
|
|
25
|
+
return owner;
|
|
26
|
+
}
|
|
27
|
+
export function isLegacyReadHostOwner(owner) {
|
|
28
|
+
return typeof owner === "object" && owner !== null && owners.has(owner);
|
|
29
|
+
}
|
|
30
|
+
export function createLegacyReadCallLease(callbacks) {
|
|
31
|
+
const lease = Object.freeze({ approval: callbacks.approval, signal: callbacks.signal,
|
|
32
|
+
assertAvailable: callbacks.assertAvailable.bind(callbacks), finish: callbacks.finish.bind(callbacks), release: callbacks.release.bind(callbacks) });
|
|
33
|
+
callLeases.add(lease);
|
|
34
|
+
return lease;
|
|
35
|
+
}
|
|
36
|
+
export function isLegacyReadCallLease(lease) {
|
|
37
|
+
return typeof lease === "object" && lease !== null && callLeases.has(lease);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=legacy-read-contracts.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { ToolDefinition } from "@deepseek-ai/dsh-tools";
|
|
3
|
+
import type { LegacyChildEvidence } from "./child-capture.js";
|
|
4
|
+
import type { LegacyReadHostOwner } from "./legacy-read-contracts.js";
|
|
5
|
+
import type { LegacyReadProxy } from "./legacy-read-proxy.js";
|
|
6
|
+
export { createLegacyReadHostOwner, createLegacyReadCallLease, LegacyReadUnavailable } from "./legacy-read-contracts.js";
|
|
7
|
+
export type * from "./legacy-read-contracts.js";
|
|
8
|
+
export { createLegacyReadComposition } from "./legacy-read-composition.js";
|
|
9
|
+
export type { LegacyReadComposition } from "./legacy-read-composition.js";
|
|
10
|
+
export type { LegacyReadProxy } from "./legacy-read-proxy.js";
|
|
11
|
+
/** Explicit startup entry only; default DSMM bootstrap never installs this composition. */
|
|
12
|
+
export declare function createLegacyReadHost(owner: LegacyReadHostOwner): {
|
|
13
|
+
composition: import("./legacy-read-composition.js").LegacyReadComposition;
|
|
14
|
+
attachChild(parent: Agent, child: Agent, evidence: LegacyChildEvidence, definition: ToolDefinition): LegacyReadProxy;
|
|
15
|
+
releaseAfterChildDispose(child: Agent): Promise<void>;
|
|
16
|
+
publishCheckedGeneration(): void;
|
|
17
|
+
dispose(nativeDrain: () => Promise<void>): Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=legacy-read-host.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { scopeChainOf, scopeOf } from "@deepseek-ai/dsh-scope";
|
|
2
|
+
import { createLegacyReadComposition } from "./legacy-read-composition.js";
|
|
3
|
+
import { LegacyReadUnavailable } from "./legacy-read-contracts.js";
|
|
4
|
+
import { installLegacyReadProxy } from "./legacy-read-proxy.js";
|
|
5
|
+
export { createLegacyReadHostOwner, createLegacyReadCallLease, LegacyReadUnavailable } from "./legacy-read-contracts.js";
|
|
6
|
+
export { createLegacyReadComposition } from "./legacy-read-composition.js";
|
|
7
|
+
/** Explicit startup entry only; default DSMM bootstrap never installs this composition. */
|
|
8
|
+
export function createLegacyReadHost(owner) {
|
|
9
|
+
const composition = createLegacyReadComposition(owner);
|
|
10
|
+
const children = new Map();
|
|
11
|
+
return {
|
|
12
|
+
composition,
|
|
13
|
+
attachChild(parent, child, evidence, definition) {
|
|
14
|
+
if (children.has(child))
|
|
15
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
16
|
+
const proxy = installLegacyReadProxy(composition, parent, child, evidence, definition);
|
|
17
|
+
children.set(child, proxy);
|
|
18
|
+
return proxy;
|
|
19
|
+
},
|
|
20
|
+
async releaseAfterChildDispose(child) {
|
|
21
|
+
if (composition.view().state === "ready")
|
|
22
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
23
|
+
const proxy = children.get(child);
|
|
24
|
+
if (proxy === undefined)
|
|
25
|
+
return;
|
|
26
|
+
await proxy.releaseAfterChildDispose();
|
|
27
|
+
children.delete(child);
|
|
28
|
+
},
|
|
29
|
+
publishCheckedGeneration() {
|
|
30
|
+
const snapshot = composition.captureClosedComposition();
|
|
31
|
+
if (snapshot === undefined)
|
|
32
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
33
|
+
for (const proxy of children.values()) {
|
|
34
|
+
if (!snapshot.bindings.some(binding => binding.parent === proxy.parent && binding.child === proxy.child && binding.definition === proxy.nativeDefinition)
|
|
35
|
+
|| proxy.parent.ctx.tools.get("read", proxy.parent) !== proxy.nativeDefinition
|
|
36
|
+
|| proxy.child.ctx.tools.get("read", proxy.child) !== proxy.definition
|
|
37
|
+
|| proxy.parent.ctx.agents.get(proxy.parent.id) !== proxy.parent || proxy.child.ctx.agents.get(proxy.child.id) !== proxy.child
|
|
38
|
+
|| !snapshot.scopes.some(scope => scope.ctx === proxy.proxyScope.ctx) || !snapshot.scopes.some(scope => scope.ctx === proxy.standingScope.ctx)
|
|
39
|
+
|| proxy.contributions.some(contribution => !snapshot.policies.some(policy => policy.scope === contribution.scope.ctx
|
|
40
|
+
&& policy.reference === contribution.reference && policy.stage === contribution.stage)))
|
|
41
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
42
|
+
const effectiveScopes = new Set(scopeChainOf(proxy.child));
|
|
43
|
+
for (const stage of ["pre", "around"]) {
|
|
44
|
+
const contribution = proxy.contributions.find(value => value.stage === stage);
|
|
45
|
+
const adapter = snapshot.policies.find(policy => policy.reference === contribution.reference && policy.scope === contribution.scope.ctx);
|
|
46
|
+
if (snapshot.policies.some(policy => {
|
|
47
|
+
const scope = scopeOf(policy.scope);
|
|
48
|
+
return policy.stage === stage && policy.side !== "parent" && policy.reference !== contribution.reference
|
|
49
|
+
&& (scope === undefined || effectiveScopes.has(scope)) && policy.order <= adapter.order;
|
|
50
|
+
}))
|
|
51
|
+
throw new LegacyReadUnavailable("composition-unavailable");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
composition.publishGeneration(snapshot, composition.view().generation);
|
|
55
|
+
},
|
|
56
|
+
async dispose(nativeDrain) {
|
|
57
|
+
// Calling close synchronously revokes before either async drain is entered.
|
|
58
|
+
const leases = composition.closeForDispose("host-dispose");
|
|
59
|
+
await leases;
|
|
60
|
+
await nativeDrain();
|
|
61
|
+
for (const proxy of children.values())
|
|
62
|
+
await proxy.releaseAfterChildDispose();
|
|
63
|
+
children.clear();
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=legacy-read-host.js.map
|