@lesliechan721/aw 0.1.0-beta.3
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/dist/authoring/assets/aw-config.d.mts +2 -0
- package/dist/authoring/assets/aw-config.mjs +556 -0
- package/dist/authoring/assets/aw-config.mjs.map +1 -0
- package/dist/authoring/scripts/add-skill.d.mts +2 -0
- package/dist/authoring/scripts/add-skill.mjs +355 -0
- package/dist/authoring/scripts/add-skill.mjs.map +1 -0
- package/dist/authoring/scripts/check-plugin-versions.d.mts +2 -0
- package/dist/authoring/scripts/check-plugin-versions.mjs +5 -0
- package/dist/authoring/scripts/check-plugin-versions.mjs.map +1 -0
- package/dist/authoring/scripts/init-plugin.d.mts +2 -0
- package/dist/authoring/scripts/init-plugin.mjs +512 -0
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/lib/javascript-import-scanner.d.mts +4 -0
- package/dist/authoring/scripts/lib/javascript-import-scanner.mjs +261 -0
- package/dist/authoring/scripts/lib/javascript-import-scanner.mjs.map +1 -0
- package/dist/authoring/scripts/lib/plugin-root.d.mts +26 -0
- package/dist/authoring/scripts/lib/plugin-root.mjs +125 -0
- package/dist/authoring/scripts/lib/plugin-root.mjs.map +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +55 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +777 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -0
- package/dist/authoring/scripts/lib/semver.d.mts +9 -0
- package/dist/authoring/scripts/lib/semver.mjs +63 -0
- package/dist/authoring/scripts/lib/semver.mjs.map +1 -0
- package/dist/authoring/scripts/lib/skill-scaffold.d.mts +124 -0
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +374 -0
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -0
- package/dist/authoring/scripts/plugin-status.d.mts +2 -0
- package/dist/authoring/scripts/plugin-status.mjs +96 -0
- package/dist/authoring/scripts/plugin-status.mjs.map +1 -0
- package/dist/authoring/scripts/validate-plugin.d.mts +2 -0
- package/dist/authoring/scripts/validate-plugin.mjs +4442 -0
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/validate-skill.d.mts +2 -0
- package/dist/authoring/scripts/validate-skill.mjs +126 -0
- package/dist/authoring/scripts/validate-skill.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/aw-skill-eval-engine.d.ts +13 -0
- package/dist/scripts/aw-skill-eval-engine.js +31 -0
- package/dist/scripts/aw-skill-eval-engine.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +18 -0
- package/dist/scripts/bundle-plugins.js +123 -0
- package/dist/scripts/bundle-plugins.js.map +1 -0
- package/dist/scripts/codex-eval-app-server.d.ts +89 -0
- package/dist/scripts/codex-eval-app-server.js +1228 -0
- package/dist/scripts/codex-eval-app-server.js.map +1 -0
- package/dist/scripts/codex-eval-isolation.d.ts +61 -0
- package/dist/scripts/codex-eval-isolation.js +318 -0
- package/dist/scripts/codex-eval-isolation.js.map +1 -0
- package/dist/scripts/codex-eval-process-management.d.ts +8 -0
- package/dist/scripts/codex-eval-process-management.js +69 -0
- package/dist/scripts/codex-eval-process-management.js.map +1 -0
- package/dist/scripts/codex-eval-process-tree.d.ts +38 -0
- package/dist/scripts/codex-eval-process-tree.js +803 -0
- package/dist/scripts/codex-eval-process-tree.js.map +1 -0
- package/dist/scripts/codex-eval-runtime-config.d.ts +62 -0
- package/dist/scripts/codex-eval-runtime-config.js +843 -0
- package/dist/scripts/codex-eval-runtime-config.js.map +1 -0
- package/dist/scripts/codex-trigger-eval.d.ts +84 -0
- package/dist/scripts/codex-trigger-eval.js +968 -0
- package/dist/scripts/codex-trigger-eval.js.map +1 -0
- package/dist/scripts/eval-plugin-skills-audited.d.ts +6 -0
- package/dist/scripts/eval-plugin-skills-audited.js +261 -0
- package/dist/scripts/eval-plugin-skills-audited.js.map +1 -0
- package/dist/scripts/eval-plugin-skills.d.ts +45 -0
- package/dist/scripts/eval-plugin-skills.js +1586 -0
- package/dist/scripts/eval-plugin-skills.js.map +1 -0
- package/dist/scripts/eval-run-layout.d.ts +17 -0
- package/dist/scripts/eval-run-layout.js +26 -0
- package/dist/scripts/eval-run-layout.js.map +1 -0
- package/dist/scripts/plugin-eval-contract.d.ts +185 -0
- package/dist/scripts/plugin-eval-contract.js +695 -0
- package/dist/scripts/plugin-eval-contract.js.map +1 -0
- package/dist/scripts/plugin-eval-materializer.d.ts +13 -0
- package/dist/scripts/plugin-eval-materializer.js +421 -0
- package/dist/scripts/plugin-eval-materializer.js.map +1 -0
- package/dist/scripts/plugin-staging.d.ts +43 -0
- package/dist/scripts/plugin-staging.js +196 -0
- package/dist/scripts/plugin-staging.js.map +1 -0
- package/dist/scripts/skill-reporting.d.ts +212 -0
- package/dist/scripts/skill-reporting.js +922 -0
- package/dist/scripts/skill-reporting.js.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +7 -0
- package/dist/scripts/test-plugin-scripts.js +674 -0
- package/dist/scripts/test-plugin-scripts.js.map +1 -0
- package/dist/src/adapters/helpers.d.ts +44 -0
- package/dist/src/adapters/helpers.js +95 -0
- package/dist/src/adapters/helpers.js.map +1 -0
- package/dist/src/authoring/workspace-commands.d.ts +46 -0
- package/dist/src/authoring/workspace-commands.js +133 -0
- package/dist/src/authoring/workspace-commands.js.map +1 -0
- package/dist/src/commands/catalog-publish.d.ts +33 -0
- package/dist/src/commands/catalog-publish.js +374 -0
- package/dist/src/commands/catalog-publish.js.map +1 -0
- package/dist/src/commands/catalog-source.d.ts +111 -0
- package/dist/src/commands/catalog-source.js +266 -0
- package/dist/src/commands/catalog-source.js.map +1 -0
- package/dist/src/commands/console.d.ts +3 -0
- package/dist/src/commands/console.js +44 -0
- package/dist/src/commands/console.js.map +1 -0
- package/dist/src/commands/dependency-operation-plan.d.ts +28 -0
- package/dist/src/commands/dependency-operation-plan.js +15 -0
- package/dist/src/commands/dependency-operation-plan.js.map +1 -0
- package/dist/src/commands/init.d.ts +31 -0
- package/dist/src/commands/init.js +63 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/options.d.ts +68 -0
- package/dist/src/commands/options.js +146 -0
- package/dist/src/commands/options.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +77 -0
- package/dist/src/commands/rebuild-command.js +1681 -0
- package/dist/src/commands/rebuild-command.js.map +1 -0
- package/dist/src/commands/rebuild-integration.d.ts +94 -0
- package/dist/src/commands/rebuild-integration.js +3289 -0
- package/dist/src/commands/rebuild-integration.js.map +1 -0
- package/dist/src/commands/rebuild-operations.d.ts +110 -0
- package/dist/src/commands/rebuild-operations.js +791 -0
- package/dist/src/commands/rebuild-operations.js.map +1 -0
- package/dist/src/commands/review-publication.d.ts +99 -0
- package/dist/src/commands/review-publication.js +904 -0
- package/dist/src/commands/review-publication.js.map +1 -0
- package/dist/src/commands/runtime.d.ts +176 -0
- package/dist/src/commands/runtime.js +746 -0
- package/dist/src/commands/runtime.js.map +1 -0
- package/dist/src/commands/status-v4.d.ts +102 -0
- package/dist/src/commands/status-v4.js +844 -0
- package/dist/src/commands/status-v4.js.map +1 -0
- package/dist/src/commands/status.d.ts +93 -0
- package/dist/src/commands/status.js +442 -0
- package/dist/src/commands/status.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +57 -0
- package/dist/src/commands/wizard.js +58 -0
- package/dist/src/commands/wizard.js.map +1 -0
- package/dist/src/commands/write-commands.d.ts +7 -0
- package/dist/src/commands/write-commands.js +167 -0
- package/dist/src/commands/write-commands.js.map +1 -0
- package/dist/src/constants.d.ts +25 -0
- package/dist/src/constants.js +26 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/generators/agents.d.ts +3 -0
- package/dist/src/generators/agents.js +46 -0
- package/dist/src/generators/agents.js.map +1 -0
- package/dist/src/generators/hooks.d.ts +15 -0
- package/dist/src/generators/hooks.js +76 -0
- package/dist/src/generators/hooks.js.map +1 -0
- package/dist/src/generators/instructions.d.ts +13 -0
- package/dist/src/generators/instructions.js +66 -0
- package/dist/src/generators/instructions.js.map +1 -0
- package/dist/src/generators/local-plugin.d.ts +53 -0
- package/dist/src/generators/local-plugin.js +1268 -0
- package/dist/src/generators/local-plugin.js.map +1 -0
- package/dist/src/generators/permissions.d.ts +10 -0
- package/dist/src/generators/permissions.js +37 -0
- package/dist/src/generators/permissions.js.map +1 -0
- package/dist/src/generators/shared.d.ts +2 -0
- package/dist/src/generators/shared.js +15 -0
- package/dist/src/generators/shared.js.map +1 -0
- package/dist/src/index.d.ts +35 -0
- package/dist/src/index.js +2344 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +90 -0
- package/dist/src/output/command-receipt.js +129 -0
- package/dist/src/output/command-receipt.js.map +1 -0
- package/dist/src/output/debug-log.d.ts +4 -0
- package/dist/src/output/debug-log.js +97 -0
- package/dist/src/output/debug-log.js.map +1 -0
- package/dist/src/output/equivalent-command.d.ts +9 -0
- package/dist/src/output/equivalent-command.js +39 -0
- package/dist/src/output/equivalent-command.js.map +1 -0
- package/dist/src/output/model.d.ts +117 -0
- package/dist/src/output/model.js +145 -0
- package/dist/src/output/model.js.map +1 -0
- package/dist/src/output/rebuild-progress.d.ts +21 -0
- package/dist/src/output/rebuild-progress.js +138 -0
- package/dist/src/output/rebuild-progress.js.map +1 -0
- package/dist/src/output/redact.d.ts +3 -0
- package/dist/src/output/redact.js +39 -0
- package/dist/src/output/redact.js.map +1 -0
- package/dist/src/output/reporter.d.ts +9 -0
- package/dist/src/output/reporter.js +133 -0
- package/dist/src/output/reporter.js.map +1 -0
- package/dist/src/portable/commands.d.ts +120 -0
- package/dist/src/portable/commands.js +506 -0
- package/dist/src/portable/commands.js.map +1 -0
- package/dist/src/portable/materializer.d.ts +50 -0
- package/dist/src/portable/materializer.js +408 -0
- package/dist/src/portable/materializer.js.map +1 -0
- package/dist/src/portable/skills-cli.d.ts +43 -0
- package/dist/src/portable/skills-cli.js +148 -0
- package/dist/src/portable/skills-cli.js.map +1 -0
- package/dist/src/tui/components.d.ts +32 -0
- package/dist/src/tui/components.js +42 -0
- package/dist/src/tui/components.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +20 -0
- package/dist/src/tui/console-app-v4.js +2613 -0
- package/dist/src/tui/console-app-v4.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +11 -0
- package/dist/src/tui/controller-runtime.js +902 -0
- package/dist/src/tui/controller-runtime.js.map +1 -0
- package/dist/src/tui/controller.d.ts +367 -0
- package/dist/src/tui/controller.js +1724 -0
- package/dist/src/tui/controller.js.map +1 -0
- package/dist/src/tui/index.d.ts +13 -0
- package/dist/src/tui/index.js +14 -0
- package/dist/src/tui/index.js.map +1 -0
- package/dist/src/tui/keys.d.ts +12 -0
- package/dist/src/tui/keys.js +22 -0
- package/dist/src/tui/keys.js.map +1 -0
- package/dist/src/tui/layout.d.ts +12 -0
- package/dist/src/tui/layout.js +19 -0
- package/dist/src/tui/layout.js.map +1 -0
- package/dist/src/tui/model.d.ts +279 -0
- package/dist/src/tui/model.js +652 -0
- package/dist/src/tui/model.js.map +1 -0
- package/dist/src/tui/prompt.d.ts +8 -0
- package/dist/src/tui/prompt.js +242 -0
- package/dist/src/tui/prompt.js.map +1 -0
- package/dist/src/tui/router.d.ts +153 -0
- package/dist/src/tui/router.js +102 -0
- package/dist/src/tui/router.js.map +1 -0
- package/dist/src/tui/runner.d.ts +11 -0
- package/dist/src/tui/runner.js +71 -0
- package/dist/src/tui/runner.js.map +1 -0
- package/dist/src/tui/theme.d.ts +18 -0
- package/dist/src/tui/theme.js +20 -0
- package/dist/src/tui/theme.js.map +1 -0
- package/dist/src/tui/views.d.ts +57 -0
- package/dist/src/tui/views.js +173 -0
- package/dist/src/tui/views.js.map +1 -0
- package/dist/src/tui/wizard.d.ts +11 -0
- package/dist/src/tui/wizard.js +321 -0
- package/dist/src/tui/wizard.js.map +1 -0
- package/dist/src/types.d.ts +313 -0
- package/dist/src/types.js +33 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/active-marketplace-runtime-lock.d.ts +12 -0
- package/dist/src/utils/active-marketplace-runtime-lock.js +133 -0
- package/dist/src/utils/active-marketplace-runtime-lock.js.map +1 -0
- package/dist/src/utils/agent-version.d.ts +13 -0
- package/dist/src/utils/agent-version.js +172 -0
- package/dist/src/utils/agent-version.js.map +1 -0
- package/dist/src/utils/artifact-plan.d.ts +26 -0
- package/dist/src/utils/artifact-plan.js +444 -0
- package/dist/src/utils/artifact-plan.js.map +1 -0
- package/dist/src/utils/artifact-renderer.d.ts +124 -0
- package/dist/src/utils/artifact-renderer.js +442 -0
- package/dist/src/utils/artifact-renderer.js.map +1 -0
- package/dist/src/utils/artifact-sources.d.ts +8 -0
- package/dist/src/utils/artifact-sources.js +10 -0
- package/dist/src/utils/artifact-sources.js.map +1 -0
- package/dist/src/utils/aw-home-mutation-lock.d.ts +10 -0
- package/dist/src/utils/aw-home-mutation-lock.js +55 -0
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -0
- package/dist/src/utils/bundle-integrity.d.ts +3 -0
- package/dist/src/utils/bundle-integrity.js +88 -0
- package/dist/src/utils/bundle-integrity.js.map +1 -0
- package/dist/src/utils/bundle-layout.d.ts +4 -0
- package/dist/src/utils/bundle-layout.js +546 -0
- package/dist/src/utils/bundle-layout.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +8 -0
- package/dist/src/utils/catalog-digests.js +108 -0
- package/dist/src/utils/catalog-digests.js.map +1 -0
- package/dist/src/utils/catalog-manifest-v3.d.ts +2 -0
- package/dist/src/utils/catalog-manifest-v3.js +3 -0
- package/dist/src/utils/catalog-manifest-v3.js.map +1 -0
- package/dist/src/utils/catalog-manifest-v4.d.ts +5 -0
- package/dist/src/utils/catalog-manifest-v4.js +106 -0
- package/dist/src/utils/catalog-manifest-v4.js.map +1 -0
- package/dist/src/utils/catalog-public-error.d.ts +15 -0
- package/dist/src/utils/catalog-public-error.js +84 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -0
- package/dist/src/utils/catalog-runtime-projection.d.ts +36 -0
- package/dist/src/utils/catalog-runtime-projection.js +172 -0
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -0
- package/dist/src/utils/catalog-snapshot.d.ts +8 -0
- package/dist/src/utils/catalog-snapshot.js +12 -0
- package/dist/src/utils/catalog-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-source-cache.d.ts +61 -0
- package/dist/src/utils/catalog-source-cache.js +276 -0
- package/dist/src/utils/catalog-source-cache.js.map +1 -0
- package/dist/src/utils/catalog-source-identity.d.ts +4 -0
- package/dist/src/utils/catalog-source-identity.js +118 -0
- package/dist/src/utils/catalog-source-identity.js.map +1 -0
- package/dist/src/utils/catalog-source-presentation.d.ts +1 -0
- package/dist/src/utils/catalog-source-presentation.js +32 -0
- package/dist/src/utils/catalog-source-presentation.js.map +1 -0
- package/dist/src/utils/catalog-source-references.d.ts +65 -0
- package/dist/src/utils/catalog-source-references.js +1418 -0
- package/dist/src/utils/catalog-source-references.js.map +1 -0
- package/dist/src/utils/catalog-sources.d.ts +39 -0
- package/dist/src/utils/catalog-sources.js +293 -0
- package/dist/src/utils/catalog-sources.js.map +1 -0
- package/dist/src/utils/codex-config.d.ts +124 -0
- package/dist/src/utils/codex-config.js +1011 -0
- package/dist/src/utils/codex-config.js.map +1 -0
- package/dist/src/utils/codex-project-surface.d.ts +3 -0
- package/dist/src/utils/codex-project-surface.js +49 -0
- package/dist/src/utils/codex-project-surface.js.map +1 -0
- package/dist/src/utils/codex-roles.d.ts +71 -0
- package/dist/src/utils/codex-roles.js +257 -0
- package/dist/src/utils/codex-roles.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +9 -0
- package/dist/src/utils/codex-skill-staging.js +8 -0
- package/dist/src/utils/codex-skill-staging.js.map +1 -0
- package/dist/src/utils/config-value.d.ts +3 -0
- package/dist/src/utils/config-value.js +23 -0
- package/dist/src/utils/config-value.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +32 -0
- package/dist/src/utils/dynamic-skill-tree.js +436 -0
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -0
- package/dist/src/utils/file-rules.d.ts +1 -0
- package/dist/src/utils/file-rules.js +2 -0
- package/dist/src/utils/file-rules.js.map +1 -0
- package/dist/src/utils/git-catalog-provider.d.ts +7 -0
- package/dist/src/utils/git-catalog-provider.js +510 -0
- package/dist/src/utils/git-catalog-provider.js.map +1 -0
- package/dist/src/utils/hooks-contract.d.ts +1 -0
- package/dist/src/utils/hooks-contract.js +2 -0
- package/dist/src/utils/hooks-contract.js.map +1 -0
- package/dist/src/utils/json.d.ts +4 -0
- package/dist/src/utils/json.js +29 -0
- package/dist/src/utils/json.js.map +1 -0
- package/dist/src/utils/lifecycle-active-store.d.ts +175 -0
- package/dist/src/utils/lifecycle-active-store.js +1276 -0
- package/dist/src/utils/lifecycle-active-store.js.map +1 -0
- package/dist/src/utils/local-marketplace.d.ts +41 -0
- package/dist/src/utils/local-marketplace.js +317 -0
- package/dist/src/utils/local-marketplace.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +14 -0
- package/dist/src/utils/manifest.js +36 -0
- package/dist/src/utils/manifest.js.map +1 -0
- package/dist/src/utils/marketplace.d.ts +3 -0
- package/dist/src/utils/marketplace.js +76 -0
- package/dist/src/utils/marketplace.js.map +1 -0
- package/dist/src/utils/multi-source-catalog.d.ts +72 -0
- package/dist/src/utils/multi-source-catalog.js +402 -0
- package/dist/src/utils/multi-source-catalog.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +75 -0
- package/dist/src/utils/native-cli.js +435 -0
- package/dist/src/utils/native-cli.js.map +1 -0
- package/dist/src/utils/orphan-marketplace-cleanup.d.ts +18 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js +202 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -0
- package/dist/src/utils/ownership.d.ts +130 -0
- package/dist/src/utils/ownership.js +766 -0
- package/dist/src/utils/ownership.js.map +1 -0
- package/dist/src/utils/path-catalog-provider.d.ts +7 -0
- package/dist/src/utils/path-catalog-provider.js +87 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -0
- package/dist/src/utils/paths.d.ts +41 -0
- package/dist/src/utils/paths.js +138 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/platform-entries.d.ts +1 -0
- package/dist/src/utils/platform-entries.js +2 -0
- package/dist/src/utils/platform-entries.js.map +1 -0
- package/dist/src/utils/platform-support.d.ts +1 -0
- package/dist/src/utils/platform-support.js +2 -0
- package/dist/src/utils/platform-support.js.map +1 -0
- package/dist/src/utils/plugin-authoring-capabilities.d.ts +23 -0
- package/dist/src/utils/plugin-authoring-capabilities.js +37 -0
- package/dist/src/utils/plugin-authoring-capabilities.js.map +1 -0
- package/dist/src/utils/plugin-authoring-capabilities.json +92 -0
- package/dist/src/utils/plugin-config-write.d.ts +107 -0
- package/dist/src/utils/plugin-config-write.js +565 -0
- package/dist/src/utils/plugin-config-write.js.map +1 -0
- package/dist/src/utils/plugin-config.d.ts +396 -0
- package/dist/src/utils/plugin-config.js +1898 -0
- package/dist/src/utils/plugin-config.js.map +1 -0
- package/dist/src/utils/plugin-dependencies.d.ts +12 -0
- package/dist/src/utils/plugin-dependencies.js +162 -0
- package/dist/src/utils/plugin-dependencies.js.map +1 -0
- package/dist/src/utils/plugin-release.d.ts +2 -0
- package/dist/src/utils/plugin-release.js +2 -0
- package/dist/src/utils/plugin-release.js.map +1 -0
- package/dist/src/utils/plugin-script-contract.d.ts +1 -0
- package/dist/src/utils/plugin-script-contract.js +2 -0
- package/dist/src/utils/plugin-script-contract.js.map +1 -0
- package/dist/src/utils/plugin-scripts.d.ts +172 -0
- package/dist/src/utils/plugin-scripts.js +585 -0
- package/dist/src/utils/plugin-scripts.js.map +1 -0
- package/dist/src/utils/process-lock.d.ts +47 -0
- package/dist/src/utils/process-lock.js +532 -0
- package/dist/src/utils/process-lock.js.map +1 -0
- package/dist/src/utils/process-tree.d.ts +2 -0
- package/dist/src/utils/process-tree.js +2 -0
- package/dist/src/utils/process-tree.js.map +1 -0
- package/dist/src/utils/project-boundary.d.ts +21 -0
- package/dist/src/utils/project-boundary.js +95 -0
- package/dist/src/utils/project-boundary.js.map +1 -0
- package/dist/src/utils/rendered-contract.d.ts +8 -0
- package/dist/src/utils/rendered-contract.js +134 -0
- package/dist/src/utils/rendered-contract.js.map +1 -0
- package/dist/src/utils/runtime-skill-closure.d.ts +13 -0
- package/dist/src/utils/runtime-skill-closure.js +863 -0
- package/dist/src/utils/runtime-skill-closure.js.map +1 -0
- package/dist/src/utils/skill-authoring.d.ts +1 -0
- package/dist/src/utils/skill-authoring.js +2 -0
- package/dist/src/utils/skill-authoring.js.map +1 -0
- package/dist/src/utils/skill-frontmatter-capabilities.d.ts +201 -0
- package/dist/src/utils/skill-frontmatter-capabilities.js +5 -0
- package/dist/src/utils/skill-frontmatter-capabilities.js.map +1 -0
- package/dist/src/utils/skill-frontmatter-capabilities.json +200 -0
- package/dist/src/utils/skill-validation.d.ts +37 -0
- package/dist/src/utils/skill-validation.js +326 -0
- package/dist/src/utils/skill-validation.js.map +1 -0
- package/dist/src/utils/slash-commands.d.ts +1 -0
- package/dist/src/utils/slash-commands.js +2 -0
- package/dist/src/utils/slash-commands.js.map +1 -0
- package/dist/src/utils/state-paths.d.ts +13 -0
- package/dist/src/utils/state-paths.js +129 -0
- package/dist/src/utils/state-paths.js.map +1 -0
- package/dist/src/utils/target-eligibility.d.ts +7 -0
- package/dist/src/utils/target-eligibility.js +26 -0
- package/dist/src/utils/target-eligibility.js.map +1 -0
- package/dist/src/utils/target-order.d.ts +7 -0
- package/dist/src/utils/target-order.js +10 -0
- package/dist/src/utils/target-order.js.map +1 -0
- package/dist/src/utils/template-engine.d.ts +1 -0
- package/dist/src/utils/template-engine.js +2 -0
- package/dist/src/utils/template-engine.js.map +1 -0
- package/dist/src/utils/test-path-fence.d.ts +12 -0
- package/dist/src/utils/test-path-fence.js +31 -0
- package/dist/src/utils/test-path-fence.js.map +1 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +16 -0
- package/dist/vitest.config.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { CatalogFreshnessPolicy, PluginMeta, PortableSkillCandidate, Scope } from '../types.js';
|
|
2
|
+
import type { CatalogSourceProviderSet } from '../utils/multi-source-catalog.js';
|
|
3
|
+
import type { CatalogSourcesConfigSnapshot } from '../utils/catalog-sources.js';
|
|
4
|
+
export interface PortableMaterializationProvenance {
|
|
5
|
+
schemaVersion: 1;
|
|
6
|
+
pluginId: string;
|
|
7
|
+
scope: Scope;
|
|
8
|
+
dependencyPluginIds: string[];
|
|
9
|
+
configDigest: string;
|
|
10
|
+
digest: string;
|
|
11
|
+
skills: Array<PortableSkillCandidate & {
|
|
12
|
+
digest: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export interface MaterializePortableSkillsOptions {
|
|
16
|
+
plugins: readonly PluginMeta[];
|
|
17
|
+
pluginId: string;
|
|
18
|
+
scope: Scope;
|
|
19
|
+
cwd: string;
|
|
20
|
+
env?: NodeJS.ProcessEnv;
|
|
21
|
+
outputRoot?: string;
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
export interface MaterializedPortableSkills {
|
|
25
|
+
rootDir: string;
|
|
26
|
+
pluginId: string;
|
|
27
|
+
sourceId?: string;
|
|
28
|
+
sourceIdentity?: string;
|
|
29
|
+
pluginVersion?: string;
|
|
30
|
+
scope: Scope;
|
|
31
|
+
candidates: PortableSkillCandidate[];
|
|
32
|
+
dependencyPluginIds: string[];
|
|
33
|
+
configDigest: string;
|
|
34
|
+
digest: string;
|
|
35
|
+
provenancePath: string;
|
|
36
|
+
cleanup(): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export interface MaterializePortableSkillsFromCatalogOptions {
|
|
39
|
+
selector: string;
|
|
40
|
+
scope: Scope;
|
|
41
|
+
cwd: string;
|
|
42
|
+
cliVersion: string;
|
|
43
|
+
freshnessPolicy?: CatalogFreshnessPolicy;
|
|
44
|
+
env?: NodeJS.ProcessEnv;
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
configSnapshot?: CatalogSourcesConfigSnapshot;
|
|
47
|
+
providers?: CatalogSourceProviderSet;
|
|
48
|
+
}
|
|
49
|
+
export declare function materializePortableSkillsFromCatalog(options: MaterializePortableSkillsFromCatalogOptions): Promise<MaterializedPortableSkills>;
|
|
50
|
+
export declare function materializePortableSkills(options: MaterializePortableSkillsOptions): Promise<MaterializedPortableSkills>;
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import fs from 'fs-extra';
|
|
5
|
+
import { validateArtifactPlan } from '../utils/artifact-plan.js';
|
|
6
|
+
import { runArtifactRenderer, resolveArtifactRenderConfig } from '../utils/artifact-renderer.js';
|
|
7
|
+
import { calculateFileDigest } from '../utils/bundle-integrity.js';
|
|
8
|
+
import { parsePortableSkillFrontmatter, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
|
|
9
|
+
import { resolvePluginMetaDependencyClosure } from '../utils/plugin-dependencies.js';
|
|
10
|
+
import { resolvePluginsFromCatalog } from '../utils/manifest.js';
|
|
11
|
+
import { withResolvedCatalogPlugin } from '../utils/multi-source-catalog.js';
|
|
12
|
+
import { collectSensitivePluginConfigValues } from '../utils/plugin-scripts.js';
|
|
13
|
+
import { validateRuntimeSkillClosure } from '../utils/runtime-skill-closure.js';
|
|
14
|
+
import { isSkillAuthorOnlyPath } from '../utils/skill-authoring.js';
|
|
15
|
+
function pluginId(plugin) {
|
|
16
|
+
return plugin.pluginId ?? (plugin.sourceId
|
|
17
|
+
? `${plugin.sourceId}/${plugin.manifest.name}`
|
|
18
|
+
: plugin.manifest.name);
|
|
19
|
+
}
|
|
20
|
+
function resolveRequestedPlugin(plugins, requestedId) {
|
|
21
|
+
const matches = plugins.filter((plugin) => pluginId(plugin) === requestedId || plugin.manifest.name === requestedId);
|
|
22
|
+
if (matches.length !== 1) {
|
|
23
|
+
throw new Error(matches.length === 0
|
|
24
|
+
? `Unknown portable plugin "${requestedId}".`
|
|
25
|
+
: `Ambiguous portable plugin "${requestedId}".`);
|
|
26
|
+
}
|
|
27
|
+
return matches[0];
|
|
28
|
+
}
|
|
29
|
+
function assertSameSource(root, closure) {
|
|
30
|
+
for (const plugin of closure) {
|
|
31
|
+
if ((root.sourceId !== undefined && plugin.sourceId !== root.sourceId)
|
|
32
|
+
|| (root.sourceIdentity !== undefined && plugin.sourceIdentity !== root.sourceIdentity)) {
|
|
33
|
+
throw new Error('Portable dependency closure must resolve from one Catalog source.');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function relationFor(root, plugin) {
|
|
38
|
+
if (plugin.manifest.name === root.manifest.name)
|
|
39
|
+
return 'requested';
|
|
40
|
+
if ((root.manifest.dependencies ?? []).includes(plugin.manifest.name))
|
|
41
|
+
return 'direct';
|
|
42
|
+
return 'transitive';
|
|
43
|
+
}
|
|
44
|
+
function stableDigest(entries) {
|
|
45
|
+
const hash = crypto.createHash('sha256');
|
|
46
|
+
for (const [relativePath, content] of entries) {
|
|
47
|
+
hash.update(relativePath, 'utf8');
|
|
48
|
+
hash.update('\0');
|
|
49
|
+
hash.update(content);
|
|
50
|
+
hash.update('\0');
|
|
51
|
+
}
|
|
52
|
+
return `sha256:${hash.digest('hex')}`;
|
|
53
|
+
}
|
|
54
|
+
function treeDigest(tree) {
|
|
55
|
+
return stableDigest(Object.entries(tree.files).sort(([left], [right]) => left.localeCompare(right)));
|
|
56
|
+
}
|
|
57
|
+
function skillDescription(tree) {
|
|
58
|
+
const content = tree.files['SKILL.md']?.toString('utf8') ?? '';
|
|
59
|
+
const frontmatter = parsePortableSkillFrontmatter(content);
|
|
60
|
+
return typeof frontmatter.description === 'string' ? frontmatter.description : '';
|
|
61
|
+
}
|
|
62
|
+
async function copyTreeFiles(files, targetRoot) {
|
|
63
|
+
for (const [relativePath, content] of Object.entries(files)) {
|
|
64
|
+
const targetPath = path.join(targetRoot, ...relativePath.split('/'));
|
|
65
|
+
await fs.ensureDir(path.dirname(targetPath));
|
|
66
|
+
await fs.writeFile(targetPath, content);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function overlayDirectory(sourceRoot, files) {
|
|
70
|
+
const visit = async (current, parent = '') => {
|
|
71
|
+
const stats = await fs.lstat(current).catch(() => undefined);
|
|
72
|
+
if (!stats?.isDirectory() || stats.isSymbolicLink()) {
|
|
73
|
+
throw new Error(`Portable Skill source must be a regular directory: ${sourceRoot}.`);
|
|
74
|
+
}
|
|
75
|
+
for (const entry of await fs.readdir(current, { withFileTypes: true })) {
|
|
76
|
+
const relativePath = parent ? `${parent}/${entry.name}` : entry.name;
|
|
77
|
+
if (isSkillAuthorOnlyPath(relativePath))
|
|
78
|
+
continue;
|
|
79
|
+
const absolutePath = path.join(current, entry.name);
|
|
80
|
+
if (entry.isSymbolicLink()) {
|
|
81
|
+
throw new Error(`Portable Skill source contains a symbolic link: ${relativePath}.`);
|
|
82
|
+
}
|
|
83
|
+
if (entry.isDirectory()) {
|
|
84
|
+
await visit(absolutePath, relativePath);
|
|
85
|
+
}
|
|
86
|
+
else if (entry.isFile()) {
|
|
87
|
+
files[relativePath] = await fs.readFile(absolutePath);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
throw new Error(`Portable Skill source contains a non-regular file: ${relativePath}.`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
await visit(sourceRoot);
|
|
95
|
+
}
|
|
96
|
+
function assertNoSensitiveValues(candidate, sensitiveValues) {
|
|
97
|
+
for (const [relativePath, content] of Object.entries(candidate.tree.files)) {
|
|
98
|
+
const text = content.toString('utf8');
|
|
99
|
+
if (/\{\{[^{}]+\}\}/u.test(text)) {
|
|
100
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" contains an unresolved template in "${relativePath}".`);
|
|
101
|
+
}
|
|
102
|
+
const leaked = sensitiveValues.find((value) => value.length > 0 && text.includes(value));
|
|
103
|
+
if (leaked) {
|
|
104
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" exposes sensitive config in "${relativePath}".`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async function assertRuntimeImports(plugin) {
|
|
109
|
+
const imports = (plugin.manifest.artifacts?.targets ?? [])
|
|
110
|
+
.filter((target) => target.distribution === 'agent-skills')
|
|
111
|
+
.flatMap((target) => target.runtimeImports ?? []);
|
|
112
|
+
for (const runtimeImport of imports) {
|
|
113
|
+
await assertRuntimeImport(plugin, runtimeImport);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async function assertRuntimeImport(plugin, runtimeImport) {
|
|
117
|
+
if (!runtimeImport.resolved) {
|
|
118
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" is not resolved in the consumer bundle.`);
|
|
119
|
+
}
|
|
120
|
+
const root = await fs.realpath(plugin.rootDir);
|
|
121
|
+
const importPath = path.join(root, runtimeImport.resolved.path.replace(/^\.\//u, ''));
|
|
122
|
+
const stats = await fs.lstat(importPath).catch(() => undefined);
|
|
123
|
+
if (!stats?.isFile() || stats.isSymbolicLink()) {
|
|
124
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" is missing from the consumer bundle.`);
|
|
125
|
+
}
|
|
126
|
+
const realImport = await fs.realpath(importPath);
|
|
127
|
+
const relative = path.relative(root, realImport);
|
|
128
|
+
if (relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
|
|
129
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" escapes the consumer bundle.`);
|
|
130
|
+
}
|
|
131
|
+
if (await calculateFileDigest(realImport) !== runtimeImport.resolved.digest) {
|
|
132
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" has an invalid digest.`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async function materializePluginCandidates(options) {
|
|
136
|
+
options.signal?.throwIfAborted();
|
|
137
|
+
const distribution = options.plugin.manifest.distributions?.agentSkills;
|
|
138
|
+
if (!distribution)
|
|
139
|
+
return [];
|
|
140
|
+
const dynamicTargets = (options.plugin.manifest.artifacts?.targets ?? [])
|
|
141
|
+
.filter((target) => target.distribution === 'agent-skills'
|
|
142
|
+
&& target.scopes.includes(options.scope));
|
|
143
|
+
const dynamicKeys = new Set((options.plugin.manifest.artifacts?.targets ?? [])
|
|
144
|
+
.filter((target) => target.target === 'agent-skills.skill')
|
|
145
|
+
.map((target) => target.skillKey));
|
|
146
|
+
const output = [];
|
|
147
|
+
const config = await resolveArtifactRenderConfig({
|
|
148
|
+
sourceId: options.plugin.sourceId,
|
|
149
|
+
sourceIdentity: options.plugin.sourceIdentity,
|
|
150
|
+
pluginName: options.plugin.manifest.name,
|
|
151
|
+
manifest: options.plugin.manifest,
|
|
152
|
+
scope: options.scope,
|
|
153
|
+
cwd: options.cwd,
|
|
154
|
+
env: options.env,
|
|
155
|
+
});
|
|
156
|
+
if (config.issues.length > 0) {
|
|
157
|
+
throw new Error(`Portable materialization config is invalid: ${config.issues.map((issue) => issue.message).join('; ')}`);
|
|
158
|
+
}
|
|
159
|
+
options.recordConfigDigest(pluginId(options.plugin), `sha256:${crypto.createHash('sha256').update(JSON.stringify(config.values)).digest('hex')}`);
|
|
160
|
+
const staticRoot = distribution.skills
|
|
161
|
+
? path.join(options.plugin.rootDir, distribution.skills.replace(/^\.\//u, ''))
|
|
162
|
+
: undefined;
|
|
163
|
+
if (staticRoot) {
|
|
164
|
+
const rootStats = await fs.lstat(staticRoot).catch(() => undefined);
|
|
165
|
+
if (!rootStats?.isDirectory() || rootStats.isSymbolicLink()) {
|
|
166
|
+
throw new Error('Portable Skills root must be a regular directory.');
|
|
167
|
+
}
|
|
168
|
+
const entries = await fs.readdir(staticRoot, { withFileTypes: true });
|
|
169
|
+
for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
|
|
170
|
+
const entryStats = await fs.lstat(path.join(staticRoot, entry.name)).catch(() => undefined);
|
|
171
|
+
if (!entryStats?.isDirectory() || entryStats.isSymbolicLink()) {
|
|
172
|
+
throw new Error(`Portable Skills root direct child must be a regular directory: ${entry.name}.`);
|
|
173
|
+
}
|
|
174
|
+
if (dynamicKeys.has(entry.name))
|
|
175
|
+
continue;
|
|
176
|
+
output.push({
|
|
177
|
+
plugin: options.plugin,
|
|
178
|
+
relation: options.relation,
|
|
179
|
+
dynamic: false,
|
|
180
|
+
tree: await validatePortableSkillDirectory(path.join(staticRoot, entry.name)),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (dynamicTargets.length === 0) {
|
|
185
|
+
const sensitiveValues = collectSensitivePluginConfigValues(options.plugin.manifest, config.values);
|
|
186
|
+
for (const candidate of output)
|
|
187
|
+
assertNoSensitiveValues(candidate, sensitiveValues);
|
|
188
|
+
return output;
|
|
189
|
+
}
|
|
190
|
+
await assertRuntimeImports(options.plugin);
|
|
191
|
+
const rendered = await runArtifactRenderer({
|
|
192
|
+
event: 'materialize',
|
|
193
|
+
plugin: options.plugin,
|
|
194
|
+
platform: 'agent-skills',
|
|
195
|
+
scope: options.scope,
|
|
196
|
+
cwd: options.cwd,
|
|
197
|
+
commandEnv: options.env,
|
|
198
|
+
signal: options.signal,
|
|
199
|
+
});
|
|
200
|
+
const plan = validateArtifactPlan({
|
|
201
|
+
pluginName: options.plugin.manifest.name,
|
|
202
|
+
manifest: options.plugin.manifest,
|
|
203
|
+
plan: rendered.plan,
|
|
204
|
+
platform: 'agent-skills',
|
|
205
|
+
scope: options.scope,
|
|
206
|
+
renderConfig: config,
|
|
207
|
+
rendererDigest: rendered.target.rendererDigest,
|
|
208
|
+
manifestDigest: rendered.target.manifestDigest,
|
|
209
|
+
});
|
|
210
|
+
const sourcesById = new Map(rendered.context.artifactSources.map((source) => [source.id, source]));
|
|
211
|
+
const portableRuntimeProjectionPath = path.join(options.plugin.rootDir, '.agents-plugin', 'portable-runtime-files.json');
|
|
212
|
+
const portableRuntimeProjections = await fs.readJson(portableRuntimeProjectionPath)
|
|
213
|
+
.catch(() => []);
|
|
214
|
+
for (const artifact of plan.artifacts) {
|
|
215
|
+
if (artifact.target !== 'agent-skills.skill' || artifact.state === 'disabled')
|
|
216
|
+
continue;
|
|
217
|
+
const files = {};
|
|
218
|
+
for (const sourceDir of sourcesById.get(artifact.id)?.sourceDirs ?? []) {
|
|
219
|
+
await overlayDirectory(sourceDir, files);
|
|
220
|
+
}
|
|
221
|
+
for (const projection of portableRuntimeProjections.filter((entry) => entry.skill === artifact.skillKey)) {
|
|
222
|
+
const expectedPath = `./agent-skills/skills/${artifact.skillKey}/${projection.target}`;
|
|
223
|
+
if (projection.path !== expectedPath
|
|
224
|
+
|| projection.target.includes('\\')
|
|
225
|
+
|| path.posix.normalize(projection.target) !== projection.target
|
|
226
|
+
|| !/^(?:references|assets|scripts)\/.+/u.test(projection.target)) {
|
|
227
|
+
throw new Error(`Portable runtime projection "${artifact.skillKey}/${projection.target}" has an invalid bundle path.`);
|
|
228
|
+
}
|
|
229
|
+
const projectionPath = path.join(options.plugin.rootDir, projection.path.replace(/^\.\//u, ''));
|
|
230
|
+
if (await calculateFileDigest(projectionPath) !== projection.digest) {
|
|
231
|
+
throw new Error(`Portable runtime projection "${artifact.skillKey}/${projection.target}" has an invalid digest.`);
|
|
232
|
+
}
|
|
233
|
+
files[projection.target] = await fs.readFile(projectionPath);
|
|
234
|
+
}
|
|
235
|
+
for (const [relativePath, content] of Object.entries(artifact.content?.files ?? {})) {
|
|
236
|
+
if (isSkillAuthorOnlyPath(relativePath)) {
|
|
237
|
+
throw new Error(`Portable dynamic Skill "${artifact.skillKey}" renderer returned author-only path "${relativePath}".`);
|
|
238
|
+
}
|
|
239
|
+
files[relativePath] = Buffer.from(content, 'utf8');
|
|
240
|
+
}
|
|
241
|
+
const stagingRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-tree-'));
|
|
242
|
+
try {
|
|
243
|
+
const skillRoot = path.join(stagingRoot, artifact.skillKey);
|
|
244
|
+
await copyTreeFiles(files, skillRoot);
|
|
245
|
+
output.push({
|
|
246
|
+
plugin: options.plugin,
|
|
247
|
+
relation: options.relation,
|
|
248
|
+
dynamic: true,
|
|
249
|
+
tree: await validatePortableSkillDirectory(skillRoot),
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
finally {
|
|
253
|
+
await fs.remove(stagingRoot);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const sensitiveValues = collectSensitivePluginConfigValues(options.plugin.manifest, config.values);
|
|
257
|
+
for (const candidate of output) {
|
|
258
|
+
assertNoSensitiveValues(candidate, sensitiveValues);
|
|
259
|
+
}
|
|
260
|
+
return output;
|
|
261
|
+
}
|
|
262
|
+
export async function materializePortableSkillsFromCatalog(options) {
|
|
263
|
+
const operationRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-operation-'));
|
|
264
|
+
const outputRoot = path.join(operationRoot, 'materialized');
|
|
265
|
+
try {
|
|
266
|
+
const metadata = await withResolvedCatalogPlugin({
|
|
267
|
+
selector: options.selector,
|
|
268
|
+
cliVersion: options.cliVersion,
|
|
269
|
+
freshnessPolicy: options.freshnessPolicy ?? 'cacheFirst',
|
|
270
|
+
...(options.env ? { env: options.env } : {}),
|
|
271
|
+
...(options.signal ? { signal: options.signal } : {}),
|
|
272
|
+
...(options.configSnapshot ? { configSnapshot: options.configSnapshot } : {}),
|
|
273
|
+
...(options.providers ? { providers: options.providers } : {}),
|
|
274
|
+
consume: async ({ pluginId: resolvedPluginId, source, plugin: requestedPlugin }) => {
|
|
275
|
+
const plugins = await resolvePluginsFromCatalog(source.rootDir);
|
|
276
|
+
for (const plugin of plugins) {
|
|
277
|
+
plugin.sourceId = source.sourceId;
|
|
278
|
+
plugin.sourceIdentity = source.sourceIdentity;
|
|
279
|
+
plugin.pluginId = `${source.sourceId}/${plugin.manifest.name}`;
|
|
280
|
+
}
|
|
281
|
+
const materialized = await materializePortableSkills({
|
|
282
|
+
plugins,
|
|
283
|
+
pluginId: resolvedPluginId,
|
|
284
|
+
scope: options.scope,
|
|
285
|
+
cwd: options.cwd,
|
|
286
|
+
env: options.env,
|
|
287
|
+
outputRoot,
|
|
288
|
+
signal: options.signal,
|
|
289
|
+
});
|
|
290
|
+
return {
|
|
291
|
+
pluginId: materialized.pluginId,
|
|
292
|
+
sourceId: source.sourceId,
|
|
293
|
+
sourceIdentity: source.sourceIdentity,
|
|
294
|
+
pluginVersion: requestedPlugin.manifest.version,
|
|
295
|
+
scope: materialized.scope,
|
|
296
|
+
candidates: materialized.candidates,
|
|
297
|
+
dependencyPluginIds: materialized.dependencyPluginIds,
|
|
298
|
+
configDigest: materialized.configDigest,
|
|
299
|
+
digest: materialized.digest,
|
|
300
|
+
};
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
return {
|
|
304
|
+
...metadata,
|
|
305
|
+
rootDir: outputRoot,
|
|
306
|
+
provenancePath: path.join(outputRoot, '.aw-materialization.json'),
|
|
307
|
+
cleanup: async () => fs.remove(operationRoot),
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
await fs.remove(operationRoot);
|
|
312
|
+
throw error;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
export async function materializePortableSkills(options) {
|
|
316
|
+
const requested = resolveRequestedPlugin(options.plugins, options.pluginId);
|
|
317
|
+
if (!requested.manifest.distributions?.agentSkills) {
|
|
318
|
+
throw new Error(`Plugin "${pluginId(requested)}" does not declare distributions.agentSkills.`);
|
|
319
|
+
}
|
|
320
|
+
const closure = resolvePluginMetaDependencyClosure(options.plugins, [requested.manifest.name]);
|
|
321
|
+
assertSameSource(requested, closure);
|
|
322
|
+
const createdRoot = options.outputRoot === undefined;
|
|
323
|
+
const rootDir = options.outputRoot
|
|
324
|
+
? path.resolve(options.outputRoot)
|
|
325
|
+
: await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-materialize-'));
|
|
326
|
+
if (options.outputRoot) {
|
|
327
|
+
if (await fs.pathExists(rootDir)) {
|
|
328
|
+
throw new Error(`Portable output root already exists: ${rootDir}.`);
|
|
329
|
+
}
|
|
330
|
+
await fs.ensureDir(rootDir);
|
|
331
|
+
}
|
|
332
|
+
const skillsRoot = path.join(rootDir, 'skills');
|
|
333
|
+
const env = options.env ?? process.env;
|
|
334
|
+
try {
|
|
335
|
+
const trees = [];
|
|
336
|
+
const configDigests = [];
|
|
337
|
+
for (const plugin of closure) {
|
|
338
|
+
options.signal?.throwIfAborted();
|
|
339
|
+
trees.push(...await materializePluginCandidates({
|
|
340
|
+
plugin,
|
|
341
|
+
relation: relationFor(requested, plugin),
|
|
342
|
+
scope: options.scope,
|
|
343
|
+
cwd: options.cwd,
|
|
344
|
+
env,
|
|
345
|
+
signal: options.signal,
|
|
346
|
+
recordConfigDigest: (id, configDigest) => configDigests.push([id, configDigest]),
|
|
347
|
+
}));
|
|
348
|
+
}
|
|
349
|
+
const seenNames = new Set();
|
|
350
|
+
for (const candidate of trees) {
|
|
351
|
+
if (seenNames.has(candidate.tree.skillKey)) {
|
|
352
|
+
throw new Error(`Portable Skill name collision: "${candidate.tree.skillKey}".`);
|
|
353
|
+
}
|
|
354
|
+
seenNames.add(candidate.tree.skillKey);
|
|
355
|
+
await copyTreeFiles(candidate.tree.files, path.join(skillsRoot, candidate.tree.skillKey));
|
|
356
|
+
await validateRuntimeSkillClosure(path.join(skillsRoot, candidate.tree.skillKey));
|
|
357
|
+
}
|
|
358
|
+
const candidates = trees.map((candidate) => ({
|
|
359
|
+
name: candidate.tree.skillKey,
|
|
360
|
+
description: skillDescription(candidate.tree),
|
|
361
|
+
providerPluginId: pluginId(candidate.plugin),
|
|
362
|
+
providerDisplayName: candidate.plugin.manifest.interface?.displayName
|
|
363
|
+
?? candidate.plugin.manifest.name,
|
|
364
|
+
relation: candidate.relation,
|
|
365
|
+
dynamic: candidate.dynamic,
|
|
366
|
+
filesDigest: treeDigest(candidate.tree),
|
|
367
|
+
})).sort((left, right) => left.name.localeCompare(right.name));
|
|
368
|
+
const dependencyPluginIds = closure
|
|
369
|
+
.filter((plugin) => plugin.manifest.name !== requested.manifest.name)
|
|
370
|
+
.map(pluginId);
|
|
371
|
+
const configDigest = `sha256:${crypto.createHash('sha256')
|
|
372
|
+
.update(JSON.stringify(configDigests))
|
|
373
|
+
.digest('hex')}`;
|
|
374
|
+
const digest = `sha256:${crypto.createHash('sha256')
|
|
375
|
+
.update(JSON.stringify(candidates.map((candidate) => [candidate.name, candidate.filesDigest])))
|
|
376
|
+
.digest('hex')}`;
|
|
377
|
+
const provenancePath = path.join(rootDir, '.aw-materialization.json');
|
|
378
|
+
const provenance = {
|
|
379
|
+
schemaVersion: 1,
|
|
380
|
+
pluginId: pluginId(requested),
|
|
381
|
+
scope: options.scope,
|
|
382
|
+
dependencyPluginIds,
|
|
383
|
+
configDigest,
|
|
384
|
+
digest,
|
|
385
|
+
skills: candidates.map((candidate) => ({ ...candidate, digest: candidate.filesDigest })),
|
|
386
|
+
};
|
|
387
|
+
await fs.writeJson(provenancePath, provenance, { spaces: 2 });
|
|
388
|
+
return {
|
|
389
|
+
rootDir,
|
|
390
|
+
pluginId: pluginId(requested),
|
|
391
|
+
scope: options.scope,
|
|
392
|
+
candidates,
|
|
393
|
+
dependencyPluginIds,
|
|
394
|
+
configDigest,
|
|
395
|
+
digest,
|
|
396
|
+
provenancePath,
|
|
397
|
+
cleanup: async () => {
|
|
398
|
+
if (createdRoot)
|
|
399
|
+
await fs.remove(rootDir);
|
|
400
|
+
},
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
catch (error) {
|
|
404
|
+
await fs.remove(rootDir);
|
|
405
|
+
throw error;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
//# sourceMappingURL=materializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materializer.js","sourceRoot":"","sources":["../../../src/portable/materializer.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAa1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,GAE/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAE,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAwDpE,SAAS,QAAQ,CAAC,MAAkB;IAClC,OAAO,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ;QACxC,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;QAC9C,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,sBAAsB,CAAC,OAA8B,EAAE,WAAmB;IACjF,MAAM,OAAO,GAAG,OAAO,C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CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type SkillsCliErrorCode = 'portableSkillsCliMissing' | 'portableSkillsCliIncompatible' | 'portableSkillsCliInstallFailed' | 'portableSkillsCliVerificationFailed';
|
|
2
|
+
export declare class SkillsCliError extends Error {
|
|
3
|
+
readonly code: SkillsCliErrorCode;
|
|
4
|
+
constructor(code: SkillsCliErrorCode, message: string);
|
|
5
|
+
}
|
|
6
|
+
export interface InstalledSkillRecord {
|
|
7
|
+
name: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
scope?: string;
|
|
10
|
+
agents: string[];
|
|
11
|
+
source?: string | null;
|
|
12
|
+
sourceUrl?: string | null;
|
|
13
|
+
sourceType?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface SkillsCliInvocationOptions {
|
|
16
|
+
cwd: string;
|
|
17
|
+
env?: NodeJS.ProcessEnv;
|
|
18
|
+
signal?: AbortSignal;
|
|
19
|
+
}
|
|
20
|
+
export declare function probeSkillsCli(options: SkillsCliInvocationOptions): Promise<{
|
|
21
|
+
version: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function listInstalledSkills(options: SkillsCliInvocationOptions & {
|
|
24
|
+
global: boolean;
|
|
25
|
+
agent?: string;
|
|
26
|
+
}): Promise<InstalledSkillRecord[]>;
|
|
27
|
+
export declare function addSkills(options: SkillsCliInvocationOptions & {
|
|
28
|
+
rootDir: string;
|
|
29
|
+
skills: string[];
|
|
30
|
+
agents?: string[];
|
|
31
|
+
global: boolean;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
export declare function verifySkills(options: SkillsCliInvocationOptions & {
|
|
34
|
+
skills: string[];
|
|
35
|
+
agents?: string[];
|
|
36
|
+
global: boolean;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
records: InstalledSkillRecord[];
|
|
39
|
+
missing: Array<{
|
|
40
|
+
skill: string;
|
|
41
|
+
agent?: string;
|
|
42
|
+
}>;
|
|
43
|
+
}>;
|