@hcu-lab.me/mcp-device 1.0.9 → 1.0.12
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/PRIVACY.md +21 -0
- package/README.md +58 -3
- package/SECURITY.md +67 -0
- package/config/revoked-approvals.json +1 -0
- package/control-plane/config/mcp-servers.example.toml +52 -0
- package/control-plane/config/mcp-servers.toml +52 -0
- package/control-plane/contracts/device-public-contract-v1.json +733 -0
- package/control-plane/scripts/GATEWAY-LICENSE.txt +7 -0
- package/control-plane/scripts/account-http.mjs +220 -0
- package/control-plane/scripts/account-store.mjs +368 -0
- package/control-plane/scripts/admin.mjs +68 -0
- package/control-plane/scripts/auth-session.mjs +411 -0
- package/control-plane/scripts/authenticated-mcp-wrapper.mjs +1281 -0
- package/control-plane/scripts/benchmark-command.mjs +9 -0
- package/control-plane/scripts/benchmark-mcp-catalog.mjs +174 -0
- package/control-plane/scripts/catalog-budget.mjs +87 -0
- package/control-plane/scripts/check-device-public-contract.mjs +20 -0
- package/control-plane/scripts/custom-tools/index.mjs +221 -0
- package/control-plane/scripts/custom-tools/path-utils.mjs +117 -0
- package/control-plane/scripts/custom-tools/response-utils.mjs +34 -0
- package/control-plane/scripts/dashboard-http.mjs +598 -0
- package/control-plane/scripts/device-access-policy.mjs +205 -0
- package/control-plane/scripts/device-admin.mjs +43 -0
- package/control-plane/scripts/device-audit.mjs +63 -0
- package/control-plane/scripts/device-broker.mjs +1461 -0
- package/control-plane/scripts/device-execution-tool-definitions.mjs +217 -0
- package/control-plane/scripts/device-inventory.mjs +128 -0
- package/control-plane/scripts/device-pairing-http.mjs +109 -0
- package/control-plane/scripts/device-pairing-store.mjs +245 -0
- package/control-plane/scripts/device-public-contract.mjs +165 -0
- package/control-plane/scripts/device-release.mjs +95 -0
- package/control-plane/scripts/device-secure-transport.mjs +128 -0
- package/control-plane/scripts/device-store.mjs +283 -0
- package/control-plane/scripts/device-usage.mjs +657 -0
- package/control-plane/scripts/embedded-device.mjs +149 -0
- package/control-plane/scripts/enduser-ui.mjs +45 -0
- package/control-plane/scripts/external-tool-broker.mjs +179 -0
- package/control-plane/scripts/oauth-authorization-server.mjs +589 -0
- package/control-plane/scripts/operator-dashboard-http.mjs +81 -0
- package/control-plane/scripts/project-inspection.mjs +227 -0
- package/control-plane/scripts/projects/project-id.mjs +69 -0
- package/control-plane/scripts/projects/trusted-roots-projects.mjs +375 -0
- package/control-plane/scripts/prompts/index.mjs +60 -0
- package/control-plane/scripts/remote-process-sessions.mjs +78 -0
- package/control-plane/scripts/remote-tool-result.mjs +9 -0
- package/control-plane/scripts/resources/index.mjs +166 -0
- package/control-plane/scripts/runtime-profile.mjs +54 -0
- package/control-plane/scripts/shell-tool-descriptor.mjs +17 -0
- package/control-plane/scripts/skill-source-safety.mjs +46 -0
- package/control-plane/scripts/skills/README.md +70 -0
- package/control-plane/scripts/skills/_upstream_licenses/anthropic-THIRD_PARTY_NOTICES.md +405 -0
- package/control-plane/scripts/skills/_upstream_licenses/hallmark-LICENSE.txt +21 -0
- package/control-plane/scripts/skills/_upstream_licenses/ponytail-LICENSE.txt +21 -0
- package/control-plane/scripts/skills/_upstream_licenses/stitch-skills-LICENSE.txt +201 -0
- package/control-plane/scripts/skills/_upstream_licenses/superpowers-LICENSE.txt +21 -0
- package/control-plane/scripts/skills/algorithmic-art/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/algorithmic-art/SKILL.md +405 -0
- package/control-plane/scripts/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/control-plane/scripts/skills/algorithmic-art/templates/viewer.html +599 -0
- package/control-plane/scripts/skills/brainstorming/SKILL.md +285 -0
- package/control-plane/scripts/skills/brainstorming/scripts/frame-template.html +213 -0
- package/control-plane/scripts/skills/brainstorming/scripts/helper.js +167 -0
- package/control-plane/scripts/skills/brainstorming/scripts/server.cjs +723 -0
- package/control-plane/scripts/skills/brainstorming/scripts/start-server.sh +209 -0
- package/control-plane/scripts/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/control-plane/scripts/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/control-plane/scripts/skills/brainstorming/visual-companion.md +299 -0
- package/control-plane/scripts/skills/brand-guidelines/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/brand-guidelines/SKILL.md +73 -0
- package/control-plane/scripts/skills/claude-api/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/claude-api/SKILL.md +570 -0
- package/control-plane/scripts/skills/claude-api/csharp/claude-api/README.md +362 -0
- package/control-plane/scripts/skills/claude-api/csharp/claude-api/batches.md +14 -0
- package/control-plane/scripts/skills/claude-api/csharp/claude-api/files-api.md +25 -0
- package/control-plane/scripts/skills/claude-api/csharp/claude-api/streaming.md +28 -0
- package/control-plane/scripts/skills/claude-api/csharp/claude-api/tool-use.md +164 -0
- package/control-plane/scripts/skills/claude-api/curl/examples.md +256 -0
- package/control-plane/scripts/skills/claude-api/curl/managed-agents.md +371 -0
- package/control-plane/scripts/skills/claude-api/go/claude-api/README.md +188 -0
- package/control-plane/scripts/skills/claude-api/go/claude-api/files-api.md +23 -0
- package/control-plane/scripts/skills/claude-api/go/claude-api/streaming.md +43 -0
- package/control-plane/scripts/skills/claude-api/go/claude-api/tool-use.md +220 -0
- package/control-plane/scripts/skills/claude-api/go/managed-agents/README.md +564 -0
- package/control-plane/scripts/skills/claude-api/java/claude-api/README.md +238 -0
- package/control-plane/scripts/skills/claude-api/java/claude-api/files-api.md +27 -0
- package/control-plane/scripts/skills/claude-api/java/claude-api/streaming.md +24 -0
- package/control-plane/scripts/skills/claude-api/java/claude-api/tool-use.md +228 -0
- package/control-plane/scripts/skills/claude-api/java/managed-agents/README.md +443 -0
- package/control-plane/scripts/skills/claude-api/php/claude-api/README.md +174 -0
- package/control-plane/scripts/skills/claude-api/php/claude-api/batches.md +15 -0
- package/control-plane/scripts/skills/claude-api/php/claude-api/files-api.md +13 -0
- package/control-plane/scripts/skills/claude-api/php/claude-api/streaming.md +27 -0
- package/control-plane/scripts/skills/claude-api/php/claude-api/tool-use.md +253 -0
- package/control-plane/scripts/skills/claude-api/php/managed-agents/README.md +443 -0
- package/control-plane/scripts/skills/claude-api/python/claude-api/README.md +565 -0
- package/control-plane/scripts/skills/claude-api/python/claude-api/batches.md +198 -0
- package/control-plane/scripts/skills/claude-api/python/claude-api/files-api.md +170 -0
- package/control-plane/scripts/skills/claude-api/python/claude-api/sdk-upgrade.md +286 -0
- package/control-plane/scripts/skills/claude-api/python/claude-api/streaming.md +179 -0
- package/control-plane/scripts/skills/claude-api/python/claude-api/tool-use.md +627 -0
- package/control-plane/scripts/skills/claude-api/python/managed-agents/README.md +335 -0
- package/control-plane/scripts/skills/claude-api/ruby/claude-api/README.md +134 -0
- package/control-plane/scripts/skills/claude-api/ruby/claude-api/streaming.md +16 -0
- package/control-plane/scripts/skills/claude-api/ruby/claude-api/tool-use.md +41 -0
- package/control-plane/scripts/skills/claude-api/ruby/managed-agents/README.md +394 -0
- package/control-plane/scripts/skills/claude-api/shared/admin-api.md +179 -0
- package/control-plane/scripts/skills/claude-api/shared/agent-design.md +101 -0
- package/control-plane/scripts/skills/claude-api/shared/anthropic-cli.md +269 -0
- package/control-plane/scripts/skills/claude-api/shared/claude-platform-on-aws.md +59 -0
- package/control-plane/scripts/skills/claude-api/shared/cost-optimization.md +233 -0
- package/control-plane/scripts/skills/claude-api/shared/error-codes.md +262 -0
- package/control-plane/scripts/skills/claude-api/shared/live-sources.md +166 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-api-reference.md +455 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-client-patterns.md +220 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-core.md +359 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-environments.md +226 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-events.md +290 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-memory.md +201 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-multiagent.md +260 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-onboarding.md +82 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-outcomes.md +108 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-overview.md +77 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-scheduled-deployments.md +156 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +282 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-tools.md +504 -0
- package/control-plane/scripts/skills/claude-api/shared/managed-agents-webhooks.md +143 -0
- package/control-plane/scripts/skills/claude-api/shared/model-migration.md +1872 -0
- package/control-plane/scripts/skills/claude-api/shared/models.md +142 -0
- package/control-plane/scripts/skills/claude-api/shared/platform-availability.md +52 -0
- package/control-plane/scripts/skills/claude-api/shared/prompt-audit.md +223 -0
- package/control-plane/scripts/skills/claude-api/shared/prompt-caching.md +292 -0
- package/control-plane/scripts/skills/claude-api/shared/token-counting.md +56 -0
- package/control-plane/scripts/skills/claude-api/shared/tool-use-concepts.md +526 -0
- package/control-plane/scripts/skills/claude-api/typescript/claude-api/README.md +405 -0
- package/control-plane/scripts/skills/claude-api/typescript/claude-api/batches.md +106 -0
- package/control-plane/scripts/skills/claude-api/typescript/claude-api/files-api.md +98 -0
- package/control-plane/scripts/skills/claude-api/typescript/claude-api/streaming.md +178 -0
- package/control-plane/scripts/skills/claude-api/typescript/claude-api/tool-use.md +586 -0
- package/control-plane/scripts/skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/control-plane/scripts/skills/dispatching-parallel-agents/SKILL.md +167 -0
- package/control-plane/scripts/skills/enhance-prompt/README.md +34 -0
- package/control-plane/scripts/skills/enhance-prompt/SKILL.md +204 -0
- package/control-plane/scripts/skills/enhance-prompt/references/KEYWORDS.md +114 -0
- package/control-plane/scripts/skills/executing-plans/SKILL.md +371 -0
- package/control-plane/scripts/skills/executing-plans/scripts/task-done +52 -0
- package/control-plane/scripts/skills/executing-plans/scripts/task-start +28 -0
- package/control-plane/scripts/skills/extract-design-md/SKILL.md +358 -0
- package/control-plane/scripts/skills/extract-design-md/examples/DESIGN.md +210 -0
- package/control-plane/scripts/skills/extract-design-md/references/angular.md +122 -0
- package/control-plane/scripts/skills/extract-design-md/references/plain-css.md +161 -0
- package/control-plane/scripts/skills/extract-design-md/references/react-tailwind.md +157 -0
- package/control-plane/scripts/skills/extract-design-md/references/svelte.md +101 -0
- package/control-plane/scripts/skills/extract-design-md/references/vue.md +107 -0
- package/control-plane/scripts/skills/finishing-a-development-branch/SKILL.md +225 -0
- package/control-plane/scripts/skills/frontend-design/LICENSE.txt +177 -0
- package/control-plane/scripts/skills/frontend-design/SKILL.md +71 -0
- package/control-plane/scripts/skills/hallmark/SKILL.md +558 -0
- package/control-plane/scripts/skills/hallmark/references/anti-patterns.md +418 -0
- package/control-plane/scripts/skills/hallmark/references/assets.md +406 -0
- package/control-plane/scripts/skills/hallmark/references/color.md +95 -0
- package/control-plane/scripts/skills/hallmark/references/component-cookbook.md +263 -0
- package/control-plane/scripts/skills/hallmark/references/components/c1-outlined-chip.md +12 -0
- package/control-plane/scripts/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -0
- package/control-plane/scripts/skills/hallmark/references/components/c3-typographic-link.md +8 -0
- package/control-plane/scripts/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -0
- package/control-plane/scripts/skills/hallmark/references/components/f1-bento-grid.md +20 -0
- package/control-plane/scripts/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -0
- package/control-plane/scripts/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/f4-step-sequence.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/f6-product-card-grid.md +41 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft1-mast-headed.md +13 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft4-dense-typographic.md +10 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft5-statement.md +21 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft6-letter-close.md +19 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft7-newsletter-first.md +27 -0
- package/control-plane/scripts/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -0
- package/control-plane/scripts/skills/hallmark/references/components/h1-marquee.md +15 -0
- package/control-plane/scripts/skills/hallmark/references/components/h2-split-diptych.md +15 -0
- package/control-plane/scripts/skills/hallmark/references/components/h3-quote-led.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/h4-stat-led.md +14 -0
- package/control-plane/scripts/skills/hallmark/references/components/h5-letter-hero.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/h6-photographic-fold.md +16 -0
- package/control-plane/scripts/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -0
- package/control-plane/scripts/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -0
- package/control-plane/scripts/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -0
- package/control-plane/scripts/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -0
- package/control-plane/scripts/skills/hallmark/references/components/n11-mega-menu.md +40 -0
- package/control-plane/scripts/skills/hallmark/references/components/n12-banner-retract.md +34 -0
- package/control-plane/scripts/skills/hallmark/references/components/n13-inline-cmdk-pill.md +39 -0
- package/control-plane/scripts/skills/hallmark/references/components/n1b-saas-three-section.md +35 -0
- package/control-plane/scripts/skills/hallmark/references/components/n2-floating-chip.md +14 -0
- package/control-plane/scripts/skills/hallmark/references/components/n3-side-rail.md +14 -0
- package/control-plane/scripts/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -0
- package/control-plane/scripts/skills/hallmark/references/components/n5-floating-pill.md +28 -0
- package/control-plane/scripts/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -0
- package/control-plane/scripts/skills/hallmark/references/components/n7-brutal-slab.md +22 -0
- package/control-plane/scripts/skills/hallmark/references/components/n8-terminal-command.md +21 -0
- package/control-plane/scripts/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -0
- package/control-plane/scripts/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -0
- package/control-plane/scripts/skills/hallmark/references/components/s2-hanging.md +13 -0
- package/control-plane/scripts/skills/hallmark/references/components/s3-sticky-pinned.md +19 -0
- package/control-plane/scripts/skills/hallmark/references/components/s4-inline-no-break.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/s5-bottom-anchored.md +13 -0
- package/control-plane/scripts/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -0
- package/control-plane/scripts/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -0
- package/control-plane/scripts/skills/hallmark/references/components/t3-single-huge-quote.md +11 -0
- package/control-plane/scripts/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -0
- package/control-plane/scripts/skills/hallmark/references/contract.md +25 -0
- package/control-plane/scripts/skills/hallmark/references/copy.md +182 -0
- package/control-plane/scripts/skills/hallmark/references/custom-craft.md +626 -0
- package/control-plane/scripts/skills/hallmark/references/custom-theme.md +367 -0
- package/control-plane/scripts/skills/hallmark/references/design-md.md +116 -0
- package/control-plane/scripts/skills/hallmark/references/export-formats.md +329 -0
- package/control-plane/scripts/skills/hallmark/references/floating-nav.md +89 -0
- package/control-plane/scripts/skills/hallmark/references/genres/atmospheric.md +69 -0
- package/control-plane/scripts/skills/hallmark/references/genres/editorial.md +72 -0
- package/control-plane/scripts/skills/hallmark/references/genres/modern-minimal.md +71 -0
- package/control-plane/scripts/skills/hallmark/references/genres/playful.md +70 -0
- package/control-plane/scripts/skills/hallmark/references/hero-enrichment.md +475 -0
- package/control-plane/scripts/skills/hallmark/references/imagery-kit.md +170 -0
- package/control-plane/scripts/skills/hallmark/references/interaction-and-states.md +208 -0
- package/control-plane/scripts/skills/hallmark/references/layout-and-space.md +112 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/02-long-document.md +34 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/04-stat-led.md +34 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/05-workbench.md +32 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/07-manifesto.md +32 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/08-photographic.md +34 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/09-quote-led.md +32 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/10-specimen.md +32 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/11-catalogue.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/12-letter.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/13-index-first.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/15-split-studio.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures/21-component-playground.md +23 -0
- package/control-plane/scripts/skills/hallmark/references/macrostructures.md +89 -0
- package/control-plane/scripts/skills/hallmark/references/microinteractions.md +258 -0
- package/control-plane/scripts/skills/hallmark/references/motion.md +109 -0
- package/control-plane/scripts/skills/hallmark/references/preview-examples.md +49 -0
- package/control-plane/scripts/skills/hallmark/references/responsive.md +138 -0
- package/control-plane/scripts/skills/hallmark/references/slop-test.md +192 -0
- package/control-plane/scripts/skills/hallmark/references/structure.md +160 -0
- package/control-plane/scripts/skills/hallmark/references/study.md +509 -0
- package/control-plane/scripts/skills/hallmark/references/themes/carnival.md +301 -0
- package/control-plane/scripts/skills/hallmark/references/themes/cobalt.md +146 -0
- package/control-plane/scripts/skills/hallmark/references/themes/grid.md +161 -0
- package/control-plane/scripts/skills/hallmark/references/themes/hum.md +403 -0
- package/control-plane/scripts/skills/hallmark/references/themes/lumen.md +478 -0
- package/control-plane/scripts/skills/hallmark/references/typography.md +243 -0
- package/control-plane/scripts/skills/hallmark/references/upstream/recipes.md +186 -0
- package/control-plane/scripts/skills/hallmark/references/upstream/study-examples.md +176 -0
- package/control-plane/scripts/skills/hallmark/references/upstream/tokens.css +1221 -0
- package/control-plane/scripts/skills/hallmark/references/verbs/audit.md +25 -0
- package/control-plane/scripts/skills/hallmark/references/verbs/redesign.md +269 -0
- package/control-plane/scripts/skills/human-comms/SKILL.md +29 -0
- package/control-plane/scripts/skills/index.mjs +432 -0
- package/control-plane/scripts/skills/internal-comms/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/internal-comms/SKILL.md +32 -0
- package/control-plane/scripts/skills/internal-comms/examples/3p-updates.md +47 -0
- package/control-plane/scripts/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/control-plane/scripts/skills/internal-comms/examples/faq-answers.md +30 -0
- package/control-plane/scripts/skills/internal-comms/examples/general-comms.md +16 -0
- package/control-plane/scripts/skills/mcp-adapter.mjs +94 -0
- package/control-plane/scripts/skills/mcp-builder/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/mcp-builder/SKILL.md +236 -0
- package/control-plane/scripts/skills/mcp-builder/reference/evaluation.md +602 -0
- package/control-plane/scripts/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/control-plane/scripts/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/control-plane/scripts/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/control-plane/scripts/skills/mcp-builder/scripts/connections.py +151 -0
- package/control-plane/scripts/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/control-plane/scripts/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/control-plane/scripts/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/control-plane/scripts/skills/ponytail/SKILL.md +120 -0
- package/control-plane/scripts/skills/ponytail-audit/SKILL.md +41 -0
- package/control-plane/scripts/skills/ponytail-debt/SKILL.md +44 -0
- package/control-plane/scripts/skills/ponytail-gain/SKILL.md +50 -0
- package/control-plane/scripts/skills/ponytail-help/SKILL.md +71 -0
- package/control-plane/scripts/skills/ponytail-review/SKILL.md +57 -0
- package/control-plane/scripts/skills/receiving-code-review/SKILL.md +205 -0
- package/control-plane/scripts/skills/requesting-code-review/SKILL.md +95 -0
- package/control-plane/scripts/skills/requesting-code-review/code-reviewer.md +198 -0
- package/control-plane/scripts/skills/skill-creator/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/skill-creator/SKILL.md +485 -0
- package/control-plane/scripts/skills/skill-creator/agents/analyzer.md +274 -0
- package/control-plane/scripts/skills/skill-creator/agents/comparator.md +202 -0
- package/control-plane/scripts/skills/skill-creator/agents/grader.md +223 -0
- package/control-plane/scripts/skills/skill-creator/assets/eval_review.html +146 -0
- package/control-plane/scripts/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/control-plane/scripts/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/control-plane/scripts/skills/skill-creator/references/schemas.md +430 -0
- package/control-plane/scripts/skills/skill-creator/scripts/__init__.py +0 -0
- package/control-plane/scripts/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/control-plane/scripts/skills/skill-creator/scripts/generate_report.py +326 -0
- package/control-plane/scripts/skills/skill-creator/scripts/improve_description.py +247 -0
- package/control-plane/scripts/skills/skill-creator/scripts/package_skill.py +136 -0
- package/control-plane/scripts/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/control-plane/scripts/skills/skill-creator/scripts/run_eval.py +310 -0
- package/control-plane/scripts/skills/skill-creator/scripts/run_loop.py +328 -0
- package/control-plane/scripts/skills/skill-creator/scripts/utils.py +47 -0
- package/control-plane/scripts/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/slack-gif-creator/SKILL.md +254 -0
- package/control-plane/scripts/skills/slack-gif-creator/core/easing.py +234 -0
- package/control-plane/scripts/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/control-plane/scripts/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/control-plane/scripts/skills/slack-gif-creator/core/validators.py +136 -0
- package/control-plane/scripts/skills/slack-gif-creator/requirements.txt +4 -0
- package/control-plane/scripts/skills/sources.json +401 -0
- package/control-plane/scripts/skills/sources.lock.json +416 -0
- package/control-plane/scripts/skills/subagent-driven-development/SKILL.md +570 -0
- package/control-plane/scripts/skills/subagent-driven-development/implementer-prompt.md +154 -0
- package/control-plane/scripts/skills/subagent-driven-development/re-review-prompt.md +115 -0
- package/control-plane/scripts/skills/subagent-driven-development/scripts/review-package +53 -0
- package/control-plane/scripts/skills/subagent-driven-development/scripts/sdd-workspace +82 -0
- package/control-plane/scripts/skills/subagent-driven-development/scripts/task-brief +43 -0
- package/control-plane/scripts/skills/subagent-driven-development/task-reviewer-prompt.md +207 -0
- package/control-plane/scripts/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/control-plane/scripts/skills/systematic-debugging/SKILL.md +283 -0
- package/control-plane/scripts/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/control-plane/scripts/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/control-plane/scripts/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/control-plane/scripts/skills/systematic-debugging/find-polluter.sh +72 -0
- package/control-plane/scripts/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/control-plane/scripts/skills/systematic-debugging/test-academic.md +14 -0
- package/control-plane/scripts/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/control-plane/scripts/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/control-plane/scripts/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/control-plane/scripts/skills/test-driven-development/SKILL.md +330 -0
- package/control-plane/scripts/skills/test-driven-development/writing-good-tests.md +198 -0
- package/control-plane/scripts/skills/theme-factory/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/theme-factory/SKILL.md +59 -0
- package/control-plane/scripts/skills/theme-factory/theme-showcase.pdf +0 -0
- package/control-plane/scripts/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/desert-rose.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/golden-hour.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/control-plane/scripts/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/control-plane/scripts/skills/using-git-worktrees/SKILL.md +167 -0
- package/control-plane/scripts/skills/verification-before-completion/SKILL.md +120 -0
- package/control-plane/scripts/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/web-artifacts-builder/SKILL.md +74 -0
- package/control-plane/scripts/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/control-plane/scripts/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/control-plane/scripts/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/control-plane/scripts/skills/webapp-testing/LICENSE.txt +202 -0
- package/control-plane/scripts/skills/webapp-testing/SKILL.md +96 -0
- package/control-plane/scripts/skills/webapp-testing/examples/console_logging.py +35 -0
- package/control-plane/scripts/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/control-plane/scripts/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/control-plane/scripts/skills/webapp-testing/scripts/with_server.py +106 -0
- package/control-plane/scripts/skills/writing-plans/SKILL.md +192 -0
- package/control-plane/scripts/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/control-plane/scripts/skills/writing-skills/SKILL.md +681 -0
- package/control-plane/scripts/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/control-plane/scripts/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/control-plane/scripts/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/control-plane/scripts/skills/writing-skills/persuasion-principles.md +187 -0
- package/control-plane/scripts/skills/writing-skills/render-graphs.js +169 -0
- package/control-plane/scripts/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/control-plane/scripts/smoke-mcp-schemas.mjs +30 -0
- package/control-plane/scripts/surface-config.mjs +45 -0
- package/control-plane/scripts/sync-skills.mjs +370 -0
- package/control-plane/scripts/tool-metrics.mjs +74 -0
- package/control-plane/scripts/tool-risk.mjs +156 -0
- package/control-plane/scripts/tool-surface-stability.mjs +38 -0
- package/control-plane/scripts/upstreams/catalog-cache.mjs +28 -0
- package/control-plane/scripts/upstreams/config.mjs +158 -0
- package/control-plane/scripts/upstreams/diagnostics.mjs +21 -0
- package/control-plane/scripts/upstreams/http-client.mjs +67 -0
- package/control-plane/scripts/upstreams/manager.mjs +535 -0
- package/control-plane/scripts/upstreams/names.mjs +55 -0
- package/control-plane/scripts/upstreams/presets.mjs +60 -0
- package/control-plane/scripts/upstreams/resource-uri.mjs +29 -0
- package/control-plane/scripts/upstreams/stdio-client.mjs +73 -0
- package/control-plane/scripts/workspace-registry.mjs +147 -0
- package/dist/context/authorization.d.ts +5 -0
- package/dist/context/authorization.js +70 -0
- package/dist/context/capture.d.ts +46 -0
- package/dist/context/capture.js +187 -0
- package/dist/context/cli.d.ts +47 -0
- package/dist/context/cli.js +287 -0
- package/dist/context/device-adapter.d.ts +102 -0
- package/dist/context/device-adapter.js +79 -0
- package/dist/context/gateway.d.ts +354 -0
- package/dist/context/gateway.js +50 -0
- package/dist/context/graph.d.ts +63 -0
- package/dist/context/graph.js +214 -0
- package/dist/context/importer.d.ts +8 -0
- package/dist/context/importer.js +69 -0
- package/dist/context/indexer.d.ts +14 -0
- package/dist/context/indexer.js +57 -0
- package/dist/context/migrations/index.d.ts +4 -0
- package/dist/context/migrations/index.js +87 -0
- package/dist/context/redact.d.ts +15 -0
- package/dist/context/redact.js +43 -0
- package/dist/context/repositories.d.ts +9 -0
- package/dist/context/repositories.js +45 -0
- package/dist/context/search.d.ts +63 -0
- package/dist/context/search.js +207 -0
- package/dist/context/service.d.ts +278 -0
- package/dist/context/service.js +160 -0
- package/dist/context/store.d.ts +134 -0
- package/dist/context/store.js +722 -0
- package/dist/context/text.d.ts +4 -0
- package/dist/context/text.js +14 -0
- package/dist/context/tool-contract.d.ts +534 -0
- package/dist/context/tool-contract.js +45 -0
- package/dist/device/core.d.ts +29 -0
- package/dist/device/core.js +66 -0
- package/dist/device/device.d.ts +5 -0
- package/dist/device/device.js +94 -37
- package/dist/device/gateway-channel.d.ts +8 -1
- package/dist/device/gateway-channel.js +51 -3
- package/dist/device/gateway-tool-adapter.d.ts +11 -3
- package/dist/device/gateway-tool-adapter.js +141 -98
- package/dist/device/official-trust.d.ts +12 -0
- package/dist/device/official-trust.js +25 -1
- package/dist/device/runtime-owner.js +9 -1
- package/dist/distribution.d.ts +4 -0
- package/dist/distribution.js +8 -0
- package/dist/handlers/filesystem-handlers.js +53 -37
- package/dist/handlers/search-handlers.d.ts +1 -0
- package/dist/handlers/search-handlers.js +51 -1
- package/dist/log-palace/cli.d.ts +7 -0
- package/dist/log-palace/cli.js +89 -0
- package/dist/log-palace/formats.d.ts +26 -0
- package/dist/log-palace/formats.js +126 -0
- package/dist/log-palace/store.d.ts +129 -0
- package/dist/log-palace/store.js +856 -0
- package/dist/mcp-device.d.ts +1 -1
- package/dist/mcp-device.js +28 -6
- package/dist/npm-scripts/remote.js +1 -0
- package/dist/platform/activity-journal.d.ts +16 -0
- package/dist/platform/activity-journal.js +68 -0
- package/dist/platform/cli.d.ts +1 -0
- package/dist/platform/cli.js +300 -0
- package/dist/platform/coordination-lock.d.ts +45 -0
- package/dist/platform/coordination-lock.js +233 -0
- package/dist/platform/device-runtime.d.ts +16 -0
- package/dist/platform/device-runtime.js +83 -0
- package/dist/platform/knowledge-contract.d.ts +46 -0
- package/dist/platform/knowledge-contract.js +1 -0
- package/dist/platform/knowledge-mcp.d.ts +29 -0
- package/dist/platform/knowledge-mcp.js +95 -0
- package/dist/platform/knowledge-router.d.ts +64 -0
- package/dist/platform/knowledge-router.js +320 -0
- package/dist/platform/plugin-child.d.ts +1 -0
- package/dist/platform/plugin-child.js +115 -0
- package/dist/platform/plugin-contract.d.ts +76 -0
- package/dist/platform/plugin-contract.js +53 -0
- package/dist/platform/plugin-driver.d.ts +8 -0
- package/dist/platform/plugin-driver.js +443 -0
- package/dist/platform/plugin-host.d.ts +88 -0
- package/dist/platform/plugin-host.js +817 -0
- package/dist/platform/plugin-policy.d.ts +3 -0
- package/dist/platform/plugin-policy.js +29 -0
- package/dist/platform/plugin-services.d.ts +14 -0
- package/dist/platform/plugin-services.js +32 -0
- package/dist/platform/process-identity.d.ts +9 -0
- package/dist/platform/process-identity.js +68 -0
- package/dist/platform/runtime-lease.d.ts +4 -0
- package/dist/platform/runtime-lease.js +58 -0
- package/dist/platform/runtime-root.d.ts +9 -0
- package/dist/platform/runtime-root.js +61 -0
- package/dist/platform/state-backup.d.ts +92 -0
- package/dist/platform/state-backup.js +399 -0
- package/dist/plugins/reference/plugin.d.ts +3 -0
- package/dist/plugins/reference/plugin.js +13 -0
- package/dist/search-manager.d.ts +6 -0
- package/dist/search-manager.js +123 -0
- package/dist/server.d.ts +13 -0
- package/dist/server.js +7 -3
- package/dist/terminal-manager.d.ts +16 -0
- package/dist/terminal-manager.js +137 -42
- package/dist/tool-dispatcher.d.ts +11 -0
- package/dist/tool-dispatcher.js +228 -0
- package/dist/tools/edit.js +72 -1
- package/dist/tools/filesystem.d.ts +1 -1
- package/dist/tools/filesystem.js +2 -2
- package/dist/tools/improved-process-tools.js +91 -108
- package/dist/tools/schemas.d.ts +94 -2
- package/dist/tools/schemas.js +20 -6
- package/dist/types.d.ts +8 -0
- package/dist/utils/output-budget.d.ts +6 -0
- package/dist/utils/output-budget.js +15 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +29 -6
- package/skills/mcp-device-context/SKILL.md +40 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const PROMPTS = new Map([
|
|
2
|
+
['explore_project', { description: 'Explore the project structure and understand the codebase layout.', args: ['device_id', 'project_id', 'focus', 'depth'] }],
|
|
3
|
+
['quality_check', { description: 'Review project structure, documentation, and general code quality standards.', args: ['device_id', 'project_id', 'depth'] }],
|
|
4
|
+
['cross_platform_review', { description: 'Review Windows/Linux/macOS shell, path, environment, child-process, and test behavior.', args: ['device_id', 'project_id'] }],
|
|
5
|
+
['release_readiness', { description: 'Check release readiness, git state, tests, secret scan, schema smoke, and docs consistency.', args: ['device_id', 'project_id'] }],
|
|
6
|
+
['explain_diff', { description: 'Explain the working-tree or staged diff.', args: ['device_id', 'project_id', 'staged'] }],
|
|
7
|
+
['generate_pr_description', { description: 'Generate a PR description from repo context and diff.', args: ['device_id', 'project_id', 'baseBranch', 'headBranch'] }],
|
|
8
|
+
['plan_feature', { description: 'Create a small, reviewable implementation plan for a feature.', args: ['device_id', 'project_id', 'feature'] }],
|
|
9
|
+
['fix_with_tests', { description: 'Run an agent coding loop that fixes a scoped issue and validates with tests.', args: ['device_id', 'project_id', 'issue'] }]
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
function profileName(context) {
|
|
13
|
+
return context.runtimeProfile?.name || context.profile || context.safetyProfile?.name || 'yolo';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function promptArguments(names) {
|
|
17
|
+
return names.map(name => ({ name, required: name === 'device_id' || name === 'project_id' }));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function listRepoPrompts(_context = {}) {
|
|
21
|
+
return [...PROMPTS.entries()].map(([name, prompt]) => ({
|
|
22
|
+
name,
|
|
23
|
+
description: prompt.description,
|
|
24
|
+
arguments: promptArguments(prompt.args)
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function textMessage(text) {
|
|
29
|
+
return { role: 'user', content: { type: 'text', text } };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getRepoPrompt(name, args = {}, context = {}) {
|
|
33
|
+
const prompt = PROMPTS.get(name);
|
|
34
|
+
if (!prompt) throw new Error(`Unknown prompt: ${name}`);
|
|
35
|
+
const deviceId = String(args.device_id || '').trim();
|
|
36
|
+
if (!deviceId) {
|
|
37
|
+
const error = new Error('DEVICE_ID_REQUIRED: device_id is required.');
|
|
38
|
+
error.code = 'DEVICE_ID_REQUIRED';
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
const projectId = String(args.project_id || '').trim();
|
|
42
|
+
if (!projectId) {
|
|
43
|
+
const error = new Error('PROJECT_ID_REQUIRED: project_id is required.');
|
|
44
|
+
error.code = 'PROJECT_ID_REQUIRED';
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
const safety = profileName(context);
|
|
48
|
+
const common = `Device: ${deviceId}\nProject: ${projectId}\nActive MCP runtime profile: ${safety}. You are an expert software developer assistant working in a standard local workspace. Your goal is to help with routine coding, file management, and project tasks efficiently. Command strings are executed as-is by the selected OS shell; do not assume PowerShell and POSIX syntax are interchangeable.`;
|
|
49
|
+
const bodies = {
|
|
50
|
+
explore_project: `${common}\nExplore focus: ${args.focus || 'structure,entrypoints,config,tests,docs'}. Depth: ${args.depth || 'normal'}. Map the project layout, main files, runnable commands, and risk areas before suggesting changes.`,
|
|
51
|
+
quality_check: `${common}\nReview the project for consistency, adherence to style guides, and general architectural health.`,
|
|
52
|
+
cross_platform_review: `${common}\nReview Windows/Linux/macOS behavior: path handling, env vars, direct shell args, child_process usage, quoting, test coverage, and CI matrix gaps. Preserve POSIX non-login -c behavior and Windows PowerShell flags.`,
|
|
53
|
+
release_readiness: `${common}\nCheck clean git state, tests, secret scan, runtime schema smoke, untracked imported files, package/docs consistency, and release blockers. Do not publish or push without explicit user intent.`,
|
|
54
|
+
explain_diff: `${common}\nExplain the ${String(args.staged) === 'true' ? 'staged' : 'working-tree'} diff. Summarize intent, behavior, tests affected, and review concerns.`,
|
|
55
|
+
generate_pr_description: `${common}\nGenerate a PR description from ${args.baseBranch || '<baseBranch>'} to ${args.headBranch || '<headBranch>'}. Include summary, changes, validation, behavior, and rollout notes.`,
|
|
56
|
+
plan_feature: `${common}\nCreate a small, reviewable implementation plan for: ${args.feature || '<feature>'}. Include files to inspect, phases, tests, rollback concerns, and docs updates.`,
|
|
57
|
+
fix_with_tests: `${common}\nFix this issue: ${args.issue || '<issue>'}. Inspect first, make minimal changes, run targeted tests after each major phase where practical, then run the full relevant suite and report results.`
|
|
58
|
+
};
|
|
59
|
+
return { description: prompt.description, messages: [textMessage(bodies[name])] };
|
|
60
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_TTL_MS = 30 * 60 * 1000;
|
|
4
|
+
|
|
5
|
+
export function createRemoteProcessSessionRegistry(options = {}) {
|
|
6
|
+
const ttlMs = options.ttlMs ?? DEFAULT_TTL_MS;
|
|
7
|
+
const now = options.now || (() => Date.now());
|
|
8
|
+
const sessions = new Map();
|
|
9
|
+
|
|
10
|
+
function sweep() {
|
|
11
|
+
const cutoff = now() - ttlMs;
|
|
12
|
+
for (const [sessionId, record] of sessions) {
|
|
13
|
+
if (record.lastUsedAt < cutoff) sessions.delete(sessionId);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function register({ ownerKey, deviceId, connectionEpoch, executionRuntimeGeneration, remoteSessionId }) {
|
|
18
|
+
sweep();
|
|
19
|
+
if (connectionEpoch === undefined || connectionEpoch === null || String(connectionEpoch).trim() === '') {
|
|
20
|
+
throw new Error('Process session requires a connection epoch.');
|
|
21
|
+
}
|
|
22
|
+
const runtimeGeneration = String(executionRuntimeGeneration || '').trim();
|
|
23
|
+
if (!runtimeGeneration) throw new Error('Process session requires an execution runtime generation.');
|
|
24
|
+
const sessionId = `remote-${randomUUID()}`;
|
|
25
|
+
const createdAt = now();
|
|
26
|
+
sessions.set(sessionId, {
|
|
27
|
+
ownerKey: String(ownerKey || 'anonymous'),
|
|
28
|
+
deviceId: String(deviceId),
|
|
29
|
+
connectionEpoch,
|
|
30
|
+
executionRuntimeGeneration: runtimeGeneration,
|
|
31
|
+
remoteSessionId: String(remoteSessionId),
|
|
32
|
+
createdAt,
|
|
33
|
+
lastUsedAt: createdAt
|
|
34
|
+
});
|
|
35
|
+
return sessionId;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function resolve({ sessionId, ownerKey }) {
|
|
39
|
+
sweep();
|
|
40
|
+
const record = sessions.get(String(sessionId || ''));
|
|
41
|
+
if (!record) throw new Error(`Unknown or expired process session ${sessionId}.`);
|
|
42
|
+
const caller = String(ownerKey || 'anonymous');
|
|
43
|
+
if (record.ownerKey !== caller) throw new Error('Process session belongs to a different caller.');
|
|
44
|
+
return { ...record };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function touch({ sessionId, ownerKey }) {
|
|
48
|
+
const record = resolve({ sessionId, ownerKey });
|
|
49
|
+
const current = sessions.get(String(sessionId));
|
|
50
|
+
if (!current) throw new Error(`Unknown or expired process session ${sessionId}.`);
|
|
51
|
+
current.lastUsedAt = now();
|
|
52
|
+
return { ...current };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function remove({ sessionId, ownerKey }) {
|
|
56
|
+
const record = resolve({ sessionId, ownerKey });
|
|
57
|
+
sessions.delete(String(sessionId));
|
|
58
|
+
return record;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function removeByDevice(deviceId) {
|
|
62
|
+
const target = String(deviceId || '');
|
|
63
|
+
let removed = 0;
|
|
64
|
+
for (const [sessionId, record] of sessions) {
|
|
65
|
+
if (record.deviceId !== target) continue;
|
|
66
|
+
sessions.delete(sessionId);
|
|
67
|
+
removed += 1;
|
|
68
|
+
}
|
|
69
|
+
return removed;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function size() {
|
|
73
|
+
sweep();
|
|
74
|
+
return sessions.size;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return { register, resolve, touch, remove, removeByDevice, size };
|
|
78
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function normalizeRemoteFilesystemResult(result) {
|
|
2
|
+
if (!result || typeof result !== 'object' || result.structuredContent !== undefined) return result;
|
|
3
|
+
const content = Array.isArray(result.content) ? result.content : [];
|
|
4
|
+
const text = content
|
|
5
|
+
.filter(item => item?.type === 'text')
|
|
6
|
+
.map(item => String(item.text ?? ''))
|
|
7
|
+
.join('\n');
|
|
8
|
+
return { ...result, structuredContent: { content: text } };
|
|
9
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { buildRuntimeProfileStatus, getRuntimeProfile } from '../runtime-profile.mjs';
|
|
2
|
+
import { inspectProject, listProjects, readProjectResourceFile, resolveProjectRoute } from '../project-inspection.mjs';
|
|
3
|
+
import { applyToolRisk, buildToolRiskManifest } from '../tool-risk.mjs';
|
|
4
|
+
|
|
5
|
+
const GATEWAY_RESOURCES = Object.freeze([
|
|
6
|
+
{
|
|
7
|
+
uri: 'repo://gateway/runtime-profile',
|
|
8
|
+
name: 'Gateway runtime profile',
|
|
9
|
+
mimeType: 'application/json',
|
|
10
|
+
description: 'Current gateway runtime profile.'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
uri: 'repo://gateway/tool-manifest',
|
|
14
|
+
name: 'Gateway tool manifest',
|
|
15
|
+
mimeType: 'application/json',
|
|
16
|
+
description: 'Current gateway tool risk and visibility manifest.'
|
|
17
|
+
}
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
const LEGACY_RESOURCE_TEMPLATES = Object.freeze([
|
|
21
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/file/{path}', name: 'Project file', mimeType: 'text/plain' },
|
|
22
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/tree{?depth}', name: 'Project tree', mimeType: 'application/json' },
|
|
23
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/git/diff{?staged}', name: 'Git diff', mimeType: 'text/plain' }
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
const NATIVE_RESOURCE_TEMPLATES = Object.freeze([
|
|
27
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/summary', name: 'Project summary', mimeType: 'application/json' },
|
|
28
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/tree{?depth}', name: 'Project tree', mimeType: 'application/json' },
|
|
29
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/git/status', name: 'Git status', mimeType: 'application/json' },
|
|
30
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/git/diff{?staged}', name: 'Git diff', mimeType: 'text/plain' },
|
|
31
|
+
{ uriTemplate: 'repo://device/{device_id}/project/{project_id}/file/{path}', name: 'Project file', mimeType: 'text/plain' }
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
function jsonContent(uri, data) {
|
|
35
|
+
return { contents: [{ uri, mimeType: 'application/json', text: JSON.stringify(data, null, 2) }] };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function textContent(uri, text, mimeType = 'text/plain') {
|
|
39
|
+
return { contents: [{ uri, mimeType, text }] };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function surfaceMode(surfaceConfig) {
|
|
43
|
+
return surfaceConfig?.mode || 'legacy';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function listRepoResources(context = {}, surfaceConfig = context.surfaceConfig) {
|
|
47
|
+
const mode = surfaceMode(surfaceConfig);
|
|
48
|
+
if (mode === 'agent' || mode === 'native') return GATEWAY_RESOURCES.map(resource => ({ ...resource }));
|
|
49
|
+
|
|
50
|
+
const visibleDevices = typeof context.listVisibleDevices === 'function'
|
|
51
|
+
? context.listVisibleDevices().filter(device => device?.online && !device?.revoked)
|
|
52
|
+
: [];
|
|
53
|
+
const visibleDeviceIds = new Set(visibleDevices.map(device => String(device.deviceId || '').trim()).filter(Boolean));
|
|
54
|
+
const projects = [...(context.projectRegistry?.projectRoutes?.values() || [])]
|
|
55
|
+
.filter(project => visibleDeviceIds.has(project.deviceId));
|
|
56
|
+
const resources = GATEWAY_RESOURCES.map(resource => ({ ...resource }));
|
|
57
|
+
for (const deviceId of [...visibleDeviceIds].sort()) {
|
|
58
|
+
resources.push({
|
|
59
|
+
uri: `repo://device/${encodeURIComponent(deviceId)}/projects`,
|
|
60
|
+
name: `${deviceId} projects`,
|
|
61
|
+
mimeType: 'application/json',
|
|
62
|
+
description: 'Configured projects for one owned online device.'
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
for (const project of projects) {
|
|
66
|
+
const base = `repo://device/${encodeURIComponent(project.deviceId)}/project/${encodeURIComponent(project.projectId)}`;
|
|
67
|
+
resources.push(
|
|
68
|
+
{ uri: `${base}/summary`, name: `${project.displayName} summary`, mimeType: 'application/json' },
|
|
69
|
+
{ uri: `${base}/tree`, name: `${project.displayName} directory tree`, mimeType: 'application/json' },
|
|
70
|
+
{ uri: `${base}/git/status`, name: `${project.displayName} git status`, mimeType: 'application/json' },
|
|
71
|
+
{ uri: `${base}/readme`, name: `${project.displayName} README`, mimeType: 'text/markdown' },
|
|
72
|
+
{ uri: `${base}/package`, name: `${project.displayName} package.json`, mimeType: 'application/json' }
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
return resources;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function listRepoResourceTemplates(context = {}, surfaceConfig = context.surfaceConfig) {
|
|
79
|
+
const mode = surfaceMode(surfaceConfig);
|
|
80
|
+
if (mode === 'agent') return [];
|
|
81
|
+
if (mode === 'native') return NATIVE_RESOURCE_TEMPLATES.map(template => ({ ...template }));
|
|
82
|
+
return LEGACY_RESOURCE_TEMPLATES.map(template => ({ ...template }));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function readRuntimeProfile(uri, context) {
|
|
86
|
+
return jsonContent(uri, buildRuntimeProfileStatus(context.env || process.env));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function readToolManifest(uri, context) {
|
|
90
|
+
const runtimeProfile = getRuntimeProfile(context.env || process.env);
|
|
91
|
+
const tools = (context.listTools ? await context.listTools() : []).map(applyToolRisk);
|
|
92
|
+
return jsonContent(uri, { profile: runtimeProfile.name, tools: buildToolRiskManifest(tools, runtimeProfile) });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export async function readRepoResource(uri, context = {}) {
|
|
96
|
+
const parsed = new URL(uri);
|
|
97
|
+
if (parsed.protocol === 'skill:') {
|
|
98
|
+
if (!context.skillRegistry) throw new Error('Skill registry is unavailable.');
|
|
99
|
+
const resource = context.skillRegistry.readResource(uri);
|
|
100
|
+
if (!resource) throw new Error(`Unknown skill resource URI: ${uri}`);
|
|
101
|
+
return {
|
|
102
|
+
contents: [{
|
|
103
|
+
uri: resource.uri,
|
|
104
|
+
mimeType: resource.mimeType,
|
|
105
|
+
...(resource.text !== undefined ? { text: resource.text } : { blob: resource.blob })
|
|
106
|
+
}],
|
|
107
|
+
ttlMs: 30000,
|
|
108
|
+
cacheScope: 'public'
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (parsed.protocol !== 'repo:') throw new Error(`Unsupported resource URI: ${uri}`);
|
|
112
|
+
if (uri === 'repo://gateway/runtime-profile') return await readRuntimeProfile(uri, context);
|
|
113
|
+
if (uri === 'repo://gateway/tool-manifest') return await readToolManifest(uri, context);
|
|
114
|
+
|
|
115
|
+
// Historical project-scoped diagnostic aliases are singleton gateway
|
|
116
|
+
// diagnostics; they do not execute against a project path.
|
|
117
|
+
const legacyDiagnosticMatch = uri.match(/^repo:\/\/project\/[^/?#]+\/(runtime-profile|safety-profile|tool-manifest)$/);
|
|
118
|
+
if (legacyDiagnosticMatch?.[1] === 'tool-manifest') return await readToolManifest(uri, context);
|
|
119
|
+
if (legacyDiagnosticMatch) return await readRuntimeProfile(uri, context);
|
|
120
|
+
|
|
121
|
+
const deviceProjectsMatch = uri.match(/^repo:\/\/device\/([^/?#]+)\/projects(?:[?#].*)?$/);
|
|
122
|
+
if (deviceProjectsMatch) {
|
|
123
|
+
const deviceId = decodeURIComponent(deviceProjectsMatch[1]);
|
|
124
|
+
const result = listProjects(context, { device_id: deviceId, limit: 200 });
|
|
125
|
+
return jsonContent(uri, { device_id: deviceId, projects: result.items, pathExposure: result.pathExposure, nextCursor: result.nextCursor });
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const match = uri.match(/^repo:\/\/device\/([^/?#]+)\/project\/([^/?#]+)\/(.+)$/);
|
|
129
|
+
if (!match) throw new Error(`Unknown resource URI: ${uri}`);
|
|
130
|
+
const deviceId = decodeURIComponent(match[1]);
|
|
131
|
+
const projectId = decodeURIComponent(match[2]);
|
|
132
|
+
const project = resolveProjectRoute(context, { deviceId, projectId });
|
|
133
|
+
const rest = match[3].replace(/[?#].*$/, '');
|
|
134
|
+
|
|
135
|
+
if (rest === 'summary') return jsonContent(uri, await inspectProject(context, { deviceId, projectId: project.projectId, view: 'summary' }));
|
|
136
|
+
if (rest === 'runtime-profile' || rest === 'safety-profile') return await readRuntimeProfile(uri, context);
|
|
137
|
+
if (rest === 'tool-manifest') return await readToolManifest(uri, context);
|
|
138
|
+
if (rest === 'readme') {
|
|
139
|
+
const result = await inspectProject(context, { deviceId, projectId: project.projectId, view: 'readme' });
|
|
140
|
+
return textContent(uri, result.text, 'text/markdown');
|
|
141
|
+
}
|
|
142
|
+
if (rest === 'package') {
|
|
143
|
+
const result = await inspectProject(context, { deviceId, projectId: project.projectId, view: 'package' });
|
|
144
|
+
return jsonContent(uri, result.data);
|
|
145
|
+
}
|
|
146
|
+
if (rest === 'tree') {
|
|
147
|
+
const depthText = parsed.searchParams.get('depth');
|
|
148
|
+
const depthNumber = depthText === null || depthText === '' ? 3 : Number(depthText);
|
|
149
|
+
const depth = Number.isInteger(depthNumber) && depthNumber >= 1 && depthNumber <= 10 ? depthNumber : 3;
|
|
150
|
+
return jsonContent(uri, await inspectProject(context, { deviceId, projectId: project.projectId, view: 'tree', depth, limit: 500 }));
|
|
151
|
+
}
|
|
152
|
+
if (rest === 'git/status') return jsonContent(uri, await inspectProject(context, { deviceId, projectId: project.projectId, view: 'git_status' }));
|
|
153
|
+
if (rest === 'git/diff') {
|
|
154
|
+
const result = await inspectProject(context, { deviceId, projectId: project.projectId, view: 'git_diff', staged: parsed.searchParams.get('staged') === 'true' });
|
|
155
|
+
return textContent(uri, result.text, 'text/plain');
|
|
156
|
+
}
|
|
157
|
+
if (rest.startsWith('file/')) {
|
|
158
|
+
const text = await readProjectResourceFile(context, {
|
|
159
|
+
deviceId,
|
|
160
|
+
projectId: project.projectId,
|
|
161
|
+
encodedPath: rest.slice('file/'.length)
|
|
162
|
+
});
|
|
163
|
+
return textContent(uri, text, 'text/plain');
|
|
164
|
+
}
|
|
165
|
+
throw new Error(`Unknown resource URI: ${uri}`);
|
|
166
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export const RUNTIME_PROFILE_NAMES = ['safe', 'assisted', 'yolo'];
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_RUNTIME_PROFILE = 'yolo';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const RUNTIME_PROFILES = {
|
|
7
|
+
safe: {
|
|
8
|
+
name: 'safe',
|
|
9
|
+
exposeShell: false,
|
|
10
|
+
exposeDestructiveTools: false,
|
|
11
|
+
exposeOpenWorldTools: false,
|
|
12
|
+
requireServerSideApproval: true,
|
|
13
|
+
description: 'Conservative profile for ChatGPT-friendly read-mostly usage.'
|
|
14
|
+
},
|
|
15
|
+
assisted: {
|
|
16
|
+
name: 'assisted',
|
|
17
|
+
exposeShell: false,
|
|
18
|
+
exposeDestructiveTools: true,
|
|
19
|
+
exposeOpenWorldTools: false,
|
|
20
|
+
requireServerSideApproval: true,
|
|
21
|
+
description: 'Project automation profile with write-capable tools and external publish steps off by default.'
|
|
22
|
+
},
|
|
23
|
+
yolo: {
|
|
24
|
+
name: 'yolo',
|
|
25
|
+
exposeShell: true,
|
|
26
|
+
exposeDestructiveTools: true,
|
|
27
|
+
exposeOpenWorldTools: true,
|
|
28
|
+
requireServerSideApproval: false,
|
|
29
|
+
description: 'Project automation profile with shell and external publish steps available.'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export function normalizeRuntimeProfileName(value) {
|
|
34
|
+
const raw = String(value ?? '').trim().toLowerCase();
|
|
35
|
+
return RUNTIME_PROFILE_NAMES.includes(raw) ? raw : DEFAULT_RUNTIME_PROFILE;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function getRuntimeProfile(env = process.env) {
|
|
39
|
+
const raw = String(env.MCP_RUNTIME_PROFILE || DEFAULT_RUNTIME_PROFILE).trim().toLowerCase();
|
|
40
|
+
const name = normalizeRuntimeProfileName(raw);
|
|
41
|
+
return RUNTIME_PROFILES[name];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function buildRuntimeProfileStatus(env = process.env) {
|
|
45
|
+
const profile = getRuntimeProfile(env);
|
|
46
|
+
return {
|
|
47
|
+
profile: profile.name,
|
|
48
|
+
defaultProfile: DEFAULT_RUNTIME_PROFILE,
|
|
49
|
+
shellEnabled: profile.exposeShell,
|
|
50
|
+
destructiveToolsEnabled: profile.exposeDestructiveTools,
|
|
51
|
+
openWorldToolsEnabled: profile.exposeOpenWorldTools,
|
|
52
|
+
serverSideApprovalRequired: profile.requireServerSideApproval,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const SHELL_COMMAND_AS_IS_NOTICE = 'Tasks are processed by the project execution environment.';
|
|
2
|
+
|
|
3
|
+
export function buildShellExecuteDescription() {
|
|
4
|
+
return [
|
|
5
|
+
'Use this when the task needs terminal access on the selected device for file discovery, content search, git, tests, builds, package management, or scripts not covered by read_text_file, write_file, or edit_file. Set device_id explicitly and working_directory to the active project folder.',
|
|
6
|
+
'Execution is routed through the authenticated device broker. Oversized device results fail closed at the transport/output budget rather than falling back to gateway-host execution.'
|
|
7
|
+
].join('\n\n');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function buildShellExecuteAnnotations() {
|
|
11
|
+
return {
|
|
12
|
+
readOnlyHint: false,
|
|
13
|
+
idempotentHint: false,
|
|
14
|
+
destructiveHint: false,
|
|
15
|
+
openWorldHint: false
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
export function assertSafeRelativePath(value, label) {
|
|
5
|
+
const normalized = path.normalize(String(value || ''));
|
|
6
|
+
if (!normalized || path.isAbsolute(normalized) || normalized.split(path.sep).includes('..')) {
|
|
7
|
+
throw new Error(`Unsafe ${label} path: ${value}`);
|
|
8
|
+
}
|
|
9
|
+
return normalized;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function assertContained(root, candidate, label) {
|
|
13
|
+
const relative = path.relative(root, candidate);
|
|
14
|
+
if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
|
|
15
|
+
throw new Error(`Unsafe ${label} path: ${candidate}`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function resolveSafeFile(root, relativePath, label, {
|
|
20
|
+
maxFileBytes = Number.POSITIVE_INFINITY,
|
|
21
|
+
forbiddenExtensions = new Set()
|
|
22
|
+
} = {}) {
|
|
23
|
+
const rootReal = fs.realpathSync(root);
|
|
24
|
+
const normalized = assertSafeRelativePath(relativePath, label);
|
|
25
|
+
const candidate = path.resolve(rootReal, normalized);
|
|
26
|
+
assertContained(rootReal, candidate, label);
|
|
27
|
+
|
|
28
|
+
let current = rootReal;
|
|
29
|
+
for (const segment of path.relative(rootReal, candidate).split(path.sep).filter(Boolean)) {
|
|
30
|
+
current = path.join(current, segment);
|
|
31
|
+
if (!fs.existsSync(current)) throw new Error(`Missing ${label}: ${current}`);
|
|
32
|
+
if (fs.lstatSync(current).isSymbolicLink()) {
|
|
33
|
+
throw new Error(`Symlink is not allowed for ${label}: ${current}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const resolved = fs.realpathSync(candidate);
|
|
38
|
+
assertContained(rootReal, resolved, label);
|
|
39
|
+
const stat = fs.lstatSync(resolved);
|
|
40
|
+
if (!stat.isFile()) throw new Error(`Expected file for ${label}: ${resolved}`);
|
|
41
|
+
if (stat.size > maxFileBytes) throw new Error(`${label} exceeds ${maxFileBytes} bytes: ${resolved}`);
|
|
42
|
+
if (forbiddenExtensions.has(path.extname(resolved).toLowerCase())) {
|
|
43
|
+
throw new Error(`Font files are not vendored: ${resolved}`);
|
|
44
|
+
}
|
|
45
|
+
return resolved;
|
|
46
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Canonical global/team skills
|
|
2
|
+
|
|
3
|
+
`scripts/skills/` is the gateway's only runtime source for global/team skills. One `SkillRegistry` scans this directory and serves both the standard MCP Skills extension and the two generic fallback tools.
|
|
4
|
+
|
|
5
|
+
Repository-specific guidance stays outside this registry: use root `AGENTS.md` and `.agents/skills/<name>/SKILL.md` in the repository that owns the instructions.
|
|
6
|
+
|
|
7
|
+
## Package format
|
|
8
|
+
|
|
9
|
+
A skill package is a directory:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
scripts/skills/<name>/
|
|
13
|
+
SKILL.md
|
|
14
|
+
references/...
|
|
15
|
+
scripts/...
|
|
16
|
+
assets/...
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`SKILL.md` must be a regular file with YAML mapping frontmatter, a non-empty body, and these required fields:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
---
|
|
23
|
+
name: systematic-debugging
|
|
24
|
+
description: Use when a bug needs root-cause analysis before changing code.
|
|
25
|
+
---
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The canonical name must match both `^[a-z0-9]+(?:-[a-z0-9]+)*$` and the directory basename. Runtime metadata is parsed from the actual resulting `SKILL.md`; source configuration never overrides it at runtime.
|
|
29
|
+
|
|
30
|
+
Every regular served file becomes a `skill://skills/<name>/...` resource with an exact-byte SHA-256 digest and size. Symlinks and path traversal are rejected. A package may contain at most 512 served resources and 16 MiB of static served bytes.
|
|
31
|
+
|
|
32
|
+
Supply-chain metadata, registry metadata, upstream-license storage, and temporary sync files are not served as skill package contents.
|
|
33
|
+
|
|
34
|
+
## Delivery paths
|
|
35
|
+
|
|
36
|
+
Modern MCP `2026-07-28` clients use `io.modelcontextprotocol/skills`:
|
|
37
|
+
|
|
38
|
+
- `skills/list` for stable metadata entries and complete manifests.
|
|
39
|
+
- `skills/get` for one current metadata entry by URI.
|
|
40
|
+
- normal `resources/read` for exact skill content.
|
|
41
|
+
|
|
42
|
+
Generic clients use only `skill_catalog` and `load_skill`. Both adapters read the same registry snapshot, revisions, and catalog version. There is no server-side skill classifier, priority system, bootstrap gate, prompt mirror, or background watcher.
|
|
43
|
+
|
|
44
|
+
Relevant entry points rescan/hash deterministically. Therefore add/edit/remove is visible on the next catalog/get/read call without restarting the server.
|
|
45
|
+
|
|
46
|
+
## Health
|
|
47
|
+
|
|
48
|
+
A valid empty directory is healthy. A missing, unreadable, or invalid root is degraded/error. The gateway never substitutes an embedded catalog when the configured root disappears. `/healthz` exposes only bounded skill status, count/version when healthy, or a stable error code when degraded.
|
|
49
|
+
|
|
50
|
+
## Managed upstream skills
|
|
51
|
+
|
|
52
|
+
`sources.json` is the reviewable source manifest. `sources.lock.json` records exact repositories, refs, commits, source paths, targets, compatibility patches, and license provenance. `sync-skills.mjs` fetches pinned upstream state, checks licenses and tree safety, copies selected skills, applies compatibility patches to the resulting package, validates the entire prepared catalog, replaces managed directories, removes stale managed skills, and writes the lock.
|
|
53
|
+
|
|
54
|
+
Current managed sources include Ponytail, ordinary Superpowers workflow skills, redistributable Anthropic skills, selected Stitch skills, and Hallmark. Non-redistributable packages remain excluded.
|
|
55
|
+
|
|
56
|
+
Compatibility changes belong in `sources.json`, not as hand-edits to managed output. Semantic changes such as a corrected name or description must be applied to the resulting `SKILL.md` during sync.
|
|
57
|
+
|
|
58
|
+
Run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm run skills:check
|
|
62
|
+
npm run skills:sync
|
|
63
|
+
npm test
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
After sync, review `git status --short`, `git diff --stat`, and `git diff`. Re-running sync against the same source commits must be idempotent.
|
|
67
|
+
|
|
68
|
+
## Adding a team skill
|
|
69
|
+
|
|
70
|
+
Add a valid `scripts/skills/<name>/SKILL.md` package. Do not add hard-coded runtime definitions, aliases, source-specific runtime URIs, or a second registry. The next relevant registry operation will discover it.
|