@lesliechan721/aw 0.1.0-beta.14 → 0.1.0-beta.16

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.
Files changed (49) hide show
  1. package/dist/src/commands/aw-capabilities.d.ts +1 -1
  2. package/dist/src/commands/aw-capabilities.js +1 -0
  3. package/dist/src/commands/aw-capabilities.js.map +1 -1
  4. package/dist/src/commands/review-inspection.d.ts +169 -0
  5. package/dist/src/commands/review-inspection.js +916 -0
  6. package/dist/src/commands/review-inspection.js.map +1 -0
  7. package/dist/src/commands/skill-eval.d.ts +5 -0
  8. package/dist/src/commands/skill-eval.js +86 -63
  9. package/dist/src/commands/skill-eval.js.map +1 -1
  10. package/dist/src/commands/status-v6.d.ts +2 -1
  11. package/dist/src/commands/status-v6.js +7 -1
  12. package/dist/src/commands/status-v6.js.map +1 -1
  13. package/dist/src/eval/manifest-v1.js +0 -5
  14. package/dist/src/eval/manifest-v1.js.map +1 -1
  15. package/dist/src/index.js +39 -6
  16. package/dist/src/index.js.map +1 -1
  17. package/dist/src/portable/commands.d.ts +1 -0
  18. package/dist/src/portable/commands.js +43 -1
  19. package/dist/src/portable/commands.js.map +1 -1
  20. package/dist/src/portable/materializer.d.ts +12 -0
  21. package/dist/src/portable/materializer.js +67 -41
  22. package/dist/src/portable/materializer.js.map +1 -1
  23. package/dist/src/review/eval-source-input.d.ts +43 -0
  24. package/dist/src/review/eval-source-input.js +207 -0
  25. package/dist/src/review/eval-source-input.js.map +1 -0
  26. package/dist/src/review/source-binding.d.ts +170 -0
  27. package/dist/src/review/source-binding.js +622 -0
  28. package/dist/src/review/source-binding.js.map +1 -0
  29. package/dist/src/tui/console-app-v4.js +523 -133
  30. package/dist/src/tui/console-app-v4.js.map +1 -1
  31. package/dist/src/tui/controller-runtime.js +59 -37
  32. package/dist/src/tui/controller-runtime.js.map +1 -1
  33. package/dist/src/tui/controller.d.ts +15 -1
  34. package/dist/src/tui/controller.js +86 -3
  35. package/dist/src/tui/controller.js.map +1 -1
  36. package/dist/src/tui/model.js +2 -3
  37. package/dist/src/tui/model.js.map +1 -1
  38. package/dist/src/tui/operation-review-planner.js +22 -1
  39. package/dist/src/tui/operation-review-planner.js.map +1 -1
  40. package/dist/src/tui/plugin-write-task.d.ts +2 -1
  41. package/dist/src/tui/plugin-write-task.js +17 -0
  42. package/dist/src/tui/plugin-write-task.js.map +1 -1
  43. package/dist/src/tui/router.d.ts +1 -0
  44. package/dist/src/tui/router.js +13 -5
  45. package/dist/src/tui/router.js.map +1 -1
  46. package/dist/src/tui/screen-registry.d.ts +21 -1
  47. package/dist/src/tui/screen-registry.js +5 -1
  48. package/dist/src/tui/screen-registry.js.map +1 -1
  49. package/package.json +3 -3
package/dist/src/index.js CHANGED
@@ -36,6 +36,7 @@ import { withAwHomeMutationLock, } from './utils/aw-home-mutation-lock.js';
36
36
  import { installPortableSkills, materializePortableSkillsToDirectory, PortableCommandError, renderPortableReview, } from './portable/commands.js';
37
37
  import { SkillsCliError } from './portable/skills-cli.js';
38
38
  import { computeReviewComponentDigest, listReviewRecords, parseReviewAttachment, publishReviewRecord, showReviewRecord, verifyReviewRecord, } from './commands/review-publication.js';
39
+ import { createReviewInspectionFailure, inspectReviewTarget, } from './commands/review-inspection.js';
39
40
  import { resolveRepoRoot } from './utils/state-paths.js';
40
41
  import { runCatalogBuildCommand, runCatalogInitCommand, runCatalogValidateCommand, runCatalogVersionCommand, runPluginBuildCommand, runPluginTestCommand, } from './authoring/workspace-commands.js';
