@vibe-agent-toolkit/cli 0.1.41-rc.7 → 0.1.41
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/bin/vat +24 -1
- package/dist/bin/vat.js +24 -1
- package/dist/bin/vat.js.map +1 -1
- package/dist/bin.js +23 -2
- package/dist/bin.js.map +1 -1
- package/dist/commands/agent/list.d.ts +11 -0
- package/dist/commands/agent/list.d.ts.map +1 -1
- package/dist/commands/agent/list.js +30 -11
- package/dist/commands/agent/list.js.map +1 -1
- package/dist/commands/audit/distributed-tree.d.ts +172 -0
- package/dist/commands/audit/distributed-tree.d.ts.map +1 -0
- package/dist/commands/audit/distributed-tree.js +319 -0
- package/dist/commands/audit/distributed-tree.js.map +1 -0
- package/dist/commands/audit.d.ts +69 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +525 -174
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/build.d.ts +14 -0
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +103 -26
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/git-publish.js +21 -3
- package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
- package/dist/commands/claude/marketplace/validate.d.ts +125 -0
- package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
- package/dist/commands/claude/marketplace/validate.js +251 -44
- package/dist/commands/claude/marketplace/validate.js.map +1 -1
- package/dist/commands/claude/org/stubs.d.ts +9 -1
- package/dist/commands/claude/org/stubs.d.ts.map +1 -1
- package/dist/commands/claude/org/stubs.js +11 -3
- package/dist/commands/claude/org/stubs.js.map +1 -1
- package/dist/commands/claude/plugin/build.d.ts +34 -4
- package/dist/commands/claude/plugin/build.d.ts.map +1 -1
- package/dist/commands/claude/plugin/build.js +187 -16
- package/dist/commands/claude/plugin/build.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-files.js +6 -2
- package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
- package/dist/commands/claude/plugin/plugin-json-merge.d.ts.map +1 -1
- package/dist/commands/claude/plugin/plugin-json-merge.js +15 -0
- package/dist/commands/claude/plugin/plugin-json-merge.js.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.d.ts +40 -0
- package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
- package/dist/commands/claude/plugin/tree-copy.js +100 -4
- package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
- package/dist/commands/corpus/report.d.ts +22 -4
- package/dist/commands/corpus/report.d.ts.map +1 -1
- package/dist/commands/corpus/report.js +1 -0
- package/dist/commands/corpus/report.js.map +1 -1
- package/dist/commands/corpus/runner.d.ts +16 -1
- package/dist/commands/corpus/runner.d.ts.map +1 -1
- package/dist/commands/corpus/runner.js +40 -22
- package/dist/commands/corpus/runner.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/inventory.d.ts +2 -0
- package/dist/commands/inventory.d.ts.map +1 -1
- package/dist/commands/inventory.js +45 -4
- package/dist/commands/inventory.js.map +1 -1
- package/dist/commands/phase-utils.d.ts +183 -14
- package/dist/commands/phase-utils.d.ts.map +1 -1
- package/dist/commands/phase-utils.js +294 -29
- package/dist/commands/phase-utils.js.map +1 -1
- package/dist/commands/positional-args.d.ts +36 -0
- package/dist/commands/positional-args.d.ts.map +1 -0
- package/dist/commands/positional-args.js +52 -0
- package/dist/commands/positional-args.js.map +1 -0
- package/dist/commands/rag/query-command.d.ts +40 -0
- package/dist/commands/rag/query-command.d.ts.map +1 -1
- package/dist/commands/rag/query-command.js +47 -20
- package/dist/commands/rag/query-command.js.map +1 -1
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +27 -9
- package/dist/commands/resources/index.js.map +1 -1
- package/dist/commands/resources/scan.d.ts +37 -0
- package/dist/commands/resources/scan.d.ts.map +1 -1
- package/dist/commands/resources/scan.js +47 -32
- package/dist/commands/resources/scan.js.map +1 -1
- package/dist/commands/resources/validate.d.ts +136 -1
- package/dist/commands/resources/validate.d.ts.map +1 -1
- package/dist/commands/resources/validate.js +105 -66
- package/dist/commands/resources/validate.js.map +1 -1
- package/dist/commands/skill/review-checklist.d.ts.map +1 -1
- package/dist/commands/skill/review-checklist.js +5 -0
- package/dist/commands/skill/review-checklist.js.map +1 -1
- package/dist/commands/skill/review.d.ts.map +1 -1
- package/dist/commands/skill/review.js +7 -3
- package/dist/commands/skill/review.js.map +1 -1
- package/dist/commands/skill/test/run.d.ts +1 -1
- package/dist/commands/skill/test/run.d.ts.map +1 -1
- package/dist/commands/skill/test/run.js +8 -6
- package/dist/commands/skill/test/run.js.map +1 -1
- package/dist/commands/skills/build.d.ts +349 -11
- package/dist/commands/skills/build.d.ts.map +1 -1
- package/dist/commands/skills/build.js +901 -97
- package/dist/commands/skills/build.js.map +1 -1
- package/dist/commands/skills/command-helpers.d.ts +6 -10
- package/dist/commands/skills/command-helpers.d.ts.map +1 -1
- package/dist/commands/skills/command-helpers.js +6 -22
- package/dist/commands/skills/command-helpers.js.map +1 -1
- package/dist/commands/skills/list.d.ts +18 -0
- package/dist/commands/skills/list.d.ts.map +1 -1
- package/dist/commands/skills/list.js +41 -15
- package/dist/commands/skills/list.js.map +1 -1
- package/dist/commands/skills/package.d.ts +15 -0
- package/dist/commands/skills/package.d.ts.map +1 -1
- package/dist/commands/skills/package.js +30 -20
- package/dist/commands/skills/package.js.map +1 -1
- package/dist/commands/skills/scope-guard.d.ts +64 -0
- package/dist/commands/skills/scope-guard.d.ts.map +1 -0
- package/dist/commands/skills/scope-guard.js +86 -0
- package/dist/commands/skills/scope-guard.js.map +1 -0
- package/dist/commands/skills/validate-command.d.ts.map +1 -1
- package/dist/commands/skills/validate-command.js +41 -7
- package/dist/commands/skills/validate-command.js.map +1 -1
- package/dist/commands/skills/validate.d.ts +44 -3
- package/dist/commands/skills/validate.d.ts.map +1 -1
- package/dist/commands/skills/validate.js +217 -53
- package/dist/commands/skills/validate.js.map +1 -1
- package/dist/commands/validate.d.ts +18 -0
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +89 -68
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/verify.d.ts +113 -6
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +440 -123
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/skill-resolution/index.d.ts +1 -1
- package/dist/skill-resolution/index.d.ts.map +1 -1
- package/dist/skill-resolution/index.js +1 -1
- package/dist/skill-resolution/index.js.map +1 -1
- package/dist/skill-resolution/packaging-config.d.ts +15 -2
- package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
- package/dist/skill-resolution/packaging-config.js +39 -2
- package/dist/skill-resolution/packaging-config.js.map +1 -1
- package/dist/utils/command-error.d.ts +34 -1
- package/dist/utils/command-error.d.ts.map +1 -1
- package/dist/utils/command-error.js +32 -1
- package/dist/utils/command-error.js.map +1 -1
- package/dist/utils/help-loader.d.ts +6 -2
- package/dist/utils/help-loader.d.ts.map +1 -1
- package/dist/utils/help-loader.js +9 -16
- package/dist/utils/help-loader.js.map +1 -1
- package/dist/utils/issue-rendering.d.ts +130 -0
- package/dist/utils/issue-rendering.d.ts.map +1 -1
- package/dist/utils/issue-rendering.js +147 -0
- package/dist/utils/issue-rendering.js.map +1 -1
- package/dist/utils/issue-severity.d.ts +51 -0
- package/dist/utils/issue-severity.d.ts.map +1 -0
- package/dist/utils/issue-severity.js +63 -0
- package/dist/utils/issue-severity.js.map +1 -0
- package/dist/utils/output.d.ts +54 -5
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +111 -17
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/relativize-paths.d.ts +45 -0
- package/dist/utils/relativize-paths.d.ts.map +1 -0
- package/dist/utils/relativize-paths.js +67 -0
- package/dist/utils/relativize-paths.js.map +1 -0
- package/dist/utils/resource-loader.d.ts +21 -2
- package/dist/utils/resource-loader.d.ts.map +1 -1
- package/dist/utils/resource-loader.js +85 -11
- package/dist/utils/resource-loader.js.map +1 -1
- package/dist/utils/skill-packaging-config.d.ts +22 -1
- package/dist/utils/skill-packaging-config.d.ts.map +1 -1
- package/dist/utils/skill-packaging-config.js +26 -0
- package/dist/utils/skill-packaging-config.js.map +1 -1
- package/dist/utils/verdict-helpers.d.ts +4 -3
- package/dist/utils/verdict-helpers.d.ts.map +1 -1
- package/dist/utils/verdict-helpers.js +6 -13
- package/dist/utils/verdict-helpers.js.map +1 -1
- package/dist/version.d.ts +22 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +31 -2
- package/dist/version.js.map +1 -1
- package/docs/index.md +12 -0
- package/docs/rag.md +9 -4
- package/docs/resources.md +30 -14
- package/docs/skills.md +25 -7
- package/package.json +12 -12
|
@@ -8,6 +8,131 @@
|
|
|
8
8
|
* - README.md should exist (warning)
|
|
9
9
|
* - CHANGELOG.md should exist (warning)
|
|
10
10
|
*/
|
|
11
|
+
import { type SeverityCounts, type ValidationIssue } from '@vibe-agent-toolkit/agent-schema';
|
|
12
|
+
import { type ValidationResult } from '@vibe-agent-toolkit/agent-skills';
|
|
11
13
|
import { Command } from 'commander';
|
|
14
|
+
import { type FindingCountSummary } from '../../../utils/issue-rendering.js';
|
|
15
|
+
import { createLogger } from '../../../utils/logger.js';
|
|
16
|
+
/** Every finding the command reports, all anchored at one marketplace root. */
|
|
17
|
+
export interface MarketplaceFindings {
|
|
18
|
+
marketplaceResult: ValidationResult;
|
|
19
|
+
/** Empty when the manifest failed: the run bails before reaching plugins. */
|
|
20
|
+
pluginResults: ValidationResult[];
|
|
21
|
+
/**
|
|
22
|
+
* Manifest, required-file, plugin and skill issues, in report order, with
|
|
23
|
+
* every severity already resolved against the governing project's
|
|
24
|
+
* `validation.severity` map.
|
|
25
|
+
*/
|
|
26
|
+
issues: ValidationIssue[];
|
|
27
|
+
/**
|
|
28
|
+
* The run's overall status — the value the command's exit code is derived
|
|
29
|
+
* from (`error` → 1, otherwise 0), and the status `vat verify` reads back as
|
|
30
|
+
* this phase's status.
|
|
31
|
+
*
|
|
32
|
+
* Computed here rather than by the caller so it cannot be derived from a
|
|
33
|
+
* different issue set than the one reported. A promote-to-`error` override
|
|
34
|
+
* that moved a severity without moving this would be half-wired: the finding
|
|
35
|
+
* would read `error` while the run still exited 0.
|
|
36
|
+
*/
|
|
37
|
+
status: 'success' | 'warning' | 'error';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Run every validator this command reports on, each anchored at
|
|
41
|
+
* `marketplacePath`, and resolve their severities against the governing
|
|
42
|
+
* project's `validation.severity` map.
|
|
43
|
+
*
|
|
44
|
+
* Anchoring is what makes this one function rather than four call sites in the
|
|
45
|
+
* command body. Unlike `path`, an issue `location` cannot be re-based at the
|
|
46
|
+
* document boundary — `relative()` is not idempotent, so an already-relative
|
|
47
|
+
* value is indistinguishable from an absolute one and re-basing it yields
|
|
48
|
+
* nonsense. "Relative to what?" therefore has to be answered identically by
|
|
49
|
+
* every producer at the moment it emits, and answering it in four places is how
|
|
50
|
+
* three producers agreed and the fourth silently anchored at the enclosing
|
|
51
|
+
* PROJECT root instead — putting two coordinate systems in one document, where
|
|
52
|
+
* `join(root, location)` resolved for some findings and named nothing for
|
|
53
|
+
* others.
|
|
54
|
+
*
|
|
55
|
+
* Severity resolution is likewise INSIDE this function rather than a step the
|
|
56
|
+
* command adds after it. Its absence is the whole defect this addressed, and a
|
|
57
|
+
* command-body step is one a caller can forget: with it here, `status`, the
|
|
58
|
+
* exit code, the flat `issues` list and `plugins[].issues` all derive from a
|
|
59
|
+
* single resolved set, and the smallest testable entry point is the one that
|
|
60
|
+
* includes the filter.
|
|
61
|
+
*
|
|
62
|
+
* Exported so that contract is testable against a real marketplace without a
|
|
63
|
+
* CLI spawn; the command adds only the exit code and the emission.
|
|
64
|
+
*
|
|
65
|
+
* @param logger - Used only to report a config that exists but cannot be read.
|
|
66
|
+
* Required, not optional: a defaulted logger is how that diagnosis goes
|
|
67
|
+
* nowhere.
|
|
68
|
+
*/
|
|
69
|
+
export declare function collectMarketplaceFindings(marketplacePath: string, logger: ReturnType<typeof createLogger>): Promise<MarketplaceFindings>;
|
|
70
|
+
/** Everything the emitted report is built from. */
|
|
71
|
+
export interface MarketplaceValidateReportInput {
|
|
72
|
+
status: 'success' | 'warning' | 'error';
|
|
73
|
+
/**
|
|
74
|
+
* The marketplace directory: the ONE base every reported `path` AND every
|
|
75
|
+
* issue `location` is relative to.
|
|
76
|
+
*
|
|
77
|
+
* `location` is the half that has to be got right upstream. This builder
|
|
78
|
+
* re-bases `path` (producers hand over absolute paths on purpose), but it
|
|
79
|
+
* cannot re-base a `location` — re-basing is not idempotent, so a location
|
|
80
|
+
* that arrived anchored elsewhere is indistinguishable from a correct one.
|
|
81
|
+
* Every producer feeding this report must therefore already have been told
|
|
82
|
+
* this root: `validatePlugin`/`validateSkill` via `locationRoot`,
|
|
83
|
+
* `checkMarketplaceFiles` via `issueLocation`.
|
|
84
|
+
*/
|
|
85
|
+
root: string;
|
|
86
|
+
marketplace: ValidationResult['metadata'];
|
|
87
|
+
pluginResults: readonly ValidationResult[];
|
|
88
|
+
issues: readonly ValidationIssue[];
|
|
89
|
+
issueCounts: SeverityCounts;
|
|
90
|
+
summary: string;
|
|
91
|
+
duration: string;
|
|
92
|
+
/**
|
|
93
|
+
* Publish the flat per-issue list instead of the per-location summary.
|
|
94
|
+
*
|
|
95
|
+
* Picks the UNIT of the `issues` listing, not the content: everything else in
|
|
96
|
+
* the document is a total about the run and is identical in both modes.
|
|
97
|
+
* Optional, and absent means the summary — a caller with no opinion gets the
|
|
98
|
+
* readable form rather than the corpus-scale one.
|
|
99
|
+
*/
|
|
100
|
+
verbose?: boolean;
|
|
101
|
+
}
|
|
102
|
+
/** One inspected asset's DEFAULT row: where, how many, of what code. */
|
|
103
|
+
export type LocationIssueSummary = FindingCountSummary & {
|
|
104
|
+
/** The asset, relative to the report's `root`. Absent iff `unlocated`. */
|
|
105
|
+
location?: string;
|
|
106
|
+
/** Set instead of `location` when the findings named no file at all. */
|
|
107
|
+
unlocated?: true;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Collapse a flat finding list onto one counts-only row per `location`.
|
|
111
|
+
*
|
|
112
|
+
* `location` is this command's per-asset unit: `plugins/alpha/.claude-plugin/
|
|
113
|
+
* plugin.json`, `plugins/beta/skills/x/SKILL.md`. Rows come out in first-seen
|
|
114
|
+
* order, and a location with no findings has no row — there is nothing to
|
|
115
|
+
* filter here, because a location only exists in this listing by having emitted
|
|
116
|
+
* something.
|
|
117
|
+
*
|
|
118
|
+
* Every value is passed through un-rebased: `location` is already relative to
|
|
119
|
+
* the report's stated `root`, and `relative()` is not idempotent (see
|
|
120
|
+
* {@link MarketplaceValidateReportInput.root}).
|
|
121
|
+
*/
|
|
122
|
+
export declare function summarizeIssuesByLocation(issues: readonly ValidationIssue[]): LocationIssueSummary[];
|
|
123
|
+
/**
|
|
124
|
+
* Build the report `vat claude marketplace validate` publishes on stdout.
|
|
125
|
+
*
|
|
126
|
+
* Pure — returns the document rather than writing it — so the emitted shape,
|
|
127
|
+
* `path` included, is under unit test instead of only under a CLI spawn. One
|
|
128
|
+
* builder serves both exits (manifest-missing bail and full run) so the
|
|
129
|
+
* document has a single shape either way.
|
|
130
|
+
*
|
|
131
|
+
* Being pure is also the limit of what it can guarantee: it re-bases `path`,
|
|
132
|
+
* and passes `issues` through verbatim. The single-coordinate-system property
|
|
133
|
+
* is therefore only as true as its inputs — see `root` above — and is enforced
|
|
134
|
+
* against a real marketplace in `payload-path-coordinates.test.ts`, not here.
|
|
135
|
+
*/
|
|
136
|
+
export declare function buildMarketplaceValidateReport(input: MarketplaceValidateReportInput): Record<string, unknown>;
|
|
12
137
|
export declare function createMarketplaceValidateCommand(): Command;
|
|
13
138
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/commands/claude/marketplace/validate.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/commands/claude/marketplace/validate.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAKH,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAiKxD,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,6EAA6E;IAC7E,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC;;;;OAIG;IACH,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B;;;;;;;;;OASG;IACH,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,0BAA0B,CAC9C,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAqC9B;AAED,mDAAmD;AACnD,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC1C,aAAa,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC3C,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IACnC,WAAW,EAAE,cAAc,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAgBD,wEAAwE;AACxE,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACvD,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,eAAe,EAAE,GACjC,oBAAoB,EAAE,CAiBxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,8BAA8B,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0BzB;AA4CD,wBAAgB,gCAAgC,IAAI,OAAO,CAqC1D"}
|
|
@@ -10,14 +10,18 @@
|
|
|
10
10
|
* - CHANGELOG.md should exist (warning)
|
|
11
11
|
*/
|
|
12
12
|
import { existsSync, readdirSync } from 'node:fs';
|
|
13
|
-
import { calculateValidationStatus, countBySeverity } from '@vibe-agent-toolkit/agent-schema';
|
|
13
|
+
import { calculateValidationStatus, countBySeverity, } from '@vibe-agent-toolkit/agent-schema';
|
|
14
14
|
import { validateMarketplace, validateSkill, } from '@vibe-agent-toolkit/agent-skills';
|
|
15
15
|
import { validatePlugin } from '@vibe-agent-toolkit/claude-marketplace';
|
|
16
|
-
import { issueLocation, safePath } from '@vibe-agent-toolkit/utils';
|
|
16
|
+
import { findProjectRoot, issueLocation, safePath } from '@vibe-agent-toolkit/utils';
|
|
17
17
|
import { Command } from 'commander';
|
|
18
18
|
import { formatDuration, handleCommandError } from '../../../utils/command-error.js';
|
|
19
|
+
import { loadConfig } from '../../../utils/config-loader.js';
|
|
20
|
+
import { summarizeFindings } from '../../../utils/issue-rendering.js';
|
|
21
|
+
import { resolveIssueSeverity } from '../../../utils/issue-severity.js';
|
|
19
22
|
import { createLogger } from '../../../utils/logger.js';
|
|
20
23
|
import { writeYamlOutput } from '../../../utils/output.js';
|
|
24
|
+
import { relativizePathEntries } from '../../../utils/relativize-paths.js';
|
|
21
25
|
/**
|
|
22
26
|
* Check for required/recommended files in the marketplace root.
|
|
23
27
|
*/
|
|
@@ -64,8 +68,17 @@ async function validatePluginSkills(pluginDir, marketplacePath) {
|
|
|
64
68
|
}
|
|
65
69
|
/**
|
|
66
70
|
* Validate all plugins under the plugins/ directory.
|
|
71
|
+
*
|
|
72
|
+
* `validation` is the governing project's severity map (see
|
|
73
|
+
* {@link resolveProjectValidationConfig}). It is applied to each plugin result
|
|
74
|
+
* HERE rather than to the flat list at the end because the emitted document
|
|
75
|
+
* publishes both: `issues` and `plugins[].issues` are two views of the same
|
|
76
|
+
* findings, plus `plugins[].status`. Resolving once, at the producer, is what
|
|
77
|
+
* keeps them from disagreeing — a suppressed warning still listed under
|
|
78
|
+
* `plugins[]`, or a plugin `status: warning` above an issue list that no longer
|
|
79
|
+
* contains a warning.
|
|
67
80
|
*/
|
|
68
|
-
async function validatePlugins(marketplacePath) {
|
|
81
|
+
async function validatePlugins(marketplacePath, validation) {
|
|
69
82
|
const pluginsDir = safePath.join(marketplacePath, 'plugins');
|
|
70
83
|
if (!existsSync(pluginsDir))
|
|
71
84
|
return { pluginResults: [], issues: [] };
|
|
@@ -76,61 +89,243 @@ async function validatePlugins(marketplacePath) {
|
|
|
76
89
|
if (!entry.isDirectory())
|
|
77
90
|
continue;
|
|
78
91
|
const pluginDir = safePath.join(pluginsDir, entry.name);
|
|
79
|
-
|
|
92
|
+
// `locationRoot` is not optional here even though the parameter is: omitted,
|
|
93
|
+
// `validatePlugin` anchors at the plugin's own discovered project root, so
|
|
94
|
+
// its findings land in a different coordinate system than the marketplace
|
|
95
|
+
// and skill findings beside them — and every plugin's manifest collapses to
|
|
96
|
+
// the same `.claude-plugin/plugin.json`.
|
|
97
|
+
const rawResult = await validatePlugin(pluginDir, { strict: true, locationRoot: marketplacePath });
|
|
98
|
+
const pluginIssues = resolveIssueSeverity(rawResult.issues, validation);
|
|
99
|
+
const pluginResult = {
|
|
100
|
+
...rawResult,
|
|
101
|
+
issues: pluginIssues,
|
|
102
|
+
status: calculateValidationStatus(pluginIssues),
|
|
103
|
+
issueCounts: countBySeverity(pluginIssues),
|
|
104
|
+
};
|
|
80
105
|
pluginResults.push(pluginResult);
|
|
81
|
-
issues.push(...
|
|
106
|
+
issues.push(...pluginIssues);
|
|
82
107
|
const skillIssues = await validatePluginSkills(pluginDir, marketplacePath);
|
|
83
|
-
issues.push(...skillIssues);
|
|
108
|
+
issues.push(...resolveIssueSeverity(skillIssues, validation));
|
|
84
109
|
}
|
|
85
110
|
return { pluginResults, issues };
|
|
86
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* The `validation` config governing findings about `marketplacePath`.
|
|
114
|
+
*
|
|
115
|
+
* A built marketplace tree lives under the project that produced it
|
|
116
|
+
* (`dist/.claude/plugins/marketplaces/<name>/`), so the governing config is
|
|
117
|
+
* found by walking UP through {@link findProjectRoot} — the same discovery
|
|
118
|
+
* ladder every other lane uses, so they cannot disagree about which project
|
|
119
|
+
* governs a path.
|
|
120
|
+
*
|
|
121
|
+
* `skills.defaults.validation` is the ONE available scope, and deliberately so.
|
|
122
|
+
* A marketplace finding is not attributable to a skill, and neither
|
|
123
|
+
* `ClaudeMarketplaceSchema` nor `ClaudeMarketplacePluginEntrySchema` has a
|
|
124
|
+
* `validation` key — both are `.strict()`, so adding one to a config is a config
|
|
125
|
+
* error rather than an override. Per-plugin granularity is therefore
|
|
126
|
+
* unreachable by design until those schemas gain a key, which is a config-surface
|
|
127
|
+
* decision, not a fix.
|
|
128
|
+
*
|
|
129
|
+
* Why this phase needed it at all: `PACKAGED_AGENT_INSTRUCTION_FILE` ships at
|
|
130
|
+
* `warning` precisely because a legitimate exception exists — a plugin
|
|
131
|
+
* intentionally shipping a scaffold `CLAUDE.md` — and the code's own `fix` text
|
|
132
|
+
* tells the reader to record it as `severity.PACKAGED_AGENT_INSTRUCTION_FILE:
|
|
133
|
+
* ignore`. This command never read any config, so that instruction was a total
|
|
134
|
+
* no-op here: measured, the warnings survived the override at `skills.defaults`,
|
|
135
|
+
* at every per-skill key, and at the plugin's own name, and `vat verify` could
|
|
136
|
+
* not be made to reach `status: success` on a project that intends to ship one.
|
|
137
|
+
*
|
|
138
|
+
* A config that exists but does not parse yields no overrides rather than
|
|
139
|
+
* aborting: `vat verify` runs its `resources` and `skills` phases against the
|
|
140
|
+
* same config and both report the real parse error, so the run is not silent —
|
|
141
|
+
* and failing marketplace validation over an unrelated config defect would be a
|
|
142
|
+
* worse answer than validating it unmodified. The reason is logged, never
|
|
143
|
+
* swallowed.
|
|
144
|
+
*/
|
|
145
|
+
function resolveProjectValidationConfig(marketplacePath, logger) {
|
|
146
|
+
const projectRoot = findProjectRoot(marketplacePath);
|
|
147
|
+
if (projectRoot === null)
|
|
148
|
+
return undefined;
|
|
149
|
+
try {
|
|
150
|
+
return loadConfig(projectRoot)?.skills?.defaults?.validation;
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
logger.error(`Warning: could not read ${projectRoot} config for validation.severity overrides — ` +
|
|
154
|
+
`reporting unmodified severities (${error instanceof Error ? error.message : String(error)})`);
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Run every validator this command reports on, each anchored at
|
|
160
|
+
* `marketplacePath`, and resolve their severities against the governing
|
|
161
|
+
* project's `validation.severity` map.
|
|
162
|
+
*
|
|
163
|
+
* Anchoring is what makes this one function rather than four call sites in the
|
|
164
|
+
* command body. Unlike `path`, an issue `location` cannot be re-based at the
|
|
165
|
+
* document boundary — `relative()` is not idempotent, so an already-relative
|
|
166
|
+
* value is indistinguishable from an absolute one and re-basing it yields
|
|
167
|
+
* nonsense. "Relative to what?" therefore has to be answered identically by
|
|
168
|
+
* every producer at the moment it emits, and answering it in four places is how
|
|
169
|
+
* three producers agreed and the fourth silently anchored at the enclosing
|
|
170
|
+
* PROJECT root instead — putting two coordinate systems in one document, where
|
|
171
|
+
* `join(root, location)` resolved for some findings and named nothing for
|
|
172
|
+
* others.
|
|
173
|
+
*
|
|
174
|
+
* Severity resolution is likewise INSIDE this function rather than a step the
|
|
175
|
+
* command adds after it. Its absence is the whole defect this addressed, and a
|
|
176
|
+
* command-body step is one a caller can forget: with it here, `status`, the
|
|
177
|
+
* exit code, the flat `issues` list and `plugins[].issues` all derive from a
|
|
178
|
+
* single resolved set, and the smallest testable entry point is the one that
|
|
179
|
+
* includes the filter.
|
|
180
|
+
*
|
|
181
|
+
* Exported so that contract is testable against a real marketplace without a
|
|
182
|
+
* CLI spawn; the command adds only the exit code and the emission.
|
|
183
|
+
*
|
|
184
|
+
* @param logger - Used only to report a config that exists but cannot be read.
|
|
185
|
+
* Required, not optional: a defaulted logger is how that diagnosis goes
|
|
186
|
+
* nowhere.
|
|
187
|
+
*/
|
|
188
|
+
export async function collectMarketplaceFindings(marketplacePath, logger) {
|
|
189
|
+
const marketplaceResult = await validateMarketplace(marketplacePath, {
|
|
190
|
+
locationRoot: marketplacePath,
|
|
191
|
+
});
|
|
192
|
+
// A missing or malformed manifest makes every downstream check meaningless.
|
|
193
|
+
//
|
|
194
|
+
// These issues are deliberately NOT severity-resolved: an override governs
|
|
195
|
+
// findings ABOUT a marketplace that could be read, not the failure to read
|
|
196
|
+
// one. Resolving them would let `MARKETPLACE_MISSING_MANIFEST: ignore` empty
|
|
197
|
+
// the list and report `status: success` beside a summary saying the manifest
|
|
198
|
+
// is missing — a run that never happened claiming it passed.
|
|
199
|
+
if (marketplaceResult.status === 'error') {
|
|
200
|
+
return {
|
|
201
|
+
marketplaceResult,
|
|
202
|
+
pluginResults: [],
|
|
203
|
+
issues: [...marketplaceResult.issues],
|
|
204
|
+
status: 'error',
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const validation = resolveProjectValidationConfig(marketplacePath, logger);
|
|
208
|
+
const fileIssues = checkMarketplaceFiles(marketplacePath);
|
|
209
|
+
const { pluginResults, issues: pluginIssues } = await validatePlugins(marketplacePath, validation);
|
|
210
|
+
const issues = [
|
|
211
|
+
...resolveIssueSeverity(marketplaceResult.issues, validation),
|
|
212
|
+
...resolveIssueSeverity(fileIssues, validation),
|
|
213
|
+
...pluginIssues,
|
|
214
|
+
];
|
|
215
|
+
return {
|
|
216
|
+
marketplaceResult,
|
|
217
|
+
pluginResults,
|
|
218
|
+
issues,
|
|
219
|
+
status: calculateValidationStatus(issues),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Group key for findings that carry no `location` at all.
|
|
224
|
+
*
|
|
225
|
+
* A symbol rather than a sentinel string, and it is deliberately NOT published
|
|
226
|
+
* as one: every `location` in this document must satisfy the anchor contract —
|
|
227
|
+
* `join(root, location)` names a real file — so a row keyed `(no location)`
|
|
228
|
+
* would be a path that resolves to nothing, which is the coordinate lie `root`
|
|
229
|
+
* exists to prevent. The row is published with `unlocated: true` and no
|
|
230
|
+
* `location` instead. Dropping such findings was the other option and is the
|
|
231
|
+
* worse one: grouping by `location` is exactly the operation that silently
|
|
232
|
+
* loses them, and a shorter summary is the reassuring failure.
|
|
233
|
+
*/
|
|
234
|
+
const UNLOCATED = Symbol('unlocated');
|
|
235
|
+
/**
|
|
236
|
+
* Collapse a flat finding list onto one counts-only row per `location`.
|
|
237
|
+
*
|
|
238
|
+
* `location` is this command's per-asset unit: `plugins/alpha/.claude-plugin/
|
|
239
|
+
* plugin.json`, `plugins/beta/skills/x/SKILL.md`. Rows come out in first-seen
|
|
240
|
+
* order, and a location with no findings has no row — there is nothing to
|
|
241
|
+
* filter here, because a location only exists in this listing by having emitted
|
|
242
|
+
* something.
|
|
243
|
+
*
|
|
244
|
+
* Every value is passed through un-rebased: `location` is already relative to
|
|
245
|
+
* the report's stated `root`, and `relative()` is not idempotent (see
|
|
246
|
+
* {@link MarketplaceValidateReportInput.root}).
|
|
247
|
+
*/
|
|
248
|
+
export function summarizeIssuesByLocation(issues) {
|
|
249
|
+
const byLocation = new Map();
|
|
250
|
+
for (const issue of issues) {
|
|
251
|
+
const key = issue.location ?? UNLOCATED;
|
|
252
|
+
const existing = byLocation.get(key);
|
|
253
|
+
if (existing) {
|
|
254
|
+
existing.push(issue);
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
byLocation.set(key, [issue]);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return [...byLocation.entries()].map(([key, locationIssues]) => {
|
|
261
|
+
const { codes, ...counts } = summarizeFindings(locationIssues);
|
|
262
|
+
const anchor = typeof key === 'string' ? { location: key } : { unlocated: true };
|
|
263
|
+
return { ...anchor, ...counts, codes };
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Build the report `vat claude marketplace validate` publishes on stdout.
|
|
268
|
+
*
|
|
269
|
+
* Pure — returns the document rather than writing it — so the emitted shape,
|
|
270
|
+
* `path` included, is under unit test instead of only under a CLI spawn. One
|
|
271
|
+
* builder serves both exits (manifest-missing bail and full run) so the
|
|
272
|
+
* document has a single shape either way.
|
|
273
|
+
*
|
|
274
|
+
* Being pure is also the limit of what it can guarantee: it re-bases `path`,
|
|
275
|
+
* and passes `issues` through verbatim. The single-coordinate-system property
|
|
276
|
+
* is therefore only as true as its inputs — see `root` above — and is enforced
|
|
277
|
+
* against a real marketplace in `payload-path-coordinates.test.ts`, not here.
|
|
278
|
+
*/
|
|
279
|
+
export function buildMarketplaceValidateReport(input) {
|
|
280
|
+
const { status, root, marketplace, pluginResults, issues, issueCounts, summary, duration, verbose } = input;
|
|
281
|
+
const plugins = pluginResults.map(r => ({
|
|
282
|
+
path: r.path,
|
|
283
|
+
status: r.status,
|
|
284
|
+
metadata: r.metadata,
|
|
285
|
+
issues: r.issues,
|
|
286
|
+
}));
|
|
287
|
+
return {
|
|
288
|
+
status,
|
|
289
|
+
// Stated once, and the only absolute path in the document.
|
|
290
|
+
root,
|
|
291
|
+
...(marketplace ? { marketplace } : {}),
|
|
292
|
+
plugins: relativizePathEntries(plugins, root),
|
|
293
|
+
// One row per inspected asset by default; the flat per-issue list under
|
|
294
|
+
// `--verbose`. Either way every `location` stays relative to `root` above.
|
|
295
|
+
issues: verbose === true ? issues : summarizeIssuesByLocation(issues),
|
|
296
|
+
// Counts ride beside the status: `status` names only the worst ACTIONABLE
|
|
297
|
+
// severity, so an info-only run is `success` and the info would otherwise
|
|
298
|
+
// be unreported.
|
|
299
|
+
issueCounts,
|
|
300
|
+
summary,
|
|
301
|
+
duration,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
87
304
|
async function marketplaceValidateCommand(targetPath, options) {
|
|
88
305
|
const logger = createLogger(options.debug ? { debug: true } : {});
|
|
89
306
|
const startTime = Date.now();
|
|
90
307
|
try {
|
|
91
308
|
const marketplacePath = safePath.resolve(targetPath ?? '.');
|
|
92
309
|
logger.info(`Validating marketplace: ${marketplacePath}`);
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const duration = formatDuration(Date.now() - startTime);
|
|
98
|
-
writeYamlOutput({
|
|
99
|
-
status: 'error',
|
|
100
|
-
path: marketplacePath,
|
|
101
|
-
summary: marketplaceResult.summary,
|
|
102
|
-
issues: marketplaceResult.issues,
|
|
103
|
-
duration,
|
|
104
|
-
});
|
|
105
|
-
process.exit(1);
|
|
106
|
-
}
|
|
107
|
-
// 2. Check required/recommended files
|
|
108
|
-
const fileIssues = checkMarketplaceFiles(marketplacePath);
|
|
109
|
-
// 3. Validate plugins and their skills
|
|
110
|
-
const { pluginResults, issues: pluginIssues } = await validatePlugins(marketplacePath);
|
|
111
|
-
// Combine all issues
|
|
112
|
-
const allIssues = [...marketplaceResult.issues, ...fileIssues, ...pluginIssues];
|
|
113
|
-
const status = calculateValidationStatus(allIssues);
|
|
114
|
-
const issueCounts = countBySeverity(allIssues);
|
|
115
|
-
const duration = formatDuration(Date.now() - startTime);
|
|
116
|
-
writeYamlOutput({
|
|
310
|
+
const { marketplaceResult, pluginResults, issues, status } = await collectMarketplaceFindings(marketplacePath, logger);
|
|
311
|
+
const bailed = marketplaceResult.status === 'error';
|
|
312
|
+
const issueCounts = countBySeverity(issues);
|
|
313
|
+
writeYamlOutput(buildMarketplaceValidateReport({
|
|
117
314
|
status,
|
|
118
|
-
|
|
315
|
+
root: marketplacePath,
|
|
119
316
|
marketplace: marketplaceResult.metadata,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
status: r.status,
|
|
123
|
-
metadata: r.metadata,
|
|
124
|
-
issues: r.issues,
|
|
125
|
-
})),
|
|
126
|
-
issues: allIssues,
|
|
127
|
-
// Counts ride beside the status: `status` names only the worst ACTIONABLE
|
|
128
|
-
// severity, so an info-only run is `success` and the info would otherwise
|
|
129
|
-
// be unreported.
|
|
317
|
+
pluginResults,
|
|
318
|
+
issues,
|
|
130
319
|
issueCounts,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
320
|
+
// A bailed run reports WHY it stopped; a completed run reports what it
|
|
321
|
+
// found. Both emit through the one builder, so the document has a
|
|
322
|
+
// single shape either way.
|
|
323
|
+
summary: bailed
|
|
324
|
+
? marketplaceResult.summary
|
|
325
|
+
: `${issueCounts.errors} error(s), ${issueCounts.warnings} warning(s), ${issueCounts.info} info`,
|
|
326
|
+
duration: formatDuration(Date.now() - startTime),
|
|
327
|
+
verbose: options.verbose === true,
|
|
328
|
+
}));
|
|
134
329
|
process.exit(status === 'error' ? 1 : 0);
|
|
135
330
|
}
|
|
136
331
|
catch (error) {
|
|
@@ -143,6 +338,7 @@ export function createMarketplaceValidateCommand() {
|
|
|
143
338
|
.description('Validate a marketplace directory for publishing')
|
|
144
339
|
.argument('[path]', 'Path to marketplace directory (default: current directory)')
|
|
145
340
|
.option('-d, --debug', 'Enable debug logging')
|
|
341
|
+
.option('-v, --verbose', 'Show all scanned resources, including those without issues')
|
|
146
342
|
.action(marketplaceValidateCommand)
|
|
147
343
|
.addHelpText('after', `
|
|
148
344
|
Description:
|
|
@@ -151,6 +347,17 @@ Description:
|
|
|
151
347
|
|
|
152
348
|
Plugin versions are required (error, not warning) in strict marketplace validation.
|
|
153
349
|
|
|
350
|
+
Output (YAML on stdout):
|
|
351
|
+
root: the marketplace directory — every location below is relative to it
|
|
352
|
+
status, issueCounts, summary, duration, marketplace, plugins
|
|
353
|
+
|
|
354
|
+
issues: one row per inspected location, carrying only that location's counts
|
|
355
|
+
({location, errors?, warnings?, info?, codes}). A zero bucket is
|
|
356
|
+
omitted, and a location with no findings has no row.
|
|
357
|
+
|
|
358
|
+
--verbose replaces those rows with the flat per-issue list (message, fix and
|
|
359
|
+
all). That form is for '> file' then grep, not for reading.
|
|
360
|
+
|
|
154
361
|
Exit Codes:
|
|
155
362
|
0 - All validations passed (warnings allowed)
|
|
156
363
|
1 - Validation errors found
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/commands/claude/marketplace/validate.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/commands/claude/marketplace/validate.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EACL,yBAAyB,EACzB,eAAe,GAIhB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB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AAE,OAAO,CAAC,OAAO,KAAK,IAAI;SAClC,CAAC,CACH,CAAC;QAEF,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACtE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAExC,OAAO;SACJ,WAAW,CAAC,iDAAiD,CAAC;SAC9D,QAAQ,CAAC,QAAQ,EAAE,4DAA4D,CAAC;SAChF,MAAM,CAAC,aAAa,EAAE,sBAAsB,CAAC;SAC7C,MAAM,CAAC,eAAe,EAAE,4DAA4D,CAAC;SACrF,MAAM,CAAC,0BAA0B,CAAC;SAClC,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBzB,CAAC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Structured stub response for not-yet-implemented org commands.
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* The payload deliberately makes no scheduling claim. It used to emit
|
|
5
|
+
* `plannedFor: "0.1.22"` plus "coming in the next release" — a promise nothing
|
|
6
|
+
* in the build re-checks, so every release that shipped without the feature
|
|
7
|
+
* turned it into a lie (by 0.1.41 the "planned" version was 19 releases in the
|
|
8
|
+
* past). A stub can only state what is true at ANY version: the command is not
|
|
9
|
+
* implemented, and here is what to use instead. If a date or milestone is ever
|
|
10
|
+
* wanted, it belongs on a tracking issue that can be closed — not in a string
|
|
11
|
+
* baked into the binary. Covered by `test/claude-org-stubs.test.ts`.
|
|
4
12
|
*/
|
|
5
13
|
export declare function writeNotYetImplementedStub(command: string): void;
|
|
6
14
|
//# sourceMappingURL=stubs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../../../src/commands/claude/org/stubs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../../../src/commands/claude/org/stubs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAQhE"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Structured stub response for not-yet-implemented org commands.
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* The payload deliberately makes no scheduling claim. It used to emit
|
|
5
|
+
* `plannedFor: "0.1.22"` plus "coming in the next release" — a promise nothing
|
|
6
|
+
* in the build re-checks, so every release that shipped without the feature
|
|
7
|
+
* turned it into a lie (by 0.1.41 the "planned" version was 19 releases in the
|
|
8
|
+
* past). A stub can only state what is true at ANY version: the command is not
|
|
9
|
+
* implemented, and here is what to use instead. If a date or milestone is ever
|
|
10
|
+
* wanted, it belongs on a tracking issue that can be closed — not in a string
|
|
11
|
+
* baked into the binary. Covered by `test/claude-org-stubs.test.ts`.
|
|
4
12
|
*/
|
|
5
13
|
export function writeNotYetImplementedStub(command) {
|
|
6
14
|
process.stdout.write('---\n');
|
|
7
15
|
process.stdout.write('status: not-yet-implemented\n');
|
|
8
16
|
process.stdout.write(`command: "${command}"\n`);
|
|
9
|
-
process.stdout.write('
|
|
10
|
-
|
|
17
|
+
process.stdout.write('guidance: "This command is not implemented. Read operations (list/get) are implemented; ' +
|
|
18
|
+
'mutating operations are not. Use the Anthropic Console or call the Admin API directly."\n');
|
|
11
19
|
}
|
|
12
20
|
//# sourceMappingURL=stubs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.js","sourceRoot":"","sources":["../../../../src/commands/claude/org/stubs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stubs.js","sourceRoot":"","sources":["../../../../src/commands/claude/org/stubs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,OAAO,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0FAA0F;QACxF,2FAA2F,CAC9F,CAAC;AACJ,CAAC"}
|