@dsmm/dsmm 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -24
- package/agent-presets/dsmm-builder/agent.cordis.yml +1949 -39
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +436 -14
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-coding/agent.cordis.yml +588 -0
- package/agent-presets/dsmm-coding/preset.yml +3 -0
- package/agent-presets/dsmm-complex/agent.cordis.yml +1140 -0
- package/agent-presets/dsmm-complex/preset.yml +3 -0
- package/agent-presets/dsmm-creative/agent.cordis.yml +536 -12
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1163 -0
- package/agent-presets/dsmm-cross-cutting/preset.yml +3 -0
- package/agent-presets/dsmm-deep/agent.cordis.yml +1173 -0
- package/agent-presets/dsmm-deep/preset.yml +3 -0
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-documenting/agent.cordis.yml +581 -0
- package/agent-presets/dsmm-documenting/preset.yml +3 -0
- package/agent-presets/dsmm-frontend/agent.cordis.yml +580 -0
- package/agent-presets/dsmm-frontend/preset.yml +3 -0
- package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +572 -0
- package/agent-presets/dsmm-hard-reasoning/preset.yml +3 -0
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +56 -14
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-normal-task/agent.cordis.yml +546 -0
- package/agent-presets/dsmm-normal-task/preset.yml +3 -0
- package/agent-presets/dsmm-oracle/agent.cordis.yml +421 -12
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +421 -12
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +2023 -43
- package/agent-presets/dsmm-orchestrator/preset.yml +1 -1
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +416 -13
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +462 -13
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-quick/agent.cordis.yml +119 -0
- package/agent-presets/dsmm-quick/preset.yml +3 -0
- package/agent-presets/dsmm-research/agent.cordis.yml +141 -0
- package/agent-presets/dsmm-research/preset.yml +3 -0
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +420 -13
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/cordis.patch.yml +1 -5
- package/docs/agent-presets.md +64 -15
- package/docs/compatibility.md +61 -13
- package/docs/design.md +41 -0
- package/docs/lsp.md +12 -2
- package/docs/migration-from-ocmm.md +8 -0
- package/docs/profiles.md +41 -15
- package/docs/releasing.md +78 -8
- package/docs/roadmap.md +6 -0
- package/docs/runtime-recovery.md +12 -0
- package/docs/safety-guards.md +7 -3
- package/docs/settings-status.md +148 -7
- package/docs/skill-sync.md +52 -14
- package/lib/client/DeploymentPage.d.ts +18 -0
- package/lib/client/DeploymentPage.js +120 -0
- package/lib/client/ProfilesSection.js +4 -2
- package/lib/client/deployment-controller.d.ts +50 -0
- package/lib/client/deployment-controller.js +193 -0
- package/lib/client/deployment-data.d.ts +16 -0
- package/lib/client/deployment-data.js +109 -0
- package/lib/client/deployment-locales.d.ts +66 -0
- package/lib/client/deployment-locales.js +72 -0
- package/lib/client/index.js +50 -0
- package/lib/client/locales.d.ts +4 -0
- package/lib/client/locales.js +4 -2
- package/lib/client/plugins-contract.d.ts +27 -0
- package/lib/client/plugins-contract.js +2 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.js +16 -0
- package/lib/client.js +1048 -29
- package/lib/commands.js +3 -0
- package/lib/config-file-store.d.ts +23 -0
- package/lib/config-file-store.js +67 -0
- package/lib/deployment-config.d.ts +37 -0
- package/lib/deployment-config.js +184 -0
- package/lib/dsh-home.d.ts +3 -0
- package/lib/dsh-home.js +10 -0
- package/lib/dsh-types.d.ts +12 -65
- package/lib/guards.d.ts +2 -1
- package/lib/guards.js +19 -2
- package/lib/index.d.ts +8 -1
- package/lib/index.js +115 -25
- package/lib/lsp.d.ts +13 -0
- package/lib/lsp.js +60 -0
- package/lib/mode.js +42 -47
- package/lib/model-routing.js +5 -2
- package/lib/modules.d.ts +27 -0
- package/lib/modules.js +21 -0
- package/lib/native-scope.d.ts +9 -0
- package/lib/native-scope.js +20 -0
- package/lib/plan-validation.js +6 -44
- package/lib/preset-materializer.js +2 -0
- package/lib/preset-registry.d.ts +1 -1
- package/lib/preset-registry.js +7 -4
- package/lib/preset-skills.d.ts +4 -1
- package/lib/preset-skills.js +60 -19
- package/lib/profile-remote.d.ts +14 -0
- package/lib/profile-remote.js +197 -4
- package/lib/profile-rpc.d.ts +24 -1
- package/lib/profile-rpc.js +139 -1
- package/lib/profile-runtime.d.ts +24 -0
- package/lib/profile-runtime.js +177 -33
- package/lib/profile-store.d.ts +45 -1
- package/lib/profile-store.js +236 -102
- package/lib/profile-types.d.ts +55 -0
- package/lib/prompt-content.d.ts +25 -0
- package/lib/prompt-content.js +27 -0
- package/lib/prompts.d.ts +8 -2
- package/lib/prompts.js +46 -34
- package/lib/role-policy.d.ts +51 -0
- package/lib/role-policy.js +224 -0
- package/lib/role-providers.d.ts +6 -2
- package/lib/role-providers.js +72 -39
- package/lib/role-subagents.d.ts +6 -2
- package/lib/role-subagents.js +187 -48
- package/lib/roles.d.ts +16 -4
- package/lib/roles.js +86 -186
- package/lib/runtime-recovery.js +16 -5
- package/lib/session-scope.js +2 -0
- package/lib/settings.d.ts +69 -1
- package/lib/settings.js +262 -91
- package/lib/skills.d.ts +24 -9
- package/lib/skills.js +114 -35
- package/lib/state.d.ts +10 -6
- package/lib/state.js +48 -49
- package/lib/status.d.ts +25 -0
- package/lib/status.js +47 -9
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +19 -2
- package/prompts/deepwork.md +144 -20
- package/prompts/source/agents/clarifier.md +45 -0
- package/prompts/source/agents/orchestrator.md +63 -0
- package/prompts/source/agents/plan-critic.md +25 -0
- package/prompts/source/agents/planner.md +19 -0
- package/prompts/source/agents/reviewer.md +17 -0
- package/prompts/source/catalog.json +548 -0
- package/prompts/source/category/coding.md +46 -0
- package/prompts/source/category/complex.md +29 -0
- package/prompts/source/category/creative.md +38 -0
- package/prompts/source/category/cross-cutting.md +52 -0
- package/prompts/source/category/deep.md +62 -0
- package/prompts/source/category/documenting.md +62 -0
- package/prompts/source/category/frontend.md +38 -0
- package/prompts/source/category/hard-reasoning.md +53 -0
- package/prompts/source/category/normal-task.md +27 -0
- package/prompts/source/category/quick.md +34 -0
- package/prompts/source/category/research.md +56 -0
- package/prompts/source/deepwork/claude-opus-5.md +28 -0
- package/prompts/source/deepwork/codex.md +9 -0
- package/prompts/source/deepwork/default.md +129 -0
- package/prompts/source/deepwork/gemini.md +184 -0
- package/prompts/source/deepwork/glm.md +256 -0
- package/prompts/source/deepwork/gpt.md +43 -0
- package/prompts/source/deepwork/kimi-k27.md +13 -0
- package/prompts/source/deepwork/planner.md +41 -0
- package/prompts/source/deepwork/swe-2.md +13 -0
- package/prompts/source/manifest.json +3118 -0
- package/prompts/source/shared/dsh-host-contract.md +6 -0
- package/prompts/source/shared/locale.md +8 -0
- package/prompts/source/shared/shell-safety.md +7 -0
- package/prompts/source/terminal/builder.md +13 -0
- package/prompts/source/terminal/clarifier.md +41 -0
- package/prompts/source/terminal/code-search.md +39 -0
- package/prompts/source/terminal/coding.md +41 -0
- package/prompts/source/terminal/complex.md +43 -0
- package/prompts/source/terminal/creative.md +41 -0
- package/prompts/source/terminal/cross-cutting.md +43 -0
- package/prompts/source/terminal/deep.md +43 -0
- package/prompts/source/terminal/doc-search.md +39 -0
- package/prompts/source/terminal/documenting.md +41 -0
- package/prompts/source/terminal/frontend.md +41 -0
- package/prompts/source/terminal/hard-reasoning.md +41 -0
- package/prompts/source/terminal/media-reader.md +39 -0
- package/prompts/source/terminal/normal-task.md +41 -0
- package/prompts/source/terminal/oracle-2nd.md +53 -0
- package/prompts/source/terminal/oracle.md +53 -0
- package/prompts/source/terminal/orchestrator.md +26 -0
- package/prompts/source/terminal/plan-critic.md +41 -0
- package/prompts/source/terminal/planner.md +42 -0
- package/prompts/source/terminal/quick.md +39 -0
- package/prompts/source/terminal/research.md +39 -0
- package/prompts/source/terminal/reviewer.md +53 -0
- package/skills/ast-grep/LICENSE +21 -0
- package/skills/ast-grep/README.md +138 -0
- package/skills/ast-grep/SKILL.md +284 -0
- package/skills/ast-grep/SOURCE +1 -0
- package/skills/ast-grep/install.ps1 +235 -0
- package/skills/ast-grep/install.sh +286 -0
- package/skills/ast-grep/references/cli.md +233 -0
- package/skills/ast-grep/references/install.md +168 -0
- package/skills/ast-grep/references/patterns.md +149 -0
- package/skills/ast-grep/references/pitfalls.md +305 -0
- package/skills/ast-grep/references/recipes.md +404 -0
- package/skills/ast-grep/references/sgconfig.md +250 -0
- package/skills/ast-grep/references/yaml-rules.md +511 -0
- package/skills/ast-grep/scripts/ast_grep_helper.py +760 -0
- package/skills/ast-grep/tests/smoke.ps1 +129 -0
- package/skills/ast-grep/tests/smoke.sh +212 -0
- package/skills/ast-grep/tests/test_resolver.py +154 -0
- package/skills/brainstorming/SKILL.md +102 -9
- package/skills/coding-agent-sessions/LICENSE-UPSTREAM.md +82 -0
- package/skills/coding-agent-sessions/NOTICE.md +24 -0
- package/skills/coding-agent-sessions/SKILL.md +144 -0
- package/skills/coding-agent-sessions/agents/openai.yaml +4 -0
- package/skills/coding-agent-sessions/pyrightconfig.json +5 -0
- package/skills/coding-agent-sessions/references/all-platforms.md +77 -0
- package/skills/coding-agent-sessions/references/claude.md +34 -0
- package/skills/coding-agent-sessions/references/codex.md +32 -0
- package/skills/coding-agent-sessions/references/opencode.md +45 -0
- package/skills/coding-agent-sessions/references/senpi.md +29 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +104 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
- package/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
- package/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
- package/skills/coding-agent-sessions/scripts/tests/test_agent_sessions.py +322 -0
- package/skills/coding-agent-sessions/scripts/tests/test_aside_scanner.py +131 -0
- package/skills/coding-agent-sessions/scripts/tests/test_cli_contract.py +126 -0
- package/skills/coding-agent-sessions/scripts/tests/test_extended_scanners.py +262 -0
- package/skills/coding-agent-sessions/scripts/tests/test_optional_sqlite_scanners.py +79 -0
- package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -0
- package/skills/debugging/SKILL.md +125 -4
- package/skills/debugging/references/logging.md +2 -0
- package/skills/debugging/references/methodology/00-setup.md +2 -0
- package/skills/debugging/references/methodology/02-investigate.md +8 -2
- package/skills/debugging/references/methodology/03-flaky-triage.md +3 -1
- package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +4 -2
- package/skills/debugging/references/methodology/05-escalate.md +2 -0
- package/skills/debugging/references/methodology/06-fix.md +2 -0
- package/skills/debugging/references/methodology/08-qa.md +2 -0
- package/skills/debugging/references/methodology/09-cleanup.md +2 -0
- package/skills/debugging/references/methodology/partial-runtime-evidence.md +4 -2
- package/skills/debugging/references/runtimes/bundled-js-binary.md +2 -0
- package/skills/debugging/references/runtimes/go.md +2 -0
- package/skills/debugging/references/runtimes/native-binary.md +2 -0
- package/skills/debugging/references/runtimes/node.md +2 -0
- package/skills/debugging/references/runtimes/python.md +2 -0
- package/skills/debugging/references/runtimes/rust.md +2 -0
- package/skills/debugging/references/scripts/dap.test.mjs +539 -0
- package/skills/debugging/references/scripts/fixture-adapter.mjs +164 -0
- package/skills/debugging/references/tools/dap.md +3 -1
- package/skills/debugging/references/tools/ghidra.md +2 -0
- package/skills/debugging/references/tools/playwright-cli.md +2 -0
- package/skills/debugging/references/tools/pwndbg.md +2 -0
- package/skills/debugging/references/tools/pwntools.md +2 -0
- package/skills/dispatching-parallel-agents/SKILL.md +94 -7
- package/skills/frontend/.frontend-materialized.json +856 -0
- package/skills/frontend/ATTRIBUTION.md +37 -0
- package/skills/frontend/LICENSE-Apache-2.0.txt +201 -0
- package/skills/frontend/LICENSE-taste-skill.txt +21 -0
- package/skills/frontend/LICENSE-ui-ux-pro-max.txt +21 -0
- package/skills/frontend/SKILL.md +142 -0
- package/skills/frontend/references/design/README.md +256 -0
- package/skills/frontend/references/design/_INDEX.md +206 -0
- package/skills/frontend/references/design/airbnb.md +393 -0
- package/skills/frontend/references/design/airtable.md +92 -0
- package/skills/frontend/references/design/apple.md +250 -0
- package/skills/frontend/references/design/aside.md +211 -0
- package/skills/frontend/references/design/binance.md +348 -0
- package/skills/frontend/references/design/bmw.md +183 -0
- package/skills/frontend/references/design/brutalist-skill.md +92 -0
- package/skills/frontend/references/design/bugatti.md +271 -0
- package/skills/frontend/references/design/cal.md +262 -0
- package/skills/frontend/references/design/claude.md +315 -0
- package/skills/frontend/references/design/clay.md +307 -0
- package/skills/frontend/references/design/clickhouse.md +284 -0
- package/skills/frontend/references/design/clone-from-url.md +69 -0
- package/skills/frontend/references/design/cohere.md +269 -0
- package/skills/frontend/references/design/coinbase.md +132 -0
- package/skills/frontend/references/design/composio.md +310 -0
- package/skills/frontend/references/design/cursor.md +312 -0
- package/skills/frontend/references/design/design-system-architecture.md +250 -0
- package/skills/frontend/references/design/elevenlabs.md +268 -0
- package/skills/frontend/references/design/expo.md +284 -0
- package/skills/frontend/references/design/ferrari.md +317 -0
- package/skills/frontend/references/design/figma.md +223 -0
- package/skills/frontend/references/design/framer.md +249 -0
- package/skills/frontend/references/design/gpt-tasteskill.md +74 -0
- package/skills/frontend/references/design/hashicorp.md +281 -0
- package/skills/frontend/references/design/ibm.md +335 -0
- package/skills/frontend/references/design/image-to-code-skill.md +1228 -0
- package/skills/frontend/references/design/imagegen-brandkit.md +798 -0
- package/skills/frontend/references/design/imagegen-frontend-mobile.md +1465 -0
- package/skills/frontend/references/design/imagegen-frontend-web.md +987 -0
- package/skills/frontend/references/design/interaction-skill.md +52 -0
- package/skills/frontend/references/design/intercom.md +149 -0
- package/skills/frontend/references/design/kraken.md +128 -0
- package/skills/frontend/references/design/lamborghini.md +291 -0
- package/skills/frontend/references/design/linear.app.md +370 -0
- package/skills/frontend/references/design/lovable.md +301 -0
- package/skills/frontend/references/design/mastercard.md +368 -0
- package/skills/frontend/references/design/meta.md +369 -0
- package/skills/frontend/references/design/minimalist-skill.md +85 -0
- package/skills/frontend/references/design/minimax.md +260 -0
- package/skills/frontend/references/design/mintlify.md +329 -0
- package/skills/frontend/references/design/miro.md +111 -0
- package/skills/frontend/references/design/mistral.ai.md +264 -0
- package/skills/frontend/references/design/mongodb.md +269 -0
- package/skills/frontend/references/design/nike.md +366 -0
- package/skills/frontend/references/design/notion.md +312 -0
- package/skills/frontend/references/design/nvidia.md +296 -0
- package/skills/frontend/references/design/ollama.md +270 -0
- package/skills/frontend/references/design/opencode.ai.md +284 -0
- package/skills/frontend/references/design/output-skill.md +49 -0
- package/skills/frontend/references/design/pinterest.md +233 -0
- package/skills/frontend/references/design/playstation.md +367 -0
- package/skills/frontend/references/design/posthog.md +259 -0
- package/skills/frontend/references/design/raycast.md +271 -0
- package/skills/frontend/references/design/react-dev-tooling-skill.md +232 -0
- package/skills/frontend/references/design/redesign-skill.md +178 -0
- package/skills/frontend/references/design/renault.md +314 -0
- package/skills/frontend/references/design/replicate.md +264 -0
- package/skills/frontend/references/design/resend.md +306 -0
- package/skills/frontend/references/design/revolut.md +188 -0
- package/skills/frontend/references/design/runwayml.md +247 -0
- package/skills/frontend/references/design/sanity.md +360 -0
- package/skills/frontend/references/design/sentry.md +265 -0
- package/skills/frontend/references/design/shopify.md +353 -0
- package/skills/frontend/references/design/soft-skill.md +98 -0
- package/skills/frontend/references/design/spacex.md +197 -0
- package/skills/frontend/references/design/spotify.md +249 -0
- package/skills/frontend/references/design/starbucks.md +583 -0
- package/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/skills/frontend/references/design/stitch-skill.md +184 -0
- package/skills/frontend/references/design/stripe.md +325 -0
- package/skills/frontend/references/design/supabase.md +258 -0
- package/skills/frontend/references/design/superhuman.md +255 -0
- package/skills/frontend/references/design/taste-skill.md +1206 -0
- package/skills/frontend/references/design/tesla.md +289 -0
- package/skills/frontend/references/design/theverge.md +342 -0
- package/skills/frontend/references/design/together.ai.md +266 -0
- package/skills/frontend/references/design/uber.md +298 -0
- package/skills/frontend/references/design/vercel.md +313 -0
- package/skills/frontend/references/design/vodafone.md +426 -0
- package/skills/frontend/references/design/voltagent.md +326 -0
- package/skills/frontend/references/design/warp.md +256 -0
- package/skills/frontend/references/design/webflow.md +95 -0
- package/skills/frontend/references/design/wired.md +281 -0
- package/skills/frontend/references/design/wise.md +176 -0
- package/skills/frontend/references/design/x.ai.md +260 -0
- package/skills/frontend/references/design/zapier.md +331 -0
- package/skills/frontend/references/perfection/README.md +264 -0
- package/skills/frontend/references/perfection/react-perf-tooling.md +234 -0
- package/skills/frontend/references/ui-ux-db/README.md +659 -0
- package/skills/frontend/references/ui-ux-db/data/app-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/data/charts.csv +26 -0
- package/skills/frontend/references/ui-ux-db/data/colors.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/google-fonts.csv +1924 -0
- package/skills/frontend/references/ui-ux-db/data/icons.csv +106 -0
- package/skills/frontend/references/ui-ux-db/data/landing.csv +35 -0
- package/skills/frontend/references/ui-ux-db/data/products.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/react-performance.csv +45 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/angular.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/astro.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/jetpack-compose.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/laravel.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxt-ui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/nuxtjs.csv +59 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react-native.csv +52 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/shadcn.csv +61 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/threejs.csv +54 -0
- package/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -0
- package/skills/frontend/references/ui-ux-db/data/styles.csv +85 -0
- package/skills/frontend/references/ui-ux-db/data/typography.csv +74 -0
- package/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -0
- package/skills/frontend/references/ui-ux-db/data/ux-guidelines.csv +100 -0
- package/skills/frontend/references/ui-ux-db/data/web-interface.csv +31 -0
- package/skills/frontend/references/ui-ux-db/scripts/core.py +262 -0
- package/skills/frontend/references/ui-ux-db/scripts/design_system.py +1148 -0
- package/skills/frontend/references/ui-ux-db/scripts/search.py +114 -0
- package/skills/frontend/scripts/perfection/lighthouse-audit.py +201 -0
- package/skills/git-master/SKILL.md +112 -0
- package/skills/git-master/agents/openai.yaml +13 -0
- package/skills/init-deep/SKILL.md +279 -0
- package/skills/receiving-code-review/SKILL.md +112 -7
- package/skills/remove-ai-slops/SKILL.md +159 -8
- package/skills/requesting-code-review/SKILL.md +96 -3
- package/skills/requesting-code-review/code-reviewer.md +47 -0
- package/skills/subagent-driven-development/SKILL.md +176 -6
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +23 -0
- package/skills/subagent-driven-development/implementer-prompt.md +69 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +32 -0
- package/skills/using-git-worktrees/SKILL.md +141 -0
- package/skills/writing-plans/SKILL.md +121 -7
- package/skills/writing-plans/plan-document-reviewer-prompt.md +38 -0
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { once } from "node:events";
|
|
4
|
+
import { copyFileSync, existsSync, mkdtempSync, readFileSync, rmSync, watch } from "node:fs";
|
|
5
|
+
import { createServer } from "node:net";
|
|
6
|
+
import { tmpdir } from "node:os";
|
|
7
|
+
import { dirname, join } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { test } from "node:test";
|
|
10
|
+
|
|
11
|
+
import { DapFrameParser, isTcpAdapterSpec, MAX_OUTPUT_BYTES, parseBreakpointSpec, tokenizeCommand } from "./dap.mjs";
|
|
12
|
+
|
|
13
|
+
const directory = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const client = join(directory, "dap.mjs");
|
|
15
|
+
const fixture = join(directory, "fixture-adapter.mjs");
|
|
16
|
+
|
|
17
|
+
function frame(message) {
|
|
18
|
+
const body = Buffer.from(JSON.stringify(message));
|
|
19
|
+
return Buffer.concat([Buffer.from(`Content-Length: ${body.length}\r\n\r\n`), body]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function startSession(env = {}) {
|
|
23
|
+
const child = spawn(process.execPath, [client], {
|
|
24
|
+
cwd: directory,
|
|
25
|
+
env: { ...process.env, ...env },
|
|
26
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
27
|
+
});
|
|
28
|
+
let output = "";
|
|
29
|
+
let errors = "";
|
|
30
|
+
const listeners = new Set();
|
|
31
|
+
|
|
32
|
+
child.stdout.setEncoding("utf8");
|
|
33
|
+
child.stderr.setEncoding("utf8");
|
|
34
|
+
child.stdout.on("data", (chunk) => {
|
|
35
|
+
output += chunk;
|
|
36
|
+
for (const listener of listeners) listener();
|
|
37
|
+
});
|
|
38
|
+
child.stderr.on("data", (chunk) => { errors += chunk; });
|
|
39
|
+
|
|
40
|
+
function waitFor(pattern) {
|
|
41
|
+
const outputStart = output.length;
|
|
42
|
+
return new Promise((resolve, reject) => {
|
|
43
|
+
const matches = () => pattern.test(output.slice(outputStart));
|
|
44
|
+
if (matches()) return resolve();
|
|
45
|
+
const timer = setTimeout(() => {
|
|
46
|
+
listeners.delete(check);
|
|
47
|
+
reject(new Error(`timed out waiting for ${pattern}; stdout=${output}; stderr=${errors}`));
|
|
48
|
+
}, 10_000);
|
|
49
|
+
function check() {
|
|
50
|
+
if (!matches()) return;
|
|
51
|
+
clearTimeout(timer);
|
|
52
|
+
listeners.delete(check);
|
|
53
|
+
resolve();
|
|
54
|
+
}
|
|
55
|
+
listeners.add(check);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
child,
|
|
61
|
+
command(value) { child.stdin.write(`${value}\n`); },
|
|
62
|
+
output() { return output; },
|
|
63
|
+
waitFor,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function quit(session) {
|
|
68
|
+
const closed = once(session.child, "close");
|
|
69
|
+
session.command("quit");
|
|
70
|
+
await closed;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function stopFixture(child) {
|
|
74
|
+
if (child.exitCode !== null || child.signalCode !== null) return;
|
|
75
|
+
const exited = once(child, "exit");
|
|
76
|
+
child.kill();
|
|
77
|
+
await exited;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function createFixtureRoot() {
|
|
81
|
+
const root = mkdtempSync(join(tmpdir(), "dap fixture "));
|
|
82
|
+
const adapter = join(root, "fixture adapter.mjs");
|
|
83
|
+
copyFileSync(fixture, adapter);
|
|
84
|
+
return {
|
|
85
|
+
root,
|
|
86
|
+
adapter,
|
|
87
|
+
capturePath: join(root, "capture.jsonl"),
|
|
88
|
+
lifecyclePath: join(root, "lifecycle.txt"),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function waitForFileValue(path) {
|
|
93
|
+
return new Promise((resolve, reject) => {
|
|
94
|
+
let watcher;
|
|
95
|
+
let finished = false;
|
|
96
|
+
const timer = setTimeout(() => finish(new Error(`timed out waiting for ${path}`)), 10_000);
|
|
97
|
+
function value() {
|
|
98
|
+
return existsSync(path) ? readFileSync(path, "utf8").trim() : "";
|
|
99
|
+
}
|
|
100
|
+
function finish(cause, result) {
|
|
101
|
+
if (finished) return;
|
|
102
|
+
finished = true;
|
|
103
|
+
clearTimeout(timer);
|
|
104
|
+
watcher?.close();
|
|
105
|
+
if (cause) reject(cause);
|
|
106
|
+
else resolve(result);
|
|
107
|
+
}
|
|
108
|
+
watcher = watch(dirname(path), () => {
|
|
109
|
+
const result = value();
|
|
110
|
+
if (result) finish(null, result);
|
|
111
|
+
});
|
|
112
|
+
const initial = value();
|
|
113
|
+
if (initial) finish(null, initial);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function startTcpFixture(paths, environment = {}) {
|
|
118
|
+
const portPath = join(paths.root, "tcp-port.txt");
|
|
119
|
+
const child = spawn(process.execPath, [paths.adapter], {
|
|
120
|
+
env: { ...process.env, ...environment, DAP_FIXTURE_TCP_PORT_FILE: portPath },
|
|
121
|
+
stdio: "ignore",
|
|
122
|
+
});
|
|
123
|
+
try {
|
|
124
|
+
const port = Number(await waitForFileValue(portPath));
|
|
125
|
+
assert.ok(Number.isInteger(port) && port > 0, `invalid fixture port: ${port}`);
|
|
126
|
+
return { child, port };
|
|
127
|
+
} catch (cause) {
|
|
128
|
+
await stopFixture(child);
|
|
129
|
+
throw cause;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function reserveUnusedLoopbackPort() {
|
|
134
|
+
const server = createServer();
|
|
135
|
+
await new Promise(resolve => server.listen(0, "127.0.0.1", resolve));
|
|
136
|
+
const address = server.address();
|
|
137
|
+
assert.ok(address && typeof address !== "string");
|
|
138
|
+
const port = address.port;
|
|
139
|
+
await new Promise(resolve => server.close(resolve));
|
|
140
|
+
return port;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function assertOutputLinesBounded(text) {
|
|
144
|
+
for (const outputLine of text.split(/\r?\n/)) {
|
|
145
|
+
if (!outputLine) continue;
|
|
146
|
+
assert.ok(
|
|
147
|
+
Buffer.byteLength(`${outputLine}\n`) <= MAX_OUTPUT_BYTES,
|
|
148
|
+
`output line exceeded ${MAX_OUTPUT_BYTES} bytes`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function fixturePid(path) {
|
|
154
|
+
const pid = Number(readFileSync(path, "utf8").match(/^started (\d+)$/m)?.[1]);
|
|
155
|
+
assert.ok(Number.isInteger(pid) && pid > 0, "fixture PID was not recorded");
|
|
156
|
+
return pid;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
test("DAP parsing preserves framing, quoted Windows paths, and malformed command rejection", () => {
|
|
160
|
+
const parser = new DapFrameParser();
|
|
161
|
+
const first = frame({ type: "event", event: "one" });
|
|
162
|
+
const second = frame({ type: "event", event: "two", body: { ok: true } });
|
|
163
|
+
assert.deepEqual(parser.push(Buffer.concat([first, second])), [
|
|
164
|
+
{ type: "event", event: "one" },
|
|
165
|
+
{ type: "event", event: "two", body: { ok: true } },
|
|
166
|
+
]);
|
|
167
|
+
|
|
168
|
+
const third = frame({ type: "response", seq: 3 });
|
|
169
|
+
assert.deepEqual(parser.push(third.subarray(0, 9)), []);
|
|
170
|
+
assert.deepEqual(parser.push(third.subarray(9)), [{ type: "response", seq: 3 }]);
|
|
171
|
+
assert.equal(isTcpAdapterSpec("C:\\workspace\\fixture-adapter.mjs"), false);
|
|
172
|
+
assert.equal(isTcpAdapterSpec("127.0.0.1:5678"), true);
|
|
173
|
+
assert.deepEqual(
|
|
174
|
+
tokenizeCommand('launch "C:\\workspace path\\adapter.mjs" \'C:\\program path\\app.py\' --debug'),
|
|
175
|
+
["launch", "C:\\workspace path\\adapter.mjs", "C:\\program path\\app.py", "--debug"],
|
|
176
|
+
);
|
|
177
|
+
assert.equal(tokenizeCommand('launch "C:\\workspace path\\adapter.mjs'), null);
|
|
178
|
+
assert.deepEqual(parseBreakpointSpec("C:\\workspace path\\program.py:12"), {
|
|
179
|
+
file: "C:\\workspace path\\program.py",
|
|
180
|
+
line: 12,
|
|
181
|
+
});
|
|
182
|
+
assert.equal(parseBreakpointSpec("C:\\workspace path\\program.py:last"), null);
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
test("DAP rejected launch and configuration failure never report READY", { timeout: 15_000 }, async () => {
|
|
186
|
+
const launchPaths = createFixtureRoot();
|
|
187
|
+
const launchSession = startSession({
|
|
188
|
+
DAP_FIXTURE_CAPTURE: launchPaths.capturePath,
|
|
189
|
+
DAP_FIXTURE_LAUNCH_FAIL_ONCE_FILE: join(launchPaths.root, "fail-once.txt"),
|
|
190
|
+
});
|
|
191
|
+
try {
|
|
192
|
+
const rejected = launchSession.waitFor(/^ERR: adapter-error$/m);
|
|
193
|
+
launchSession.command(`launch "${launchPaths.adapter}" "C:\\workspace path\\program.py"`);
|
|
194
|
+
await rejected;
|
|
195
|
+
assert.doesNotMatch(launchSession.output(), /READY: launch/);
|
|
196
|
+
|
|
197
|
+
const retryReady = launchSession.waitFor(/^READY: launch$/m);
|
|
198
|
+
launchSession.command(`launch "${launchPaths.adapter}" "C:\\workspace path\\program.py"`);
|
|
199
|
+
await retryReady;
|
|
200
|
+
} finally {
|
|
201
|
+
if (launchSession.child.exitCode === null) await quit(launchSession);
|
|
202
|
+
rmSync(launchPaths.root, { recursive: true, force: true });
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const configurationPaths = createFixtureRoot();
|
|
206
|
+
const configurationSession = startSession({ DAP_FIXTURE_CONFIGURATION_FAILURE: "1" });
|
|
207
|
+
try {
|
|
208
|
+
const rejected = configurationSession.waitFor(/^ERR: adapter-error$/m);
|
|
209
|
+
configurationSession.command(`launch "${configurationPaths.adapter}" "C:\\workspace path\\program.py"`);
|
|
210
|
+
await rejected;
|
|
211
|
+
assert.doesNotMatch(configurationSession.output(), /READY: launch/);
|
|
212
|
+
} finally {
|
|
213
|
+
if (configurationSession.child.exitCode === null) await quit(configurationSession);
|
|
214
|
+
rmSync(configurationPaths.root, { recursive: true, force: true });
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test("DAP setup timeout preserves timeout classification without READY", { timeout: 15_000 }, async () => {
|
|
219
|
+
const paths = createFixtureRoot();
|
|
220
|
+
const session = startSession({ DAP_FIXTURE_NO_ANSWER: "1", DAP_TIMEOUT_MS: "2000" });
|
|
221
|
+
try {
|
|
222
|
+
const timedOut = session.waitFor(/^ERR: timeout$/m);
|
|
223
|
+
session.command(`launch "${paths.adapter}" "C:\\workspace path\\program.py"`);
|
|
224
|
+
await timedOut;
|
|
225
|
+
assert.doesNotMatch(session.output(), /READY: launch/);
|
|
226
|
+
} finally {
|
|
227
|
+
if (session.child.exitCode === null) await quit(session);
|
|
228
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test("DAP lldb rejected launch requires process or stopped corroboration", { timeout: 15_000 }, async () => {
|
|
233
|
+
const paths = createFixtureRoot();
|
|
234
|
+
const lldbAdapter = join(paths.root, "lldb-dap fixture.mjs");
|
|
235
|
+
copyFileSync(paths.adapter, lldbAdapter);
|
|
236
|
+
const session = startSession({ DAP_FIXTURE_LAUNCH_FAILURE: "1", DAP_FIXTURE_LAUNCH_PROCESS: "1" });
|
|
237
|
+
try {
|
|
238
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
239
|
+
session.command(`launch "${lldbAdapter}" "C:\\workspace path\\program.py"`);
|
|
240
|
+
await ready;
|
|
241
|
+
} finally {
|
|
242
|
+
if (session.child.exitCode === null) await quit(session);
|
|
243
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
test("DAP lldb launch timeout with process corroboration never reaches READY", { timeout: 15_000 }, async () => {
|
|
248
|
+
const paths = createFixtureRoot();
|
|
249
|
+
const lldbAdapter = join(paths.root, "lldb-dap timeout fixture.mjs");
|
|
250
|
+
copyFileSync(paths.adapter, lldbAdapter);
|
|
251
|
+
const session = startSession({
|
|
252
|
+
DAP_FIXTURE_LAUNCH_NO_RESPONSE: "1",
|
|
253
|
+
DAP_FIXTURE_LAUNCH_PROCESS: "1",
|
|
254
|
+
DAP_FIXTURE_LIFECYCLE: paths.lifecyclePath,
|
|
255
|
+
DAP_TIMEOUT_MS: "2000",
|
|
256
|
+
});
|
|
257
|
+
try {
|
|
258
|
+
const timedOut = session.waitFor(/^ERR: timeout$/m);
|
|
259
|
+
session.command(`launch "${lldbAdapter}" "C:\\workspace path\\program.py"`);
|
|
260
|
+
await timedOut;
|
|
261
|
+
assert.doesNotMatch(session.output(), /READY: launch/);
|
|
262
|
+
const adapterPid = fixturePid(paths.lifecyclePath);
|
|
263
|
+
assert.throws(() => process.kill(adapterPid, 0), { code: "ESRCH" });
|
|
264
|
+
} finally {
|
|
265
|
+
if (session.child.exitCode === null) await quit(session);
|
|
266
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
test("DAP failed transport retry succeeds after connect failure", { timeout: 15_000 }, async () => {
|
|
271
|
+
const paths = createFixtureRoot();
|
|
272
|
+
const session = startSession();
|
|
273
|
+
let tcpFixture;
|
|
274
|
+
try {
|
|
275
|
+
const badPort = await reserveUnusedLoopbackPort();
|
|
276
|
+
const failed = session.waitFor(/^ERR: adapter-failed$/m);
|
|
277
|
+
session.command(`attach 127.0.0.1:${badPort}`);
|
|
278
|
+
await failed;
|
|
279
|
+
|
|
280
|
+
tcpFixture = await startTcpFixture(paths);
|
|
281
|
+
const ready = session.waitFor(/^READY: attach$/m);
|
|
282
|
+
session.command(`attach 127.0.0.1:${tcpFixture.port}`);
|
|
283
|
+
await ready;
|
|
284
|
+
} finally {
|
|
285
|
+
if (session.child.exitCode === null) await quit(session);
|
|
286
|
+
if (tcpFixture) await stopFixture(tcpFixture.child);
|
|
287
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
test("DAP session overwrite rejection preserves launched adapter cleanup", { timeout: 15_000 }, async () => {
|
|
292
|
+
const paths = createFixtureRoot();
|
|
293
|
+
const session = startSession({ DAP_FIXTURE_LIFECYCLE: paths.lifecyclePath });
|
|
294
|
+
try {
|
|
295
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
296
|
+
session.command(`launch "${paths.adapter}" "C:\\workspace path\\program.py"`);
|
|
297
|
+
await ready;
|
|
298
|
+
const adapterPid = fixturePid(paths.lifecyclePath);
|
|
299
|
+
|
|
300
|
+
const rejected = session.waitFor(/^ERR: adapter-error session already exists$/m);
|
|
301
|
+
session.command("attach 127.0.0.1:1");
|
|
302
|
+
await rejected;
|
|
303
|
+
|
|
304
|
+
await quit(session);
|
|
305
|
+
assert.throws(() => process.kill(adapterPid, 0), { code: "ESRCH" });
|
|
306
|
+
} finally {
|
|
307
|
+
if (session.child.exitCode === null) await quit(session);
|
|
308
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
test("DAP deferred attach initialized handshake reaches READY", { timeout: 15_000 }, async () => {
|
|
313
|
+
const paths = createFixtureRoot();
|
|
314
|
+
const tcpFixture = await startTcpFixture(paths);
|
|
315
|
+
const session = startSession();
|
|
316
|
+
try {
|
|
317
|
+
const ready = session.waitFor(/^READY: attach$/m);
|
|
318
|
+
session.command(`attach 127.0.0.1:${tcpFixture.port}`);
|
|
319
|
+
await ready;
|
|
320
|
+
} finally {
|
|
321
|
+
if (session.child.exitCode === null) await quit(session);
|
|
322
|
+
await stopFixture(tcpFixture.child);
|
|
323
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
test("DAP active transport disconnect reclaims child before attach retry", { timeout: 15_000 }, async () => {
|
|
328
|
+
const paths = createFixtureRoot();
|
|
329
|
+
const disconnectingFixture = await startTcpFixture(paths, {
|
|
330
|
+
DAP_FIXTURE_CLOSE_PROTOCOL_AFTER_CONFIGURATION: "1",
|
|
331
|
+
});
|
|
332
|
+
const retryPaths = createFixtureRoot();
|
|
333
|
+
const session = startSession();
|
|
334
|
+
let retryFixture;
|
|
335
|
+
try {
|
|
336
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
337
|
+
const disconnected = session.waitFor(/^ERR: adapter-failed$/m);
|
|
338
|
+
const fixtureExited = once(disconnectingFixture.child, "exit");
|
|
339
|
+
session.command(`launch 127.0.0.1:${disconnectingFixture.port} "C:\\workspace path\\program.py"`);
|
|
340
|
+
await ready;
|
|
341
|
+
await disconnected;
|
|
342
|
+
assert.equal((session.output().match(/^ERR: adapter-failed$/gm) ?? []).length, 1);
|
|
343
|
+
await fixtureExited;
|
|
344
|
+
|
|
345
|
+
retryFixture = await startTcpFixture(retryPaths);
|
|
346
|
+
const attached = session.waitFor(/^READY: attach$/m);
|
|
347
|
+
session.command(`attach 127.0.0.1:${retryFixture.port}`);
|
|
348
|
+
await attached;
|
|
349
|
+
} finally {
|
|
350
|
+
if (session.child.exitCode === null) await quit(session);
|
|
351
|
+
await stopFixture(disconnectingFixture.child);
|
|
352
|
+
if (retryFixture) await stopFixture(retryFixture.child);
|
|
353
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
354
|
+
rmSync(retryPaths.root, { recursive: true, force: true });
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
test("DAP terminal close reports one EXIT and no adapter failure", { timeout: 15_000 }, async () => {
|
|
359
|
+
const paths = createFixtureRoot();
|
|
360
|
+
const tcpFixture = await startTcpFixture(paths, { DAP_FIXTURE_CLOSE_PROTOCOL_AFTER_TERMINATE: "1" });
|
|
361
|
+
const session = startSession();
|
|
362
|
+
try {
|
|
363
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
364
|
+
session.command(`launch 127.0.0.1:${tcpFixture.port} "C:\\workspace path\\program.py"`);
|
|
365
|
+
await ready;
|
|
366
|
+
|
|
367
|
+
const fixtureExited = once(tcpFixture.child, "exit");
|
|
368
|
+
const exited = session.waitFor(/^EXIT: terminated$/m);
|
|
369
|
+
session.command("terminate");
|
|
370
|
+
await exited;
|
|
371
|
+
await fixtureExited;
|
|
372
|
+
assert.equal((session.output().match(/^EXIT: terminated$/gm) ?? []).length, 1);
|
|
373
|
+
assert.doesNotMatch(session.output(), /^ERR: adapter-failed$/m);
|
|
374
|
+
|
|
375
|
+
await quit(session);
|
|
376
|
+
} finally {
|
|
377
|
+
if (session.child.exitCode === null) await quit(session);
|
|
378
|
+
await stopFixture(tcpFixture.child);
|
|
379
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
test("DAP launch setup terminal reports one EXIT without READY or ERR", { timeout: 15_000 }, async () => {
|
|
384
|
+
const paths = createFixtureRoot();
|
|
385
|
+
const tcpFixture = await startTcpFixture(paths, { DAP_FIXTURE_TERMINATE_AFTER_CONFIGURATION: "1" });
|
|
386
|
+
const session = startSession();
|
|
387
|
+
try {
|
|
388
|
+
const fixtureExited = once(tcpFixture.child, "exit");
|
|
389
|
+
const exited = session.waitFor(/^EXIT: terminated$/m);
|
|
390
|
+
session.command(`launch 127.0.0.1:${tcpFixture.port} "C:\\workspace path\\program.py"`);
|
|
391
|
+
await exited;
|
|
392
|
+
await fixtureExited;
|
|
393
|
+
assert.equal((session.output().match(/^EXIT: terminated$/gm) ?? []).length, 1);
|
|
394
|
+
assert.doesNotMatch(session.output(), /^READY: launch$/m);
|
|
395
|
+
assert.doesNotMatch(session.output(), /^ERR:/m);
|
|
396
|
+
|
|
397
|
+
await quit(session);
|
|
398
|
+
} finally {
|
|
399
|
+
if (session.child.exitCode === null) await quit(session);
|
|
400
|
+
await stopFixture(tcpFixture.child);
|
|
401
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
test("DAP attach setup terminal reports one EXIT without READY or ERR", { timeout: 15_000 }, async () => {
|
|
406
|
+
const paths = createFixtureRoot();
|
|
407
|
+
const tcpFixture = await startTcpFixture(paths, { DAP_FIXTURE_TERMINATE_AFTER_CONFIGURATION: "1" });
|
|
408
|
+
const session = startSession();
|
|
409
|
+
try {
|
|
410
|
+
const fixtureExited = once(tcpFixture.child, "exit");
|
|
411
|
+
const exited = session.waitFor(/^EXIT: terminated$/m);
|
|
412
|
+
session.command(`attach 127.0.0.1:${tcpFixture.port}`);
|
|
413
|
+
await exited;
|
|
414
|
+
await fixtureExited;
|
|
415
|
+
assert.equal((session.output().match(/^EXIT: terminated$/gm) ?? []).length, 1);
|
|
416
|
+
assert.doesNotMatch(session.output(), /^READY: attach$/m);
|
|
417
|
+
assert.doesNotMatch(session.output(), /^ERR:/m);
|
|
418
|
+
|
|
419
|
+
await quit(session);
|
|
420
|
+
} finally {
|
|
421
|
+
if (session.child.exitCode === null) await quit(session);
|
|
422
|
+
await stopFixture(tcpFixture.child);
|
|
423
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
test("DAP snapshot transport loss reports one adapter failure", { timeout: 15_000 }, async () => {
|
|
428
|
+
const paths = createFixtureRoot();
|
|
429
|
+
const tcpFixture = await startTcpFixture(paths, { DAP_FIXTURE_CLOSE_PROTOCOL_ON_STACK_TRACE: "1" });
|
|
430
|
+
const session = startSession();
|
|
431
|
+
try {
|
|
432
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
433
|
+
session.command(`launch 127.0.0.1:${tcpFixture.port} "C:\\workspace path\\program.py"`);
|
|
434
|
+
await ready;
|
|
435
|
+
|
|
436
|
+
const fixtureExited = once(tcpFixture.child, "exit");
|
|
437
|
+
const failed = session.waitFor(/^ERR: adapter-failed$/m);
|
|
438
|
+
session.command("continue");
|
|
439
|
+
await failed;
|
|
440
|
+
await fixtureExited;
|
|
441
|
+
assert.equal((session.output().match(/^ERR: adapter-failed$/gm) ?? []).length, 1);
|
|
442
|
+
assert.doesNotMatch(session.output(), /^STOP:/m);
|
|
443
|
+
|
|
444
|
+
await quit(session);
|
|
445
|
+
} finally {
|
|
446
|
+
if (session.child.exitCode === null) await quit(session);
|
|
447
|
+
await stopFixture(tcpFixture.child);
|
|
448
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
test("DAP required no-stop timeout emits no STOP", { timeout: 15_000 }, async () => {
|
|
453
|
+
const paths = createFixtureRoot();
|
|
454
|
+
const session = startSession({ DAP_FIXTURE_NO_STOP: "1", DAP_TIMEOUT_MS: "2000" });
|
|
455
|
+
try {
|
|
456
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
457
|
+
session.command(`launch "${paths.adapter}" "C:\\workspace path\\program.py"`);
|
|
458
|
+
await ready;
|
|
459
|
+
|
|
460
|
+
const outputStart = session.output().length;
|
|
461
|
+
const timedOut = session.waitFor(/^ERR: timeout$/m);
|
|
462
|
+
session.command("continue");
|
|
463
|
+
await timedOut;
|
|
464
|
+
assert.doesNotMatch(session.output().slice(outputStart), /^STOP:/m);
|
|
465
|
+
} finally {
|
|
466
|
+
if (session.child.exitCode === null) await quit(session);
|
|
467
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
test("DAP oversized eval/stack output stays within 32KB", { timeout: 15_000 }, async () => {
|
|
472
|
+
const paths = createFixtureRoot();
|
|
473
|
+
const session = startSession({ DAP_FIXTURE_OVERSIZED_OUTPUT: "1" });
|
|
474
|
+
try {
|
|
475
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
476
|
+
session.command(`launch "${paths.adapter}" "C:\\workspace path\\program.py"`);
|
|
477
|
+
await ready;
|
|
478
|
+
|
|
479
|
+
const stopStart = session.output().length;
|
|
480
|
+
const stopped = session.waitFor(/^STOP: /m);
|
|
481
|
+
const stopTruncated = session.waitFor(/^TRUNCATED: bytes dropped=\d+$/m);
|
|
482
|
+
session.command("continue");
|
|
483
|
+
await Promise.all([stopped, stopTruncated]);
|
|
484
|
+
assertOutputLinesBounded(session.output().slice(stopStart));
|
|
485
|
+
|
|
486
|
+
const stackStart = session.output().length;
|
|
487
|
+
const stackTruncated = session.waitFor(/^TRUNCATED: rows dropped=\d+ bytes dropped=\d+$/m);
|
|
488
|
+
session.command("stack");
|
|
489
|
+
await stackTruncated;
|
|
490
|
+
assertOutputLinesBounded(session.output().slice(stackStart));
|
|
491
|
+
|
|
492
|
+
const evalStart = session.output().length;
|
|
493
|
+
const evaluated = session.waitFor(/^EVAL\t/m);
|
|
494
|
+
const evalTruncated = session.waitFor(/^TRUNCATED: bytes dropped=\d+$/m);
|
|
495
|
+
session.command("eval value");
|
|
496
|
+
await Promise.all([evaluated, evalTruncated]);
|
|
497
|
+
assertOutputLinesBounded(session.output().slice(evalStart));
|
|
498
|
+
} finally {
|
|
499
|
+
if (session.child.exitCode === null) await quit(session);
|
|
500
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
test("DAP REPL keeps quoted Windows paths, invalid launch args, and table caps", { timeout: 15_000 }, async () => {
|
|
505
|
+
const paths = createFixtureRoot();
|
|
506
|
+
const session = startSession({ DAP_FIXTURE_CAPTURE: paths.capturePath, DAP_FIXTURE_LIFECYCLE: paths.lifecyclePath });
|
|
507
|
+
try {
|
|
508
|
+
const missingAdapter = session.waitFor(/^ERR: invalid-args$/m);
|
|
509
|
+
session.command("launch");
|
|
510
|
+
await missingAdapter;
|
|
511
|
+
|
|
512
|
+
const missingProgram = session.waitFor(/^ERR: invalid-args$/m);
|
|
513
|
+
session.command('launch "C:\\workspace path\\adapter.mjs"');
|
|
514
|
+
await missingProgram;
|
|
515
|
+
|
|
516
|
+
const unclosedQuote = session.waitFor(/^ERR: invalid-args$/m);
|
|
517
|
+
session.command('launch "C:\\workspace path\\adapter.mjs');
|
|
518
|
+
await unclosedQuote;
|
|
519
|
+
|
|
520
|
+
const ready = session.waitFor(/^READY: launch$/m);
|
|
521
|
+
session.command(`launch "${paths.adapter}" "C:\\workspace path\\program.py"`);
|
|
522
|
+
await ready;
|
|
523
|
+
const launchArguments = JSON.parse(readFileSync(paths.capturePath, "utf8").trim());
|
|
524
|
+
assert.equal(launchArguments.program, "C:\\workspace path\\program.py");
|
|
525
|
+
|
|
526
|
+
const breakpoint = session.waitFor(/^BREAK: C:\\workspace path\\program\.py:12$/m);
|
|
527
|
+
session.command('break "C:\\workspace path\\program.py:12"');
|
|
528
|
+
await breakpoint;
|
|
529
|
+
|
|
530
|
+
const truncated = session.waitFor(/^TRUNCATED: rows dropped=\d+ bytes dropped=\d+$/m);
|
|
531
|
+
session.command("vars 8");
|
|
532
|
+
await truncated;
|
|
533
|
+
const rowCount = (session.output().match(/^v\d+\t/gm) ?? []).length;
|
|
534
|
+
assert.ok(rowCount > 0 && rowCount <= 100, `expected at most ${100} variable rows, got ${rowCount}`);
|
|
535
|
+
} finally {
|
|
536
|
+
if (session.child.exitCode === null) await quit(session);
|
|
537
|
+
rmSync(paths.root, { recursive: true, force: true });
|
|
538
|
+
}
|
|
539
|
+
});
|