@agentxm/extension-content 0.34.0 → 0.35.0
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/src/lint/catalog/pack/manifest-present.d.ts +1 -1
- package/dist/src/lint/catalog/shared/recommended-packs-rules.d.ts +0 -12
- package/dist/src/lint/catalog/shared/recommended-packs-rules.js +2 -17
- package/dist/src/lint/catalog/skill/manifest-present.d.ts +1 -1
- package/dist/src/lint/catalog-metadata.js +6 -0
- package/dist/src/lint/evaluate.d.ts +3 -3
- package/dist/src/lint/rule.d.ts +3 -3
- package/package.json +3 -3
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* @packageDocumentation
|
|
14
14
|
*/
|
|
15
15
|
import type { PackRuleContext } from "../../context.js";
|
|
16
|
-
export declare const manifestPresentRule: import("../../rule.ts").AdvisoryRule<PackRuleContext<import("../../context.js").PackContent
|
|
16
|
+
export declare const manifestPresentRule: import("../../rule.ts").AdvisoryRule<PackRuleContext<import("../../context.js").PackContent>, never>;
|
|
17
17
|
//# sourceMappingURL=manifest-present.d.ts.map
|
|
@@ -30,18 +30,6 @@ export interface RecommendedPacksRuleOptions<C> {
|
|
|
30
30
|
/** Reads the caller-decoded manifest JSON off the rule context. */
|
|
31
31
|
readonly manifestJson: (context: C) => unknown;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Split a `recommendedPacks` entry into its FQN and optional version range.
|
|
35
|
-
*
|
|
36
|
-
* Mirrors the separator search in `PackSpecSchema`: the range delimiter is the
|
|
37
|
-
* first `@` after the last `/`, since the owner segment also starts with `@`.
|
|
38
|
-
*
|
|
39
|
-
* @experimental This API is unstable and may change without notice.
|
|
40
|
-
*/
|
|
41
|
-
export declare const splitPackSpec: (spec: string) => {
|
|
42
|
-
readonly fqn: string;
|
|
43
|
-
readonly range: string | undefined;
|
|
44
|
-
};
|
|
45
33
|
/**
|
|
46
34
|
* Build the `<namespace>/standalone-declaration-valid` rule for one catalog.
|
|
47
35
|
*
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
19
|
import * as Effect from "effect/Effect";
|
|
20
|
+
import { splitExtensionReference } from "@agentxm/extension-model/unstable/extensions/common";
|
|
20
21
|
import { isManifestJsonParseFailure } from "./manifest-json.js";
|
|
21
22
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22
23
|
/**
|
|
@@ -31,22 +32,6 @@ const manifestRecord = (input) => {
|
|
|
31
32
|
return input;
|
|
32
33
|
};
|
|
33
34
|
const stringEntries = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
|
|
34
|
-
/**
|
|
35
|
-
* Split a `recommendedPacks` entry into its FQN and optional version range.
|
|
36
|
-
*
|
|
37
|
-
* Mirrors the separator search in `PackSpecSchema`: the range delimiter is the
|
|
38
|
-
* first `@` after the last `/`, since the owner segment also starts with `@`.
|
|
39
|
-
*
|
|
40
|
-
* @experimental This API is unstable and may change without notice.
|
|
41
|
-
*/
|
|
42
|
-
export const splitPackSpec = (spec) => {
|
|
43
|
-
const lastSlash = spec.lastIndexOf("/");
|
|
44
|
-
const rangeAt = lastSlash > 0 ? spec.indexOf("@", lastSlash + 1) : -1;
|
|
45
|
-
if (rangeAt <= 0) {
|
|
46
|
-
return { fqn: spec, range: undefined };
|
|
47
|
-
}
|
|
48
|
-
return { fqn: spec.slice(0, rangeAt), range: spec.slice(rangeAt + 1) };
|
|
49
|
-
};
|
|
50
35
|
// -----------------------------------------------------------------------------
|
|
51
36
|
// <namespace>/standalone-declaration-valid
|
|
52
37
|
// -----------------------------------------------------------------------------
|
|
@@ -119,7 +104,7 @@ export const makeRecommendedPacksValidRule = (options) => {
|
|
|
119
104
|
}
|
|
120
105
|
const findings = [];
|
|
121
106
|
for (const entry of stringEntries(manifest["recommendedPacks"])) {
|
|
122
|
-
const { fqn, range } =
|
|
107
|
+
const { name: fqn, constraint: range } = splitExtensionReference(entry);
|
|
123
108
|
if (range === undefined) {
|
|
124
109
|
continue;
|
|
125
110
|
}
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
* @packageDocumentation
|
|
20
20
|
*/
|
|
21
21
|
import type { SkillRuleContext } from "../../context.js";
|
|
22
|
-
export declare const manifestPresentRule: import("../../rule.ts").AdvisoryRule<SkillRuleContext<import("../../context.js").SkillContent
|
|
22
|
+
export declare const manifestPresentRule: import("../../rule.ts").AdvisoryRule<SkillRuleContext<import("../../context.js").SkillContent>, never>;
|
|
23
23
|
//# sourceMappingURL=manifest-present.d.ts.map
|
|
@@ -570,6 +570,12 @@ export const lintCatalogRuleMetadata = defineLintCatalog([
|
|
|
570
570
|
group: "workspace",
|
|
571
571
|
views: workspaceView,
|
|
572
572
|
},
|
|
573
|
+
{
|
|
574
|
+
id: "workspace/deprecated-installed",
|
|
575
|
+
defaultSeverity: "warning",
|
|
576
|
+
group: "workspace",
|
|
577
|
+
views: workspaceView,
|
|
578
|
+
},
|
|
573
579
|
{
|
|
574
580
|
id: "workspace/authored-package-declared",
|
|
575
581
|
defaultSeverity: "warning",
|
|
@@ -24,8 +24,8 @@ import type { LintFinding, LintRule } from "./rule.js";
|
|
|
24
24
|
*
|
|
25
25
|
* @experimental This API is unstable and may change without notice.
|
|
26
26
|
*/
|
|
27
|
-
export interface Evaluated<C> {
|
|
28
|
-
readonly rule: LintRule<C>;
|
|
27
|
+
export interface Evaluated<C, E = never> {
|
|
28
|
+
readonly rule: LintRule<C, E>;
|
|
29
29
|
readonly context: C;
|
|
30
30
|
readonly findings: ReadonlyArray<LintFinding>;
|
|
31
31
|
}
|
|
@@ -43,5 +43,5 @@ export interface Evaluated<C> {
|
|
|
43
43
|
*
|
|
44
44
|
* @experimental This API is unstable and may change without notice.
|
|
45
45
|
*/
|
|
46
|
-
export declare const evaluateContexts: <C>(rules: ReadonlyArray<LintRule<C>>, contexts: ReadonlyArray<C>, config: LintConfig) => Effect.Effect<ReadonlyArray<Evaluated<C
|
|
46
|
+
export declare const evaluateContexts: <C, E>(rules: ReadonlyArray<LintRule<C, E>>, contexts: ReadonlyArray<C>, config: LintConfig) => Effect.Effect<ReadonlyArray<Evaluated<C, E>>, E>;
|
|
47
47
|
//# sourceMappingURL=evaluate.d.ts.map
|
package/dist/src/lint/rule.d.ts
CHANGED
|
@@ -84,14 +84,14 @@ export interface RuleBase {
|
|
|
84
84
|
*
|
|
85
85
|
* @experimental This API is unstable and may change without notice.
|
|
86
86
|
*/
|
|
87
|
-
export interface AdvisoryRule<C> extends RuleBase {
|
|
87
|
+
export interface AdvisoryRule<C, E = never> extends RuleBase {
|
|
88
88
|
readonly kind: "advisory";
|
|
89
|
-
readonly check: (context: C) => Effect.Effect<ReadonlyArray<AdvisoryFinding
|
|
89
|
+
readonly check: (context: C) => Effect.Effect<ReadonlyArray<AdvisoryFinding>, E>;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* Discriminated union of lint rules over a caller-built rule-context type `C`.
|
|
93
93
|
*
|
|
94
94
|
* @experimental This API is unstable and may change without notice.
|
|
95
95
|
*/
|
|
96
|
-
export type LintRule<C> = AdvisoryRule<C>;
|
|
96
|
+
export type LintRule<C, E = never> = AdvisoryRule<C, E>;
|
|
97
97
|
//# sourceMappingURL=rule.d.ts.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/agentxm/axm/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@agentxm/extension-model": "^0.
|
|
7
|
+
"@agentxm/extension-model": "^0.35.0",
|
|
8
8
|
"effect": "4.0.0-rc.117",
|
|
9
9
|
"yaml": "^2.9.0"
|
|
10
10
|
},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@fast-check/vitest": "^0.5.0",
|
|
16
16
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
17
17
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
18
|
-
"vitest": "^5.0.
|
|
18
|
+
"vitest": "^5.0.1"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=24.19.0"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
},
|
|
59
59
|
"sideEffects": false,
|
|
60
60
|
"type": "module",
|
|
61
|
-
"version": "0.
|
|
61
|
+
"version": "0.35.0"
|
|
62
62
|
}
|