@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.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/README.md +4 -5
- package/dist/bin/vat +95 -28
- package/dist/bin/vat.js +95 -28
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +115 -76
- package/dist/bin.js.map +1 -1
- package/dist/command-loaders.d.ts +44 -0
- package/dist/command-loaders.d.ts.map +1 -0
- package/dist/command-loaders.js +60 -0
- package/dist/command-loaders.js.map +1 -0
- package/dist/commands/agent/build.d.ts.map +1 -1
- package/dist/commands/agent/build.js +2 -1
- package/dist/commands/agent/build.js.map +1 -1
- package/dist/commands/agent/import.d.ts.map +1 -1
- package/dist/commands/agent/import.js +3 -2
- package/dist/commands/agent/import.js.map +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/agent/install-path.d.ts +36 -0
- package/dist/commands/agent/install-path.d.ts.map +1 -0
- package/dist/commands/agent/install-path.js +44 -0
- package/dist/commands/agent/install-path.js.map +1 -0
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +66 -13
- package/dist/commands/agent/install.js.map +1 -1
- package/dist/commands/agent/installed.d.ts.map +1 -1
- package/dist/commands/agent/installed.js +22 -12
- package/dist/commands/agent/installed.js.map +1 -1
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +2 -1
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/agent/run.d.ts.map +1 -1
- package/dist/commands/agent/run.js +2 -1
- package/dist/commands/agent/run.js.map +1 -1
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +13 -6
- package/dist/commands/agent/uninstall.js.map +1 -1
- package/dist/commands/agent/validate.d.ts.map +1 -1
- package/dist/commands/agent/validate.js +3 -2
- package/dist/commands/agent/validate.js.map +1 -1
- package/dist/commands/ard/emit.d.ts +153 -0
- package/dist/commands/ard/emit.d.ts.map +1 -0
- package/dist/commands/ard/emit.js +276 -0
- package/dist/commands/ard/emit.js.map +1 -0
- package/dist/commands/ard/index.d.ts +12 -0
- package/dist/commands/ard/index.d.ts.map +1 -0
- package/dist/commands/ard/index.js +80 -0
- package/dist/commands/ard/index.js.map +1 -0
- package/dist/commands/ard/surfaces.d.ts +56 -0
- package/dist/commands/ard/surfaces.d.ts.map +1 -0
- package/dist/commands/ard/surfaces.js +150 -0
- package/dist/commands/ard/surfaces.js.map +1 -0
- package/dist/commands/audit/distributed-tree.d.ts +2 -2
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
- package/dist/commands/audit/distributed-tree.js +11 -7
- package/dist/commands/audit/distributed-tree.js.map +1 -1
- package/dist/commands/audit/git-url-clone.d.ts +1 -1
- package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
- package/dist/commands/audit/git-url-clone.js.map +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts +1 -1
- package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
- package/dist/commands/audit/hierarchical-output.js +1 -1
- package/dist/commands/audit/hierarchical-output.js.map +1 -1
- package/dist/commands/audit/provenance.d.ts.map +1 -1
- package/dist/commands/audit/provenance.js +4 -3
- package/dist/commands/audit/provenance.js.map +1 -1
- package/dist/commands/audit/scan-population.d.ts +158 -0
- package/dist/commands/audit/scan-population.d.ts.map +1 -0
- package/dist/commands/audit/scan-population.js +292 -0
- package/dist/commands/audit/scan-population.js.map +1 -0
- package/dist/commands/audit-settings.d.ts.map +1 -1
- package/dist/commands/audit-settings.js +6 -5
- package/dist/commands/audit-settings.js.map +1 -1
- package/dist/commands/audit.d.ts +98 -8
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +1126 -394
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +40 -36
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cache/cache-control.d.ts +82 -0
- package/dist/commands/cache/cache-control.d.ts.map +1 -0
- package/dist/commands/cache/cache-control.js +86 -0
- package/dist/commands/cache/cache-control.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +34 -6
- package/dist/commands/cache/clear.d.ts.map +1 -1
- package/dist/commands/cache/clear.js +101 -15
- package/dist/commands/cache/clear.js.map +1 -1
- package/dist/commands/cache/index.d.ts +13 -63
- package/dist/commands/cache/index.d.ts.map +1 -1
- package/dist/commands/cache/index.js +47 -79
- package/dist/commands/cache/index.js.map +1 -1
- package/dist/commands/claude/claude-config.d.ts.map +1 -1
- package/dist/commands/claude/claude-config.js +6 -0
- package/dist/commands/claude/claude-config.js.map +1 -1
- package/dist/commands/claude/context.d.ts +340 -0
- package/dist/commands/claude/context.d.ts.map +1 -0
- package/dist/commands/claude/context.js +1080 -0
- package/dist/commands/claude/context.js.map +1 -0
- package/dist/commands/claude/index.d.ts +14 -0
- package/dist/commands/claude/index.d.ts.map +1 -1
- package/dist/commands/claude/index.js +22 -2
- package/dist/commands/claude/index.js.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
- package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +40 -31
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/license-utils.js +0 -1
- package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish-tree.js +0 -6
- package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
- package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/publish.js +2 -1
- package/dist/commands/claude/marketplace/publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +73 -22
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +407 -72
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/api-keys.d.ts +0 -3
- package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
- package/dist/commands/claude/org/api-keys.js +2 -1
- package/dist/commands/claude/org/api-keys.js.map +1 -1
- package/dist/commands/claude/org/helpers.d.ts +54 -1
- package/dist/commands/claude/org/helpers.d.ts.map +1 -1
- package/dist/commands/claude/org/helpers.js +42 -7
- package/dist/commands/claude/org/helpers.js.map +1 -1
- package/dist/commands/claude/org/index.d.ts.map +1 -1
- package/dist/commands/claude/org/index.js +24 -16
- package/dist/commands/claude/org/index.js.map +1 -1
- package/dist/commands/claude/org/invites.d.ts +0 -3
- package/dist/commands/claude/org/invites.d.ts.map +1 -1
- package/dist/commands/claude/org/invites.js +3 -2
- package/dist/commands/claude/org/invites.js.map +1 -1
- package/dist/commands/claude/org/skills.d.ts +527 -0
- package/dist/commands/claude/org/skills.d.ts.map +1 -1
- package/dist/commands/claude/org/skills.js +1414 -108
- package/dist/commands/claude/org/skills.js.map +1 -1
- package/dist/commands/claude/org/users.d.ts +0 -3
- package/dist/commands/claude/org/users.d.ts.map +1 -1
- package/dist/commands/claude/org/users.js +6 -3
- package/dist/commands/claude/org/users.js.map +1 -1
- package/dist/commands/claude/org/workspaces.d.ts +0 -3
- package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
- package/dist/commands/claude/org/workspaces.js +11 -7
- package/dist/commands/claude/org/workspaces.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +41 -3
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +147 -80
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
- package/dist/commands/claude/plugin/helpers.js +2 -7
- package/dist/commands/claude/plugin/helpers.js.map +1 -1
- package/dist/commands/claude/plugin/install.d.ts +12 -0
- package/dist/commands/claude/plugin/install.d.ts.map +1 -1
- package/dist/commands/claude/plugin/install.js +93 -62
- package/dist/commands/claude/plugin/install.js.map +1 -1
- package/dist/commands/claude/plugin/list.d.ts.map +1 -1
- package/dist/commands/claude/plugin/list.js +3 -2
- package/dist/commands/claude/plugin/list.js.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
- package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
- package/dist/commands/claude/plugin/marketplace-json.js +10 -9
- package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
- package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +3 -6
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-validators.js +3 -6
- package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +221 -14
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
- package/dist/commands/claude/plugin/uninstall.js +4 -4
- package/dist/commands/claude/plugin/uninstall.js.map +1 -1
- package/dist/commands/consistency-check.d.ts +17 -15
- package/dist/commands/consistency-check.d.ts.map +1 -1
- package/dist/commands/consistency-check.js +152 -106
- package/dist/commands/consistency-check.js.map +1 -1
- package/dist/commands/corpus/index.d.ts.map +1 -1
- package/dist/commands/corpus/index.js +3 -0
- package/dist/commands/corpus/index.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +1 -2
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -3
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +58 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +95 -41
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/corpus/scan.d.ts.map +1 -1
- package/dist/commands/corpus/scan.js +20 -12
- package/dist/commands/corpus/scan.js.map +1 -1
- package/dist/commands/corpus/seed.d.ts +4 -4
- package/dist/commands/corpus/seed.d.ts.map +1 -1
- package/dist/commands/corpus/seed.js +1 -3
- package/dist/commands/corpus/seed.js.map +1 -1
- package/dist/commands/doctor.d.ts +50 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +245 -52
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +13 -1
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +121 -17
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/mcp/collections.d.ts +1 -1
- package/dist/commands/mcp/collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.d.ts.map +1 -1
- package/dist/commands/mcp/list-collections.js +2 -1
- package/dist/commands/mcp/list-collections.js.map +1 -1
- package/dist/commands/mcp/serve.d.ts.map +1 -1
- package/dist/commands/mcp/serve.js +3 -2
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/okf/index.d.ts +11 -0
- package/dist/commands/okf/index.d.ts.map +1 -0
- package/dist/commands/okf/index.js +114 -0
- package/dist/commands/okf/index.js.map +1 -0
- package/dist/commands/okf/validate.d.ts +191 -0
- package/dist/commands/okf/validate.d.ts.map +1 -0
- package/dist/commands/okf/validate.js +190 -0
- package/dist/commands/okf/validate.js.map +1 -0
- package/dist/commands/phase-utils.d.ts +182 -114
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +154 -163
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts.map +1 -1
- package/dist/commands/positional-args.js +3 -2
- package/dist/commands/positional-args.js.map +1 -1
- package/dist/commands/rag/clear-command.d.ts.map +1 -1
- package/dist/commands/rag/clear-command.js +2 -1
- package/dist/commands/rag/clear-command.js.map +1 -1
- package/dist/commands/rag/index-command.d.ts +64 -0
- package/dist/commands/rag/index-command.d.ts.map +1 -1
- package/dist/commands/rag/index-command.js +72 -6
- package/dist/commands/rag/index-command.js.map +1 -1
- package/dist/commands/rag/index.d.ts.map +1 -1
- package/dist/commands/rag/index.js +23 -10
- package/dist/commands/rag/index.js.map +1 -1
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +2 -1
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/rag/stats-command.d.ts.map +1 -1
- package/dist/commands/rag/stats-command.js +2 -1
- package/dist/commands/rag/stats-command.js.map +1 -1
- package/dist/commands/resources/builtin-help.d.ts +27 -0
- package/dist/commands/resources/builtin-help.d.ts.map +1 -0
- package/dist/commands/resources/builtin-help.js +46 -0
- package/dist/commands/resources/builtin-help.js.map +1 -0
- package/dist/commands/resources/check-progress.d.ts +154 -0
- package/dist/commands/resources/check-progress.d.ts.map +1 -0
- package/dist/commands/resources/check-progress.js +222 -0
- package/dist/commands/resources/check-progress.js.map +1 -0
- package/dist/commands/resources/check-supervisor.d.ts +465 -0
- package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
- package/dist/commands/resources/check-supervisor.js +573 -0
- package/dist/commands/resources/check-supervisor.js.map +1 -0
- package/dist/commands/resources/check.d.ts +593 -0
- package/dist/commands/resources/check.d.ts.map +1 -0
- package/dist/commands/resources/check.js +1365 -0
- package/dist/commands/resources/check.js.map +1 -0
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +418 -4
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/query.d.ts +106 -0
- package/dist/commands/resources/query.d.ts.map +1 -0
- package/dist/commands/resources/query.js +177 -0
- package/dist/commands/resources/query.js.map +1 -0
- package/dist/commands/resources/scan.d.ts +24 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +17 -8
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +42 -2
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +208 -55
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts +3 -2
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +40 -2
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts +247 -0
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +99 -62
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/configure.d.ts +56 -0
- package/dist/commands/skill/test/configure.d.ts.map +1 -1
- package/dist/commands/skill/test/configure.js +75 -16
- package/dist/commands/skill/test/configure.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +63 -10
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +258 -77
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +94 -4
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +325 -97
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/install.d.ts +2 -1
- package/dist/commands/skills/install.d.ts.map +1 -1
- package/dist/commands/skills/install.js +20 -31
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/skills/list.d.ts +2 -1
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +44 -26
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +1 -1
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +6 -8
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts.map +1 -1
- package/dist/commands/skills/scope-guard.js +3 -5
- package/dist/commands/skills/scope-guard.js.map +1 -1
- package/dist/commands/skills/shared.d.ts.map +1 -1
- package/dist/commands/skills/shared.js +2 -4
- package/dist/commands/skills/shared.js.map +1 -1
- package/dist/commands/skills/skill-discovery.d.ts +47 -6
- package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
- package/dist/commands/skills/skill-discovery.js +61 -11
- package/dist/commands/skills/skill-discovery.js.map +1 -1
- package/dist/commands/skills/source-resolvers.d.ts +15 -0
- package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
- package/dist/commands/skills/source-resolvers.js +25 -4
- package/dist/commands/skills/source-resolvers.js.map +1 -1
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +11 -3
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +140 -4
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +224 -67
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +63 -27
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +119 -15
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +357 -142
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/report-schemas.d.ts +45 -0
- package/dist/report-schemas.d.ts.map +1 -0
- package/dist/report-schemas.js +100 -0
- package/dist/report-schemas.js.map +1 -0
- package/dist/skill-resolution/classify.js +2 -2
- package/dist/skill-resolution/classify.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +49 -5
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +59 -19
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
- package/dist/skill-resolution/resolve-skill-reference.js +55 -57
- package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
- package/dist/utils/agent-discovery.d.ts.map +1 -1
- package/dist/utils/agent-discovery.js +22 -11
- package/dist/utils/agent-discovery.js.map +1 -1
- package/dist/utils/agent-runner.d.ts.map +1 -1
- package/dist/utils/agent-runner.js +7 -4
- package/dist/utils/agent-runner.js.map +1 -1
- package/dist/utils/claude-context-lens.d.ts +34 -0
- package/dist/utils/claude-context-lens.d.ts.map +1 -0
- package/dist/utils/claude-context-lens.js +39 -0
- package/dist/utils/claude-context-lens.js.map +1 -0
- package/dist/utils/command-error.d.ts +138 -20
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +172 -36
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/config-loader.d.ts +2 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +40 -14
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/corpus-target.d.ts +26 -0
- package/dist/utils/corpus-target.d.ts.map +1 -0
- package/dist/utils/corpus-target.js +35 -0
- package/dist/utils/corpus-target.js.map +1 -0
- package/dist/utils/edge-lens-evaluation.d.ts +83 -0
- package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
- package/dist/utils/edge-lens-evaluation.js +110 -0
- package/dist/utils/edge-lens-evaluation.js.map +1 -0
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +0 -1
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-anchor.d.ts +2 -2
- package/dist/utils/issue-anchor.d.ts.map +1 -1
- package/dist/utils/issue-anchor.js +1 -1
- package/dist/utils/issue-rendering.d.ts +3 -3
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +3 -3
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +12 -5
- package/dist/utils/issue-severity.d.ts.map +1 -1
- package/dist/utils/issue-severity.js +1 -1
- package/dist/utils/issue-severity.js.map +1 -1
- package/dist/utils/optional-backend.d.ts +78 -0
- package/dist/utils/optional-backend.d.ts.map +1 -0
- package/dist/utils/optional-backend.js +117 -0
- package/dist/utils/optional-backend.js.map +1 -0
- package/dist/utils/output.d.ts +26 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +35 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/package-json.d.ts +24 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +49 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/population-wiring.d.ts +100 -0
- package/dist/utils/population-wiring.d.ts.map +1 -0
- package/dist/utils/population-wiring.js +98 -0
- package/dist/utils/population-wiring.js.map +1 -0
- package/dist/utils/project-root-policy.d.ts +20 -0
- package/dist/utils/project-root-policy.d.ts.map +1 -1
- package/dist/utils/project-root-policy.js +30 -0
- package/dist/utils/project-root-policy.js.map +1 -1
- package/dist/utils/projection-lenses.d.ts +98 -0
- package/dist/utils/projection-lenses.d.ts.map +1 -0
- package/dist/utils/projection-lenses.js +203 -0
- package/dist/utils/projection-lenses.js.map +1 -0
- package/dist/utils/projection-query.d.ts +324 -0
- package/dist/utils/projection-query.d.ts.map +1 -0
- package/dist/utils/projection-query.js +357 -0
- package/dist/utils/projection-query.js.map +1 -0
- package/dist/utils/projection-store.d.ts +335 -0
- package/dist/utils/projection-store.d.ts.map +1 -0
- package/dist/utils/projection-store.js +522 -0
- package/dist/utils/projection-store.js.map +1 -0
- package/dist/utils/relation-limits.d.ts +50 -0
- package/dist/utils/relation-limits.d.ts.map +1 -0
- package/dist/utils/relation-limits.js +50 -0
- package/dist/utils/relation-limits.js.map +1 -0
- package/dist/utils/repeatable-option.d.ts +37 -0
- package/dist/utils/repeatable-option.d.ts.map +1 -0
- package/dist/utils/repeatable-option.js +39 -0
- package/dist/utils/repeatable-option.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +132 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +288 -27
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/root-argv.d.ts +53 -0
- package/dist/utils/root-argv.d.ts.map +1 -0
- package/dist/utils/root-argv.js +215 -0
- package/dist/utils/root-argv.js.map +1 -0
- package/dist/utils/run-integrity.d.ts +95 -0
- package/dist/utils/run-integrity.d.ts.map +1 -0
- package/dist/utils/run-integrity.js +102 -0
- package/dist/utils/run-integrity.js.map +1 -0
- package/dist/utils/skill-discovery.d.ts.map +1 -1
- package/dist/utils/skill-discovery.js +2 -1
- package/dist/utils/skill-discovery.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +63 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +56 -1
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
- package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/utils/sqlite-experimental-warning.js +144 -0
- package/dist/utils/sqlite-experimental-warning.js.map +1 -0
- package/dist/utils/url-redact.d.ts.map +1 -1
- package/dist/utils/url-redact.js +4 -6
- package/dist/utils/url-redact.js.map +1 -1
- package/dist/utils/user-context-scanner.d.ts +8 -0
- package/dist/utils/user-context-scanner.d.ts.map +1 -1
- package/dist/utils/user-context-scanner.js +4 -2
- package/dist/utils/user-context-scanner.js.map +1 -1
- package/dist/utils/validate-help-files.d.ts.map +1 -1
- package/dist/utils/validate-help-files.js +12 -6
- package/dist/utils/validate-help-files.js.map +1 -1
- package/dist/utils/vat-bin-path.d.ts +36 -0
- package/dist/utils/vat-bin-path.d.ts.map +1 -0
- package/dist/utils/vat-bin-path.js +48 -0
- package/dist/utils/vat-bin-path.js.map +1 -0
- package/dist/utils/verdict-helpers.d.ts +1 -1
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +1 -1
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/version.js.map +1 -1
- package/docs/agent.md +2 -2
- package/docs/audit.md +141 -37
- package/docs/doctor.md +7 -6
- package/docs/index.md +19 -11
- package/docs/mcp.md +2 -2
- package/docs/rag.md +3 -2
- package/docs/resources.md +13 -3
- package/docs/skill-test.md +10 -9
- package/docs/skills.md +53 -69
- package/package.json +35 -26
- package/schemas/ard-emit.json +149 -0
- package/schemas/okf-validate.json +170 -0
- package/schemas/resources-check.json +229 -0
- package/schemas/skill-review.json +230 -0
- package/dist/commands/resources/command-helpers.d.ts +0 -5
- package/dist/commands/resources/command-helpers.d.ts.map +0 -1
- package/dist/commands/resources/command-helpers.js +0 -6
- package/dist/commands/resources/command-helpers.js.map +0 -1
|
@@ -9,11 +9,245 @@
|
|
|
9
9
|
* This is a thin presentation layer. No new validation logic lives here —
|
|
10
10
|
* the automated portion is the same code path used by `vat skills validate`.
|
|
11
11
|
*/
|
|
12
|
+
import { type PackagingValidationResult } from '@vibe-agent-toolkit/agent-skills';
|
|
13
|
+
import { type Report, type ValidationIssue } from '@vibe-agent-toolkit/schema';
|
|
12
14
|
import { Command } from 'commander';
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { type ChecklistSection } from './review-checklist.js';
|
|
13
17
|
export interface SkillReviewCommandOptions {
|
|
14
18
|
yaml?: boolean;
|
|
19
|
+
/** Treat warnings as failing: end on `FINDINGS` when any warning is present. */
|
|
20
|
+
strict?: boolean;
|
|
15
21
|
debug?: boolean;
|
|
16
22
|
}
|
|
23
|
+
/** What the review reports beyond its findings. */
|
|
24
|
+
export declare const SkillReviewDataSchema: z.ZodObject<{
|
|
25
|
+
skill: z.ZodString;
|
|
26
|
+
/** The path the caller named. */
|
|
27
|
+
source: z.ZodString;
|
|
28
|
+
metadata: z.ZodObject<{
|
|
29
|
+
skillLines: z.ZodNumber;
|
|
30
|
+
totalLines: z.ZodNumber;
|
|
31
|
+
fileCount: z.ZodNumber;
|
|
32
|
+
directFileCount: z.ZodNumber;
|
|
33
|
+
maxLinkDepth: z.ZodNumber;
|
|
34
|
+
excludedReferenceCount: z.ZodNumber;
|
|
35
|
+
excludedReferences: z.ZodArray<z.ZodObject<{
|
|
36
|
+
path: z.ZodString;
|
|
37
|
+
reason: z.ZodString;
|
|
38
|
+
matchedPattern: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
path: string;
|
|
41
|
+
reason: string;
|
|
42
|
+
matchedPattern?: string | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
path: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
matchedPattern?: string | undefined;
|
|
47
|
+
}>, "many">;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
skillLines: number;
|
|
50
|
+
totalLines: number;
|
|
51
|
+
fileCount: number;
|
|
52
|
+
directFileCount: number;
|
|
53
|
+
maxLinkDepth: number;
|
|
54
|
+
excludedReferenceCount: number;
|
|
55
|
+
excludedReferences: {
|
|
56
|
+
path: string;
|
|
57
|
+
reason: string;
|
|
58
|
+
matchedPattern?: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
}, {
|
|
61
|
+
skillLines: number;
|
|
62
|
+
totalLines: number;
|
|
63
|
+
fileCount: number;
|
|
64
|
+
directFileCount: number;
|
|
65
|
+
maxLinkDepth: number;
|
|
66
|
+
excludedReferenceCount: number;
|
|
67
|
+
excludedReferences: {
|
|
68
|
+
path: string;
|
|
69
|
+
reason: string;
|
|
70
|
+
matchedPattern?: string | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Every checklist section, in rubric order — including the ones no finding
|
|
75
|
+
* landed in, because the manual items are the point of a review and a
|
|
76
|
+
* section with nothing automated still has to be walked through.
|
|
77
|
+
*/
|
|
78
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
79
|
+
section: z.ZodString;
|
|
80
|
+
/** Codes of the envelope's findings that belong to this section, in finding order. */
|
|
81
|
+
codes: z.ZodArray<z.ZodString, "many">;
|
|
82
|
+
/** The judgment-call items a reviewer completes for this section. */
|
|
83
|
+
manual: z.ZodArray<z.ZodString, "many">;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
codes: string[];
|
|
86
|
+
section: string;
|
|
87
|
+
manual: string[];
|
|
88
|
+
}, {
|
|
89
|
+
codes: string[];
|
|
90
|
+
section: string;
|
|
91
|
+
manual: string[];
|
|
92
|
+
}>, "many">;
|
|
93
|
+
}, "strict", z.ZodTypeAny, {
|
|
94
|
+
skill: string;
|
|
95
|
+
source: string;
|
|
96
|
+
metadata: {
|
|
97
|
+
skillLines: number;
|
|
98
|
+
totalLines: number;
|
|
99
|
+
fileCount: number;
|
|
100
|
+
directFileCount: number;
|
|
101
|
+
maxLinkDepth: number;
|
|
102
|
+
excludedReferenceCount: number;
|
|
103
|
+
excludedReferences: {
|
|
104
|
+
path: string;
|
|
105
|
+
reason: string;
|
|
106
|
+
matchedPattern?: string | undefined;
|
|
107
|
+
}[];
|
|
108
|
+
};
|
|
109
|
+
sections: {
|
|
110
|
+
codes: string[];
|
|
111
|
+
section: string;
|
|
112
|
+
manual: string[];
|
|
113
|
+
}[];
|
|
114
|
+
}, {
|
|
115
|
+
skill: string;
|
|
116
|
+
source: string;
|
|
117
|
+
metadata: {
|
|
118
|
+
skillLines: number;
|
|
119
|
+
totalLines: number;
|
|
120
|
+
fileCount: number;
|
|
121
|
+
directFileCount: number;
|
|
122
|
+
maxLinkDepth: number;
|
|
123
|
+
excludedReferenceCount: number;
|
|
124
|
+
excludedReferences: {
|
|
125
|
+
path: string;
|
|
126
|
+
reason: string;
|
|
127
|
+
matchedPattern?: string | undefined;
|
|
128
|
+
}[];
|
|
129
|
+
};
|
|
130
|
+
sections: {
|
|
131
|
+
codes: string[];
|
|
132
|
+
section: string;
|
|
133
|
+
manual: string[];
|
|
134
|
+
}[];
|
|
135
|
+
}>;
|
|
136
|
+
export type SkillReviewData = z.infer<typeof SkillReviewDataSchema>;
|
|
137
|
+
/** The document `--yaml` publishes. */
|
|
138
|
+
export declare const SKILL_REVIEW_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
|
|
139
|
+
skill: z.ZodString;
|
|
140
|
+
/** The path the caller named. */
|
|
141
|
+
source: z.ZodString;
|
|
142
|
+
metadata: z.ZodObject<{
|
|
143
|
+
skillLines: z.ZodNumber;
|
|
144
|
+
totalLines: z.ZodNumber;
|
|
145
|
+
fileCount: z.ZodNumber;
|
|
146
|
+
directFileCount: z.ZodNumber;
|
|
147
|
+
maxLinkDepth: z.ZodNumber;
|
|
148
|
+
excludedReferenceCount: z.ZodNumber;
|
|
149
|
+
excludedReferences: z.ZodArray<z.ZodObject<{
|
|
150
|
+
path: z.ZodString;
|
|
151
|
+
reason: z.ZodString;
|
|
152
|
+
matchedPattern: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, "strict", z.ZodTypeAny, {
|
|
154
|
+
path: string;
|
|
155
|
+
reason: string;
|
|
156
|
+
matchedPattern?: string | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
path: string;
|
|
159
|
+
reason: string;
|
|
160
|
+
matchedPattern?: string | undefined;
|
|
161
|
+
}>, "many">;
|
|
162
|
+
}, "strict", z.ZodTypeAny, {
|
|
163
|
+
skillLines: number;
|
|
164
|
+
totalLines: number;
|
|
165
|
+
fileCount: number;
|
|
166
|
+
directFileCount: number;
|
|
167
|
+
maxLinkDepth: number;
|
|
168
|
+
excludedReferenceCount: number;
|
|
169
|
+
excludedReferences: {
|
|
170
|
+
path: string;
|
|
171
|
+
reason: string;
|
|
172
|
+
matchedPattern?: string | undefined;
|
|
173
|
+
}[];
|
|
174
|
+
}, {
|
|
175
|
+
skillLines: number;
|
|
176
|
+
totalLines: number;
|
|
177
|
+
fileCount: number;
|
|
178
|
+
directFileCount: number;
|
|
179
|
+
maxLinkDepth: number;
|
|
180
|
+
excludedReferenceCount: number;
|
|
181
|
+
excludedReferences: {
|
|
182
|
+
path: string;
|
|
183
|
+
reason: string;
|
|
184
|
+
matchedPattern?: string | undefined;
|
|
185
|
+
}[];
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* Every checklist section, in rubric order — including the ones no finding
|
|
189
|
+
* landed in, because the manual items are the point of a review and a
|
|
190
|
+
* section with nothing automated still has to be walked through.
|
|
191
|
+
*/
|
|
192
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
193
|
+
section: z.ZodString;
|
|
194
|
+
/** Codes of the envelope's findings that belong to this section, in finding order. */
|
|
195
|
+
codes: z.ZodArray<z.ZodString, "many">;
|
|
196
|
+
/** The judgment-call items a reviewer completes for this section. */
|
|
197
|
+
manual: z.ZodArray<z.ZodString, "many">;
|
|
198
|
+
}, "strict", z.ZodTypeAny, {
|
|
199
|
+
codes: string[];
|
|
200
|
+
section: string;
|
|
201
|
+
manual: string[];
|
|
202
|
+
}, {
|
|
203
|
+
codes: string[];
|
|
204
|
+
section: string;
|
|
205
|
+
manual: string[];
|
|
206
|
+
}>, "many">;
|
|
207
|
+
}, "strict", z.ZodTypeAny, {
|
|
208
|
+
skill: string;
|
|
209
|
+
source: string;
|
|
210
|
+
metadata: {
|
|
211
|
+
skillLines: number;
|
|
212
|
+
totalLines: number;
|
|
213
|
+
fileCount: number;
|
|
214
|
+
directFileCount: number;
|
|
215
|
+
maxLinkDepth: number;
|
|
216
|
+
excludedReferenceCount: number;
|
|
217
|
+
excludedReferences: {
|
|
218
|
+
path: string;
|
|
219
|
+
reason: string;
|
|
220
|
+
matchedPattern?: string | undefined;
|
|
221
|
+
}[];
|
|
222
|
+
};
|
|
223
|
+
sections: {
|
|
224
|
+
codes: string[];
|
|
225
|
+
section: string;
|
|
226
|
+
manual: string[];
|
|
227
|
+
}[];
|
|
228
|
+
}, {
|
|
229
|
+
skill: string;
|
|
230
|
+
source: string;
|
|
231
|
+
metadata: {
|
|
232
|
+
skillLines: number;
|
|
233
|
+
totalLines: number;
|
|
234
|
+
fileCount: number;
|
|
235
|
+
directFileCount: number;
|
|
236
|
+
maxLinkDepth: number;
|
|
237
|
+
excludedReferenceCount: number;
|
|
238
|
+
excludedReferences: {
|
|
239
|
+
path: string;
|
|
240
|
+
reason: string;
|
|
241
|
+
matchedPattern?: string | undefined;
|
|
242
|
+
}[];
|
|
243
|
+
};
|
|
244
|
+
sections: {
|
|
245
|
+
codes: string[];
|
|
246
|
+
section: string;
|
|
247
|
+
manual: string[];
|
|
248
|
+
}[];
|
|
249
|
+
}>>;
|
|
250
|
+
export type SkillReviewReport = Report<SkillReviewData>;
|
|
17
251
|
/**
|
|
18
252
|
* Resolve the caller's argument to the absolute path of a skill markdown file.
|
|
19
253
|
*
|
|
@@ -27,6 +261,19 @@ export interface SkillReviewCommandOptions {
|
|
|
27
261
|
* the downstream packaging validator handles that.
|
|
28
262
|
*/
|
|
29
263
|
export declare function resolveSkillPath(pathArg: string): string;
|
|
264
|
+
/**
|
|
265
|
+
* The machine-readable review, for `--yaml` (e.g. CI consumption).
|
|
266
|
+
*
|
|
267
|
+
* `examined` is 1: a review looks at ONE skill, and the denominator says so
|
|
268
|
+
* rather than leaving a reader to infer it from `skill`. Pure, so the shape is
|
|
269
|
+
* unit-testable without a validator run.
|
|
270
|
+
*
|
|
271
|
+
* @param result - The validator's result
|
|
272
|
+
* @param skillPath - The path the caller named
|
|
273
|
+
* @param grouped - The findings by checklist section
|
|
274
|
+
* @returns The report
|
|
275
|
+
*/
|
|
276
|
+
export declare function buildReviewReport(result: PackagingValidationResult, skillPath: string, grouped: ReadonlyMap<ChecklistSection, readonly ValidationIssue[]>): SkillReviewReport;
|
|
30
277
|
export declare function reviewCommand(pathArg: string | undefined, options: SkillReviewCommandOptions): Promise<void>;
|
|
31
278
|
export declare function createSkillReviewCommand(): Command;
|
|
32
279
|
//# sourceMappingURL=review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/commands/skill/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/commands/skill/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gFAAgF;IAChF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAWD,mDAAmD;AACnD,eAAO,MAAM,qBAAqB;;IAEhC,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAejC;;;;OAIG;;;QA5BH,sFAAsF;;QAEtF,qEAAqE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B5D,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,uCAAuC;AACvC,eAAO,MAAM,0BAA0B;;IA1BrC,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAejC;;;;OAIG;;;QA5BH,sFAAsF;;QAEtF,qEAAqE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCM,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA6BxD;AA4FD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,yBAAyB,EACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,WAAW,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC,GACjE,iBAAiB,CAwBnB;AAYD,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC,CA2Df;AAED,wBAAgB,wBAAwB,IAAI,OAAO,CAkDlD"}
|
|
@@ -11,19 +11,55 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { existsSync, statSync } from 'node:fs';
|
|
13
13
|
import { dirname } from 'node:path';
|
|
14
|
-
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/agent-schema';
|
|
15
14
|
import { resolveAnchorRoot, validateSkillForPackaging, } from '@vibe-agent-toolkit/agent-skills';
|
|
15
|
+
import { buildReport, calculateValidationStatus, countBySeverity, exitCodeForSeverityCounts, reportSchema, toFindings, } from '@vibe-agent-toolkit/schema';
|
|
16
16
|
import { safePath } from '@vibe-agent-toolkit/utils';
|
|
17
17
|
import { Command } from 'commander';
|
|
18
|
-
import
|
|
18
|
+
import { z } from 'zod';
|
|
19
19
|
import { resolveProjectDeclaredEvalSuites, resolveSkillPackagingConfig } from '../../skill-resolution/packaging-config.js';
|
|
20
|
-
import {
|
|
20
|
+
import { handleReportCommandError } from '../../utils/command-error.js';
|
|
21
21
|
import { formatIssueAnchor } from '../../utils/issue-anchor.js';
|
|
22
22
|
import { createLogger } from '../../utils/logger.js';
|
|
23
|
+
import { writeYamlOutput } from '../../utils/output.js';
|
|
23
24
|
import { projectRootOrNull } from '../../utils/project-root-policy.js';
|
|
24
25
|
import { renderSkillQualityFooter } from '../../utils/skill-quality-footer.js';
|
|
25
26
|
import { applyConfigVerdicts } from '../../utils/verdict-helpers.js';
|
|
26
27
|
import { CHECKLIST_SECTIONS, MANUAL_CHECKLIST_ITEMS, sectionForCode, } from './review-checklist.js';
|
|
28
|
+
/** One checklist section: which automated findings landed in it, and what a reviewer walks through by hand. */
|
|
29
|
+
const ReviewSectionSchema = z.object({
|
|
30
|
+
section: z.string(),
|
|
31
|
+
/** Codes of the envelope's findings that belong to this section, in finding order. */
|
|
32
|
+
codes: z.array(z.string()),
|
|
33
|
+
/** The judgment-call items a reviewer completes for this section. */
|
|
34
|
+
manual: z.array(z.string()),
|
|
35
|
+
}).strict();
|
|
36
|
+
/** What the review reports beyond its findings. */
|
|
37
|
+
export const SkillReviewDataSchema = z.object({
|
|
38
|
+
skill: z.string(),
|
|
39
|
+
/** The path the caller named. */
|
|
40
|
+
source: z.string(),
|
|
41
|
+
metadata: z.object({
|
|
42
|
+
skillLines: z.number().int().nonnegative(),
|
|
43
|
+
totalLines: z.number().int().nonnegative(),
|
|
44
|
+
fileCount: z.number().int().nonnegative(),
|
|
45
|
+
directFileCount: z.number().int().nonnegative(),
|
|
46
|
+
maxLinkDepth: z.number().int().nonnegative(),
|
|
47
|
+
excludedReferenceCount: z.number().int().nonnegative(),
|
|
48
|
+
excludedReferences: z.array(z.object({
|
|
49
|
+
path: z.string(),
|
|
50
|
+
reason: z.string(),
|
|
51
|
+
matchedPattern: z.string().optional(),
|
|
52
|
+
}).strict()),
|
|
53
|
+
}).strict(),
|
|
54
|
+
/**
|
|
55
|
+
* Every checklist section, in rubric order — including the ones no finding
|
|
56
|
+
* landed in, because the manual items are the point of a review and a
|
|
57
|
+
* section with nothing automated still has to be walked through.
|
|
58
|
+
*/
|
|
59
|
+
sections: z.array(ReviewSectionSchema),
|
|
60
|
+
}).strict();
|
|
61
|
+
/** The document `--yaml` publishes. */
|
|
62
|
+
export const SKILL_REVIEW_REPORT_SCHEMA = reportSchema(SkillReviewDataSchema);
|
|
27
63
|
/**
|
|
28
64
|
* Resolve the caller's argument to the absolute path of a skill markdown file.
|
|
29
65
|
*
|
|
@@ -38,11 +74,9 @@ import { CHECKLIST_SECTIONS, MANUAL_CHECKLIST_ITEMS, sectionForCode, } from './r
|
|
|
38
74
|
*/
|
|
39
75
|
export function resolveSkillPath(pathArg) {
|
|
40
76
|
const absolute = safePath.resolve(pathArg);
|
|
41
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- user-supplied path
|
|
42
77
|
if (!existsSync(absolute)) {
|
|
43
78
|
throw new Error(`Path does not exist: ${pathArg}`);
|
|
44
79
|
}
|
|
45
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- user-supplied path
|
|
46
80
|
const stat = statSync(absolute);
|
|
47
81
|
if (stat.isFile()) {
|
|
48
82
|
if (!absolute.endsWith('.md')) {
|
|
@@ -52,7 +86,6 @@ export function resolveSkillPath(pathArg) {
|
|
|
52
86
|
}
|
|
53
87
|
if (stat.isDirectory()) {
|
|
54
88
|
const candidate = safePath.join(absolute, 'SKILL.md');
|
|
55
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename -- candidate constructed from validated dir
|
|
56
89
|
if (!existsSync(candidate)) {
|
|
57
90
|
throw new Error(`No SKILL.md found in directory: ${pathArg}. Point at the skill directory (containing SKILL.md) or the SKILL.md file directly.`);
|
|
58
91
|
}
|
|
@@ -82,10 +115,10 @@ function groupIssuesBySection(issues) {
|
|
|
82
115
|
}
|
|
83
116
|
/**
|
|
84
117
|
* Render the human-readable review report to stderr (logger). Structured
|
|
85
|
-
* output goes to stdout via {@link
|
|
118
|
+
* output goes to stdout via {@link buildReviewReport}.
|
|
86
119
|
*/
|
|
87
120
|
function renderHumanReport(result, skillPath, grouped, logger) {
|
|
88
|
-
// One collapse, from
|
|
121
|
+
// One collapse, from schema: `allErrors` carries info issues despite the
|
|
89
122
|
// name, and there is no `activeInfo` bucket to read them from.
|
|
90
123
|
const counts = countBySeverity(result.allErrors);
|
|
91
124
|
logger.info('');
|
|
@@ -134,48 +167,41 @@ function renderIssue(issue, logger) {
|
|
|
134
167
|
}
|
|
135
168
|
}
|
|
136
169
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
170
|
+
* The machine-readable review, for `--yaml` (e.g. CI consumption).
|
|
171
|
+
*
|
|
172
|
+
* `examined` is 1: a review looks at ONE skill, and the denominator says so
|
|
173
|
+
* rather than leaving a reader to infer it from `skill`. Pure, so the shape is
|
|
174
|
+
* unit-testable without a validator run.
|
|
175
|
+
*
|
|
176
|
+
* @param result - The validator's result
|
|
177
|
+
* @param skillPath - The path the caller named
|
|
178
|
+
* @param grouped - The findings by checklist section
|
|
179
|
+
* @returns The report
|
|
139
180
|
*/
|
|
140
|
-
function
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
skill: result.skillName,
|
|
165
|
-
source: skillPath,
|
|
166
|
-
// NOT `result.status`: that is the packaging GATE verdict, two-valued by
|
|
167
|
-
// design, so a review holding only warnings published `status: success`
|
|
168
|
-
// while the very same run exited 1. Review treats a warning as a finding
|
|
169
|
-
// you must look at (that is its documented exit-code contract), so the
|
|
170
|
-
// status channel has to be able to say so.
|
|
171
|
-
status: calculateValidationStatus(result.allErrors),
|
|
172
|
-
issueCounts: countBySeverity(result.allErrors),
|
|
173
|
-
metadata: result.metadata,
|
|
174
|
-
automated,
|
|
175
|
-
manual,
|
|
176
|
-
};
|
|
177
|
-
process.stdout.write('---\n');
|
|
178
|
-
process.stdout.write(yaml.stringify(payload, { indent: 2, lineWidth: 120, aliasDuplicateObjects: false }));
|
|
181
|
+
export function buildReviewReport(result, skillPath, grouped) {
|
|
182
|
+
const findings = CHECKLIST_SECTIONS.flatMap((section) => toFindings(grouped.get(section) ?? []));
|
|
183
|
+
const sections = CHECKLIST_SECTIONS.map((section) => ({
|
|
184
|
+
section,
|
|
185
|
+
codes: toFindings(grouped.get(section) ?? []).map((issue) => issue.code),
|
|
186
|
+
manual: [...MANUAL_CHECKLIST_ITEMS[section]],
|
|
187
|
+
}));
|
|
188
|
+
return buildReport({
|
|
189
|
+
examined: 1,
|
|
190
|
+
findings,
|
|
191
|
+
data: {
|
|
192
|
+
skill: result.skillName,
|
|
193
|
+
source: skillPath,
|
|
194
|
+
metadata: {
|
|
195
|
+
...result.metadata,
|
|
196
|
+
excludedReferences: result.metadata.excludedReferences.map((detail) => ({
|
|
197
|
+
path: detail.path,
|
|
198
|
+
reason: detail.reason,
|
|
199
|
+
...(detail.matchedPattern === undefined ? {} : { matchedPattern: detail.matchedPattern }),
|
|
200
|
+
})),
|
|
201
|
+
},
|
|
202
|
+
sections,
|
|
203
|
+
},
|
|
204
|
+
});
|
|
179
205
|
}
|
|
180
206
|
/** Footer: share the checklist link when any skill-level finding fires. */
|
|
181
207
|
function renderFooter(result, logger) {
|
|
@@ -200,11 +226,18 @@ export async function reviewCommand(pathArg, options) {
|
|
|
200
226
|
projectRootOrNull(process.cwd());
|
|
201
227
|
const skillPath = resolveSkillPath(pathArg);
|
|
202
228
|
logger.debug(`Reviewing SKILL.md at: ${skillPath}`);
|
|
203
|
-
|
|
229
|
+
// `'refuse'` on both: a review that cannot tell whether this skill is
|
|
230
|
+
// declared, or which suites are the project's, would report against the
|
|
231
|
+
// wrong rules at exit 0. The throw lands in the catch below →
|
|
232
|
+
// `handleReportCommandError`, exit 2.
|
|
233
|
+
const packagingConfig = (await resolveSkillPackagingConfig(skillPath, 'refuse')) ?? undefined;
|
|
204
234
|
// Project-wide test input: a review of skill A must not count skill B's eval
|
|
205
235
|
// suite as content A ships. Memoized per config root; `[]` in wild mode.
|
|
206
236
|
const result = await validateSkillForPackaging(skillPath, packagingConfig, 'source', {
|
|
207
|
-
projectSkills: await resolveProjectDeclaredEvalSuites(skillPath),
|
|
237
|
+
projectSkills: await resolveProjectDeclaredEvalSuites(skillPath, 'refuse'),
|
|
238
|
+
// Same ruling as the discovery above: a review is acted on whole, so a
|
|
239
|
+
// directory the registry crawl cannot list refuses it by name.
|
|
240
|
+
unreadable: 'refuse',
|
|
208
241
|
});
|
|
209
242
|
// The anchor root for a single-skill review is the skill's own project
|
|
210
243
|
// boundary — the same base the packaging validator anchored its issues
|
|
@@ -212,19 +245,20 @@ export async function reviewCommand(pathArg, options) {
|
|
|
212
245
|
applyConfigVerdicts(result, packagingConfig?.targets, skillPath, resolveAnchorRoot(undefined, dirname(skillPath)));
|
|
213
246
|
const grouped = groupIssuesBySection(result.allErrors);
|
|
214
247
|
if (options.yaml) {
|
|
215
|
-
|
|
248
|
+
writeYamlOutput({ ...buildReviewReport(result, skillPath, grouped), durationMs: Date.now() - startTime });
|
|
216
249
|
}
|
|
217
250
|
else {
|
|
218
251
|
renderHumanReport(result, skillPath, grouped, logger);
|
|
219
252
|
}
|
|
220
253
|
renderFooter(result, logger);
|
|
221
254
|
// Same counts the status channel is derived from, so the two agree by
|
|
222
|
-
// construction
|
|
223
|
-
|
|
224
|
-
|
|
255
|
+
// construction. Errors fail; warnings fail only under `--strict` — this
|
|
256
|
+
// used to exit 1 on a warning while every sibling exited 1 on errors only,
|
|
257
|
+
// so the one verb meant for a human's review was the strictest gate.
|
|
258
|
+
process.exit(exitCodeForSeverityCounts(countBySeverity(result.allErrors), { strict: options.strict === true }));
|
|
225
259
|
}
|
|
226
260
|
catch (error) {
|
|
227
|
-
|
|
261
|
+
handleReportCommandError(error, logger, startTime, 'SkillReview');
|
|
228
262
|
}
|
|
229
263
|
}
|
|
230
264
|
export function createSkillReviewCommand() {
|
|
@@ -233,6 +267,7 @@ export function createSkillReviewCommand() {
|
|
|
233
267
|
.description('Deep-review a single skill: automated findings plus a manual rubric walkthrough')
|
|
234
268
|
.argument('<path>', 'Path to a SKILL.md file, a single-file skill (.md), or a skill directory containing SKILL.md')
|
|
235
269
|
.option('--yaml', 'Emit machine-readable YAML on stdout (for CI consumption)')
|
|
270
|
+
.option('--strict', 'Exit 1 on warnings as well as errors')
|
|
236
271
|
.option('--debug', 'Enable debug logging')
|
|
237
272
|
.action(reviewCommand)
|
|
238
273
|
.addHelpText('after', `
|
|
@@ -249,14 +284,16 @@ Description:
|
|
|
249
284
|
Output:
|
|
250
285
|
Default: human-readable report to stderr (automated findings grouped by
|
|
251
286
|
checklist section, then the manual walkthrough).
|
|
252
|
-
--yaml:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
287
|
+
--yaml: the report envelope as YAML on stdout — status (ok | findings),
|
|
288
|
+
examined (always 1), findings, summary {errors, warnings, info},
|
|
289
|
+
and data.sections: every checklist section with the codes of
|
|
290
|
+
the findings that landed in it and its manual items. The exit
|
|
291
|
+
code is derived from the same summary: exit 1 iff
|
|
292
|
+
summary.errors + summary.warnings > 0.
|
|
256
293
|
|
|
257
294
|
Exit Codes:
|
|
258
|
-
0 - No
|
|
259
|
-
1 - At least one error
|
|
295
|
+
0 - No error-severity finding (warnings and info are in the report; --strict promotes warnings)
|
|
296
|
+
1 - At least one error present, or any warning under --strict
|
|
260
297
|
2 - System error (path missing, internal failure)
|
|
261
298
|
|
|
262
299
|
Requirements:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/commands/skill/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ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C5G,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACxD,CAAC;QAED,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE7B,sEAAsE;QACtE,wEAAwE;QACxE,2EAA2E;QAC3E,qEAAqE;QACrE,OAAO,CAAC,IAAI,CAAC,yBAAyB,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;IAClH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtC,OAAO;SACJ,WAAW,CAAC,iFAAiF,CAAC;SAC9F,QAAQ,CAAC,QAAQ,EAAE,8FAA8F,CAAC;SAClH,MAAM,CAAC,QAAQ,EAAE,2DAA2D,CAAC;SAC7E,MAAM,CAAC,UAAU,EAAE,sCAAsC,CAAC;SAC1D,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC;SACzC,MAAM,CAAC,aAAa,CAAC;SACrB,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCL,CACI,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Orchestration only. Domain logic lives in upsertTestConfig (agent-skills).
|
|
6
6
|
* Mirrors review.ts error-handling conventions (handleCommandError / projectRootOrNull).
|
|
7
7
|
*/
|
|
8
|
+
import { upsertTestConfig } from '@vibe-agent-toolkit/agent-skills';
|
|
8
9
|
import { Command } from 'commander';
|
|
9
10
|
export interface SkillTestConfigureOptions {
|
|
10
11
|
auth?: string;
|
|
@@ -13,10 +14,65 @@ export interface SkillTestConfigureOptions {
|
|
|
13
14
|
timeout?: string;
|
|
14
15
|
stall?: string;
|
|
15
16
|
model?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Tri-state, like `run`'s: `true` from `--baseline`, `false` from
|
|
19
|
+
* `--no-baseline`, `undefined` when neither was typed — and only `undefined`
|
|
20
|
+
* leaves an existing `baseline:` in the config alone. Commander gives this shape
|
|
21
|
+
* only because `--baseline` is declared BEFORE `--no-baseline`; declaring the
|
|
22
|
+
* negation first would default it to `true` and make every `configure` call
|
|
23
|
+
* silently commit a baseline.
|
|
24
|
+
*/
|
|
16
25
|
baseline?: boolean;
|
|
17
26
|
evals?: string;
|
|
18
27
|
print?: boolean;
|
|
19
28
|
debug?: boolean;
|
|
20
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Assemble the knob patch handed to `upsertTestConfig`. Exported for testing: the
|
|
32
|
+
* option DECLARATIONS were pinned (Commander's `--baseline`/`--no-baseline`
|
|
33
|
+
* tri-state) and `upsertTestConfig` writes `false` correctly, but the assembly
|
|
34
|
+
* between them — the step that decides which typed flags become knobs at all — was
|
|
35
|
+
* not, so both `if (options.baseline === true)` (a `--no-baseline` that silently
|
|
36
|
+
* does nothing, i.e. the exact regression `--no-baseline` exists to prevent) and
|
|
37
|
+
* deleting the branch outright left the whole CLI suite green.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildKnobs(options: SkillTestConfigureOptions): Parameters<typeof upsertTestConfig>[2];
|
|
40
|
+
/**
|
|
41
|
+
* Read the config at `configPath`, apply `knobs` to `skillName`'s test block, and
|
|
42
|
+
* hand back the YAML to write — refusing only what VAT would otherwise MISREAD.
|
|
43
|
+
*
|
|
44
|
+
* Exported and separated from the command because the command's own shape made
|
|
45
|
+
* both of this lane's defects untestable: the read and the schema check were
|
|
46
|
+
* inlined between a `process.cwd()` walk-up and a `writeFileSync`, so reaching
|
|
47
|
+
* them from a test meant `process.chdir`, which the Unix unit pool (threads)
|
|
48
|
+
* cannot do at all. Two defects therefore shipped with a green suite.
|
|
49
|
+
*
|
|
50
|
+
* 🔑 **The schema check goes through the SHARED reader**, not
|
|
51
|
+
* `ProjectConfigSchema.safeParse`. This was the THIRD config reader in the
|
|
52
|
+
* toolkit and the only one still carrying both defects the other two had fixed:
|
|
53
|
+
*
|
|
54
|
+
* - An unrecognized key was a hard refusal. `vat skill test configure my-skill
|
|
55
|
+
* --max-turns 20` exited 1 on a config carrying `resources.metadata` — a
|
|
56
|
+
* section this command never reads — refusing to write a change that had
|
|
57
|
+
* nothing to do with it. Unknown keys are a warning now; see
|
|
58
|
+
* {@link parseConfigAllowingUnknownKeys} for why.
|
|
59
|
+
* - The message was `validation.error.message`, which in Zod 3 is a **JSON dump
|
|
60
|
+
* of the issue array**: no file named, no key named in words, no remedy.
|
|
61
|
+
*
|
|
62
|
+
* 🔑 **The read goes through `readTextContent`**, never `readFileSync(path,
|
|
63
|
+
* 'utf-8')`. This is a read-modify-WRITE path, so a UTF-16LE or BOM-prefixed
|
|
64
|
+
* config (what PowerShell 5.1 writes by default) was decoded as mojibake and then
|
|
65
|
+
* serialized back over the original — destroying a config whose only fault was
|
|
66
|
+
* its encoding.
|
|
67
|
+
*
|
|
68
|
+
* @param configPath - Absolute path to `vibe-agent-toolkit.config.yaml`
|
|
69
|
+
* @param skillName - The key under `skills.config` to upsert
|
|
70
|
+
* @param knobs - The knobs the operator typed; only these are changed
|
|
71
|
+
* @param onWarn - Receives the unknown-key warning, if any
|
|
72
|
+
* @returns The updated YAML, comments and key ordering preserved
|
|
73
|
+
* @throws Error when the UPDATED config would fail validation for any reason
|
|
74
|
+
* other than an unknown key
|
|
75
|
+
*/
|
|
76
|
+
export declare function updateSkillTestConfig(configPath: string, skillName: string, knobs: Parameters<typeof upsertTestConfig>[2], onWarn: (message: string) => void): Promise<string>;
|
|
21
77
|
export declare function createSkillTestConfigureCommand(): Command;
|
|
22
78
|
//# sourceMappingURL=configure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/commands/skill/test/configure.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/commands/skill/test/configure.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAIpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAkBD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,yBAAyB,GACjC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CA8BxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC7C,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAqCD,wBAAgB,+BAA+B,IAAI,OAAO,CAkDzD"}
|