@agentxm/registry-protocol 0.28.4 → 0.28.6

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.
@@ -1,4 +1,3 @@
1
- import { registerLintRuleIds } from "../config.js";
2
1
  import { entrypointExistsRule } from "./hook/entrypoint-exists.js";
3
2
  import { decisionPortabilityRule } from "./hook/decision-portability.js";
4
3
  import { hookEnvelopeRules } from "./hook/envelope.js";
@@ -13,5 +12,4 @@ export const hookRules = [
13
12
  hookEnvelopeRules.standaloneDeclarationValid,
14
13
  hookEnvelopeRules.recommendedPacksValid,
15
14
  ];
16
- registerLintRuleIds(hookRules.map((r) => r.id));
17
15
  //# sourceMappingURL=hook.js.map
@@ -1,4 +1,3 @@
1
- import { registerLintRuleIds } from "../config.js";
2
1
  import { knowledgeEnvelopeRules } from "./knowledge/envelope.js";
3
2
  import { orderedEnvelopeRules } from "./shared/envelope-rules.js";
4
3
  import { knowledgeDiagnosticRules } from "./knowledge/diagnostics.js";
@@ -7,5 +6,4 @@ export const knowledgeRules = [
7
6
  ...knowledgeDiagnosticRules,
8
7
  ];
9
8
  export { knowledgeDiagnosticRuleDefinitions, knowledgeDiagnosticRules, } from "./knowledge/diagnostics.js";
10
- registerLintRuleIds(knowledgeRules.map((r) => r.id));
11
9
  //# sourceMappingURL=knowledge.js.map
@@ -1,6 +1,4 @@
1
- import { registerLintRuleIds } from "../config.js";
2
1
  import { mcpServerEnvelopeRules } from "./mcp-server/envelope.js";
3
2
  import { orderedEnvelopeRules } from "./shared/envelope-rules.js";
4
3
  export const mcpServerRules = orderedEnvelopeRules(mcpServerEnvelopeRules);
5
- registerLintRuleIds(mcpServerRules.map((r) => r.id));
6
4
  //# sourceMappingURL=mcp-server.js.map
@@ -15,12 +15,6 @@
15
15
  * context runs every rule and the `check` body's early-return arms handle
16
16
  * manifest-absent cases.
17
17
  *
18
- * Rule ids are **registered with the lint config allowlist at module-load
19
- * time**, so importing this catalog extends the set of accepted
20
- * `axm.json` `lint.rules` keys. Consumers that never import the
21
- * catalog (the registry Worker bundle for `skill`-only routes, e.g.) don't
22
- * pay the registration cost.
23
- *
24
18
  * @experimental This API is unstable and may change without notice.
25
19
  * @packageDocumentation
26
20
  */
@@ -15,16 +15,9 @@
15
15
  * context runs every rule and the `check` body's early-return arms handle
16
16
  * manifest-absent cases.
17
17
  *
18
- * Rule ids are **registered with the lint config allowlist at module-load
19
- * time**, so importing this catalog extends the set of accepted
20
- * `axm.json` `lint.rules` keys. Consumers that never import the
21
- * catalog (the registry Worker bundle for `skill`-only routes, e.g.) don't
22
- * pay the registration cost.
23
- *
24
18
  * @experimental This API is unstable and may change without notice.
25
19
  * @packageDocumentation
26
20
  */
27
- import { registerLintRuleIds } from "../config.js";
28
21
  import { manifestPresentRule } from "./pack/manifest-present.js";
29
22
  import { manifestSchemaValidRule } from "./pack/manifest-schema-valid.js";
30
23
  import { manifestKeysRecognizedRule } from "./pack/manifest-keys-recognized.js";
@@ -40,8 +33,4 @@ export const packRules = [
40
33
  manifestSchemaValidRule,
41
34
  manifestKeysRecognizedRule,
42
35
  ];
