@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,44 @@
|
|
|
1
|
+
import type { Scope } from '../types.js';
|
|
2
|
+
export interface ClaudeSettings {
|
|
3
|
+
extraKnownMarketplaces?: Record<string, string | {
|
|
4
|
+
source: string | {
|
|
5
|
+
source: string;
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
enabledPlugins?: Record<string, boolean | string[]>;
|
|
10
|
+
plugins?: {
|
|
11
|
+
installed?: Record<string, ClaudeSettingsInstalledRecord>;
|
|
12
|
+
};
|
|
13
|
+
permissions?: {
|
|
14
|
+
allow?: string[];
|
|
15
|
+
ask?: string[];
|
|
16
|
+
deny?: string[];
|
|
17
|
+
};
|
|
18
|
+
hooks?: Array<Record<string, unknown>>;
|
|
19
|
+
awGenerated?: {
|
|
20
|
+
permissions?: Record<string, {
|
|
21
|
+
allow: string[];
|
|
22
|
+
ask: string[];
|
|
23
|
+
deny: string[];
|
|
24
|
+
}>;
|
|
25
|
+
hooks?: Record<string, Array<Record<string, unknown>>>;
|
|
26
|
+
manualPermissions?: {
|
|
27
|
+
allow?: string[];
|
|
28
|
+
ask?: string[];
|
|
29
|
+
deny?: string[];
|
|
30
|
+
};
|
|
31
|
+
manualHooks?: Array<Record<string, unknown>>;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface ClaudeSettingsInstalledRecord {
|
|
35
|
+
marketplace: string;
|
|
36
|
+
version: string;
|
|
37
|
+
installedAt: string;
|
|
38
|
+
scope?: Scope;
|
|
39
|
+
projectPath?: string;
|
|
40
|
+
enabled?: boolean;
|
|
41
|
+
owner?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function readClaudeSettings(settingsPath: string): Promise<ClaudeSettings>;
|
|
44
|
+
export declare function writeClaudeSettings(settingsPath: string, settings: ClaudeSettings): Promise<void>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import { atomicReplaceConfigFile, withConfigFileMutation, } from '../utils/plugin-config.js';
|
|
4
|
+
import { readJsonFileIfExists } from '../utils/json.js';
|
|
5
|
+
const claudeSettingsBaselines = new WeakMap();
|
|
6
|
+
const DELETE_MERGED_VALUE = Symbol('delete-merged-value');
|
|
7
|
+
function isRecord(value) {
|
|
8
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
9
|
+
}
|
|
10
|
+
function arrayIncludes(values, candidate) {
|
|
11
|
+
return values.some((value) => isDeepStrictEqual(value, candidate));
|
|
12
|
+
}
|
|
13
|
+
function removeBaselineValue(baseline, latest) {
|
|
14
|
+
if (latest === undefined)
|
|
15
|
+
return DELETE_MERGED_VALUE;
|
|
16
|
+
if (!isRecord(baseline) || !isRecord(latest)) {
|
|
17
|
+
return isDeepStrictEqual(baseline, latest)
|
|
18
|
+
? DELETE_MERGED_VALUE
|
|
19
|
+
: structuredClone(latest);
|
|
20
|
+
}
|
|
21
|
+
const retained = structuredClone(latest);
|
|
22
|
+
for (const [key, baselineValue] of Object.entries(baseline)) {
|
|
23
|
+
if (!Object.hasOwn(retained, key))
|
|
24
|
+
continue;
|
|
25
|
+
const next = removeBaselineValue(baselineValue, retained[key]);
|
|
26
|
+
if (next === DELETE_MERGED_VALUE)
|
|
27
|
+
delete retained[key];
|
|
28
|
+
else
|
|
29
|
+
retained[key] = next;
|
|
30
|
+
}
|
|
31
|
+
return Object.keys(retained).length === 0 ? DELETE_MERGED_VALUE : retained;
|
|
32
|
+
}
|
|
33
|
+
function mergeClaudeSettingsChanges(baseline, desired, latest) {
|
|
34
|
+
if (isDeepStrictEqual(baseline, desired)) {
|
|
35
|
+
return structuredClone(latest);
|
|
36
|
+
}
|
|
37
|
+
if (Array.isArray(baseline) && Array.isArray(desired) && Array.isArray(latest)) {
|
|
38
|
+
const removed = baseline.filter((entry) => !arrayIncludes(desired, entry));
|
|
39
|
+
const added = desired.filter((entry) => !arrayIncludes(baseline, entry));
|
|
40
|
+
const merged = latest.filter((entry) => !arrayIncludes(removed, entry));
|
|
41
|
+
for (const entry of added) {
|
|
42
|
+
if (!arrayIncludes(merged, entry))
|
|
43
|
+
merged.push(structuredClone(entry));
|
|
44
|
+
}
|
|
45
|
+
return merged;
|
|
46
|
+
}
|
|
47
|
+
if (!isRecord(desired) || (!isRecord(baseline) && baseline !== undefined)) {
|
|
48
|
+
return structuredClone(desired);
|
|
49
|
+
}
|
|
50
|
+
const baselineRecord = isRecord(baseline) ? baseline : {};
|
|
51
|
+
const merged = isRecord(latest)
|
|
52
|
+
? structuredClone(latest)
|
|
53
|
+
: {};
|
|
54
|
+
for (const key of new Set([...Object.keys(baselineRecord), ...Object.keys(desired)])) {
|
|
55
|
+
if (!Object.hasOwn(desired, key)) {
|
|
56
|
+
const next = removeBaselineValue(baselineRecord[key], merged[key]);
|
|
57
|
+
if (next === DELETE_MERGED_VALUE)
|
|
58
|
+
delete merged[key];
|
|
59
|
+
else
|
|
60
|
+
merged[key] = next;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (!Object.hasOwn(baselineRecord, key)) {
|
|
64
|
+
merged[key] = mergeClaudeSettingsChanges(undefined, desired[key], merged[key]);
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
merged[key] = mergeClaudeSettingsChanges(baselineRecord[key], desired[key], isRecord(latest) ? latest[key] : undefined);
|
|
68
|
+
}
|
|
69
|
+
return merged;
|
|
70
|
+
}
|
|
71
|
+
export async function readClaudeSettings(settingsPath) {
|
|
72
|
+
const settings = await readJsonFileIfExists(settingsPath) ?? {};
|
|
73
|
+
claudeSettingsBaselines.set(settings, structuredClone(settings));
|
|
74
|
+
return settings;
|
|
75
|
+
}
|
|
76
|
+
export async function writeClaudeSettings(settingsPath, settings) {
|
|
77
|
+
const baseline = claudeSettingsBaselines.get(settings);
|
|
78
|
+
await withConfigFileMutation({
|
|
79
|
+
filePath: settingsPath,
|
|
80
|
+
allowedRoot: path.dirname(settingsPath),
|
|
81
|
+
action: async () => {
|
|
82
|
+
const latest = await readJsonFileIfExists(settingsPath) ?? {};
|
|
83
|
+
const next = baseline
|
|
84
|
+
? mergeClaudeSettingsChanges(baseline, settings, latest)
|
|
85
|
+
: settings;
|
|
86
|
+
await atomicReplaceConfigFile({
|
|
87
|
+
filePath: settingsPath,
|
|
88
|
+
allowedRoot: path.dirname(settingsPath),
|
|
89
|
+
content: `${JSON.stringify(next, null, 2)}\n`,
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
claudeSettingsBaselines.set(settings, structuredClone(settings));
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/adapters/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAsCxD,MAAM,uBAAuB,GAAG,IAAI,OAAO,EAAkC,CAAC;AAC9E,MAAM,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAE1D,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAA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CAAC,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,YAAoB,EACpB,QAAwB;IAExB,MAAM,QAAQ,GAAG,uBAAuB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACvD,MAAM,sBAAsB,CAAC;QAC3B,QAAQ,EAAE,YAAY;QACtB,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;QACvC,MAAM,EAAE,KAAK,IAAI,EAAE;YACjB,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAiB,YAAY,CAAC,IAAI,EAAE,CAAC;YAC9E,MAAM,IAAI,GAAG,QAAQ;gBACnB,CAAC,CAAC,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAmB;gBAC1E,CAAC,CAAC,QAAQ,CAAC;YACb,MAAM,uBAAuB,CAAC;gBAC5B,QAAQ,EAAE,YAAY;gBACtB,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;gBACvC,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;aAC9C,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;IACH,uBAAuB,CAAC,GAAG,CAAC,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type CatalogVersionBump } from '@lesliechan721/aw-plugin-core';
|
|
2
|
+
import type { CatalogWorkspaceResolvedFrom } from '../commands/catalog-workspace-resolution.js';
|
|
3
|
+
export interface AuthoringCommandIo {
|
|
4
|
+
stdout(text: string): void;
|
|
5
|
+
stderr(text: string): void;
|
|
6
|
+
}
|
|
7
|
+
export declare function runCatalogInitCommand(options: {
|
|
8
|
+
workspaceRoot: string;
|
|
9
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
10
|
+
force?: boolean;
|
|
11
|
+
json?: boolean;
|
|
12
|
+
ownerName?: string;
|
|
13
|
+
ownerUrl?: string;
|
|
14
|
+
displayName?: string;
|
|
15
|
+
catalogVersion?: string;
|
|
16
|
+
io: AuthoringCommandIo;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
export declare function runCatalogVersionCommand(options: {
|
|
19
|
+
workspaceRoot: string;
|
|
20
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
21
|
+
version?: string;
|
|
22
|
+
bump?: CatalogVersionBump;
|
|
23
|
+
json?: boolean;
|
|
24
|
+
io: AuthoringCommandIo;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
command: 'catalog:version';
|
|
27
|
+
ok: true;
|
|
28
|
+
workspaceRoot: string;
|
|
29
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
30
|
+
catalogVersion: string;
|
|
31
|
+
changed: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function runCatalogBuildCommand(options: {
|
|
34
|
+
workspaceRoot: string;
|
|
35
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
36
|
+
out?: string;
|
|
37
|
+
force?: boolean;
|
|
38
|
+
json?: boolean;
|
|
39
|
+
io: AuthoringCommandIo;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
command: 'catalog:build';
|
|
42
|
+
ok: true;
|
|
43
|
+
workspaceRoot: string;
|
|
44
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
45
|
+
outputRoot: string;
|
|
46
|
+
catalogVersion: string;
|
|
47
|
+
channel: 'latest' | 'beta';
|
|
48
|
+
pluginNames: string[];
|
|
49
|
+
}>;
|
|
50
|
+
export declare function runCatalogValidateCommand(options: {
|
|
51
|
+
snapshotDirectory: string;
|
|
52
|
+
json?: boolean;
|
|
53
|
+
io: AuthoringCommandIo;
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
export declare function runPluginBuildCommand(options: {
|
|
56
|
+
workspaceRoot: string;
|
|
57
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
58
|
+
pluginDirectory: string;
|
|
59
|
+
out?: string;
|
|
60
|
+
force?: boolean;
|
|
61
|
+
json?: boolean;
|
|
62
|
+
io: AuthoringCommandIo;
|
|
63
|
+
}): Promise<void>;
|
|
64
|
+
export declare function runPluginTestCommand(options: {
|
|
65
|
+
workspaceRoot: string;
|
|
66
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
67
|
+
pluginDirectory: string;
|
|
68
|
+
json?: boolean;
|
|
69
|
+
io: AuthoringCommandIo;
|
|
70
|
+
}): Promise<number>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import { buildCatalogWorkspace, buildCatalogWorkspacePlugin, initializeCatalogWorkspace, mutateCatalogWorkspaceVersion, readCatalogWorkspace, validateCatalogSnapshotComplete, } from '@lesliechan721/aw-plugin-core';
|
|
4
|
+
import { bundleLocalPlugin, createCatalogRuntimeImportResolver, } from '../../scripts/plugin-staging.js';
|
|
5
|
+
import { runPluginScriptTests } from '../../scripts/test-plugin-scripts.js';
|
|
6
|
+
import { CLI_RESERVED_IMPORTS } from '../utils/manifest.js';
|
|
7
|
+
const catalogBuildAdapter = {
|
|
8
|
+
async build(options) {
|
|
9
|
+
await bundleLocalPlugin(options.plugin, options.outputRoot, {
|
|
10
|
+
buildMode: 'staging',
|
|
11
|
+
runtimeResolver: createCatalogRuntimeImportResolver(options.plugins),
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
const pluginBuildAdapter = {
|
|
16
|
+
async build(options) {
|
|
17
|
+
await bundleLocalPlugin(options.plugin, options.outputRoot, {
|
|
18
|
+
buildMode: 'staging',
|
|
19
|
+
runtimeResolver: createCatalogRuntimeImportResolver(options.plugins),
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
function writeJson(io, value) {
|
|
24
|
+
io.stdout(`${JSON.stringify(value)}\n`);
|
|
25
|
+
}
|
|
26
|
+
export async function runCatalogInitCommand(options) {
|
|
27
|
+
const result = await initializeCatalogWorkspace(options);
|
|
28
|
+
const receipt = {
|
|
29
|
+
command: 'catalog:init',
|
|
30
|
+
ok: true,
|
|
31
|
+
workspaceRoot: result.workspaceRoot,
|
|
32
|
+
workspaceRootResolvedFrom: options.workspaceRootResolvedFrom,
|
|
33
|
+
metadataPath: result.metadataPath,
|
|
34
|
+
catalogVersion: result.metadata.catalog.version,
|
|
35
|
+
};
|
|
36
|
+
if (options.json)
|
|
37
|
+
writeJson(options.io, receipt);
|
|
38
|
+
else
|
|
39
|
+
options.io.stdout(`Catalog Workspace initialized at ${result.workspaceRoot}.\n`);
|
|
40
|
+
}
|
|
41
|
+
export async function runCatalogVersionCommand(options) {
|
|
42
|
+
if (options.version !== undefined && options.bump !== undefined) {
|
|
43
|
+
throw new Error('Catalog version accepts an exact version or --bump, not both.');
|
|
44
|
+
}
|
|
45
|
+
const current = await readCatalogWorkspace(options.workspaceRoot, {
|
|
46
|
+
reservedImports: CLI_RESERVED_IMPORTS,
|
|
47
|
+
});
|
|
48
|
+
const metadata = options.version === undefined && options.bump === undefined
|
|
49
|
+
? current.metadata
|
|
50
|
+
: await mutateCatalogWorkspaceVersion(options.workspaceRoot, {
|
|
51
|
+
...(options.version === undefined ? {} : { version: options.version }),
|
|
52
|
+
...(options.bump === undefined ? {} : { bump: options.bump }),
|
|
53
|
+
}, { reservedImports: CLI_RESERVED_IMPORTS });
|
|
54
|
+
const receipt = {
|
|
55
|
+
command: 'catalog:version',
|
|
56
|
+
ok: true,
|
|
57
|
+
workspaceRoot: path.resolve(options.workspaceRoot),
|
|
58
|
+
workspaceRootResolvedFrom: options.workspaceRootResolvedFrom,
|
|
59
|
+
catalogVersion: metadata.catalog.version,
|
|
60
|
+
changed: metadata.catalog.version !== current.metadata.catalog.version,
|
|
61
|
+
};
|
|
62
|
+
if (options.json)
|
|
63
|
+
writeJson(options.io, receipt);
|
|
64
|
+
else
|
|
65
|
+
options.io.stdout(`${metadata.catalog.version}\n`);
|
|
66
|
+
return receipt;
|
|
67
|
+
}
|
|
68
|
+
export async function runCatalogBuildCommand(options) {
|
|
69
|
+
const result = await buildCatalogWorkspace({
|
|
70
|
+
workspaceRoot: options.workspaceRoot,
|
|
71
|
+
...(options.out ? { outputPath: options.out } : {}),
|
|
72
|
+
force: options.force,
|
|
73
|
+
adapter: catalogBuildAdapter,
|
|
74
|
+
reservedImports: CLI_RESERVED_IMPORTS,
|
|
75
|
+
});
|
|
76
|
+
const receipt = {
|
|
77
|
+
command: 'catalog:build',
|
|
78
|
+
ok: true,
|
|
79
|
+
workspaceRoot: path.resolve(options.workspaceRoot),
|
|
80
|
+
workspaceRootResolvedFrom: options.workspaceRootResolvedFrom,
|
|
81
|
+
...result,
|
|
82
|
+
};
|
|
83
|
+
if (options.json)
|
|
84
|
+
writeJson(options.io, receipt);
|
|
85
|
+
else
|
|
86
|
+
options.io.stdout(`Catalog snapshot built at ${result.outputRoot}.\n`);
|
|
87
|
+
return receipt;
|
|
88
|
+
}
|
|
89
|
+
export async function runCatalogValidateCommand(options) {
|
|
90
|
+
const result = await validateCatalogSnapshotComplete(options.snapshotDirectory);
|
|
91
|
+
const receipt = {
|
|
92
|
+
command: 'catalog:validate',
|
|
93
|
+
ok: true,
|
|
94
|
+
snapshotDirectory: result.rootDir,
|
|
95
|
+
catalogVersion: result.manifest.catalogVersion,
|
|
96
|
+
channel: result.manifest.channel,
|
|
97
|
+
snapshotDigest: result.snapshotDigest,
|
|
98
|
+
};
|
|
99
|
+
if (options.json)
|
|
100
|
+
writeJson(options.io, receipt);
|
|
101
|
+
else
|
|
102
|
+
options.io.stdout(`Catalog snapshot is valid: ${result.rootDir}.\n`);
|
|
103
|
+
}
|
|
104
|
+
export async function runPluginBuildCommand(options) {
|
|
105
|
+
const result = await buildCatalogWorkspacePlugin({
|
|
106
|
+
workspaceRoot: options.workspaceRoot,
|
|
107
|
+
pluginDirectory: options.pluginDirectory,
|
|
108
|
+
...(options.out ? { outputPath: options.out } : {}),
|
|
109
|
+
force: options.force,
|
|
110
|
+
adapter: pluginBuildAdapter,
|
|
111
|
+
reservedImports: CLI_RESERVED_IMPORTS,
|
|
112
|
+
});
|
|
113
|
+
const receipt = {
|
|
114
|
+
command: 'plugin:build',
|
|
115
|
+
ok: true,
|
|
116
|
+
workspaceRoot: path.resolve(options.workspaceRoot),
|
|
117
|
+
workspaceRootResolvedFrom: options.workspaceRootResolvedFrom,
|
|
118
|
+
...result,
|
|
119
|
+
};
|
|
120
|
+
if (options.json)
|
|
121
|
+
writeJson(options.io, receipt);
|
|
122
|
+
else
|
|
123
|
+
options.io.stdout(`Plugin bundle built at ${result.outputRoot}.\n`);
|
|
124
|
+
}
|
|
125
|
+
export async function runPluginTestCommand(options) {
|
|
126
|
+
const catalogWorkspace = await readCatalogWorkspace(options.workspaceRoot, { reservedImports: CLI_RESERVED_IMPORTS });
|
|
127
|
+
const pluginRoot = await fs.realpath(path.resolve(catalogWorkspace.workspaceRoot, options.pluginDirectory));
|
|
128
|
+
const plugin = catalogWorkspace.plugins.find((entry) => entry.rootDir === pluginRoot);
|
|
129
|
+
if (!plugin)
|
|
130
|
+
throw new Error(`Plugin directory is not part of this Catalog Workspace source: ${pluginRoot}`);
|
|
131
|
+
let stdout = '';
|
|
132
|
+
let stderr = '';
|
|
133
|
+
const exitCode = await runPluginScriptTests([plugin.manifest.name], {
|
|
134
|
+
repoRoot: catalogWorkspace.workspaceRoot,
|
|
135
|
+
stdout: (text) => { stdout += text; },
|
|
136
|
+
stderr: (text) => { stderr += text; },
|
|
137
|
+
});
|
|
138
|
+
if (options.json) {
|
|
139
|
+
writeJson(options.io, {
|
|
140
|
+
command: 'plugin:test',
|
|
141
|
+
ok: exitCode === 0,
|
|
142
|
+
workspaceRoot: catalogWorkspace.workspaceRoot,
|
|
143
|
+
workspaceRootResolvedFrom: options.workspaceRootResolvedFrom,
|
|
144
|
+
pluginName: plugin.manifest.name,
|
|
145
|
+
exitCode,
|
|
146
|
+
stdout,
|
|
147
|
+
stderr,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
if (stdout)
|
|
152
|
+
options.io.stdout(stdout);
|
|
153
|
+
if (stderr)
|
|
154
|
+
options.io.stderr(stderr);
|
|
155
|
+
}
|
|
156
|
+
return exitCode;
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=workspace-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-commands.js","sourceRoot":"","sources":["../../../src/authoring/workspace-commands.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,oBAAoB,EACpB,+BAA+B,GAIhC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,iBAAiB,EACjB,kCAAkC,GACnC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQ5D,MAAM,mBAAmB,GAAiC;IACxD,KAAK,CAAC,KAAK,CAAC,OAAO;QACjB,MAAM,iBAAiB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE;YAC1D,SAAS,EAAE,SAAS;YACpB,eAAe,EAAE,kCAAkC,CAAC,OAAO,CAAC,OAAO,CAAC;SACrE,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,MAAM,kBAAkB,GAAuC;IAC7D,KAAK,CAAC,KAAK,CAA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IACtF,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,kEAAkE,UAAU,EAAE,CAAC,CAAC;IAC7G,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAClE,QAAQ,EAAE,gBAAgB,CAAC,aAAa;QACxC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;QACrC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;KACtC,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE;YACpB,OAAO,EAAE,aAAa;YACtB,EAAE,EAAE,QAAQ,KAAK,CAAC;YAClB,aAAa,EAAE,gBAAgB,CAAC,aAAa;YAC7C,yBAAyB,EAAE,OAAO,CAAC,yBAAyB;YAC5D,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;YAChC,QAAQ;YACR,MAAM;YACN,MAAM;SACP,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,IAAI,MAAM;YAAE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,MAAM;YAAE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type AwPluginRequirementsReceiptV1, type PluginRequirementsResolution } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import { type CatalogWorkspaceResolvedFrom } from './catalog-workspace-resolution.js';
|
|
3
|
+
export declare const IMPLEMENTED_AW_CAPABILITIES: readonly ["aw.plugin-manifest.v3", "aw.plugin-skills.v1", "aw.plugin-build-config.v1", "aw.plugin-config.v2", "aw.plugin-post-apply.v1", "aw.dynamic-artifacts.v2", "aw.portable-skills.v1", "aw.runtime-imports.v1", "aw.skill-validation.v1", "aw.skill-eval.v2", "aw.plugin-authoring.v1", "aw.catalog-authoring.v1", "aw.catalog-source.v2", "aw.catalog-dev-source.v1", "aw.catalog-publication.v1", "aw.review-publication.v1", "aw.catalog-snapshot.v7", "aw.self-check.v1"];
|
|
4
|
+
export declare class AwCapabilityUnsupportedError extends Error {
|
|
5
|
+
readonly code = "awCapabilityUnsupported";
|
|
6
|
+
readonly plugin: string;
|
|
7
|
+
readonly missingCapabilities: string[];
|
|
8
|
+
readonly availableCapabilities: string[];
|
|
9
|
+
constructor(plugin: string, missingCapabilities: readonly string[]);
|
|
10
|
+
}
|
|
11
|
+
export interface AwSelfDescribeResult {
|
|
12
|
+
schemaVersion: 1;
|
|
13
|
+
command: 'self:describe';
|
|
14
|
+
awVersion: string;
|
|
15
|
+
coreVersion: string;
|
|
16
|
+
capabilities: string[];
|
|
17
|
+
capabilitySetDigest: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function describeCurrentAw(awVersion: string): AwSelfDescribeResult;
|
|
20
|
+
interface DiscoveredRequirements {
|
|
21
|
+
source: {
|
|
22
|
+
kind: 'receipt' | 'manifest';
|
|
23
|
+
path: string;
|
|
24
|
+
};
|
|
25
|
+
plugin: {
|
|
26
|
+
name: string;
|
|
27
|
+
version: string;
|
|
28
|
+
};
|
|
29
|
+
requiredCapabilities: string[];
|
|
30
|
+
capabilitySetDigest: string;
|
|
31
|
+
resolution?: PluginRequirementsResolution;
|
|
32
|
+
}
|
|
33
|
+
export declare function discoverAwPluginRequirements(from: string): Promise<DiscoveredRequirements>;
|
|
34
|
+
export interface AwSelfCheckResult {
|
|
35
|
+
schemaVersion: 1;
|
|
36
|
+
command: 'self:check';
|
|
37
|
+
ok: boolean;
|
|
38
|
+
awVersion: string;
|
|
39
|
+
coreVersion: string;
|
|
40
|
+
source: DiscoveredRequirements['source'] | null;
|
|
41
|
+
plugin: DiscoveredRequirements['plugin'] | null;
|
|
42
|
+
requiredCapabilities: string[];
|
|
43
|
+
capabilitySetDigest: string | null;
|
|
44
|
+
missingCapabilities: string[];
|
|
45
|
+
observations: PluginRequirementsResolution['observations'];
|
|
46
|
+
error?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function checkCurrentAw(options: {
|
|
49
|
+
awVersion: string;
|
|
50
|
+
from: string;
|
|
51
|
+
}): Promise<AwSelfCheckResult>;
|
|
52
|
+
export interface PluginRequirementsResult extends PluginRequirementsResolution {
|
|
53
|
+
command: 'plugin:requirements';
|
|
54
|
+
plugin: {
|
|
55
|
+
name: string;
|
|
56
|
+
version: string;
|
|
57
|
+
};
|
|
58
|
+
pluginDirectory: string;
|
|
59
|
+
workspaceRoot: string;
|
|
60
|
+
workspaceRootResolvedFrom: CatalogWorkspaceResolvedFrom;
|
|
61
|
+
mutation?: {
|
|
62
|
+
action: 'add' | 'remove';
|
|
63
|
+
capability: string;
|
|
64
|
+
changed: boolean;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export declare function inspectPluginRequirements(options: {
|
|
68
|
+
pluginDirectory: string;
|
|
69
|
+
workspaceRoot?: string;
|
|
70
|
+
cwd: string;
|
|
71
|
+
add?: string;
|
|
72
|
+
remove?: string;
|
|
73
|
+
}): Promise<PluginRequirementsResult>;
|
|
74
|
+
export declare function createRequirementsReceipt(plugin: {
|
|
75
|
+
name: string;
|
|
76
|
+
version: string;
|
|
77
|
+
}, requiredCapabilities: string[]): AwPluginRequirementsReceiptV1;
|
|
78
|
+
export {};
|