@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,347 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { parseSelectedCases, } from '@lesliechan721/agent-skill-eval';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
function record(value, label) {
|
|
5
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
6
|
+
throw new Error(`${label} must be an object.`);
|
|
7
|
+
}
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
function onlyKeys(value, allowed, label) {
|
|
11
|
+
const keys = new Set(allowed);
|
|
12
|
+
const unknown = Object.keys(value).find((key) => !keys.has(key));
|
|
13
|
+
if (unknown)
|
|
14
|
+
throw new Error(`${label} has unknown field ${JSON.stringify(unknown)}.`);
|
|
15
|
+
}
|
|
16
|
+
function safeId(value, label) {
|
|
17
|
+
if (typeof value !== 'string' || !/^[a-z0-9][a-z0-9-]*$/u.test(value)) {
|
|
18
|
+
throw new Error(`${label} must use lowercase kebab-case.`);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
function positiveInteger(value, label) {
|
|
23
|
+
if (!Number.isSafeInteger(value) || value < 1) {
|
|
24
|
+
throw new Error(`${label} must be a positive safe integer.`);
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
function relativePath(value, label) {
|
|
29
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
30
|
+
throw new Error(`${label} must be a non-empty string.`);
|
|
31
|
+
if (value.includes('\\') || value.includes('\0') || path.posix.isAbsolute(value) ||
|
|
32
|
+
path.win32.isAbsolute(value) || path.posix.normalize(value) !== value ||
|
|
33
|
+
value.split('/').includes('..'))
|
|
34
|
+
throw new Error(`${label} must be a normalized path inside the Skill eval directory.`);
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
function safeIdArray(value, label, allowEmpty = false) {
|
|
38
|
+
if (!Array.isArray(value) || (!allowEmpty && value.length === 0)) {
|
|
39
|
+
throw new Error(`${label} must be ${allowEmpty ? 'an array' : 'a non-empty array'}.`);
|
|
40
|
+
}
|
|
41
|
+
const result = value.map((entry, index) => safeId(entry, `${label}[${index}]`));
|
|
42
|
+
if (new Set(result).size !== result.length)
|
|
43
|
+
throw new Error(`${label} must contain unique values.`);
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
async function assertSafeFile(root, relative, label) {
|
|
47
|
+
const target = path.resolve(root, relative);
|
|
48
|
+
const relation = path.relative(root, target);
|
|
49
|
+
if (relation === '..' || relation.startsWith(`..${path.sep}`) || path.isAbsolute(relation)) {
|
|
50
|
+
throw new Error(`${label} must stay inside the Skill eval directory.`);
|
|
51
|
+
}
|
|
52
|
+
let current = path.resolve(root);
|
|
53
|
+
for (const segment of relation.split(path.sep).filter(Boolean)) {
|
|
54
|
+
current = path.join(current, segment);
|
|
55
|
+
const info = await fs.lstat(current).catch(() => null);
|
|
56
|
+
if (!info)
|
|
57
|
+
throw new Error(`${label} does not exist.`);
|
|
58
|
+
if (info.isSymbolicLink())
|
|
59
|
+
throw new Error(`${label} must not contain symbolic links.`);
|
|
60
|
+
}
|
|
61
|
+
if (!(await fs.lstat(target)).isFile())
|
|
62
|
+
throw new Error(`${label} must be a regular file.`);
|
|
63
|
+
return target;
|
|
64
|
+
}
|
|
65
|
+
function parseDefaults(value) {
|
|
66
|
+
const row = record(value, 'eval manifest.defaults');
|
|
67
|
+
onlyKeys(row, ['profile', 'runs', 'timeoutMs'], 'eval manifest.defaults');
|
|
68
|
+
return {
|
|
69
|
+
...(row.profile === undefined ? {} : { profile: safeId(row.profile, 'eval manifest.defaults.profile') }),
|
|
70
|
+
...(row.runs === undefined ? {} : { runs: positiveInteger(row.runs, 'eval manifest.defaults.runs') }),
|
|
71
|
+
...(row.timeoutMs === undefined
|
|
72
|
+
? {}
|
|
73
|
+
: { timeoutMs: positiveInteger(row.timeoutMs, 'eval manifest.defaults.timeoutMs') }),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function parseProfiles(value, ownerPlugin) {
|
|
77
|
+
const profiles = record(value, 'eval manifest.profiles');
|
|
78
|
+
if (Object.keys(profiles).length === 0)
|
|
79
|
+
throw new Error('eval manifest.profiles must not be empty.');
|
|
80
|
+
return Object.entries(profiles).map(([idValue, entry]) => {
|
|
81
|
+
const id = safeId(idValue, 'eval manifest profile id');
|
|
82
|
+
const row = record(entry, `eval manifest.profiles.${id}`);
|
|
83
|
+
onlyKeys(row, ['scope', 'plugins'], `eval manifest.profiles.${id}`);
|
|
84
|
+
if (row.scope !== 'project' && row.scope !== 'user') {
|
|
85
|
+
throw new Error(`eval manifest.profiles.${id}.scope must be project or user.`);
|
|
86
|
+
}
|
|
87
|
+
const plugins = record(row.plugins, `eval manifest.profiles.${id}.plugins`);
|
|
88
|
+
if (Object.keys(plugins).length === 0) {
|
|
89
|
+
throw new Error(`eval manifest.profiles.${id}.plugins must not be empty.`);
|
|
90
|
+
}
|
|
91
|
+
const result = {
|
|
92
|
+
id,
|
|
93
|
+
scope: row.scope,
|
|
94
|
+
plugins: Object.entries(plugins).map(([nameValue, config]) => ({
|
|
95
|
+
name: safeId(nameValue, `eval manifest.profiles.${id}.plugins name`),
|
|
96
|
+
config: record(config, `eval manifest.profiles.${id}.plugins.${nameValue}`),
|
|
97
|
+
})),
|
|
98
|
+
};
|
|
99
|
+
if (!result.plugins.some((plugin) => plugin.name === ownerPlugin)) {
|
|
100
|
+
throw new Error(`eval manifest.profiles.${id} must include owner plugin ${JSON.stringify(ownerPlugin)}.`);
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function parseProvider(value, label) {
|
|
106
|
+
const row = record(value, label);
|
|
107
|
+
if (row.type === 'custom-process')
|
|
108
|
+
onlyKeys(row, ['type', 'command'], label);
|
|
109
|
+
else if (row.type === 'codex-workflow') {
|
|
110
|
+
onlyKeys(row, ['type', 'command', 'allowedModels'], label);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
throw new Error(`${label}.type must be custom-process or codex-workflow.`);
|
|
114
|
+
}
|
|
115
|
+
if (!Array.isArray(row.command) || row.command.length === 0 ||
|
|
116
|
+
row.command.some((entry) => typeof entry !== 'string' || entry.trim() === '' || entry.includes('\0')))
|
|
117
|
+
throw new Error(`${label}.command must be a non-empty array of non-empty strings.`);
|
|
118
|
+
const executable = row.command[0];
|
|
119
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/u.test(executable)) {
|
|
120
|
+
throw new Error(`${label}.command[0] must be a bare system executable name.`);
|
|
121
|
+
}
|
|
122
|
+
for (const [index, argument] of row.command.entries()) {
|
|
123
|
+
if (index === 0)
|
|
124
|
+
continue;
|
|
125
|
+
if (argument.includes('\\')
|
|
126
|
+
|| path.posix.isAbsolute(argument)
|
|
127
|
+
|| path.win32.isAbsolute(argument)
|
|
128
|
+
|| /(?:^|[=/])\.\.(?:[=/]|$)/u.test(argument)
|
|
129
|
+
|| /(?:^|=)(?:\/|[A-Za-z]:\/)/u.test(argument))
|
|
130
|
+
throw new Error(`${label}.command[${index}] must not escape the Skill eval directory.`);
|
|
131
|
+
}
|
|
132
|
+
if (row.type === 'custom-process') {
|
|
133
|
+
return { type: 'custom-process', command: row.command };
|
|
134
|
+
}
|
|
135
|
+
if (!Array.isArray(row.allowedModels)) {
|
|
136
|
+
throw new Error(`${label}.allowedModels must be an array.`);
|
|
137
|
+
}
|
|
138
|
+
const allowedModels = row.allowedModels.map((entry, index) => {
|
|
139
|
+
if (typeof entry !== 'string' || entry.trim() === '') {
|
|
140
|
+
throw new Error(`${label}.allowedModels[${index}] must be a non-empty string.`);
|
|
141
|
+
}
|
|
142
|
+
return entry;
|
|
143
|
+
});
|
|
144
|
+
if (new Set(allowedModels).size !== allowedModels.length) {
|
|
145
|
+
throw new Error(`${label}.allowedModels must contain unique values.`);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
type: 'codex-workflow',
|
|
149
|
+
command: row.command,
|
|
150
|
+
allowedModels,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function looksLikeLocalPath(value) {
|
|
154
|
+
return value.startsWith('./')
|
|
155
|
+
|| value.includes('/')
|
|
156
|
+
|| /\.(?:cjs|js|json|mjs|py|sh|ts)$/u.test(value);
|
|
157
|
+
}
|
|
158
|
+
async function assertSafeAsset(root, relative, label) {
|
|
159
|
+
const target = path.resolve(root, relative);
|
|
160
|
+
const relation = path.relative(root, target);
|
|
161
|
+
if (relation === '..' || relation.startsWith(`..${path.sep}`) || path.isAbsolute(relation)) {
|
|
162
|
+
throw new Error(`${label} must stay inside the Skill eval directory.`);
|
|
163
|
+
}
|
|
164
|
+
let current = path.resolve(root);
|
|
165
|
+
for (const segment of relation.split(path.sep).filter(Boolean)) {
|
|
166
|
+
current = path.join(current, segment);
|
|
167
|
+
const info = await fs.lstat(current).catch(() => null);
|
|
168
|
+
if (!info)
|
|
169
|
+
throw new Error(`${label} does not exist.`);
|
|
170
|
+
if (info.isSymbolicLink())
|
|
171
|
+
throw new Error(`${label} must not contain symbolic links.`);
|
|
172
|
+
}
|
|
173
|
+
const info = await fs.lstat(target);
|
|
174
|
+
if (!info.isFile() && !info.isDirectory()) {
|
|
175
|
+
throw new Error(`${label} must be a regular file or directory.`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export async function resolveAwSkillEvalCustomCommand(evalRoot, provider) {
|
|
179
|
+
const command = [...provider.command];
|
|
180
|
+
const localArguments = new Map();
|
|
181
|
+
for (let index = 1; index < command.length; index += 1) {
|
|
182
|
+
const value = command[index];
|
|
183
|
+
const assignment = value.indexOf('=');
|
|
184
|
+
const prefix = assignment === -1 ? '' : value.slice(0, assignment + 1);
|
|
185
|
+
const candidate = assignment === -1 ? value : value.slice(assignment + 1);
|
|
186
|
+
const normalized = candidate.replace(/^\.\//u, '');
|
|
187
|
+
const exists = await fs.pathExists(path.join(evalRoot, normalized));
|
|
188
|
+
if (!looksLikeLocalPath(candidate) && !exists)
|
|
189
|
+
continue;
|
|
190
|
+
if (normalized === ''
|
|
191
|
+
|| normalized.includes('\\')
|
|
192
|
+
|| path.posix.isAbsolute(normalized)
|
|
193
|
+
|| path.win32.isAbsolute(normalized)
|
|
194
|
+
|| path.posix.normalize(normalized) !== normalized
|
|
195
|
+
|| normalized.split('/').includes('..'))
|
|
196
|
+
throw new Error(`custom provider command[${index}] must be a normalized Eval-local path.`);
|
|
197
|
+
await assertSafeAsset(evalRoot, normalized, `custom provider command[${index}]`);
|
|
198
|
+
localArguments.set(index, { prefix, relative: normalized });
|
|
199
|
+
}
|
|
200
|
+
return { command, localArguments };
|
|
201
|
+
}
|
|
202
|
+
function parseSuites(value, profileIds) {
|
|
203
|
+
if (!Array.isArray(value) || value.length === 0)
|
|
204
|
+
throw new Error('eval manifest.suites must be a non-empty array.');
|
|
205
|
+
const suites = value.map((entry, index) => {
|
|
206
|
+
const label = `eval manifest.suites[${index}]`;
|
|
207
|
+
const row = record(entry, label);
|
|
208
|
+
onlyKeys(row, [
|
|
209
|
+
'id', 'kind', 'cases', 'profiles', 'runs', 'timeoutMs', 'requiredForRelease',
|
|
210
|
+
'releaseSplits', 'releaseProcessManagement', 'provider',
|
|
211
|
+
], label);
|
|
212
|
+
const id = safeId(row.id, `${label}.id`);
|
|
213
|
+
if (row.kind !== 'trigger'
|
|
214
|
+
&& row.kind !== 'conversation'
|
|
215
|
+
&& row.kind !== 'custom-process'
|
|
216
|
+
&& row.kind !== 'codex-workflow') {
|
|
217
|
+
throw new Error(`${label}.kind must be trigger, conversation, custom-process, or codex-workflow.`);
|
|
218
|
+
}
|
|
219
|
+
const profiles = row.profiles === undefined ? undefined : safeIdArray(row.profiles, `${label}.profiles`);
|
|
220
|
+
const unknownProfile = profiles?.find((profile) => !profileIds.has(profile));
|
|
221
|
+
if (unknownProfile)
|
|
222
|
+
throw new Error(`${label} references unknown profile ${JSON.stringify(unknownProfile)}.`);
|
|
223
|
+
if (row.requiredForRelease !== undefined && typeof row.requiredForRelease !== 'boolean') {
|
|
224
|
+
throw new Error(`${label}.requiredForRelease must be boolean.`);
|
|
225
|
+
}
|
|
226
|
+
const releaseSplits = row.releaseSplits === undefined
|
|
227
|
+
? undefined
|
|
228
|
+
: safeIdArray(row.releaseSplits, `${label}.releaseSplits`, true);
|
|
229
|
+
if (row.releaseProcessManagement !== undefined
|
|
230
|
+
&& row.releaseProcessManagement !== 'managed-only'
|
|
231
|
+
&& row.releaseProcessManagement !== 'allow-unmanaged-confirmed') {
|
|
232
|
+
throw new Error(`${label}.releaseProcessManagement must be managed-only or allow-unmanaged-confirmed.`);
|
|
233
|
+
}
|
|
234
|
+
const provider = row.provider === undefined ? undefined : parseProvider(row.provider, `${label}.provider`);
|
|
235
|
+
if ((row.kind === 'custom-process' || row.kind === 'codex-workflow') && !provider) {
|
|
236
|
+
throw new Error(`${label} ${row.kind} requires provider.`);
|
|
237
|
+
}
|
|
238
|
+
if (provider && provider.type !== row.kind) {
|
|
239
|
+
throw new Error(`${label} provider.type must match suite kind.`);
|
|
240
|
+
}
|
|
241
|
+
if (row.kind !== 'custom-process' && row.kind !== 'codex-workflow' && provider) {
|
|
242
|
+
throw new Error(`${label} built-in kind must not declare provider.`);
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
id,
|
|
246
|
+
kind: row.kind,
|
|
247
|
+
cases: relativePath(row.cases, `${label}.cases`),
|
|
248
|
+
...(profiles ? { profiles } : {}),
|
|
249
|
+
...(row.runs === undefined ? {} : { runs: positiveInteger(row.runs, `${label}.runs`) }),
|
|
250
|
+
...(row.timeoutMs === undefined
|
|
251
|
+
? {}
|
|
252
|
+
: { timeoutMs: positiveInteger(row.timeoutMs, `${label}.timeoutMs`) }),
|
|
253
|
+
...(row.requiredForRelease === undefined ? {} : { requiredForRelease: row.requiredForRelease }),
|
|
254
|
+
...(releaseSplits ? { releaseSplits } : {}),
|
|
255
|
+
...(row.releaseProcessManagement === undefined
|
|
256
|
+
? {}
|
|
257
|
+
: { releaseProcessManagement: row.releaseProcessManagement }),
|
|
258
|
+
...(provider ? { provider } : {}),
|
|
259
|
+
};
|
|
260
|
+
});
|
|
261
|
+
if (new Set(suites.map((suite) => suite.id)).size !== suites.length) {
|
|
262
|
+
throw new Error('eval manifest.suites must contain unique ids.');
|
|
263
|
+
}
|
|
264
|
+
return suites;
|
|
265
|
+
}
|
|
266
|
+
export async function readAwSkillEvalManifest(options) {
|
|
267
|
+
const skill = safeId(options.skill, 'selected Skill');
|
|
268
|
+
const skillRoot = path.join(options.plugin.rootDir, 'skills', skill);
|
|
269
|
+
const evalRoot = path.join(skillRoot, 'evals');
|
|
270
|
+
const manifestPath = await assertSafeFile(evalRoot, 'manifest.json', 'eval manifest');
|
|
271
|
+
const raw = record(await fs.readJson(manifestPath), 'eval manifest');
|
|
272
|
+
onlyKeys(raw, ['version', 'defaults', 'profiles', 'suites'], 'eval manifest');
|
|
273
|
+
if (raw.version !== 1)
|
|
274
|
+
throw new Error('eval manifest.version must be 1.');
|
|
275
|
+
const defaults = parseDefaults(raw.defaults);
|
|
276
|
+
const profiles = parseProfiles(raw.profiles, options.plugin.manifest.name);
|
|
277
|
+
if (defaults.profile && !profiles.some((profile) => profile.id === defaults.profile)) {
|
|
278
|
+
throw new Error('eval manifest.defaults.profile references an unknown profile.');
|
|
279
|
+
}
|
|
280
|
+
const suites = parseSuites(raw.suites, new Set(profiles.map((profile) => profile.id)));
|
|
281
|
+
const ownsDynamicSkill = (options.plugin.manifest.artifacts?.targets ?? []).some((target) => (target.target === 'codex.skill' || target.target === 'claude.skill')
|
|
282
|
+
&& target.skillKey === skill);
|
|
283
|
+
if (ownsDynamicSkill && !suites.some((suite) => suite.requiredForRelease)) {
|
|
284
|
+
throw new Error(`eval manifest.suites must include at least one release-required suite for dynamic Skill "${skill}".`);
|
|
285
|
+
}
|
|
286
|
+
const casesBySuite = new Map();
|
|
287
|
+
for (const suite of suites) {
|
|
288
|
+
if (suite.provider)
|
|
289
|
+
await resolveAwSkillEvalCustomCommand(evalRoot, suite.provider);
|
|
290
|
+
const casesPath = await assertSafeFile(evalRoot, suite.cases, `eval suite ${JSON.stringify(suite.id)} cases`);
|
|
291
|
+
const document = parseSelectedCases(await fs.readJson(casesPath));
|
|
292
|
+
if (document.suite.kind !== suite.kind) {
|
|
293
|
+
throw new Error(`eval suite ${JSON.stringify(suite.id)} kind does not match its case corpus.`);
|
|
294
|
+
}
|
|
295
|
+
if (document.suite.unitUnderTest !== skill) {
|
|
296
|
+
throw new Error(`eval suite ${JSON.stringify(suite.id)} unitUnderTest must match selected Skill ${JSON.stringify(skill)}.`);
|
|
297
|
+
}
|
|
298
|
+
casesBySuite.set(suite.id, document);
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
manifest: { version: 1, defaults, profiles, suites },
|
|
302
|
+
skillRoot,
|
|
303
|
+
evalRoot,
|
|
304
|
+
manifestPath,
|
|
305
|
+
casesBySuite,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
export async function validateAwSkillEvalManifest(options) {
|
|
309
|
+
try {
|
|
310
|
+
const result = await readAwSkillEvalManifest(options);
|
|
311
|
+
return { valid: true, errors: [], manifest: result.manifest };
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
return {
|
|
315
|
+
valid: false,
|
|
316
|
+
errors: [error instanceof Error ? error.message : String(error)],
|
|
317
|
+
manifest: null,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
export function assertNoSensitiveProfileConfig(profile, plugins) {
|
|
322
|
+
const byName = new Map(plugins.map((plugin) => [plugin.manifest.name, plugin]));
|
|
323
|
+
for (const installation of profile.plugins) {
|
|
324
|
+
const plugin = byName.get(installation.name);
|
|
325
|
+
if (!plugin)
|
|
326
|
+
throw new Error(`Eval profile "${profile.id}" references unknown plugin "${installation.name}".`);
|
|
327
|
+
for (const [key, field] of Object.entries(plugin.manifest.config?.fields ?? {})) {
|
|
328
|
+
if (!Object.hasOwn(installation.config, key))
|
|
329
|
+
continue;
|
|
330
|
+
if (field.sensitive === true) {
|
|
331
|
+
throw new Error(`Eval profile "${profile.id}" provides a sensitive config field for plugin "${installation.name}".`);
|
|
332
|
+
}
|
|
333
|
+
const value = installation.config[key];
|
|
334
|
+
if (field.type !== 'object' || value === null || typeof value !== 'object' || Array.isArray(value))
|
|
335
|
+
continue;
|
|
336
|
+
for (const property of Object.keys(value)) {
|
|
337
|
+
const child = field.properties !== undefined && Object.hasOwn(field.properties, property)
|
|
338
|
+
? field.properties[property]
|
|
339
|
+
: field.additionalProperties === false ? undefined : field.additionalProperties;
|
|
340
|
+
if (child?.sensitive === true) {
|
|
341
|
+
throw new Error(`Eval profile "${profile.id}" provides a sensitive config field for plugin "${installation.name}".`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=manifest-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-v1.js","sourceRoot":"","sources":["../../../src/eval/manifest-v1.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EACL,kBAAkB,GAGnB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,MAAM,UAAU,CAAA;AA8CzB,SAAS,MAAM,CAAC,KAAc,EAAE,KAAa;IAC3C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KA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AAE,SAAQ;YACtD,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CAAC,iBAAiB,OAAO,CAAC,EAAE,mDAAmD,YAAY,CAAC,IAAI,IAAI,CAAC,CAAA;YACtH,CAAC;YACD,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACtC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAAE,SAAQ;YAC5G,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC;oBACvF,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;oBAC5B,CAAC,CAAC,KAAK,CAAC,oBAAoB,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAA;gBACjF,IAAI,KAAK,EAAE,SAAS,KAAK,IAAI,EAAE,CAAC;oBAC9B,MAAM,IAAI,KAAK,CAAC,iBAAiB,OAAO,CAAC,EAAE,mDAAmD,YAAY,CAAC,IAAI,IAAI,CAAC,CAAA;gBACtH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AgentDefinition, PlatformName } from '../types.js';
|
|
2
|
+
import type { GeneratedTextArtifact } from './instructions.js';
|
|
3
|
+
export declare function generateAgentArtifacts(pluginName: string, agents: AgentDefinition[], platform: PlatformName): GeneratedTextArtifact[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { buildGeneratedName } from './shared.js';
|
|
2
|
+
function renderTomlString(value) {
|
|
3
|
+
const trimmed = value.trim();
|
|
4
|
+
if (trimmed.includes('\n')) {
|
|
5
|
+
const escaped = trimmed
|
|
6
|
+
.replace(/\\/g, '\\\\')
|
|
7
|
+
.replace(/"""/g, '\\"\\"\\"');
|
|
8
|
+
return `"""\n${escaped}\n"""`;
|
|
9
|
+
}
|
|
10
|
+
return JSON.stringify(trimmed);
|
|
11
|
+
}
|
|
12
|
+
export function generateAgentArtifacts(pluginName, agents, platform) {
|
|
13
|
+
return agents.map((agent) => {
|
|
14
|
+
const generatedName = buildGeneratedName(pluginName, agent.name);
|
|
15
|
+
if (platform === 'codex') {
|
|
16
|
+
return {
|
|
17
|
+
relativePath: `agents/${generatedName}.toml`,
|
|
18
|
+
artifactKey: generatedName,
|
|
19
|
+
content: [
|
|
20
|
+
`name = ${renderTomlString(agent.name)}`,
|
|
21
|
+
`description = ${renderTomlString(agent.description)}`,
|
|
22
|
+
`developer_instructions = ${renderTomlString(agent.prompt)}`,
|
|
23
|
+
'',
|
|
24
|
+
].join('\n'),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const lines = [
|
|
28
|
+
'---',
|
|
29
|
+
`name: ${JSON.stringify(agent.name)}`,
|
|
30
|
+
`description: ${JSON.stringify(agent.description)}`,
|
|
31
|
+
...(agent.tools && agent.tools.length > 0
|
|
32
|
+
? ['tools:', ...agent.tools.map((tool) => ` - ${tool}`)]
|
|
33
|
+
: []),
|
|
34
|
+
'---',
|
|
35
|
+
'',
|
|
36
|
+
agent.prompt.trim(),
|
|
37
|
+
'',
|
|
38
|
+
];
|
|
39
|
+
return {
|
|
40
|
+
relativePath: `agents/${generatedName}.md`,
|
|
41
|
+
artifactKey: generatedName,
|
|
42
|
+
content: lines.join('\n'),
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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AAS,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACnD,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;gBACvC,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;gBACzD,CAAC,CAAC,EAAE,CAAC;YACP,KAAK;YACL,EAAE;YACF,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;YACnB,EAAE;SACH,CAAC;QACF,OAAO;YACL,YAAY,EAAE,UAAU,aAAa,KAAK;YAC1C,WAAW,EAAE,aAAa;YAC1B,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;SAC1B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HookDefinition, PlatformName, RenderedHooksManifest, TrackedHookGroupIdentity } from '../types.js';
|
|
2
|
+
import { type ResolvedPlatformHookDefinition } from '../utils/hooks-contract.js';
|
|
3
|
+
export interface RenderedHooksArtifact {
|
|
4
|
+
relativePath: string;
|
|
5
|
+
content: RenderedHooksManifest;
|
|
6
|
+
}
|
|
7
|
+
export interface CodexHookBundle {
|
|
8
|
+
pluginName: string;
|
|
9
|
+
hooks: ResolvedPlatformHookDefinition[];
|
|
10
|
+
}
|
|
11
|
+
export declare function renderResolvedHooksArtifact(hooks: ResolvedPlatformHookDefinition[], platform: PlatformName): RenderedHooksArtifact | null;
|
|
12
|
+
export declare function renderHooksArtifact(hooks: HookDefinition[], platform: PlatformName): RenderedHooksArtifact | null;
|
|
13
|
+
export declare function extractCodexHookGroups(hooks: ResolvedPlatformHookDefinition[]): TrackedHookGroupIdentity[];
|
|
14
|
+
export declare function renderCodexHookGroups(groups: TrackedHookGroupIdentity[]): RenderedHooksArtifact | null;
|
|
15
|
+
export declare function renderCodexHooks(bundles: CodexHookBundle[]): RenderedHooksArtifact | null;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { normalizePublicHookDefinition, normalizeRenderedHookGroupIdentity, renderHookDefinitionGroup, renderTrackedHookGroupIdentity, serializeTrackedHookGroupIdentity, } from '../utils/hooks-contract.js';
|
|
2
|
+
function sortRenderedHookGroups(groups, platform) {
|
|
3
|
+
return [...groups].sort((left, right) => {
|
|
4
|
+
const leftIdentity = normalizeRenderedHookGroupIdentity({
|
|
5
|
+
platform,
|
|
6
|
+
event: left.event,
|
|
7
|
+
matcher: left.matcher,
|
|
8
|
+
command: left.hooks[0].command,
|
|
9
|
+
});
|
|
10
|
+
const rightIdentity = normalizeRenderedHookGroupIdentity({
|
|
11
|
+
platform,
|
|
12
|
+
event: right.event,
|
|
13
|
+
matcher: right.matcher,
|
|
14
|
+
command: right.hooks[0].command,
|
|
15
|
+
});
|
|
16
|
+
return serializeTrackedHookGroupIdentity(leftIdentity).localeCompare(serializeTrackedHookGroupIdentity(rightIdentity));
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function renderGroupedHooks(groups, platform) {
|
|
20
|
+
const hooks = {};
|
|
21
|
+
for (const group of sortRenderedHookGroups(groups, platform)) {
|
|
22
|
+
hooks[group.event] ??= [];
|
|
23
|
+
hooks[group.event].push({
|
|
24
|
+
...(group.matcher === undefined ? {} : { matcher: group.matcher }),
|
|
25
|
+
hooks: group.hooks,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return hooks;
|
|
29
|
+
}
|
|
30
|
+
export function renderResolvedHooksArtifact(hooks, platform) {
|
|
31
|
+
if (hooks.length === 0) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
if (platform === 'codex') {
|
|
35
|
+
return renderCodexHooks([{ pluginName: 'aw', hooks }]);
|
|
36
|
+
}
|
|
37
|
+
const renderedGroups = hooks.map((hook) => renderHookDefinitionGroup(hook, 'claude'));
|
|
38
|
+
return {
|
|
39
|
+
relativePath: 'hooks/hooks.json',
|
|
40
|
+
content: {
|
|
41
|
+
hooks: renderGroupedHooks(renderedGroups, 'claude'),
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function renderHooksArtifact(hooks, platform) {
|
|
46
|
+
return renderResolvedHooksArtifact(hooks.map((hook) => normalizePublicHookDefinition(hook)), platform);
|
|
47
|
+
}
|
|
48
|
+
export function extractCodexHookGroups(hooks) {
|
|
49
|
+
return hooks.map((hook) => {
|
|
50
|
+
const renderedGroup = renderHookDefinitionGroup(hook, 'codex');
|
|
51
|
+
return normalizeRenderedHookGroupIdentity({
|
|
52
|
+
platform: 'codex',
|
|
53
|
+
event: renderedGroup.event,
|
|
54
|
+
matcher: renderedGroup.matcher,
|
|
55
|
+
command: renderedGroup.hooks[0].command,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export function renderCodexHookGroups(groups) {
|
|
60
|
+
if (groups.length === 0) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const renderedGroups = groups.map((group) => renderTrackedHookGroupIdentity(group));
|
|
64
|
+
return {
|
|
65
|
+
relativePath: 'hooks.json',
|
|
66
|
+
content: {
|
|
67
|
+
hooks: renderGroupedHooks(renderedGroups, 'codex'),
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export function renderCodexHooks(bundles) {
|
|
72
|
+
return renderCodexHookGroups(bundles
|
|
73
|
+
.sort((left, right) => left.pluginName.localeCompare(right.pluginName))
|
|
74
|
+
.flatMap((bundle) => extractCodexHookGroups(bundle.hooks)));
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/generators/hooks.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,yBAAyB,EAC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qB,CACnC,MAAkC;IAElC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAC;IACpF,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE;YACP,KAAK,EAAE,kBAAkB,CAAC,cAAc,EAAE,OAAO,CAAC;SACnD;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,OAA0B;IAE1B,OAAO,qBAAqB,CAC1B,OAAO;SACJ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;SACtE,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,sBAAsB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { InstructionDefinition, PlatformName } from '../types.js';
|
|
2
|
+
export interface GeneratedTextArtifact {
|
|
3
|
+
relativePath: string;
|
|
4
|
+
content: string;
|
|
5
|
+
artifactKey?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CodexInstructionBundle {
|
|
8
|
+
pluginName: string;
|
|
9
|
+
instructions: InstructionDefinition[];
|
|
10
|
+
}
|
|
11
|
+
export declare function renderCodexManagedInstructionBlock(pluginName: string, instructions: InstructionDefinition[]): string;
|
|
12
|
+
export declare function renderCodexInstructions(bundles: CodexInstructionBundle[]): string | null;
|
|
13
|
+
export declare function generateInstructionArtifacts(pluginName: string, instructions: InstructionDefinition[], platform: PlatformName): GeneratedTextArtifact[];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { buildGeneratedName } from './shared.js';
|
|
2
|
+
function renderClaudePathsFrontmatter(paths) {
|
|
3
|
+
if (!paths?.length) {
|
|
4
|
+
return '';
|
|
5
|
+
}
|
|
6
|
+
const renderedPaths = paths.map((entry) => ` - ${entry}`).join('\n');
|
|
7
|
+
return `---\npaths:\n${renderedPaths}\n---\n\n`;
|
|
8
|
+
}
|
|
9
|
+
function renderCodexInstructionSection(pluginName, instructions) {
|
|
10
|
+
const lines = [
|
|
11
|
+
`## ${pluginName}`,
|
|
12
|
+
];
|
|
13
|
+
for (const instruction of instructions) {
|
|
14
|
+
lines.push('', `### ${instruction.title}`, '', instruction.content.trim());
|
|
15
|
+
if (instruction.paths?.length) {
|
|
16
|
+
lines.push('', `适用路径:${instruction.paths.join(', ')}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return lines;
|
|
20
|
+
}
|
|
21
|
+
export function renderCodexManagedInstructionBlock(pluginName, instructions) {
|
|
22
|
+
return renderCodexInstructionSection(pluginName, instructions).join('\n').trim();
|
|
23
|
+
}
|
|
24
|
+
export function renderCodexInstructions(bundles) {
|
|
25
|
+
const populatedBundles = bundles
|
|
26
|
+
.filter((bundle) => bundle.instructions.length > 0)
|
|
27
|
+
.sort((left, right) => left.pluginName.localeCompare(right.pluginName));
|
|
28
|
+
if (populatedBundles.length === 0) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const lines = [
|
|
32
|
+
'# Agent Workflows',
|
|
33
|
+
'',
|
|
34
|
+
'以下内容由 `@lesliechan721/aw` 从中立指令模型生成。',
|
|
35
|
+
];
|
|
36
|
+
for (const bundle of populatedBundles) {
|
|
37
|
+
lines.push('', ...renderCodexInstructionSection(bundle.pluginName, bundle.instructions));
|
|
38
|
+
}
|
|
39
|
+
return `${lines.join('\n')}\n`;
|
|
40
|
+
}
|
|
41
|
+
export function generateInstructionArtifacts(pluginName, instructions, platform) {
|
|
42
|
+
if (instructions.length === 0) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
if (platform === 'codex') {
|
|
46
|
+
const content = renderCodexInstructions([{ pluginName, instructions }]);
|
|
47
|
+
if (!content) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
relativePath: 'AGENTS.md',
|
|
53
|
+
content,
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
return instructions.map((instruction) => {
|
|
58
|
+
const generatedName = buildGeneratedName(pluginName, instruction.name);
|
|
59
|
+
return {
|
|
60
|
+
relativePath: `rules/${generatedName}.md`,
|
|
61
|
+
artifactKey: generatedName,
|
|
62
|
+
content: `${renderClaudePathsFrontmatter(instruction.paths)}# ${instruction.title}\n\n${instruction.content.trim()}\n`,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/generators/instructions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAajD,SAAS,4BAA4B,CAAC,KAA2B;IAC/D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,OAAO,gBAAgB,aAAa,WAAW,CAAC;AAClD,CAAC;AAED,SAAS,6BAA6B,CACpC,UAAkB,EAClB,YAAqC;IAErC,MAAM,KAAK,GAAa;QACtB,MAAM,UAAU,EAAE;KACnB,CAAC;IAEF,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,E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