43
- // Register ids into the `LintConfig.rules` allowlist. Module-load side effect:
44
- // a consumer that imports this catalog (or the `catalog/index` barrel) enables
45
- // `axm.json` `lint.rules` to reference any of the above rule ids.
46
- registerLintRuleIds(packRules.map((r) => r.id));
47
36
  //# sourceMappingURL=pack.js.map
@@ -1,6 +1,4 @@
1
- import { registerLintRuleIds } from "../config.js";
2
1
  import { ruleEnvelopeRules } from "./rule/envelope.js";
3
2
  import { orderedEnvelopeRules } from "./shared/envelope-rules.js";
4
3
  export const ruleRules = orderedEnvelopeRules(ruleEnvelopeRules);
5
- registerLintRuleIds(ruleRules.map((r) => r.id));
6
4
  //# sourceMappingURL=rule.js.map
@@ -16,11 +16,6 @@
16
16
  * one call, and so the publish-safe barrel (`lint/publish.ts`) and the
17
17
  * `axm lint` catalog (`catalog/<type>.ts`) build from the same definitions.
18
18
  *
19
- * The factory is deliberately free of `registerLintRuleIds` — that module-load
20
- * side effect stays in `catalog/<type>.ts`, because it imports the workspace
21
- * lint config schema that `lint/publish.ts` exists to keep out of the registry
22
- * Worker bundle.
23
- *
24
19
  * @experimental This API is unstable and may change without notice.
25
20
  * @packageDocumentation
26
21
  */
@@ -16,11 +16,6 @@
16
16
  * one call, and so the publish-safe barrel (`lint/publish.ts`) and the
17
17
  * `axm lint` catalog (`catalog/<type>.ts`) build from the same definitions.
18
18
  *
19
- * The factory is deliberately free of `registerLintRuleIds` — that module-load
20
- * side effect stays in `catalog/<type>.ts`, because it imports the workspace
21
- * lint config schema that `lint/publish.ts` exists to keep out of the registry
22
- * Worker bundle.
23
- *
24
19
  * @experimental This API is unstable and may change without notice.
25
20
  * @packageDocumentation
26
21
  */
@@ -6,9 +6,8 @@
6
6
  * `onExcessProperty: "ignore"` and `errors: "all"`, then mapping the issues
7
7
  * through `issuesToFindings`.
8
8
  *
9
- * Phase 3a is the first catalog; landing the helper now keeps the Phase 3b
10
- * pack catalog from duplicating the composition when it arrives. The helper is
11
- * intentionally narrow — only the surface the `-schema-valid` rules need.
9
+ * The helper is intentionally narrow only the surface the `-schema-valid`
10
+ * rules need.
12
11
  *
13
12
  * @experimental This API is unstable and may change without notice.
14
13
  * @packageDocumentation
@@ -6,9 +6,8 @@
6
6
  * `onExcessProperty: "ignore"` and `errors: "all"`, then mapping the issues
7
7
  * through `issuesToFindings`.
8
8
  *
9
- * Phase 3a is the first catalog; landing the helper now keeps the Phase 3b
10
- * pack catalog from duplicating the composition when it arrives. The helper is
11
- * intentionally narrow — only the surface the `-schema-valid` rules need.
9
+ * The helper is intentionally narrow only the surface the `-schema-valid`
10
+ * rules need.
12
11
  *
13
12
  * @experimental This API is unstable and may change without notice.
14
13
  * @packageDocumentation
@@ -16,18 +16,12 @@
16
16
  * | `skill/recommended-packs-valid` | warning | — |
17
17
  *
18
18
  * The last two come from `catalog/shared/recommended-packs-rules.ts`; every
19
- * non-pack catalog registers the same pair against its own manifest.
19
+ * non-pack catalog applies the same pair against its own manifest.
20
20
  *
21
21
  * All ship `kind: "advisory"`. Native-vs-non-native applicability is