41
42
  import { runCatalogPublishApplyCommand, runCatalogPublishPlanCommand, } from './commands/catalog-publish.js';
@@ -1188,6 +1189,32 @@ export function buildProgram(options = {}) {
1188
1189
  recordDir: reviewRecordDir(repoRoot, record),
1189
1190
  manifest: record.manifest,
1190
1191
  });
1192
+ review
1193
+ .command('inspect')
1194
+ .description('Inspect current AW Review source and materialization facts')
1195
+ .argument('<target>', 'canonical Catalog Workspace or Plugin path')
1196
+ .option('--workspace-root <root>', 'explicit Catalog Workspace root')
1197
+ .option('--materialization <receipt>', 'validate one aw-source-binding receipt', (value, previous) => [...previous, value], [])
1198
+ .requiredOption('--json', 'emit one Review inspection JSON object')
1199
+ .action(async (target, rawOptions) => {
1200
+ try {
1201
+ const receipt = await inspectReviewTarget({
1202
+ cwd,
1203
+ target,
1204
+ ...(rawOptions.workspaceRoot === undefined
1205
+ ? {}
1206
+ : { workspaceRoot: rawOptions.workspaceRoot }),
1207
+ materializations: rawOptions.materialization.map((entry) => path.resolve(cwd, entry)),
1208
+ env,
1209
+ });
1210
+ writeJsonReceipt(io.stdout, receipt);
1211
+ commandExitState.exitCode = receipt.ok ? 0 : 1;
1212
+ }
1213
+ catch (error) {
1214
+ writeJsonReceipt(io.stdout, createReviewInspectionFailure(error));
1215
+ commandExitState.exitCode = 1;
1216
+ }
1217
+ });
1191
1218
  review
1192
1219
  .command('digest')
1193
1220
  .description('Compute one canonical workflow component digest')
@@ -3201,7 +3228,8 @@ export async function runCli(argv, options = {}) {
3201
3228
  };
3202
3229
  const jsonAuthoringCommand = argv.includes('--json')
3203
3230
  && ((argv[0] === 'catalog' && ['init', 'context', 'version', 'build', 'validate', 'status', 'publish'].includes(argv[1] ?? ''))
3204
- || (argv[0] === 'plugin' && ['build', 'test', 'validate', 'status', 'remove'].includes(argv[1] ?? '')))
3231
+ || (argv[0] === 'plugin' && ['build', 'test', 'validate', 'status', 'remove'].includes(argv[1] ?? ''))
3232
+ || (argv[0] === 'review' && argv[1] === 'inspect'))
3205
3233
  ? `${argv[0]}:${argv[1]}`
3206
3234
  : null;
3207
3235
  const jsonCatalogDevCommand = argv.includes('--json')
@@ -3462,6 +3490,9 @@ export async function runCli(argv, options = {}) {
3462
3490
  errors: [{ code: 'workspaceResolutionFailed', message }],
3463
3491
  });
3464
3492
  }
3493
+ else if (jsonAuthoringCommand === 'review:inspect') {
3494
+ writeJsonReceipt(io.stdout, createReviewInspectionFailure(error));
3495
+ }
3465
3496
  else {
3466
3497
  writeJsonReceipt(io.stdout, {
3467
3498
  command: jsonAuthoringCommand,
@@ -3472,11 +3503,13 @@ export async function runCli(argv, options = {}) {
3472
3503
  return 1;
3473
3504
  }
3474
3505
  if (jsonAuthoringCommand && error instanceof CommanderError) {
3475
- writeJsonReceipt(io.stdout, {
3476
- command: jsonAuthoringCommand,
3477
- ok: false,
3478
- errors: [{ code: 'invalidArguments', message: error.message }],
3479
- });
3506
+ writeJsonReceipt(io.stdout, jsonAuthoringCommand === 'review:inspect'
3507
+ ? createReviewInspectionFailure(error, 'invalidArguments')
3508
+ : {
3509
+ command: jsonAuthoringCommand,
3510
+ ok: false,
3511
+ errors: [{ code: 'invalidArguments', message: error.message }],
3512
+ });
3480
3513
  }
3481
3514
  return handleCliError(error, io.stderr);
3482
3515
  }