@lesliechan721/aw 0.1.0-beta.73 → 0.1.0-beta.74
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-runtime-config.mjs +65 -43
- package/dist/authoring/assets/aw-runtime-config.mjs.map +1 -1
- package/dist/authoring/scripts/add-skill.mjs +5 -14
- package/dist/authoring/scripts/add-skill.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +4 -28
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +2 -2
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/lib/skill-scaffold.mjs +0 -1
- package/dist/authoring/scripts/lib/skill-scaffold.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +234 -1422
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/aw-skill-eval-materializer.d.ts +2 -0
- package/dist/scripts/aw-skill-eval-materializer.js +19 -80
- package/dist/scripts/aw-skill-eval-materializer.js.map +1 -1
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/test-plugin-scripts.js +6 -8
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +2 -2
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/dependency-operation-plan.js +3 -3
- package/dist/src/commands/dependency-operation-plan.js.map +1 -1
- package/dist/src/commands/deployment-confirmation.d.ts +4 -0
- package/dist/src/commands/deployment-confirmation.js +20 -0
- package/dist/src/commands/deployment-confirmation.js.map +1 -0
- package/dist/src/commands/managed-commands.js +4 -2
- package/dist/src/commands/managed-commands.js.map +1 -1
- package/dist/src/commands/offline-cleanup-evidence.d.ts +3 -1
- package/dist/src/commands/offline-cleanup-evidence.js +9 -4
- package/dist/src/commands/offline-cleanup-evidence.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +6 -0
- package/dist/src/commands/operation-plan.js +29 -2
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/options.d.ts +6 -2
- package/dist/src/commands/options.js +5 -4
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +29 -41
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/public-config-confirmation.js +5 -5
- package/dist/src/commands/public-config-confirmation.js.map +1 -1
- package/dist/src/commands/public-lifecycle-result.d.ts +47 -0
- package/dist/src/commands/public-lifecycle-result.js +119 -4
- package/dist/src/commands/public-lifecycle-result.js.map +1 -1
- package/dist/src/commands/public-lifecycle.d.ts +1 -0
- package/dist/src/commands/public-lifecycle.js +15 -2
- package/dist/src/commands/public-lifecycle.js.map +1 -1
- package/dist/src/commands/public-plugin-query.d.ts +1 -0
- package/dist/src/commands/public-plugin-query.js +28 -8
- package/dist/src/commands/public-plugin-query.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +12 -11
- package/dist/src/commands/rebuild-command.js +529 -769
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +21 -43
- package/dist/src/commands/rebuild-integration.js +306 -3600
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +13 -0
- package/dist/src/commands/rebuild-operations.js +60 -15
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/rebuild-platform-integration.d.ts +59 -0
- package/dist/src/commands/rebuild-platform-integration.js +1200 -0
- package/dist/src/commands/rebuild-platform-integration.js.map +1 -0
- package/dist/src/commands/review-inspection.js +41 -4
- package/dist/src/commands/review-inspection.js.map +1 -1
- package/dist/src/commands/review-preparation.d.ts +2 -0
- package/dist/src/commands/review-preparation.js +23 -60
- package/dist/src/commands/review-preparation.js.map +1 -1
- package/dist/src/commands/skill-eval.js +1 -0
- package/dist/src/commands/skill-eval.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +3 -1
- package/dist/src/commands/status-v6.js +24 -15
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/targets-command.d.ts +9 -0
- package/dist/src/commands/targets-command.js +57 -6
- package/dist/src/commands/targets-command.js.map +1 -1
- package/dist/src/commands/write-commands.js +43 -28
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/constants.d.ts +2 -2
- package/dist/src/constants.js +2 -2
- package/dist/src/constants.js.map +1 -1
- package/dist/src/generators/local-plugin.js +59 -248
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/index.js +40 -14
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.d.ts +1 -1
- package/dist/src/output/command-receipt.js +3 -1
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/native-consent.d.ts +2 -0
- package/dist/src/output/native-consent.js +5 -0
- package/dist/src/output/native-consent.js.map +1 -0
- package/dist/src/output/public-result.js +60 -0
- package/dist/src/output/public-result.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +5 -5
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/output/receipt-projection.js +19 -2
- package/dist/src/output/receipt-projection.js.map +1 -1
- package/dist/src/platforms/capabilities.d.ts +10 -0
- package/dist/src/platforms/capabilities.js +158 -0
- package/dist/src/platforms/capabilities.js.map +1 -0
- package/dist/src/platforms/contracts.d.ts +338 -0
- package/dist/src/platforms/contracts.js +2 -0
- package/dist/src/platforms/contracts.js.map +1 -0
- package/dist/src/platforms/cursor-workspace-hook.d.ts +22 -0
- package/dist/src/platforms/cursor-workspace-hook.js +185 -0
- package/dist/src/platforms/cursor-workspace-hook.js.map +1 -0
- package/dist/src/platforms/discovery.d.ts +74 -0
- package/dist/src/platforms/discovery.js +582 -0
- package/dist/src/platforms/discovery.js.map +1 -0
- package/dist/src/platforms/gemini-activation.d.ts +36 -0
- package/dist/src/platforms/gemini-activation.js +331 -0
- package/dist/src/platforms/gemini-activation.js.map +1 -0
- package/dist/src/platforms/gemini-consent.d.ts +8 -0
- package/dist/src/platforms/gemini-consent.js +79 -0
- package/dist/src/platforms/gemini-consent.js.map +1 -0
- package/dist/src/platforms/identity.d.ts +4 -0
- package/dist/src/platforms/identity.js +22 -0
- package/dist/src/platforms/identity.js.map +1 -0
- package/dist/src/platforms/inspection-grok.d.ts +4 -0
- package/dist/src/platforms/inspection-grok.js +173 -0
- package/dist/src/platforms/inspection-grok.js.map +1 -0
- package/dist/src/platforms/inspection-native.d.ts +6 -0
- package/dist/src/platforms/inspection-native.js +379 -0
- package/dist/src/platforms/inspection-native.js.map +1 -0
- package/dist/src/platforms/inspection-pi.d.ts +4 -0
- package/dist/src/platforms/inspection-pi.js +212 -0
- package/dist/src/platforms/inspection-pi.js.map +1 -0
- package/dist/src/platforms/inspection.d.ts +13 -0
- package/dist/src/platforms/inspection.js +189 -0
- package/dist/src/platforms/inspection.js.map +1 -0
- package/dist/src/platforms/layout.d.ts +21 -0
- package/dist/src/platforms/layout.js +239 -0
- package/dist/src/platforms/layout.js.map +1 -0
- package/dist/src/platforms/lifecycle-native-services.d.ts +3 -0
- package/dist/src/platforms/lifecycle-native-services.js +147 -0
- package/dist/src/platforms/lifecycle-native-services.js.map +1 -0
- package/dist/src/platforms/lifecycle-native.d.ts +9 -0
- package/dist/src/platforms/lifecycle-native.js +252 -0
- package/dist/src/platforms/lifecycle-native.js.map +1 -0
- package/dist/src/platforms/lifecycle.d.ts +25 -0
- package/dist/src/platforms/lifecycle.js +452 -0
- package/dist/src/platforms/lifecycle.js.map +1 -0
- package/dist/src/platforms/managed-command-placement.d.ts +8 -0
- package/dist/src/platforms/managed-command-placement.js +79 -0
- package/dist/src/platforms/managed-command-placement.js.map +1 -0
- package/dist/src/platforms/projection-code-extension.d.ts +8 -0
- package/dist/src/platforms/projection-code-extension.js +121 -0
- package/dist/src/platforms/projection-code-extension.js.map +1 -0
- package/dist/src/platforms/projection-command-resources.d.ts +7 -0
- package/dist/src/platforms/projection-command-resources.js +74 -0
- package/dist/src/platforms/projection-command-resources.js.map +1 -0
- package/dist/src/platforms/projection-files.d.ts +27 -0
- package/dist/src/platforms/projection-files.js +111 -0
- package/dist/src/platforms/projection-files.js.map +1 -0
- package/dist/src/platforms/projection-marketplace.d.ts +19 -0
- package/dist/src/platforms/projection-marketplace.js +42 -0
- package/dist/src/platforms/projection-marketplace.js.map +1 -0
- package/dist/src/platforms/projection.d.ts +10 -0
- package/dist/src/platforms/projection.js +446 -0
- package/dist/src/platforms/projection.js.map +1 -0
- package/dist/src/platforms/registry.d.ts +4 -0
- package/dist/src/platforms/registry.js +30 -0
- package/dist/src/platforms/registry.js.map +1 -0
- package/dist/src/platforms/supplement-layout.d.ts +16 -0
- package/dist/src/platforms/supplement-layout.js +31 -0
- package/dist/src/platforms/supplement-layout.js.map +1 -0
- package/dist/src/portable/commands.d.ts +7 -5
- package/dist/src/portable/commands.js +6 -1
- package/dist/src/portable/commands.js.map +1 -1
- package/dist/src/portable/materializer.d.ts +8 -6
- package/dist/src/portable/materializer.js +47 -245
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/portable/recovery-layout.js +2 -15
- package/dist/src/portable/recovery-layout.js.map +1 -1
- package/dist/src/portable/recovery.d.ts +10 -1
- package/dist/src/portable/recovery.js +34 -8
- package/dist/src/portable/recovery.js.map +1 -1
- package/dist/src/recovery/coordinator.d.ts +4 -7
- package/dist/src/recovery/coordinator.js +151 -119
- package/dist/src/recovery/coordinator.js.map +1 -1
- package/dist/src/recovery/demand.d.ts +1 -1
- package/dist/src/recovery/demand.js +10 -42
- package/dist/src/recovery/demand.js.map +1 -1
- package/dist/src/recovery/joint-coordinator.js +112 -52
- package/dist/src/recovery/joint-coordinator.js.map +1 -1
- package/dist/src/recovery/joint-demand.d.ts +4 -22
- package/dist/src/recovery/joint-demand.js +43 -40
- package/dist/src/recovery/joint-demand.js.map +1 -1
- package/dist/src/recovery/receipt.d.ts +23 -8
- package/dist/src/recovery/retirement.d.ts +1 -1
- package/dist/src/recovery/retirement.js +122 -29
- package/dist/src/recovery/retirement.js.map +1 -1
- package/dist/src/recovery/status.d.ts +13 -6
- package/dist/src/recovery/status.js +479 -79
- package/dist/src/recovery/status.js.map +1 -1
- package/dist/src/recovery/types.d.ts +3 -3
- package/dist/src/review/platform-profile.d.ts +3 -0
- package/dist/src/review/platform-profile.js +16 -0
- package/dist/src/review/platform-profile.js.map +1 -0
- package/dist/src/review/review-profile.d.ts +1 -0
- package/dist/src/review/review-profile.js +8 -2
- package/dist/src/review/review-profile.js.map +1 -1
- package/dist/src/review/review-selection.d.ts +2 -11
- package/dist/src/review/review-selection.js +97 -71
- package/dist/src/review/review-selection.js.map +1 -1
- package/dist/src/review/review-types.d.ts +3 -0
- package/dist/src/review/review-types.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +44 -9
- package/dist/src/review/skill-materialization.js +112 -136
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/review/source-binding.d.ts +8 -5
- package/dist/src/review/source-binding.js +99 -41
- package/dist/src/review/source-binding.js.map +1 -1
- package/dist/src/tui/agent-management.js +112 -10
- package/dist/src/tui/agent-management.js.map +1 -1
- package/dist/src/tui/agent-settings.d.ts +3 -0
- package/dist/src/tui/agent-settings.js +10 -11
- package/dist/src/tui/agent-settings.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +58 -20
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/content-item-card.js +2 -2
- package/dist/src/tui/content-item-card.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +198 -152
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +5 -9
- package/dist/src/tui/controller.js +40 -18
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/deployment-view.d.ts +10 -0
- package/dist/src/tui/deployment-view.js +91 -0
- package/dist/src/tui/deployment-view.js.map +1 -0
- package/dist/src/tui/glossary.js +4 -4
- package/dist/src/tui/glossary.js.map +1 -1
- package/dist/src/tui/model.d.ts +5 -0
- package/dist/src/tui/model.js +73 -12
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.js +2 -1
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-history.d.ts +5 -4
- package/dist/src/tui/operation-history.js.map +1 -1
- package/dist/src/tui/operation-review-planner.d.ts +7 -2
- package/dist/src/tui/operation-review-planner.js +97 -42
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/plugin-content.d.ts +5 -3
- package/dist/src/tui/plugin-content.js +70 -508
- package/dist/src/tui/plugin-content.js.map +1 -1
- package/dist/src/tui/plugin-detail.d.ts +3 -2
- package/dist/src/tui/plugin-detail.js +33 -25
- package/dist/src/tui/plugin-detail.js.map +1 -1
- package/dist/src/tui/scoped-inventory.d.ts +10 -6
- package/dist/src/tui/scoped-inventory.js +34 -1
- package/dist/src/tui/scoped-inventory.js.map +1 -1
- package/dist/src/types.d.ts +4 -63
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.d.ts +10 -4
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +26 -2
- package/dist/src/utils/artifact-plan.js +113 -489
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +100 -93
- package/dist/src/utils/artifact-renderer.js +173 -346
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +21 -11
- package/dist/src/utils/artifact-request.js +56 -80
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +30 -146
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-digests.d.ts +2 -12
- package/dist/src/utils/catalog-digests.js +0 -39
- package/dist/src/utils/catalog-digests.js.map +1 -1
- package/dist/src/utils/catalog-source-references.d.ts +7 -0
- package/dist/src/utils/catalog-source-references.js +234 -19
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/codex-config-observation.d.ts +19 -0
- package/dist/src/utils/codex-config-observation.js +145 -0
- package/dist/src/utils/codex-config-observation.js.map +1 -0
- package/dist/src/utils/codex-executable-discovery.d.ts +2 -0
- package/dist/src/utils/codex-executable-discovery.js +47 -13
- package/dist/src/utils/codex-executable-discovery.js.map +1 -1
- package/dist/src/utils/codex-manager.js +1 -1
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +3 -0
- package/dist/src/utils/codex-native-observation.js +53 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +3 -1
- package/dist/src/utils/codex-shared-native.js +46 -5
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- package/dist/src/utils/codex-skill-staging.d.ts +4 -3
- package/dist/src/utils/codex-skill-staging.js.map +1 -1
- package/dist/src/utils/codex-surface-analysis.d.ts +5 -2
- package/dist/src/utils/codex-surface-analysis.js +28 -57
- package/dist/src/utils/codex-surface-analysis.js.map +1 -1
- package/dist/src/utils/component-command-preparation.d.ts +34 -0
- package/dist/src/utils/component-command-preparation.js +228 -0
- package/dist/src/utils/component-command-preparation.js.map +1 -0
- package/dist/src/utils/component-resources.d.ts +43 -0
- package/dist/src/utils/component-resources.js +304 -0
- package/dist/src/utils/component-resources.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +17 -6
- package/dist/src/utils/dynamic-skill-tree.js +7 -3
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +11 -44
- package/dist/src/utils/local-marketplace.js +11 -638
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-evidence.d.ts +2 -2
- package/dist/src/utils/managed-command-evidence.js +5 -81
- package/dist/src/utils/managed-command-evidence.js.map +1 -1
- package/dist/src/utils/managed-command-materialization.d.ts +5 -2
- package/dist/src/utils/managed-command-materialization.js +35 -35
- package/dist/src/utils/managed-command-materialization.js.map +1 -1
- package/dist/src/utils/managed-command-preparation.d.ts +67 -0
- package/dist/src/utils/managed-command-preparation.js +146 -0
- package/dist/src/utils/managed-command-preparation.js.map +1 -0
- package/dist/src/utils/managed-command-review.d.ts +26 -0
- package/dist/src/utils/managed-command-review.js +68 -0
- package/dist/src/utils/managed-command-review.js.map +1 -0
- package/dist/src/utils/managed-command-store.js +26 -15
- package/dist/src/utils/managed-command-store.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +19 -0
- package/dist/src/utils/native-cli.js +45 -2
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/native-demand.d.ts +20 -1
- package/dist/src/utils/native-demand.js.map +1 -1
- package/dist/src/utils/native-tool-review.d.ts +3 -6
- package/dist/src/utils/native-tool-review.js +25 -11
- package/dist/src/utils/native-tool-review.js.map +1 -1
- package/dist/src/utils/ownership.d.ts +26 -3
- package/dist/src/utils/ownership.js +95 -9
- package/dist/src/utils/ownership.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +2 -0
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/platform-empty-state.d.ts +46 -0
- package/dist/src/utils/platform-empty-state.js +123 -0
- package/dist/src/utils/platform-empty-state.js.map +1 -0
- package/dist/src/utils/plugin-config-impact.d.ts +17 -11
- package/dist/src/utils/plugin-config-impact.js +46 -62
- package/dist/src/utils/plugin-config-impact.js.map +1 -1
- package/dist/src/utils/plugin-config-write.js +52 -53
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +0 -2
- package/dist/src/utils/plugin-config.js +0 -6
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-dependencies.d.ts +1 -1
- package/dist/src/utils/plugin-dependencies.js.map +1 -1
- package/dist/src/utils/runtime-config.d.ts +5 -7
- package/dist/src/utils/runtime-config.js +12 -25
- package/dist/src/utils/runtime-config.js.map +1 -1
- package/dist/src/utils/windows-npm-shim.js +19 -2
- package/dist/src/utils/windows-npm-shim.js.map +1 -1
- package/package.json +3 -3
- package/dist/src/utils/claude-native-render-receipt.d.ts +0 -14
- package/dist/src/utils/claude-native-render-receipt.js +0 -26
- package/dist/src/utils/claude-native-render-receipt.js.map +0 -1
- package/dist/src/utils/claude-skills-root.d.ts +0 -8
- package/dist/src/utils/claude-skills-root.js +0 -87
- package/dist/src/utils/claude-skills-root.js.map +0 -1
- package/dist/src/utils/codex-native-render-receipt.d.ts +0 -40
- package/dist/src/utils/codex-native-render-receipt.js +0 -205
- package/dist/src/utils/codex-native-render-receipt.js.map +0 -1
- package/dist/src/utils/slash-commands.d.ts +0 -1
- package/dist/src/utils/slash-commands.js +0 -2
- package/dist/src/utils/slash-commands.js.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ManagedCommandReference } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import type { RenderUnit } from '../platforms/contracts.js';
|
|
3
|
+
import type { PlatformTarget, PluginMeta } from '../types.js';
|
|
4
|
+
import type { PreparedPlatformComponents } from './artifact-renderer.js';
|
|
5
|
+
import { type DynamicSkillTree } from './dynamic-skill-tree.js';
|
|
6
|
+
import { prepareManagedCommandPackage, type ManagedCommandCandidate } from './managed-command-materialization.js';
|
|
7
|
+
import { type ManagedCommandSkillProducerResolution } from './managed-command-preparation.js';
|
|
8
|
+
export interface FinalizedPlatformComponents {
|
|
9
|
+
prepared: PreparedPlatformComponents;
|
|
10
|
+
commandCandidates: ManagedCommandCandidate[];
|
|
11
|
+
producerResolutions: ManagedCommandSkillProducerResolution[];
|
|
12
|
+
commandResolver?: (reference: ManagedCommandReference) => string;
|
|
13
|
+
skills: Array<{
|
|
14
|
+
componentId: string;
|
|
15
|
+
resourceRoot: string;
|
|
16
|
+
tree: DynamicSkillTree;
|
|
17
|
+
}>;
|
|
18
|
+
cleanup(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/** Prepare command bindings and AW runtime files against one already computed component set. */
|
|
21
|
+
export declare function finalizePlatformSkillProducers(options: {
|
|
22
|
+
plugin: PluginMeta;
|
|
23
|
+
plugins?: readonly PluginMeta[];
|
|
24
|
+
platform: PlatformTarget;
|
|
25
|
+
renderUnit: Pick<RenderUnit, 'physicalKey' | 'renderScope' | 'kinds'>;
|
|
26
|
+
prepared: PreparedPlatformComponents;
|
|
27
|
+
skillWorkRoot: string;
|
|
28
|
+
cwd: string;
|
|
29
|
+
env: NodeJS.ProcessEnv;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
scriptTimeoutMs?: number;
|
|
32
|
+
/** An operation-owned cache. Its owner retains and cleans roots after every consumer completes. */
|
|
33
|
+
packagePreparationCache?: Map<string, Promise<Awaited<ReturnType<typeof prepareManagedCommandPackage>>>>;
|
|
34
|
+
}): Promise<FinalizedPlatformComponents>;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { computeCanonicalDirectoryDigest } from '@lesliechan721/agent-skill-eval';
|
|
5
|
+
import { createAwPluginRequirementsReceipt, createRuntimeConfigOrigin, COMMAND_PRODUCER_RECORD_FILE, getCommandPackageId, normalizeInstalledCommandProducer, parseManagedCommandPlaceholders, validatePortableSkillName, resolveInvocationPolicy, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
6
|
+
import { artifactValueDigest } from './artifact-plan.js';
|
|
7
|
+
import { writeDynamicSkillTree } from './dynamic-skill-tree.js';
|
|
8
|
+
import { createManagedCommandReferenceResolver, injectNativeToolClosureFiles, managedCommandProducerIdentity, prepareManagedCommandPackage, resolveSkillManagedCommandReferences, } from './managed-command-materialization.js';
|
|
9
|
+
import { prepareAgentCommandSets, resolveManagedCommandSkillProducers } from './managed-command-preparation.js';
|
|
10
|
+
import { readSafeOperationError } from './safe-operation-diagnostic.js';
|
|
11
|
+
import { injectInstalledRuntimeConfig } from './runtime-config.js';
|
|
12
|
+
import { validateRuntimeSkillClosure } from './runtime-skill-closure.js';
|
|
13
|
+
/** Prepare command bindings and AW runtime files against one already computed component set. */
|
|
14
|
+
export async function finalizePlatformSkillProducers(options) {
|
|
15
|
+
if (!options.renderUnit.kinds.includes('skill')) {
|
|
16
|
+
return { prepared: options.prepared, commandCandidates: [], producerResolutions: [], skills: [], cleanup: async () => { } };
|
|
17
|
+
}
|
|
18
|
+
const skills = [];
|
|
19
|
+
const cleanupPackages = [];
|
|
20
|
+
const commandCandidates = [];
|
|
21
|
+
const producerResolutions = [];
|
|
22
|
+
const skillCandidates = new Map();
|
|
23
|
+
const unavailableProducers = [];
|
|
24
|
+
const blockedSkills = new Set();
|
|
25
|
+
const commandResources = [];
|
|
26
|
+
try {
|
|
27
|
+
for (const component of options.prepared.expected.components) {
|
|
28
|
+
if (component.kind !== 'skill')
|
|
29
|
+
continue;
|
|
30
|
+
validatePortableSkillName(component.name, 'Skill component name');
|
|
31
|
+
const files = options.prepared.resources.files.filter((file) => file.componentId === component.id);
|
|
32
|
+
const tree = {
|
|
33
|
+
skillKey: component.name,
|
|
34
|
+
files: Object.fromEntries(files.map((file) => [file.path, Buffer.from(file.bytes)])),
|
|
35
|
+
fileModes: Object.fromEntries(files.filter((file) => (file.mode ?? 0) & 0o111).map((file) => [file.path, 0o755])),
|
|
36
|
+
};
|
|
37
|
+
const resourceRoot = path.join(options.skillWorkRoot, component.name);
|
|
38
|
+
await writeDynamicSkillTree(resourceRoot, tree);
|
|
39
|
+
skills.push({ componentId: component.id, resourceRoot, tree });
|
|
40
|
+
}
|
|
41
|
+
if (options.platform !== 'generic') {
|
|
42
|
+
const resolved = await resolveManagedCommandSkillProducers({
|
|
43
|
+
...options,
|
|
44
|
+
platform: options.platform,
|
|
45
|
+
components: options.prepared.expected,
|
|
46
|
+
skillResources: skills.map((skill) => ({ ...skill, physicalKey: options.renderUnit.physicalKey })),
|
|
47
|
+
dynamicScopeOffered: options.plugin.manifest.artifacts?.scopes?.includes(options.renderUnit.renderScope.kind) ?? true,
|
|
48
|
+
});
|
|
49
|
+
producerResolutions.push(...resolved);
|
|
50
|
+
for (const producer of resolved) {
|
|
51
|
+
if (producer.state !== 'ready') {
|
|
52
|
+
unavailableProducers.push(producer.producer);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const candidate = await prepareAgentCommandSets({
|
|
57
|
+
...options, resolved: producer, referencePlugins: options.plugins,
|
|
58
|
+
});
|
|
59
|
+
commandCandidates.push(candidate);
|
|
60
|
+
skillCandidates.set(producer.componentId, candidate);
|
|
61
|
+
commandResources.push({ producer: candidate.producer, resourceRoot: candidate.resourceRoot });
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
options.signal?.throwIfAborted();
|
|
65
|
+
if (readSafeOperationError(error))
|
|
66
|
+
throw error;
|
|
67
|
+
producerResolutions[producerResolutions.indexOf(producer)] = { ...producer, state: 'failed',
|
|
68
|
+
error: error instanceof Error ? error : new Error('commandReferenceInvalid: Skill command preparation failed.') };
|
|
69
|
+
unavailableProducers.push(producer.producer);
|
|
70
|
+
blockedSkills.add(producer.componentId);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const references = skills.filter((skill) => !blockedSkills.has(skill.componentId)).flatMap(({ tree }) => Object.entries(tree.files)
|
|
75
|
+
.filter(([file]) => file.endsWith('.md'))
|
|
76
|
+
.flatMap(([, bytes]) => parseManagedCommandPlaceholders(bytes.toString('utf8'))));
|
|
77
|
+
if (references.length && !options.plugin.manifest.requires?.aw.capabilities?.includes('aw.managed-commands.v1')) {
|
|
78
|
+
throw new Error('commandReferenceInvalid: Managed command references require aw.managed-commands.v1.');
|
|
79
|
+
}
|
|
80
|
+
if (references.length && options.platform === 'generic') {
|
|
81
|
+
throw new Error('commandReferenceInvalid: Generic Skills cannot bind native managed commands.');
|
|
82
|
+
}
|
|
83
|
+
const permissions = resolveInvocationPolicy(options.plugin.manifest, options.platform).permissions;
|
|
84
|
+
const permissionReferences = permissions.flatMap((permission) => [
|
|
85
|
+
...(permission.allow ?? []), ...(permission.ask ?? []), ...(permission.deny ?? []),
|
|
86
|
+
...(permission.sandbox?.excludedCommands ?? []),
|
|
87
|
+
]).flatMap((entry) => typeof entry === 'string' ? [] : [entry.command]);
|
|
88
|
+
const referencedPackages = new Set([...references.map(({ reference }) => reference), ...permissionReferences].flatMap((reference) => {
|
|
89
|
+
const set = options.plugin.manifest.managedCommands?.sets.find((set) => set.set === reference.set);
|
|
90
|
+
if (!set)
|
|
91
|
+
throw new Error('commandReferenceInvalid: The command set is not declared by this plugin.');
|
|
92
|
+
return set.producer.kind === 'package' ? [set.producer.packageKey] : [];
|
|
93
|
+
}));
|
|
94
|
+
for (const packageKey of referencedPackages) {
|
|
95
|
+
if (options.platform === 'generic')
|
|
96
|
+
throw new Error('commandReferenceInvalid: Generic Skills cannot bind native command packages.');
|
|
97
|
+
const declaration = options.plugin.manifest.managedCommands?.packages.find((entry) => entry.key === packageKey);
|
|
98
|
+
if (!declaration?.platforms.includes(options.platform)
|
|
99
|
+
|| options.renderUnit.renderScope.kind === 'user' && declaration.scope === 'project') {
|
|
100
|
+
throw new Error('commandReferenceInvalid: The command package is unavailable to this consumer.');
|
|
101
|
+
}
|
|
102
|
+
const identity = await managedCommandProducerIdentity({
|
|
103
|
+
...options, producer: { kind: 'package', packageKey }, scope: declaration.scope,
|
|
104
|
+
});
|
|
105
|
+
const cacheKey = getCommandPackageId(identity);
|
|
106
|
+
let preparation = options.packagePreparationCache?.get(cacheKey);
|
|
107
|
+
if (!preparation) {
|
|
108
|
+
preparation = prepareManagedCommandPackage({
|
|
109
|
+
...options, referencePlugins: options.plugins, packageKey, scope: declaration.scope, event: 'materialize',
|
|
110
|
+
});
|
|
111
|
+
options.packagePreparationCache?.set(cacheKey, preparation);
|
|
112
|
+
}
|
|
113
|
+
const candidate = await preparation;
|
|
114
|
+
if (!options.packagePreparationCache)
|
|
115
|
+
cleanupPackages.push(candidate.cleanup);
|
|
116
|
+
commandCandidates.push(candidate);
|
|
117
|
+
commandResources.push({ producer: candidate.producer, resourceRoot: candidate.resourceRoot });
|
|
118
|
+
}
|
|
119
|
+
const skillReferences = new Map(skills.map((skill) => [skill.componentId, Object.entries(skill.tree.files)
|
|
120
|
+
.filter(([file]) => file.endsWith('.md'))
|
|
121
|
+
.flatMap(([, bytes]) => parseManagedCommandPlaceholders(bytes.toString('utf8')).map(({ reference }) => reference))]));
|
|
122
|
+
let commandResolver;
|
|
123
|
+
let changed;
|
|
124
|
+
do {
|
|
125
|
+
changed = false;
|
|
126
|
+
commandResolver = options.platform === 'generic' ? undefined : await createManagedCommandReferenceResolver({
|
|
127
|
+
...options, platform: options.platform, scope: options.renderUnit.renderScope.kind, candidates: commandCandidates, unavailableProducers,
|
|
128
|
+
});
|
|
129
|
+
for (const skill of skills) {
|
|
130
|
+
if (blockedSkills.has(skill.componentId) || !commandResolver)
|
|
131
|
+
continue;
|
|
132
|
+
try {
|
|
133
|
+
for (const reference of skillReferences.get(skill.componentId) ?? [])
|
|
134
|
+
commandResolver(reference);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
blockedSkills.add(skill.componentId);
|
|
138
|
+
changed = true;
|
|
139
|
+
const candidate = skillCandidates.get(skill.componentId);
|
|
140
|
+
if (!candidate)
|
|
141
|
+
continue;
|
|
142
|
+
commandCandidates.splice(commandCandidates.indexOf(candidate), 1);
|
|
143
|
+
unavailableProducers.push(candidate.producer);
|
|
144
|
+
const index = producerResolutions.findIndex((producer) => producer.componentId === skill.componentId);
|
|
145
|
+
const producer = producerResolutions[index];
|
|
146
|
+
if (producer)
|
|
147
|
+
producerResolutions[index] = { ...producer, state: 'failed',
|
|
148
|
+
error: error instanceof Error ? error : new Error('commandReferenceInvalid: A required command is unavailable.') };
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
} while (changed);
|
|
152
|
+
const retainedSkills = skills.filter((skill) => !blockedSkills.has(skill.componentId));
|
|
153
|
+
if (commandResolver)
|
|
154
|
+
for (const { tree } of retainedSkills)
|
|
155
|
+
resolveSkillManagedCommandReferences(tree, commandResolver);
|
|
156
|
+
const receipt = Buffer.from(`${JSON.stringify(createAwPluginRequirementsReceipt({ name: options.plugin.manifest.name, version: options.plugin.manifest.version }, options.plugin.manifest.requires?.aw.capabilities ?? []), null, 2)}\n`);
|
|
157
|
+
const components = structuredClone(options.prepared.expected.components.filter((component) => !blockedSkills.has(component.id)));
|
|
158
|
+
const unmet = [...options.prepared.expected.unmet,
|
|
159
|
+
...options.prepared.expected.components.filter((component) => blockedSkills.has(component.id))
|
|
160
|
+
.map((component) => ({ id: component.id, kind: component.kind, name: component.name,
|
|
161
|
+
requiredFeatures: [], reasonCode: 'dependency-unmet' }))];
|
|
162
|
+
for (const skill of retainedSkills) {
|
|
163
|
+
const commandCandidate = skillCandidates.get(skill.componentId);
|
|
164
|
+
if (commandCandidate) {
|
|
165
|
+
const nativeTools = injectNativeToolClosureFiles(skill.tree.files, commandCandidate.nativeTools);
|
|
166
|
+
if (nativeTools)
|
|
167
|
+
commandCandidate.nativeTools = nativeTools;
|
|
168
|
+
const record = normalizeInstalledCommandProducer({ schemaVersion: 1,
|
|
169
|
+
producer: commandCandidate.producer, sets: commandCandidate.sets,
|
|
170
|
+
...(nativeTools ? { nativeTools } : {}),
|
|
171
|
+
});
|
|
172
|
+
skill.tree.files[COMMAND_PRODUCER_RECORD_FILE] = Buffer.from(`${JSON.stringify(record, null, 2)}\n`);
|
|
173
|
+
}
|
|
174
|
+
skill.tree.files['aw-plugin-requirements.json'] = receipt;
|
|
175
|
+
const snapshot = options.prepared.runtimeConfigSnapshots[skill.componentId];
|
|
176
|
+
await injectInstalledRuntimeConfig(skill.tree, snapshot, snapshot ? { origin: createRuntimeConfigOrigin({
|
|
177
|
+
snapshot, inputDigest: options.prepared.evidence.renderInputDigest,
|
|
178
|
+
}) } : {});
|
|
179
|
+
await fs.remove(skill.resourceRoot);
|
|
180
|
+
await writeDynamicSkillTree(skill.resourceRoot, skill.tree);
|
|
181
|
+
await validateRuntimeSkillClosure(skill.resourceRoot);
|
|
182
|
+
const component = components.find((component) => component.id === skill.componentId);
|
|
183
|
+
if (!component || component.kind !== 'skill')
|
|
184
|
+
throw new Error('componentSkillIdentityChanged');
|
|
185
|
+
component.content.files = Object.fromEntries(Object.keys(component.content.files).map((file) => {
|
|
186
|
+
const bytes = skill.tree.files[file];
|
|
187
|
+
const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
|
|
188
|
+
const resource = component.content.files[file];
|
|
189
|
+
return [file, resource && original?.bytes.equals(bytes) ? resource : { text: bytes.toString('utf8') }];
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
const files = [
|
|
193
|
+
...options.prepared.resources.files.filter((file) => !skills.some((skill) => skill.componentId === file.componentId)),
|
|
194
|
+
...retainedSkills.flatMap((skill) => Object.entries(skill.tree.files).map(([file, bytes]) => {
|
|
195
|
+
const original = options.prepared.resources.files.find((entry) => entry.componentId === skill.componentId && entry.path === file);
|
|
196
|
+
return {
|
|
197
|
+
componentId: skill.componentId, path: file, bytes,
|
|
198
|
+
...(original?.source && original.bytes.equals(bytes) ? { source: original.source } : {}),
|
|
199
|
+
mode: skill.tree.fileModes?.[file] ?? 0o644,
|
|
200
|
+
};
|
|
201
|
+
})),
|
|
202
|
+
];
|
|
203
|
+
const resourceDigest = artifactValueDigest({ inputDigest: options.prepared.resources.digest, files: files.map(({ componentId, path: file, bytes, mode }) => ({
|
|
204
|
+
componentId, path: file, digest: `sha256:${crypto.createHash('sha256').update(bytes).digest('hex')}`, mode,
|
|
205
|
+
})) });
|
|
206
|
+
const commands = await Promise.all(commandResources.filter((entry) => commandCandidates.some((candidate) => candidate.producer === entry.producer)).map(async (entry) => ({
|
|
207
|
+
producer: entry.producer,
|
|
208
|
+
resourceDigest: await computeCanonicalDirectoryDigest(entry.resourceRoot),
|
|
209
|
+
sets: commandCandidates.find((candidate) => candidate.producer === entry.producer)?.sets ?? [],
|
|
210
|
+
nativeTools: commandCandidates.find((candidate) => candidate.producer === entry.producer)?.nativeTools,
|
|
211
|
+
})));
|
|
212
|
+
const prepared = {
|
|
213
|
+
...options.prepared,
|
|
214
|
+
expected: { ...options.prepared.expected, components, unmet },
|
|
215
|
+
empty: components.length ? null : unmet.length ? 'unmet' : 'intentional',
|
|
216
|
+
resources: { ...options.prepared.resources, files, digest: resourceDigest },
|
|
217
|
+
evidence: { ...options.prepared.evidence, resourceDigest,
|
|
218
|
+
renderInputDigest: artifactValueDigest({ components: options.prepared.evidence.renderInputDigest, commands, unavailableProducers }),
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
return { prepared, skills: retainedSkills, commandCandidates, producerResolutions, ...(commandResolver ? { commandResolver } : {}), cleanup: async () => { await Promise.all(cleanupPackages.map((cleanup) => cleanup())); } };
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
await Promise.all(cleanupPackages.map((cleanup) => cleanup()));
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=component-command-preparation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-command-preparation.js","sourceRoot":"","sources":["../../../src/utils/component-command-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,iCAAiC,EACjC,yBAAyB,EACzB,4BAA4B,EAC5B,mBAAmB,EACnB,iCAAiC,EACjC,+BAA+B,EAC/B,yBAAyB,EACzB,uBAAuB,GAIxB,MAAM,wCAAwC,CAAC;AAIhD,O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CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;YACxE,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE;YAC3E,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc;gBACtD,iBAAiB,EAAE,mBAAmB,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;aACpI;SACF,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjO,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ExpectedComponentSet, type PlatformCapabilitiesV1, type PlatformRenderContextV1, type SourceRef } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
|
+
import type { PluginMeta } from '../types.js';
|
|
3
|
+
export interface VerifiedComponentFile {
|
|
4
|
+
componentId: string;
|
|
5
|
+
path: string;
|
|
6
|
+
bytes: Buffer;
|
|
7
|
+
source?: SourceRef;
|
|
8
|
+
mode?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface VerifiedResourceClosure {
|
|
11
|
+
resources: PlatformRenderContextV1['resources'];
|
|
12
|
+
files: VerifiedComponentFile[];
|
|
13
|
+
bundleFiles: Array<{
|
|
14
|
+
path: string;
|
|
15
|
+
bytes: Buffer;
|
|
16
|
+
mode?: number;
|
|
17
|
+
componentIds?: string[];
|
|
18
|
+
}>;
|
|
19
|
+
commandResources: VerifiedCommandResource[];
|
|
20
|
+
digest: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CommandResourceReference {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
path: string;
|
|
26
|
+
}
|
|
27
|
+
export interface VerifiedCommandResource extends CommandResourceReference {
|
|
28
|
+
componentId: string;
|
|
29
|
+
field: 'command' | 'args';
|
|
30
|
+
index?: number;
|
|
31
|
+
original: string;
|
|
32
|
+
}
|
|
33
|
+
/** Only literal package paths are portable. Shell expansion is not a resource declaration. */
|
|
34
|
+
export declare function commandResourceReferences(value: string, shell: boolean, platform: PlatformCapabilitiesV1['platform'], executable?: string): CommandResourceReference[];
|
|
35
|
+
export declare function resolvePlatformComponentResources(plugin: PluginMeta): Promise<PlatformRenderContextV1['resources']>;
|
|
36
|
+
export declare function verifyPlatformComponentResources(options: {
|
|
37
|
+
plugin: PluginMeta;
|
|
38
|
+
expected: ExpectedComponentSet;
|
|
39
|
+
resources: PlatformRenderContextV1['resources'];
|
|
40
|
+
capabilities: PlatformCapabilitiesV1;
|
|
41
|
+
sensitiveValues: readonly string[];
|
|
42
|
+
staticResourceRoot?: string;
|
|
43
|
+
}): Promise<VerifiedResourceClosure>;
|