22
22
  * expressed via `check` early-return (no separate `applies` predicate); see
23
23
  * each rule's module for the guard.
24
24
  *
25
- * Rule ids are **registered with the lint config allowlist at module-load
26
- * time**, so importing this catalog extends the set of accepted
27
- * `axm.json` `lint.rules` keys. Consumers that never import the
28
- * catalog (the registry Worker bundle for `pack`-only routes, e.g.) don't pay
29
- * the registration cost.
30
- *
31
25
  * @experimental This API is unstable and may change without notice.
32
26
  * @packageDocumentation
33
27
  */
@@ -16,22 +16,15 @@
16
16
  * | `skill/recommended-packs-valid` | warning | — |
17
17
  *
18
18
  * The last two come from `catalog/shared/recommended-packs-rules.ts`; every
19
- * non-pack catalog registers the same pair against its own manifest.
19
+ * non-pack catalog applies the same pair against its own manifest.
20
20
  *
21
21
  * All ship `kind: "advisory"`. Native-vs-non-native applicability is
22
22
  * expressed via `check` early-return (no separate `applies` predicate); see
23
23
  * each rule's module for the guard.
24
24
  *
25
- * Rule ids are **registered with the lint config allowlist at module-load
26
- * time**, so importing this catalog extends the set of accepted
27
- * `axm.json` `lint.rules` keys. Consumers that never import the
28
- * catalog (the registry Worker bundle for `pack`-only routes, e.g.) don't pay
29
- * the registration cost.
30
- *
31
25
  * @experimental This API is unstable and may change without notice.
32
26
  * @packageDocumentation
33
27
  */
34
- import { registerLintRuleIds } from "../config.js";
35
28
  import { skillMdPresentRule } from "./skill/skill-md-present.js";
36
29
  import { manifestPresentRule } from "./skill/manifest-present.js";
37
30
  import { frontmatterParseableRule } from "./skill/frontmatter-parseable.js";
@@ -57,8 +50,4 @@ export const skillRules = [
57
50
  standaloneDeclarationValidRule,
58
51
  recommendedPacksValidRule,
59
52
  ];
60
- // Register ids into the `LintConfig.rules` allowlist. Module-load side effect:
61
- // a consumer that imports this catalog (or the `catalog/index` barrel) enables
62
- // `axm.json` `lint.rules` to reference any of the above rule ids.
63
- registerLintRuleIds(skillRules.map((r) => r.id));
64
53
  //# sourceMappingURL=skill.js.map
@@ -1,6 +1,4 @@
1
- import { registerLintRuleIds } from "../config.js";
2
1
  import { orderedEnvelopeRules } from "./shared/envelope-rules.js";
3
2
  import { subagentEnvelopeRules } from "./subagent/envelope.js";
4
3
  export const subagentRules = orderedEnvelopeRules(subagentEnvelopeRules);
