@lesliechan721/aw 0.1.0-beta.10
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 +51 -0
- package/dist/authoring/assets/aw-config.mjs +1025 -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/init-plugin.d.mts +2 -0
- package/dist/authoring/scripts/init-plugin.mjs +487 -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 +69 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +563 -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 +111 -0
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +353 -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 +93 -0
- package/dist/authoring/scripts/plugin-status.mjs.map +1 -0
- package/dist/authoring/scripts/remove-plugin.d.mts +2 -0
- package/dist/authoring/scripts/remove-plugin.mjs +367 -0
- package/dist/authoring/scripts/remove-plugin.mjs.map +1 -0
- package/dist/authoring/scripts/validate-plugin.d.mts +2 -0
- package/dist/authoring/scripts/validate-plugin.mjs +3465 -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/authoring/templates/aw-config-runtime.d.mts +2 -0
- package/dist/authoring/templates/aw-config-runtime.mjs +407 -0
- package/dist/authoring/templates/aw-config-runtime.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-materializer.d.ts +24 -0
- package/dist/scripts/aw-skill-eval-materializer.js +309 -0
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -0
- package/dist/scripts/bundle-plugins.d.ts +17 -0
- package/dist/scripts/bundle-plugins.js +126 -0
- package/dist/scripts/bundle-plugins.js.map +1 -0
- package/dist/scripts/plugin-staging.d.ts +26 -0
- package/dist/scripts/plugin-staging.js +76 -0
- package/dist/scripts/plugin-staging.js.map +1 -0
- package/dist/scripts/test-plugin-scripts.d.ts +7 -0
- package/dist/scripts/test-plugin-scripts.js +610 -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 +70 -0
- package/dist/src/authoring/workspace-commands.js +158 -0
- package/dist/src/authoring/workspace-commands.js.map +1 -0
- package/dist/src/commands/aw-capabilities.d.ts +78 -0
- package/dist/src/commands/aw-capabilities.js +254 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -0
- package/dist/src/commands/catalog-dev-source.d.ts +120 -0
- package/dist/src/commands/catalog-dev-source.js +434 -0
- package/dist/src/commands/catalog-dev-source.js.map +1 -0
- package/dist/src/commands/catalog-generation.d.ts +16 -0
- package/dist/src/commands/catalog-generation.js +9 -0
- package/dist/src/commands/catalog-generation.js.map +1 -0
- package/dist/src/commands/catalog-publication-inspection.d.ts +138 -0
- package/dist/src/commands/catalog-publication-inspection.js +711 -0
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -0
- package/dist/src/commands/catalog-publication-journal.d.ts +56 -0
- package/dist/src/commands/catalog-publication-journal.js +215 -0
- package/dist/src/commands/catalog-publication-journal.js.map +1 -0
- package/dist/src/commands/catalog-publication-target.d.ts +18 -0
- package/dist/src/commands/catalog-publication-target.js +95 -0
- package/dist/src/commands/catalog-publication-target.js.map +1 -0
- package/dist/src/commands/catalog-publish.d.ts +103 -0
- package/dist/src/commands/catalog-publish.js +804 -0
- package/dist/src/commands/catalog-publish.js.map +1 -0
- package/dist/src/commands/catalog-source.d.ts +134 -0
- package/dist/src/commands/catalog-source.js +377 -0
- package/dist/src/commands/catalog-source.js.map +1 -0
- package/dist/src/commands/catalog-status.d.ts +56 -0
- package/dist/src/commands/catalog-status.js +217 -0
- package/dist/src/commands/catalog-status.js.map +1 -0
- package/dist/src/commands/catalog-store.d.ts +80 -0
- package/dist/src/commands/catalog-store.js +348 -0
- package/dist/src/commands/catalog-store.js.map +1 -0
- package/dist/src/commands/catalog-workspace-resolution.d.ts +13 -0
- package/dist/src/commands/catalog-workspace-resolution.js +42 -0
- package/dist/src/commands/catalog-workspace-resolution.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 +58 -0
- package/dist/src/commands/dependency-operation-plan.js +261 -0
- package/dist/src/commands/dependency-operation-plan.js.map +1 -0
- package/dist/src/commands/init.d.ts +25 -0
- package/dist/src/commands/init.js +42 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/offline-cleanup-evidence.d.ts +59 -0
- package/dist/src/commands/offline-cleanup-evidence.js +163 -0
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -0
- package/dist/src/commands/operation-plan.d.ts +126 -0
- package/dist/src/commands/operation-plan.js +47 -0
- package/dist/src/commands/operation-plan.js.map +1 -0
- package/dist/src/commands/operation-planner.d.ts +46 -0
- package/dist/src/commands/operation-planner.js +139 -0
- package/dist/src/commands/operation-planner.js.map +1 -0
- package/dist/src/commands/options.d.ts +70 -0
- package/dist/src/commands/options.js +194 -0
- package/dist/src/commands/options.js.map +1 -0
- package/dist/src/commands/plugin-capabilities.d.ts +22 -0
- package/dist/src/commands/plugin-capabilities.js +159 -0
- package/dist/src/commands/plugin-capabilities.js.map +1 -0
- package/dist/src/commands/rebuild-command.d.ts +88 -0
- package/dist/src/commands/rebuild-command.js +3626 -0
- package/dist/src/commands/rebuild-command.js.map +1 -0
- package/dist/src/commands/rebuild-integration.d.ts +190 -0
- package/dist/src/commands/rebuild-integration.js +4439 -0
- package/dist/src/commands/rebuild-integration.js.map +1 -0
- package/dist/src/commands/rebuild-operations.d.ts +100 -0
- package/dist/src/commands/rebuild-operations.js +625 -0
- package/dist/src/commands/rebuild-operations.js.map +1 -0
- package/dist/src/commands/reconcile-operation-plan.d.ts +26 -0
- package/dist/src/commands/reconcile-operation-plan.js +28 -0
- package/dist/src/commands/reconcile-operation-plan.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 +172 -0
- package/dist/src/commands/runtime.js +720 -0
- package/dist/src/commands/runtime.js.map +1 -0
- package/dist/src/commands/skill-eval.d.ts +33 -0
- package/dist/src/commands/skill-eval.js +363 -0
- package/dist/src/commands/skill-eval.js.map +1 -0
- package/dist/src/commands/status-v6.d.ts +206 -0
- package/dist/src/commands/status-v6.js +2175 -0
- package/dist/src/commands/status-v6.js.map +1 -0
- package/dist/src/commands/sync-command.d.ts +23 -0
- package/dist/src/commands/sync-command.js +242 -0
- package/dist/src/commands/sync-command.js.map +1 -0
- package/dist/src/commands/wizard.d.ts +56 -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 +190 -0
- package/dist/src/commands/write-commands.js.map +1 -0
- package/dist/src/constants.d.ts +31 -0
- package/dist/src/constants.js +32 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/eval/manifest-v1.d.ts +67 -0
- package/dist/src/eval/manifest-v1.js +347 -0
- package/dist/src/eval/manifest-v1.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 +56 -0
- package/dist/src/generators/local-plugin.js +1373 -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 +41 -0
- package/dist/src/index.js +3327 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/output/command-receipt.d.ts +87 -0
- package/dist/src/output/command-receipt.js +302 -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 +76 -0
- package/dist/src/output/model.js +2 -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 +128 -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 +124 -0
- package/dist/src/portable/commands.js +557 -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 +462 -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/catalog-freshness.d.ts +1 -0
- package/dist/src/tui/catalog-freshness.js +2 -0
- package/dist/src/tui/catalog-freshness.js.map +1 -0
- package/dist/src/tui/catalog-generation.d.ts +21 -0
- package/dist/src/tui/catalog-generation.js +116 -0
- package/dist/src/tui/catalog-generation.js.map +1 -0
- package/dist/src/tui/catalog-sources/projection.d.ts +4 -0
- package/dist/src/tui/catalog-sources/projection.js +17 -0
- package/dist/src/tui/catalog-sources/projection.js.map +1 -0
- package/dist/src/tui/catalog-sources/review.d.ts +3 -0
- package/dist/src/tui/catalog-sources/review.js +13 -0
- package/dist/src/tui/catalog-sources/review.js.map +1 -0
- package/dist/src/tui/catalog-sources/screens.d.ts +12 -0
- package/dist/src/tui/catalog-sources/screens.js +33 -0
- package/dist/src/tui/catalog-sources/screens.js.map +1 -0
- package/dist/src/tui/catalog-sources/session.d.ts +22 -0
- package/dist/src/tui/catalog-sources/session.js +225 -0
- package/dist/src/tui/catalog-sources/session.js.map +1 -0
- package/dist/src/tui/catalog-sources/types.d.ts +41 -0
- package/dist/src/tui/catalog-sources/types.js +2 -0
- package/dist/src/tui/catalog-sources/types.js.map +1 -0
- package/dist/src/tui/components.d.ts +102 -0
- package/dist/src/tui/components.js +184 -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 +5066 -0
- package/dist/src/tui/console-app-v4.js.map +1 -0
- package/dist/src/tui/controller-runtime.d.ts +23 -0
- package/dist/src/tui/controller-runtime.js +2011 -0
- package/dist/src/tui/controller-runtime.js.map +1 -0
- package/dist/src/tui/controller.d.ts +557 -0
- package/dist/src/tui/controller.js +2120 -0
- package/dist/src/tui/controller.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +30 -0
- package/dist/src/tui/diagnostics.js +71 -0
- package/dist/src/tui/diagnostics.js.map +1 -0
- package/dist/src/tui/index.d.ts +17 -0
- package/dist/src/tui/index.js +17 -0
- package/dist/src/tui/index.js.map +1 -0
- package/dist/src/tui/input-display.d.ts +8 -0
- package/dist/src/tui/input-display.js +36 -0
- package/dist/src/tui/input-display.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 +424 -0
- package/dist/src/tui/model.js +1493 -0
- package/dist/src/tui/model.js.map +1 -0
- package/dist/src/tui/operation-review-planner.d.ts +21 -0
- package/dist/src/tui/operation-review-planner.js +622 -0
- package/dist/src/tui/operation-review-planner.js.map +1 -0
- package/dist/src/tui/prompt.d.ts +8 -0
- package/dist/src/tui/prompt.js +231 -0
- package/dist/src/tui/prompt.js.map +1 -0
- package/dist/src/tui/router.d.ts +206 -0
- package/dist/src/tui/router.js +137 -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/source-ref-presets.d.ts +3 -0
- package/dist/src/tui/source-ref-presets.js +11 -0
- package/dist/src/tui/source-ref-presets.js.map +1 -0
- package/dist/src/tui/theme.d.ts +26 -0
- package/dist/src/tui/theme.js +28 -0
- package/dist/src/tui/theme.js.map +1 -0
- package/dist/src/tui/viewport.d.ts +20 -0
- package/dist/src/tui/viewport.js +29 -0
- package/dist/src/tui/viewport.js.map +1 -0
- package/dist/src/tui/views.d.ts +57 -0
- package/dist/src/tui/views.js +201 -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 +323 -0
- package/dist/src/tui/wizard.js.map +1 -0
- package/dist/src/types.d.ts +474 -0
- package/dist/src/types.js +34 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/agent-version.d.ts +19 -0
- package/dist/src/utils/agent-version.js +205 -0
- package/dist/src/utils/agent-version.js.map +1 -0
- package/dist/src/utils/artifact-plan.d.ts +27 -0
- package/dist/src/utils/artifact-plan.js +453 -0
- package/dist/src/utils/artifact-plan.js.map +1 -0
- package/dist/src/utils/artifact-renderer.d.ts +129 -0
- package/dist/src/utils/artifact-renderer.js +400 -0
- package/dist/src/utils/artifact-renderer.js.map +1 -0
- package/dist/src/utils/artifact-request.d.ts +16 -0
- package/dist/src/utils/artifact-request.js +42 -0
- package/dist/src/utils/artifact-request.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 +11 -0
- package/dist/src/utils/aw-home-mutation-lock.js +83 -0
- package/dist/src/utils/aw-home-mutation-lock.js.map +1 -0
- package/dist/src/utils/bundle-integrity.d.ts +2 -0
- package/dist/src/utils/bundle-integrity.js +63 -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 +531 -0
- package/dist/src/utils/bundle-layout.js.map +1 -0
- package/dist/src/utils/catalog-digests.d.ts +18 -0
- package/dist/src/utils/catalog-digests.js +156 -0
- package/dist/src/utils/catalog-digests.js.map +1 -0
- package/dist/src/utils/catalog-generation-control-snapshot.d.ts +11 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js +45 -0
- package/dist/src/utils/catalog-generation-control-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-generation-error.d.ts +16 -0
- package/dist/src/utils/catalog-generation-error.js +30 -0
- package/dist/src/utils/catalog-generation-error.js.map +1 -0
- package/dist/src/utils/catalog-generation-resolver.d.ts +32 -0
- package/dist/src/utils/catalog-generation-resolver.js +251 -0
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -0
- package/dist/src/utils/catalog-generation-service.d.ts +161 -0
- package/dist/src/utils/catalog-generation-service.js +1237 -0
- package/dist/src/utils/catalog-generation-service.js.map +1 -0
- package/dist/src/utils/catalog-generation-state.d.ts +22 -0
- package/dist/src/utils/catalog-generation-state.js +192 -0
- package/dist/src/utils/catalog-generation-state.js.map +1 -0
- package/dist/src/utils/catalog-generation-store.d.ts +57 -0
- package/dist/src/utils/catalog-generation-store.js +397 -0
- package/dist/src/utils/catalog-generation-store.js.map +1 -0
- package/dist/src/utils/catalog-manifest-v7.d.ts +5 -0
- package/dist/src/utils/catalog-manifest-v7.js +98 -0
- package/dist/src/utils/catalog-manifest-v7.js.map +1 -0
- package/dist/src/utils/catalog-operation-context.d.ts +20 -0
- package/dist/src/utils/catalog-operation-context.js +141 -0
- package/dist/src/utils/catalog-operation-context.js.map +1 -0
- package/dist/src/utils/catalog-public-error.d.ts +19 -0
- package/dist/src/utils/catalog-public-error.js +100 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -0
- package/dist/src/utils/catalog-runtime-projection.d.ts +33 -0
- package/dist/src/utils/catalog-runtime-projection.js +77 -0
- package/dist/src/utils/catalog-runtime-projection.js.map +1 -0
- package/dist/src/utils/catalog-snapshot.d.ts +10 -0
- package/dist/src/utils/catalog-snapshot.js +20 -0
- package/dist/src/utils/catalog-snapshot.js.map +1 -0
- package/dist/src/utils/catalog-source-identity.d.ts +5 -0
- package/dist/src/utils/catalog-source-identity.js +137 -0
- package/dist/src/utils/catalog-source-identity.js.map +1 -0
- package/dist/src/utils/catalog-source-impact.d.ts +20 -0
- package/dist/src/utils/catalog-source-impact.js +222 -0
- package/dist/src/utils/catalog-source-impact.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 +66 -0
- package/dist/src/utils/catalog-source-references.js +1180 -0
- package/dist/src/utils/catalog-source-references.js.map +1 -0
- package/dist/src/utils/catalog-sources.d.ts +53 -0
- package/dist/src/utils/catalog-sources.js +456 -0
- package/dist/src/utils/catalog-sources.js.map +1 -0
- package/dist/src/utils/codex-config.d.ts +126 -0
- package/dist/src/utils/codex-config.js +1032 -0
- package/dist/src/utils/codex-config.js.map +1 -0
- package/dist/src/utils/codex-manager.d.ts +81 -0
- package/dist/src/utils/codex-manager.js +810 -0
- package/dist/src/utils/codex-manager.js.map +1 -0
- package/dist/src/utils/codex-marketplace-path.d.ts +5 -0
- package/dist/src/utils/codex-marketplace-path.js +45 -0
- package/dist/src/utils/codex-marketplace-path.js.map +1 -0
- package/dist/src/utils/codex-native-observation.d.ts +16 -0
- package/dist/src/utils/codex-native-observation.js +22 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -0
- package/dist/src/utils/codex-native-render-receipt.d.ts +40 -0
- package/dist/src/utils/codex-native-render-receipt.js +205 -0
- package/dist/src/utils/codex-native-render-receipt.js.map +1 -0
- package/dist/src/utils/codex-reconciler.d.ts +128 -0
- package/dist/src/utils/codex-reconciler.js +294 -0
- package/dist/src/utils/codex-reconciler.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-shared-native.d.ts +63 -0
- package/dist/src/utils/codex-shared-native.js +142 -0
- package/dist/src/utils/codex-shared-native.js.map +1 -0
- package/dist/src/utils/codex-skill-staging.d.ts +11 -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/codex-surface-analysis.d.ts +45 -0
- package/dist/src/utils/codex-surface-analysis.js +245 -0
- package/dist/src/utils/codex-surface-analysis.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 +36 -0
- package/dist/src/utils/dynamic-skill-tree.js +466 -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 +22 -0
- package/dist/src/utils/git-catalog-provider.js +497 -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/local-marketplace.d.ts +41 -0
- package/dist/src/utils/local-marketplace.js +316 -0
- package/dist/src/utils/local-marketplace.js.map +1 -0
- package/dist/src/utils/manifest.d.ts +11 -0
- package/dist/src/utils/manifest.js +33 -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 +66 -0
- package/dist/src/utils/multi-source-catalog.js +345 -0
- package/dist/src/utils/multi-source-catalog.js.map +1 -0
- package/dist/src/utils/native-cli.d.ts +118 -0
- package/dist/src/utils/native-cli.js +518 -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 +198 -0
- package/dist/src/utils/orphan-marketplace-cleanup.js.map +1 -0
- package/dist/src/utils/ownership.d.ts +194 -0
- package/dist/src/utils/ownership.js +723 -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 +74 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -0
- package/dist/src/utils/paths.d.ts +40 -0
- package/dist/src/utils/paths.js +137 -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-config-write.d.ts +110 -0
- package/dist/src/utils/plugin-config-write.js +773 -0
- package/dist/src/utils/plugin-config-write.js.map +1 -0
- package/dist/src/utils/plugin-config.d.ts +389 -0
- package/dist/src/utils/plugin-config.js +1642 -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-intent-state.d.ts +34 -0
- package/dist/src/utils/plugin-intent-state.js +289 -0
- package/dist/src/utils/plugin-intent-state.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 +101 -0
- package/dist/src/utils/plugin-scripts.js +253 -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 +9 -0
- package/dist/src/utils/project-boundary.js +67 -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/safe-fs.d.ts +21 -0
- package/dist/src/utils/safe-fs.js +111 -0
- package/dist/src/utils/safe-fs.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-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 +14 -0
- package/dist/src/utils/state-paths.js +139 -0
- package/dist/src/utils/state-paths.js.map +1 -0
- package/dist/src/utils/target-eligibility.d.ts +13 -0
- package/dist/src/utils/target-eligibility.js +35 -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 +64 -0
|
@@ -0,0 +1,462 @@
|
|
|
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 { canonicalizePluginConfigValues } from '@lesliechan721/aw-plugin-core/manifest';
|
|
6
|
+
import { validateArtifactPlan } from '../utils/artifact-plan.js';
|
|
7
|
+
import { runArtifactRenderer, resolveArtifactRenderConfig } from '../utils/artifact-renderer.js';
|
|
8
|
+
import { calculateFileDigest } from '../utils/bundle-integrity.js';
|
|
9
|
+
import { AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH, parsePortableSkillFrontmatter, validatePortableSkillDirectory, } from '../utils/dynamic-skill-tree.js';
|
|
10
|
+
import { resolvePluginMetaDependencyClosure } from '../utils/plugin-dependencies.js';
|
|
11
|
+
import { createAwPluginRequirementsReceipt, parseAwPluginRequirementsReceipt, checkAwCapabilitySupport, readPluginManifest, } from '../utils/manifest.js';
|
|
12
|
+
import { withResolvedCatalogPlugin } from '../utils/multi-source-catalog.js';
|
|
13
|
+
import { collectSensitivePluginConfigValues } from '../utils/plugin-scripts.js';
|
|
14
|
+
import { validateRuntimeSkillClosure } from '../utils/runtime-skill-closure.js';
|
|
15
|
+
import { isSkillAuthorOnlyPath } from '../utils/skill-authoring.js';
|
|
16
|
+
import { validateCatalogSnapshotPluginEntriesComplete } from '../utils/catalog-snapshot.js';
|
|
17
|
+
import { AwCapabilityUnsupportedError, IMPLEMENTED_AW_CAPABILITIES, } from '../commands/aw-capabilities.js';
|
|
18
|
+
function pluginId(plugin) {
|
|
19
|
+
return plugin.pluginId ?? (plugin.sourceId
|
|
20
|
+
? `${plugin.sourceId}/${plugin.manifest.name}`
|
|
21
|
+
: plugin.manifest.name);
|
|
22
|
+
}
|
|
23
|
+
function resolveRequestedPlugin(plugins, requestedId) {
|
|
24
|
+
const matches = plugins.filter((plugin) => pluginId(plugin) === requestedId || plugin.manifest.name === requestedId);
|
|
25
|
+
if (matches.length !== 1) {
|
|
26
|
+
throw new Error(matches.length === 0
|
|
27
|
+
? `Unknown portable plugin "${requestedId}".`
|
|
28
|
+
: `Ambiguous portable plugin "${requestedId}".`);
|
|
29
|
+
}
|
|
30
|
+
return matches[0];
|
|
31
|
+
}
|
|
32
|
+
function assertSameSource(root, closure) {
|
|
33
|
+
for (const plugin of closure) {
|
|
34
|
+
if ((root.sourceId !== undefined && plugin.sourceId !== root.sourceId)
|
|
35
|
+
|| (root.sourceIdentity !== undefined && plugin.sourceIdentity !== root.sourceIdentity)) {
|
|
36
|
+
throw new Error('Portable dependency closure must resolve from one Catalog source.');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function relationFor(root, plugin) {
|
|
41
|
+
if (plugin.manifest.name === root.manifest.name)
|
|
42
|
+
return 'requested';
|
|
43
|
+
if ((root.manifest.dependencies ?? []).includes(plugin.manifest.name))
|
|
44
|
+
return 'direct';
|
|
45
|
+
return 'transitive';
|
|
46
|
+
}
|
|
47
|
+
function stableDigest(entries) {
|
|
48
|
+
const hash = crypto.createHash('sha256');
|
|
49
|
+
for (const [relativePath, content] of entries) {
|
|
50
|
+
hash.update(relativePath, 'utf8');
|
|
51
|
+
hash.update('\0');
|
|
52
|
+
hash.update(content);
|
|
53
|
+
hash.update('\0');
|
|
54
|
+
}
|
|
55
|
+
return `sha256:${hash.digest('hex')}`;
|
|
56
|
+
}
|
|
57
|
+
function treeDigest(tree) {
|
|
58
|
+
return stableDigest(Object.entries(tree.files).sort(([left], [right]) => left.localeCompare(right)));
|
|
59
|
+
}
|
|
60
|
+
function skillDescription(tree) {
|
|
61
|
+
const content = tree.files['SKILL.md']?.toString('utf8') ?? '';
|
|
62
|
+
const frontmatter = parsePortableSkillFrontmatter(content);
|
|
63
|
+
return typeof frontmatter.description === 'string' ? frontmatter.description : '';
|
|
64
|
+
}
|
|
65
|
+
async function copyTreeFiles(files, targetRoot) {
|
|
66
|
+
for (const [relativePath, content] of Object.entries(files)) {
|
|
67
|
+
const targetPath = path.join(targetRoot, ...relativePath.split('/'));
|
|
68
|
+
await fs.ensureDir(path.dirname(targetPath));
|
|
69
|
+
await fs.writeFile(targetPath, content);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async function overlayDirectory(sourceRoot, files) {
|
|
73
|
+
const visit = async (current, parent = '') => {
|
|
74
|
+
const stats = await fs.lstat(current).catch(() => undefined);
|
|
75
|
+
if (!stats?.isDirectory() || stats.isSymbolicLink()) {
|
|
76
|
+
throw new Error(`Portable Skill source must be a regular directory: ${sourceRoot}.`);
|
|
77
|
+
}
|
|
78
|
+
for (const entry of await fs.readdir(current, { withFileTypes: true })) {
|
|
79
|
+
const relativePath = parent ? `${parent}/${entry.name}` : entry.name;
|
|
80
|
+
if (isSkillAuthorOnlyPath(relativePath))
|
|
81
|
+
continue;
|
|
82
|
+
const absolutePath = path.join(current, entry.name);
|
|
83
|
+
if (entry.isSymbolicLink()) {
|
|
84
|
+
throw new Error(`Portable Skill source contains a symbolic link: ${relativePath}.`);
|
|
85
|
+
}
|
|
86
|
+
if (entry.isDirectory()) {
|
|
87
|
+
await visit(absolutePath, relativePath);
|
|
88
|
+
}
|
|
89
|
+
else if (entry.isFile()) {
|
|
90
|
+
files[relativePath] = await fs.readFile(absolutePath);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
throw new Error(`Portable Skill source contains a non-regular file: ${relativePath}.`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
await visit(sourceRoot);
|
|
98
|
+
}
|
|
99
|
+
function assertNoSensitiveValues(candidate, sensitiveValues) {
|
|
100
|
+
for (const [relativePath, content] of Object.entries(candidate.tree.files)) {
|
|
101
|
+
const text = content.toString('utf8');
|
|
102
|
+
if (/\{\{[^{}]+\}\}/u.test(text)) {
|
|
103
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" contains an unresolved template in "${relativePath}".`);
|
|
104
|
+
}
|
|
105
|
+
const leaked = sensitiveValues.find((value) => value.length > 0 && text.includes(value));
|
|
106
|
+
if (leaked) {
|
|
107
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" exposes sensitive config in "${relativePath}".`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function assertRuntimeImports(plugin) {
|
|
112
|
+
const imports = (plugin.manifest.artifacts?.targets ?? [])
|
|
113
|
+
.filter((target) => target.distribution === 'agent-skills')
|
|
114
|
+
.flatMap((target) => target.runtimeImports ?? []);
|
|
115
|
+
for (const runtimeImport of imports) {
|
|
116
|
+
await assertRuntimeImport(plugin, runtimeImport);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async function assertRuntimeImport(plugin, runtimeImport) {
|
|
120
|
+
if (!runtimeImport.resolved) {
|
|
121
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" is not resolved in the consumer bundle.`);
|
|
122
|
+
}
|
|
123
|
+
const root = await fs.realpath(plugin.rootDir);
|
|
124
|
+
const importPath = path.join(root, runtimeImport.resolved.path.replace(/^\.\//u, ''));
|
|
125
|
+
const stats = await fs.lstat(importPath).catch(() => undefined);
|
|
126
|
+
if (!stats?.isFile() || stats.isSymbolicLink()) {
|
|
127
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" is missing from the consumer bundle.`);
|
|
128
|
+
}
|
|
129
|
+
const realImport = await fs.realpath(importPath);
|
|
130
|
+
const relative = path.relative(root, realImport);
|
|
131
|
+
if (relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
|
|
132
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" escapes the consumer bundle.`);
|
|
133
|
+
}
|
|
134
|
+
if (await calculateFileDigest(realImport) !== runtimeImport.resolved.digest) {
|
|
135
|
+
throw new Error(`Artifact runtime import "${runtimeImport.name}" has an invalid digest.`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async function materializePluginCandidates(options) {
|
|
139
|
+
options.signal?.throwIfAborted();
|
|
140
|
+
const distribution = options.plugin.manifest.distributions?.agentSkills;
|
|
141
|
+
if (!distribution)
|
|
142
|
+
return [];
|
|
143
|
+
const dynamicTargets = (options.plugin.manifest.artifacts?.targets ?? [])
|
|
144
|
+
.filter((target) => target.distribution === 'agent-skills'
|
|
145
|
+
&& target.scopes.includes(options.scope));
|
|
146
|
+
const dynamicKeys = new Set((options.plugin.manifest.artifacts?.targets ?? [])
|
|
147
|
+
.filter((target) => target.target === 'agent-skills.skill')
|
|
148
|
+
.map((target) => target.skillKey));
|
|
149
|
+
const output = [];
|
|
150
|
+
const config = await resolveArtifactRenderConfig({
|
|
151
|
+
sourceId: options.plugin.sourceId,
|
|
152
|
+
sourceIdentity: options.plugin.sourceIdentity,
|
|
153
|
+
pluginName: options.plugin.manifest.name,
|
|
154
|
+
manifest: options.plugin.manifest,
|
|
155
|
+
scope: options.scope,
|
|
156
|
+
cwd: options.cwd,
|
|
157
|
+
env: options.env,
|
|
158
|
+
});
|
|
159
|
+
if (config.issues.length > 0) {
|
|
160
|
+
throw new Error(`Portable materialization config is invalid: ${config.issues.map((issue) => issue.message).join('; ')}`);
|
|
161
|
+
}
|
|
162
|
+
options.recordConfigDigest(pluginId(options.plugin), `sha256:${crypto.createHash('sha256')
|
|
163
|
+
.update(JSON.stringify(canonicalizePluginConfigValues(config.values)))
|
|
164
|
+
.digest('hex')}`);
|
|
165
|
+
const staticRoot = distribution.skills
|
|
166
|
+
? path.join(options.plugin.rootDir, distribution.skills.replace(/^\.\//u, ''))
|
|
167
|
+
: undefined;
|
|
168
|
+
if (staticRoot) {
|
|
169
|
+
const rootStats = await fs.lstat(staticRoot).catch(() => undefined);
|
|
170
|
+
if (!rootStats?.isDirectory() || rootStats.isSymbolicLink()) {
|
|
171
|
+
throw new Error('Portable Skills root must be a regular directory.');
|
|
172
|
+
}
|
|
173
|
+
const entries = await fs.readdir(staticRoot, { withFileTypes: true });
|
|
174
|
+
for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
|
|
175
|
+
const entryStats = await fs.lstat(path.join(staticRoot, entry.name)).catch(() => undefined);
|
|
176
|
+
if (!entryStats?.isDirectory() || entryStats.isSymbolicLink()) {
|
|
177
|
+
throw new Error(`Portable Skills root direct child must be a regular directory: ${entry.name}.`);
|
|
178
|
+
}
|
|
179
|
+
if (dynamicKeys.has(entry.name))
|
|
180
|
+
continue;
|
|
181
|
+
output.push({
|
|
182
|
+
plugin: options.plugin,
|
|
183
|
+
relation: options.relation,
|
|
184
|
+
dynamic: false,
|
|
185
|
+
tree: await validatePortableSkillDirectory(path.join(staticRoot, entry.name)),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const finalizeCandidates = () => {
|
|
190
|
+
const sensitiveValues = collectSensitivePluginConfigValues(options.plugin.manifest, config.values);
|
|
191
|
+
const receipt = createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.plugin.manifest.requires?.aw.capabilities ?? []);
|
|
192
|
+
const receiptBytes = Buffer.from(`${JSON.stringify(receipt, null, 2)}\n`, 'utf8');
|
|
193
|
+
for (const candidate of output) {
|
|
194
|
+
const existingReceipt = candidate.tree.files[AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH];
|
|
195
|
+
if (existingReceipt && options.inputMode !== 'bundle') {
|
|
196
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" cannot declare reserved file "${AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH}".`);
|
|
197
|
+
}
|
|
198
|
+
if (existingReceipt) {
|
|
199
|
+
let parsedReceipt;
|
|
200
|
+
try {
|
|
201
|
+
parsedReceipt = parseAwPluginRequirementsReceipt(JSON.parse(existingReceipt.toString('utf8')));
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" has an invalid reserved requirements receipt.`);
|
|
205
|
+
}
|
|
206
|
+
if (JSON.stringify(parsedReceipt) !== JSON.stringify(receipt)) {
|
|
207
|
+
throw new Error(`Portable Skill "${candidate.tree.skillKey}" has a mismatched reserved requirements receipt.`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
candidate.tree.files[AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH] = receiptBytes;
|
|
212
|
+
}
|
|
213
|
+
assertNoSensitiveValues(candidate, sensitiveValues);
|
|
214
|
+
}
|
|
215
|
+
return output;
|
|
216
|
+
};
|
|
217
|
+
if (dynamicTargets.length === 0) {
|
|
218
|
+
return finalizeCandidates();
|
|
219
|
+
}
|
|
220
|
+
await assertRuntimeImports(options.plugin);
|
|
221
|
+
const rendered = await runArtifactRenderer({
|
|
222
|
+
event: 'materialize',
|
|
223
|
+
plugin: options.plugin,
|
|
224
|
+
platform: 'agent-skills',
|
|
225
|
+
scope: options.scope,
|
|
226
|
+
cwd: options.cwd,
|
|
227
|
+
commandEnv: options.env,
|
|
228
|
+
signal: options.signal,
|
|
229
|
+
requestedArtifactIds: dynamicTargets.map((target) => target.id),
|
|
230
|
+
});
|
|
231
|
+
const plan = validateArtifactPlan({
|
|
232
|
+
pluginName: options.plugin.manifest.name,
|
|
233
|
+
manifest: options.plugin.manifest,
|
|
234
|
+
plan: rendered.plan,
|
|
235
|
+
platform: 'agent-skills',
|
|
236
|
+
scope: options.scope,
|
|
237
|
+
requestedArtifactIds: rendered.context.requestedArtifactIds,
|
|
238
|
+
renderConfig: config,
|
|
239
|
+
rendererDigest: rendered.target.rendererDigest,
|
|
240
|
+
manifestDigest: rendered.target.manifestDigest,
|
|
241
|
+
});
|
|
242
|
+
const sourcesById = new Map(rendered.context.artifactSources.map((source) => [source.id, source]));
|
|
243
|
+
const portableRuntimeProjectionPath = path.join(options.plugin.rootDir, '.agents-plugin', 'portable-runtime-files.json');
|
|
244
|
+
const portableRuntimeProjections = await fs.readJson(portableRuntimeProjectionPath)
|
|
245
|
+
.catch(() => []);
|
|
246
|
+
for (const artifact of plan.artifacts) {
|
|
247
|
+
if (artifact.target !== 'agent-skills.skill' || artifact.state === 'disabled')
|
|
248
|
+
continue;
|
|
249
|
+
const files = {};
|
|
250
|
+
for (const sourceDir of sourcesById.get(artifact.id)?.sourceDirs ?? []) {
|
|
251
|
+
await overlayDirectory(sourceDir, files);
|
|
252
|
+
}
|
|
253
|
+
for (const projection of portableRuntimeProjections.filter((entry) => entry.skill === artifact.skillKey)) {
|
|
254
|
+
const expectedPath = `./agent-skills/skills/${artifact.skillKey}/${projection.target}`;
|
|
255
|
+
if (projection.path !== expectedPath
|
|
256
|
+
|| projection.target.includes('\\')
|
|
257
|
+
|| path.posix.normalize(projection.target) !== projection.target
|
|
258
|
+
|| !/^(?:references|assets|scripts)\/.+/u.test(projection.target)) {
|
|
259
|
+
throw new Error(`Portable runtime projection "${artifact.skillKey}/${projection.target}" has an invalid bundle path.`);
|
|
260
|
+
}
|
|
261
|
+
const projectionPath = path.join(options.plugin.rootDir, projection.path.replace(/^\.\//u, ''));
|
|
262
|
+
if (await calculateFileDigest(projectionPath) !== projection.digest) {
|
|
263
|
+
throw new Error(`Portable runtime projection "${artifact.skillKey}/${projection.target}" has an invalid digest.`);
|
|
264
|
+
}
|
|
265
|
+
files[projection.target] = await fs.readFile(projectionPath);
|
|
266
|
+
}
|
|
267
|
+
for (const [relativePath, content] of Object.entries(artifact.content?.files ?? {})) {
|
|
268
|
+
if (isSkillAuthorOnlyPath(relativePath)) {
|
|
269
|
+
throw new Error(`Portable dynamic Skill "${artifact.skillKey}" renderer returned author-only path "${relativePath}".`);
|
|
270
|
+
}
|
|
271
|
+
if (relativePath === AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH) {
|
|
272
|
+
throw new Error(`Portable dynamic Skill renderer cannot declare reserved file "${AW_PLUGIN_REQUIREMENTS_RECEIPT_PATH}".`);
|
|
273
|
+
}
|
|
274
|
+
files[relativePath] = Buffer.from(content, 'utf8');
|
|
275
|
+
}
|
|
276
|
+
const stagingRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-tree-'));
|
|
277
|
+
try {
|
|
278
|
+
const skillRoot = path.join(stagingRoot, artifact.skillKey);
|
|
279
|
+
await copyTreeFiles(files, skillRoot);
|
|
280
|
+
output.push({
|
|
281
|
+
plugin: options.plugin,
|
|
282
|
+
relation: options.relation,
|
|
283
|
+
dynamic: true,
|
|
284
|
+
tree: await validatePortableSkillDirectory(skillRoot),
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
finally {
|
|
288
|
+
await fs.remove(stagingRoot);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return finalizeCandidates();
|
|
292
|
+
}
|
|
293
|
+
export async function materializePortableSkillsFromCatalog(options) {
|
|
294
|
+
const operationRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-operation-'));
|
|
295
|
+
const outputRoot = path.join(operationRoot, 'materialized');
|
|
296
|
+
try {
|
|
297
|
+
const metadata = await withResolvedCatalogPlugin({
|
|
298
|
+
selector: options.selector,
|
|
299
|
+
cliVersion: options.cliVersion,
|
|
300
|
+
...(options.env ? { env: options.env } : {}),
|
|
301
|
+
...(options.signal ? { signal: options.signal } : {}),
|
|
302
|
+
...(options.configSnapshot ? { configSnapshot: options.configSnapshot } : {}),
|
|
303
|
+
...(options.catalogOperationContext
|
|
304
|
+
? { operationContext: options.catalogOperationContext }
|
|
305
|
+
: {}),
|
|
306
|
+
consume: async ({ pluginId: resolvedPluginId, source, plugin: requestedPlugin }) => {
|
|
307
|
+
const entriesByName = new Map(source.manifest.entries.map((entry) => [entry.name, entry]));
|
|
308
|
+
const closureNames = [];
|
|
309
|
+
const seen = new Set();
|
|
310
|
+
const visit = (name) => {
|
|
311
|
+
if (seen.has(name))
|
|
312
|
+
return;
|
|
313
|
+
const entry = entriesByName.get(name);
|
|
314
|
+
if (!entry)
|
|
315
|
+
throw new Error(`Portable plugin "${name}" is missing from its catalog source.`);
|
|
316
|
+
seen.add(name);
|
|
317
|
+
for (const dependency of entry.dependencies)
|
|
318
|
+
visit(dependency);
|
|
319
|
+
const support = checkAwCapabilitySupport(entry.requires.aw.capabilities ?? [], IMPLEMENTED_AW_CAPABILITIES);
|
|
320
|
+
if (!support.supported) {
|
|
321
|
+
throw new AwCapabilityUnsupportedError(`${source.sourceId}/${name}`, support.missing);
|
|
322
|
+
}
|
|
323
|
+
closureNames.push(name);
|
|
324
|
+
};
|
|
325
|
+
visit(requestedPlugin.manifest.name);
|
|
326
|
+
await validateCatalogSnapshotPluginEntriesComplete(source.rootDir, closureNames);
|
|
327
|
+
const plugins = await Promise.all(closureNames.map((name) => readPluginManifest(path.join(source.rootDir, 'plugins', name), { mode: 'bundle' })));
|
|
328
|
+
for (const plugin of plugins) {
|
|
329
|
+
plugin.sourceId = source.sourceId;
|
|
330
|
+
plugin.sourceIdentity = source.sourceIdentity;
|
|
331
|
+
plugin.pluginId = `${source.sourceId}/${plugin.manifest.name}`;
|
|
332
|
+
}
|
|
333
|
+
const materialized = await materializePortableSkills({
|
|
334
|
+
plugins,
|
|
335
|
+
pluginId: resolvedPluginId,
|
|
336
|
+
scope: options.scope,
|
|
337
|
+
cwd: options.cwd,
|
|
338
|
+
env: options.env,
|
|
339
|
+
outputRoot,
|
|
340
|
+
signal: options.signal,
|
|
341
|
+
inputMode: 'bundle',
|
|
342
|
+
});
|
|
343
|
+
return {
|
|
344
|
+
pluginId: materialized.pluginId,
|
|
345
|
+
sourceId: source.sourceId,
|
|
346
|
+
sourceIdentity: source.sourceIdentity,
|
|
347
|
+
pluginVersion: requestedPlugin.manifest.version,
|
|
348
|
+
scope: materialized.scope,
|
|
349
|
+
candidates: materialized.candidates,
|
|
350
|
+
dependencyPluginIds: materialized.dependencyPluginIds,
|
|
351
|
+
configDigest: materialized.configDigest,
|
|
352
|
+
digest: materialized.digest,
|
|
353
|
+
};
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
...metadata,
|
|
358
|
+
rootDir: outputRoot,
|
|
359
|
+
provenancePath: path.join(outputRoot, '.aw-materialization.json'),
|
|
360
|
+
cleanup: async () => fs.remove(operationRoot),
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
await fs.remove(operationRoot);
|
|
365
|
+
throw error;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
export async function materializePortableSkills(options) {
|
|
369
|
+
const requested = resolveRequestedPlugin(options.plugins, options.pluginId);
|
|
370
|
+
if (!requested.manifest.distributions?.agentSkills) {
|
|
371
|
+
throw new Error(`Plugin "${pluginId(requested)}" does not declare distributions.agentSkills.`);
|
|
372
|
+
}
|
|
373
|
+
const closure = resolvePluginMetaDependencyClosure(options.plugins, [requested.manifest.name]);
|
|
374
|
+
assertSameSource(requested, closure);
|
|
375
|
+
const createdRoot = options.outputRoot === undefined;
|
|
376
|
+
const rootDir = options.outputRoot
|
|
377
|
+
? path.resolve(options.outputRoot)
|
|
378
|
+
: await fs.mkdtemp(path.join(os.tmpdir(), 'aw-portable-materialize-'));
|
|
379
|
+
if (options.outputRoot) {
|
|
380
|
+
if (await fs.pathExists(rootDir)) {
|
|
381
|
+
throw new Error(`Portable output root already exists: ${rootDir}.`);
|
|
382
|
+
}
|
|
383
|
+
await fs.ensureDir(rootDir);
|
|
384
|
+
}
|
|
385
|
+
const skillsRoot = path.join(rootDir, 'skills');
|
|
386
|
+
const env = options.env ?? process.env;
|
|
387
|
+
try {
|
|
388
|
+
const trees = [];
|
|
389
|
+
const configDigests = [];
|
|
390
|
+
for (const plugin of closure) {
|
|
391
|
+
options.signal?.throwIfAborted();
|
|
392
|
+
trees.push(...await materializePluginCandidates({
|
|
393
|
+
plugin,
|
|
394
|
+
relation: relationFor(requested, plugin),
|
|
395
|
+
scope: options.scope,
|
|
396
|
+
cwd: options.cwd,
|
|
397
|
+
env,
|
|
398
|
+
signal: options.signal,
|
|
399
|
+
inputMode: options.inputMode ?? 'source',
|
|
400
|
+
recordConfigDigest: (id, configDigest) => configDigests.push([id, configDigest]),
|
|
401
|
+
}));
|
|
402
|
+
}
|
|
403
|
+
const seenNames = new Set();
|
|
404
|
+
for (const candidate of trees) {
|
|
405
|
+
if (seenNames.has(candidate.tree.skillKey)) {
|
|
406
|
+
throw new Error(`Portable Skill name collision: "${candidate.tree.skillKey}".`);
|
|
407
|
+
}
|
|
408
|
+
seenNames.add(candidate.tree.skillKey);
|
|
409
|
+
await copyTreeFiles(candidate.tree.files, path.join(skillsRoot, candidate.tree.skillKey));
|
|
410
|
+
await validateRuntimeSkillClosure(path.join(skillsRoot, candidate.tree.skillKey));
|
|
411
|
+
}
|
|
412
|
+
const candidates = trees.map((candidate) => ({
|
|
413
|
+
name: candidate.tree.skillKey,
|
|
414
|
+
description: skillDescription(candidate.tree),
|
|
415
|
+
providerPluginId: pluginId(candidate.plugin),
|
|
416
|
+
providerDisplayName: candidate.plugin.manifest.interface?.displayName
|
|
417
|
+
?? candidate.plugin.manifest.name,
|
|
418
|
+
relation: candidate.relation,
|
|
419
|
+
dynamic: candidate.dynamic,
|
|
420
|
+
filesDigest: treeDigest(candidate.tree),
|
|
421
|
+
})).sort((left, right) => left.name.localeCompare(right.name));
|
|
422
|
+
const dependencyPluginIds = closure
|
|
423
|
+
.filter((plugin) => plugin.manifest.name !== requested.manifest.name)
|
|
424
|
+
.map(pluginId);
|
|
425
|
+
const configDigest = `sha256:${crypto.createHash('sha256')
|
|
426
|
+
.update(JSON.stringify(configDigests))
|
|
427
|
+
.digest('hex')}`;
|
|
428
|
+
const digest = `sha256:${crypto.createHash('sha256')
|
|
429
|
+
.update(JSON.stringify(candidates.map((candidate) => [candidate.name, candidate.filesDigest])))
|
|
430
|
+
.digest('hex')}`;
|
|
431
|
+
const provenancePath = path.join(rootDir, '.aw-materialization.json');
|
|
432
|
+
const provenance = {
|
|
433
|
+
schemaVersion: 1,
|
|
434
|
+
pluginId: pluginId(requested),
|
|
435
|
+
scope: options.scope,
|
|
436
|
+
dependencyPluginIds,
|
|
437
|
+
configDigest,
|
|
438
|
+
digest,
|
|
439
|
+
skills: candidates.map((candidate) => ({ ...candidate, digest: candidate.filesDigest })),
|
|
440
|
+
};
|
|
441
|
+
await fs.writeJson(provenancePath, provenance, { spaces: 2 });
|
|
442
|
+
return {
|
|
443
|
+
rootDir,
|
|
444
|
+
pluginId: pluginId(requested),
|
|
445
|
+
scope: options.scope,
|
|
446
|
+
candidates,
|
|
447
|
+
dependencyPluginIds,
|
|
448
|
+
configDigest,
|
|
449
|
+
digest,
|
|
450
|
+
provenancePath,
|
|
451
|
+
cleanup: async () => {
|
|
452
|
+
if (createdRoot)
|
|
453
|
+
await fs.remove(rootDir);
|
|
454
|
+
},
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
catch (error) {
|
|
458
|
+
await fs.remove(rootDir);
|
|
459
|
+
throw error;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
//# 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;AAC1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AASxF,OAAO,EAAE,oBAAoB,EAAE,M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YACd,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,IAAI,WAAW;oBAAE,MAAM,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzB,MAAM,KAAK,CAAC;IACd,CAAC;AACH,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
|
+
}>;
|