@lesliechan721/aw 0.1.0-beta.54 → 0.1.0-beta.56
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/scripts/lib/plugin-version-check.mjs +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +208 -31
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/bundle-plugins.js +8 -3
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/src/adapters/helpers.d.ts +7 -0
- package/dist/src/adapters/helpers.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +2 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/managed-commands.d.ts +26 -0
- package/dist/src/commands/managed-commands.js +277 -0
- package/dist/src/commands/managed-commands.js.map +1 -0
- package/dist/src/commands/operation-plan.d.ts +30 -1
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/operation-planner.d.ts +1 -0
- package/dist/src/commands/operation-planner.js +1 -0
- package/dist/src/commands/operation-planner.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +29 -1
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +2 -1
- package/dist/src/commands/rebuild-command.js +66 -26
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +13 -1
- package/dist/src/commands/rebuild-integration.js +535 -61
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +3 -1
- package/dist/src/commands/rebuild-operations.js +9 -5
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/generators/local-plugin.js +16 -0
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/generators/permissions.d.ts +5 -2
- package/dist/src/generators/permissions.js +28 -15
- package/dist/src/generators/permissions.js.map +1 -1
- package/dist/src/index.js +11 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.d.ts +3 -1
- package/dist/src/output/command-receipt.js +30 -9
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +14 -0
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/portable/materializer.js +3 -0
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/review/skill-materialization.d.ts +14 -1
- package/dist/src/review/skill-materialization.js +138 -0
- package/dist/src/review/skill-materialization.js.map +1 -1
- package/dist/src/tui/console-app-v4.js +19 -7
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +23 -9
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +5 -1
- package/dist/src/tui/controller.js +24 -3
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/diagnostic-projection.js +34 -6
- package/dist/src/tui/diagnostic-projection.js.map +1 -1
- package/dist/src/tui/operation-review-planner.js +102 -16
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/types.d.ts +22 -2
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +4 -3
- package/dist/src/utils/artifact-plan.js +50 -7
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +7 -3
- package/dist/src/utils/artifact-renderer.js +19 -6
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +16 -5
- package/dist/src/utils/artifact-request.js +27 -15
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/artifact-sources.d.ts +4 -0
- package/dist/src/utils/artifact-sources.js +17 -0
- package/dist/src/utils/artifact-sources.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +7 -0
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/claude-skills-root.d.ts +8 -0
- package/dist/src/utils/claude-skills-root.js +76 -0
- package/dist/src/utils/claude-skills-root.js.map +1 -0
- package/dist/src/utils/codex-skills-root.d.ts +4 -0
- package/dist/src/utils/codex-skills-root.js +25 -0
- package/dist/src/utils/codex-skills-root.js.map +1 -0
- package/dist/src/utils/dynamic-skill-tree.d.ts +1 -0
- package/dist/src/utils/dynamic-skill-tree.js +25 -6
- package/dist/src/utils/dynamic-skill-tree.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +9 -0
- package/dist/src/utils/local-marketplace.js +170 -90
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/managed-command-closure.d.ts +3 -0
- package/dist/src/utils/managed-command-closure.js +35 -0
- package/dist/src/utils/managed-command-closure.js.map +1 -0
- package/dist/src/utils/managed-command-evidence.d.ts +7 -0
- package/dist/src/utils/managed-command-evidence.js +86 -0
- package/dist/src/utils/managed-command-evidence.js.map +1 -0
- package/dist/src/utils/managed-command-materialization.d.ts +106 -0
- package/dist/src/utils/managed-command-materialization.js +307 -0
- package/dist/src/utils/managed-command-materialization.js.map +1 -0
- package/dist/src/utils/managed-command-runtime.d.ts +32 -0
- package/dist/src/utils/managed-command-runtime.js +110 -0
- package/dist/src/utils/managed-command-runtime.js.map +1 -0
- package/dist/src/utils/managed-command-store.d.ts +124 -0
- package/dist/src/utils/managed-command-store.js +576 -0
- package/dist/src/utils/managed-command-store.js.map +1 -0
- package/dist/src/utils/ownership.d.ts +2 -0
- package/dist/src/utils/plugin-config-impact.d.ts +8 -1
- package/dist/src/utils/plugin-config-impact.js +101 -26
- package/dist/src/utils/plugin-config-impact.js.map +1 -1
- package/dist/src/utils/plugin-config-write.js +142 -60
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/rendered-contract.js +18 -1
- package/dist/src/utils/rendered-contract.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConfigReferenceContext, ConfigReferenceDraft } from './config-references.js';
|
|
2
|
-
import type { CatalogActivationMode, CatalogSource, CatalogGenerationActiveV1, CatalogGenerationCandidateEvidence, CatalogGenerationSyncResult, CatalogSourceImpact, DependencyScopeOverride, PlatformName, Scope } from '../types.js';
|
|
2
|
+
import type { CatalogActivationMode, CatalogSource, CatalogGenerationActiveV1, CatalogGenerationCandidateEvidence, CatalogGenerationSyncResult, CatalogSourceImpact, CommandProducerResult, DependencyScopeOverride, PlatformName, Scope } from '../types.js';
|
|
3
3
|
import type { PortableReview, PortableInstallReceipt, PortableRetryReview } from '../portable/commands.js';
|
|
4
4
|
import type { CatalogSourceUpdate } from '../utils/catalog-sources.js';
|
|
5
5
|
import type { CatalogGenerationFreshnessState, CatalogGenerationFreshnessResult } from '../utils/catalog-generation-service.js';
|
|
@@ -8,6 +8,7 @@ import type { ReconcileOperationPlan } from '../commands/reconcile-operation-pla
|
|
|
8
8
|
import type { PreApplyAuthorizationTarget, RebuildCommandResult } from '../commands/rebuild-command.js';
|
|
9
9
|
import type { OfflineCleanupTargetEvidence } from '../commands/offline-cleanup-evidence.js';
|
|
10
10
|
import type { CodexReconcilePlan } from '../utils/codex-reconciler.js';
|
|
11
|
+
import type { PluginConfigMutationImpact } from '../utils/plugin-config-impact.js';
|
|
11
12
|
import type { OperationPlan } from '../commands/operation-plan.js';
|
|
12
13
|
import type { RebuildProgressFeed, RebuildProgressSnapshot } from '../output/rebuild-progress.js';
|
|
13
14
|
import { type ConfigPageViewModel, type ConfigGroupViewModel, type InstallPlacementDraftViewModel, type PluginListItemViewModel, type PluginDependencyOverviewViewModel, type PortableSkillSelectionViewModel, type SourceHealthViewModel, type SourceDetailViewModel, type TuiViewModel, type UserIssueCategory, type UserIssueViewModel } from './model.js';
|
|
@@ -264,11 +265,13 @@ export interface ConfigOperationEvidence {
|
|
|
264
265
|
platform: PlatformName;
|
|
265
266
|
scope: Scope;
|
|
266
267
|
}>;
|
|
268
|
+
commandPackages?: PluginConfigMutationImpact['affectedCommandPackages'];
|
|
267
269
|
preApplyAuthorization?: PreApplyAuthorizationTarget[];
|
|
268
270
|
sharedNativeRenderTargets?: Array<{
|
|
269
271
|
id: string;
|
|
270
272
|
skillKey: string;
|
|
271
273
|
refreshKeys: string[];
|
|
274
|
+
platform?: PlatformName;
|
|
272
275
|
}>;
|
|
273
276
|
shareability?: 'verified' | 'unverified';
|
|
274
277
|
}
|
|
@@ -541,6 +544,7 @@ export interface OperationResultSummary {
|
|
|
541
544
|
changes?: string[];
|
|
542
545
|
warnings?: string[];
|
|
543
546
|
recoveryActions?: string[];
|
|
547
|
+
commandResults?: CommandProducerResult[];
|
|
544
548
|
planFingerprint?: string;
|
|
545
549
|
diagnosticIds?: string[];
|
|
546
550
|
effects?: OperationEffectFacts;
|
|
@@ -480,6 +480,11 @@ function sanitizeOperationSummary(summary, sensitiveValues) {
|
|
|
480
480
|
...(summary.changes ? { changes: summary.changes.map(text) } : {}),
|
|
481
481
|
...(summary.warnings ? { warnings: summary.warnings.map(text) } : {}),
|
|
482
482
|
...(summary.recoveryActions ? { recoveryActions: summary.recoveryActions.map(text) } : {}),
|
|
483
|
+
...(summary.commandResults ? { commandResults: summary.commandResults.map((result) => ({
|
|
484
|
+
...result,
|
|
485
|
+
errors: result.errors.map((error) => ({ ...error, message: text(error.message) })),
|
|
486
|
+
recoveryActions: result.recoveryActions.map(text),
|
|
487
|
+
})) } : {}),
|
|
483
488
|
...(summary.quarantineBasename ? { quarantineBasename: text(summary.quarantineBasename) } : {}),
|
|
484
489
|
...(summary.portable ? {
|
|
485
490
|
portable: {
|
|
@@ -3437,7 +3442,9 @@ export class TuiController {
|
|
|
3437
3442
|
const configImpact = configEvidence ? {
|
|
3438
3443
|
state: configEvidence.some((group) => group.impactState !== 'known') ? 'unknown' : 'known',
|
|
3439
3444
|
affectedTargetCount: new Set(configEvidence.flatMap((group) => group.affectedTargets
|
|
3440
|
-
.map((target) => `${target.platform}\0${target.scope}`))).size
|
|
3445
|
+
.map((target) => `${target.platform}\0${target.scope}`))).size
|
|
3446
|
+
+ new Set(configEvidence.flatMap((group) => (group.commandPackages ?? [])
|
|
3447
|
+
.map((target) => target.packageId))).size,
|
|
3441
3448
|
} : undefined;
|
|
3442
3449
|
const projection = buildOperationReviewProjection({
|
|
3443
3450
|
intent,
|
|
@@ -4464,14 +4471,19 @@ function operationResultSummaryUnsafe(intent, execution) {
|
|
|
4464
4471
|
|| root.state === 'kept' || root.state === 'partial').length;
|
|
4465
4472
|
const failedCount = roots.filter((root) => root.state === 'failed' || root.state === 'partial'
|
|
4466
4473
|
|| root.state === 'notStarted' || root.state === 'blocked').length;
|
|
4467
|
-
const
|
|
4474
|
+
const commandFailed = taskExecution.commandResults?.some((result) => result.state !== 'completed') === true;
|
|
4475
|
+
const code = failedCount === 0 && !commandFailed ? 'operationSucceeded'
|
|
4468
4476
|
: completedCount > 0 ? 'operationPartial' : 'operationFailed';
|
|
4469
4477
|
return {
|
|
4470
4478
|
code,
|
|
4471
4479
|
message: code === 'operationSucceeded' ? '任务已完成。'
|
|
4472
4480
|
: code === 'operationPartial' ? '任务只完成了一部分。' : '任务没有完成。',
|
|
4473
4481
|
warnings: taskExecution.warnings,
|
|
4474
|
-
recoveryActions: [...new Set(
|
|
4482
|
+
recoveryActions: [...new Set([
|
|
4483
|
+
...taskExecution.targetResults.flatMap((entry) => entry.recoveryActions ?? []),
|
|
4484
|
+
...(taskExecution.commandResults ?? []).flatMap((result) => result.recoveryActions),
|
|
4485
|
+
])],
|
|
4486
|
+
...(taskExecution.commandResults ? { commandResults: taskExecution.commandResults } : {}),
|
|
4475
4487
|
...(taskExecution.operationPlan?.planFingerprint
|
|
4476
4488
|
? { planFingerprint: taskExecution.operationPlan.planFingerprint } : {}),
|
|
4477
4489
|
task: {
|
|
@@ -4615,6 +4627,7 @@ function operationResultSummaryUnsafe(intent, execution) {
|
|
|
4615
4627
|
requiredBy: entry.requiredBy,
|
|
4616
4628
|
...(entry.errorCode ? { errorCode: safeDiagnosticCode(entry.errorCode, 'writeFailed') } : {}),
|
|
4617
4629
|
})),
|
|
4630
|
+
...(result.commandResults ? { commandResults: result.commandResults } : {}),
|
|
4618
4631
|
};
|
|
4619
4632
|
}
|
|
4620
4633
|
if (intent.kind === 'configSaveBatch') {
|
|
@@ -4657,6 +4670,10 @@ function operationResultSummaryUnsafe(intent, execution) {
|
|
|
4657
4670
|
applyStatus: group.applyStatus,
|
|
4658
4671
|
...(group.errorCode ? { errorCode: safeDiagnosticCode(group.errorCode, 'configWriteFailed') } : {}),
|
|
4659
4672
|
})),
|
|
4673
|
+
commandResults: batch.groups.flatMap((group) => group.execution
|
|
4674
|
+
&& typeof group.execution === 'object'
|
|
4675
|
+
? (group.execution.apply?.commandResults ?? [])
|
|
4676
|
+
: []),
|
|
4660
4677
|
messages: [
|
|
4661
4678
|
...batch.groups.map((group) => {
|
|
4662
4679
|
const label = group.scope === 'project' ? '当前项目' : '个人默认';
|
|
@@ -4682,6 +4699,8 @@ function operationResultSummaryUnsafe(intent, execution) {
|
|
|
4682
4699
|
const rawTargets = Array.isArray(rawApply.targetResults)
|
|
4683
4700
|
? rawApply.targetResults
|
|
4684
4701
|
: [];
|
|
4702
|
+
const commandResults = Array.isArray(rawApply.commandResults)
|
|
4703
|
+
? rawApply.commandResults : [];
|
|
4685
4704
|
const targets = rawTargets.flatMap((entry) => {
|
|
4686
4705
|
const target = typeof entry.target === 'object' && entry.target !== null
|
|
4687
4706
|
? entry.target
|
|
@@ -4764,6 +4783,8 @@ function operationResultSummaryUnsafe(intent, execution) {
|
|
|
4764
4783
|
}
|
|
4765
4784
|
: {}),
|
|
4766
4785
|
...(targets.length > 0 ? { targets } : {}),
|
|
4786
|
+
...(commandResults.length > 0 ? { commandResults,
|
|
4787
|
+
recoveryActions: [...new Set(commandResults.flatMap((result) => result.recoveryActions))] } : {}),
|
|
4767
4788
|
};
|
|
4768
4789
|
}
|
|
4769
4790
|
const sourceWarnings = intent.kind === 'sourceMutation'
|