5
- registerLintRuleIds(subagentRules.map((r) => r.id));
6
4
  //# sourceMappingURL=subagent.js.map
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Static metadata for every lint rule accepted by workspace settings.
3
+ *
4
+ * This catalog is deliberately independent of executable rule modules. The
5
+ * settings schema and generated JSON Schema must know the complete rule-id
6
+ * vocabulary without relying on catalog imports or module-load side effects.
7
+ * Executable catalogs are checked against this contract separately.
8
+ *
9
+ * @experimental This API is unstable and may change without notice.
10
+ * @packageDocumentation
11
+ */
12
+ import type { ExtensionType } from "@agentxm/extension-model/unstable/extensions/common";
13
+ import type { Severity } from "./rule.js";
14
+ /** A rule-catalog namespace: every extension type plus the workspace itself. */
15
+ export type LintCatalogGroup = ExtensionType | "workspace";
16
+ /** Filesystem identity against which a rule can execute. */
17
+ export type LintCatalogView = "workspace" | "git-index";
18
+ /** Stable configuration and execution metadata for one lint rule. */
19
+ export interface LintCatalogRuleMetadata {
20
+ readonly id: string;
21
+ readonly defaultSeverity: Severity;
22
+ readonly group: LintCatalogGroup;
23
+ readonly views: ReadonlyArray<LintCatalogView>;
24
+ }
25
+ /**
26
+ * Complete ordered lint-rule contract.
27
+ *
28
+ * Order is the public reporting order: extension catalogs first, then
29
+ * workspace rules. A rule listed for `git-index` must also be listed for the
30
+ * live `workspace` view.
31
+ */
32
+ export declare const lintCatalogRuleMetadata: readonly ({
33
+ id: string;
34
+ defaultSeverity: "error";
35
+ group: "skill";
36
+ views: readonly ["workspace", "git-index"];
37
+ } | {
38
+ id: string;
39
+ defaultSeverity: "warning";
40
+ group: "skill";
41
+ views: readonly ["workspace", "git-index"];
42
+ } | {
43
+ id: string;
44
+ defaultSeverity: "error";
45
+ group: "pack";
46
+ views: readonly ["workspace", "git-index"];
47
+ } | {
48
+ id: string;
49
+ defaultSeverity: "error";
50
+ group: "subagent";
51
+ views: readonly ["workspace", "git-index"];
52
+ } | {
53
+ id: string;
54
+ defaultSeverity: "warning";
55
+ group: "subagent";
56
+ views: readonly ["workspace", "git-index"];
57
+ } | {
58
+ id: string;
59
+ defaultSeverity: "error";
60
+ group: "mcp-server";
61
+ views: readonly ["workspace", "git-index"];
62
+ } | {
63
+ id: string;
64
+ defaultSeverity: "warning";
65
+ group: "mcp-server";
66
+ views: readonly ["workspace", "git-index"];
67
+ } | {
68
+ id: string;
69
+ defaultSeverity: "error";
70
+ group: "hook";
71
+ views: readonly ["workspace", "git-index"];
72
+ } | {
73
+ id: string;
74
+ defaultSeverity: "warning";
75
+ group: "hook";
76
+ views: readonly ["workspace", "git-index"];
77
+ } | {
78
+ id: string;
79
+ defaultSeverity: "error";
80
+ group: "rule";
81
+ views: readonly ["workspace", "git-index"];
82
+ } | {
83
+ id: string;
84
+ defaultSeverity: "warning";
85
+ group: "rule";
86
+ views: readonly ["workspace", "git-index"];
87
+ } | {
88
+ id: string;
89
+ defaultSeverity: "error";
90
+ group: "knowledge";
91
+ views: readonly ["workspace", "git-index"];
92
+ } | {
93
+ id: string;
94
+ defaultSeverity: "warning";
95
+ group: "knowledge";
96
+ views: readonly ["workspace", "git-index"];
97
+ } | {
98
+ id: string;
99
+ defaultSeverity: "error";
100
+ group: "workspace";
101
+ views: readonly ["workspace", "git-index"];
102
+ } | {
103
+ id: string;
104
+ defaultSeverity: "info";
105
+ group: "workspace";
106
+ views: readonly ["workspace", "git-index"];
107
+ } | {
108
+ id: string;
109
+ defaultSeverity: "warning";
110
+ group: "workspace";
111
+ views: readonly ["workspace"];
112
+ } | {
113
+ id: string;
114
+ defaultSeverity: "warning";
115
+ group: "workspace";
116
+ views: readonly ["workspace", "git-index"];
117
+ } | {
118
+ id: string;
119
+ defaultSeverity: "error";
120
+ group: "workspace";
121
+ views: readonly ["workspace"];
122
+ })[];
123
+ /** Every accepted lint-rule identity, in catalog/reporting order. */
124
+ export declare const allLintCatalogRuleIds: readonly string[];
125
+ //# sourceMappingURL=catalog-metadata.d.ts.map