@agentxm/registry-protocol 0.28.11 → 0.28.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +13 -5
  2. package/dist/src/unstable/human-handoff.d.ts +16 -0
  3. package/dist/src/unstable/human-handoff.js +19 -0
  4. package/dist/src/unstable/publish/index.d.ts +1 -6
  5. package/dist/src/unstable/publish/index.js +1 -6
  6. package/dist/src/unstable/publish-authorization.d.ts +26 -0
  7. package/dist/src/unstable/publish-authorization.js +41 -0
  8. package/dist/src/unstable/registry/discover-schema.d.ts +4 -4
  9. package/dist/src/unstable/registry/index.d.ts +1 -0
  10. package/dist/src/unstable/registry/index.js +1 -0
  11. package/dist/src/unstable/registry/version-selection.d.ts +22 -0
  12. package/dist/src/unstable/registry/version-selection.js +39 -0
  13. package/package.json +19 -190
  14. package/dist/src/unstable/content/agent-skills-standard.d.ts +0 -17
  15. package/dist/src/unstable/content/agent-skills-standard.js +0 -24
  16. package/dist/src/unstable/content/frontmatter.d.ts +0 -52
  17. package/dist/src/unstable/content/frontmatter.js +0 -115
  18. package/dist/src/unstable/content/index.d.ts +0 -11
  19. package/dist/src/unstable/content/index.js +0 -11
  20. package/dist/src/unstable/content/skill-content.d.ts +0 -43
  21. package/dist/src/unstable/content/skill-content.js +0 -184
  22. package/dist/src/unstable/content/skill-types.d.ts +0 -22
  23. package/dist/src/unstable/content/skill-types.js +0 -9
  24. package/dist/src/unstable/content/subagent-content.d.ts +0 -58
  25. package/dist/src/unstable/content/subagent-content.js +0 -101
  26. package/dist/src/unstable/knowledge/index.d.ts +0 -8
  27. package/dist/src/unstable/knowledge/index.js +0 -8
  28. package/dist/src/unstable/knowledge/knowledge-search.d.ts +0 -32
  29. package/dist/src/unstable/knowledge/knowledge-search.js +0 -147
  30. package/dist/src/unstable/knowledge/okf.d.ts +0 -86
  31. package/dist/src/unstable/knowledge/okf.js +0 -1090
  32. package/dist/src/unstable/lint/catalog/hook/decision-portability.d.ts +0 -4
  33. package/dist/src/unstable/lint/catalog/hook/decision-portability.js +0 -40
  34. package/dist/src/unstable/lint/catalog/hook/entrypoint-exists.d.ts +0 -4
  35. package/dist/src/unstable/lint/catalog/hook/entrypoint-exists.js +0 -39
  36. package/dist/src/unstable/lint/catalog/hook/envelope.d.ts +0 -6
  37. package/dist/src/unstable/lint/catalog/hook/envelope.js +0 -15
  38. package/dist/src/unstable/lint/catalog/hook/matcher-raw-portability.d.ts +0 -4
  39. package/dist/src/unstable/lint/catalog/hook/matcher-raw-portability.js +0 -51
  40. package/dist/src/unstable/lint/catalog/hook.d.ts +0 -4
  41. package/dist/src/unstable/lint/catalog/hook.js +0 -15
  42. package/dist/src/unstable/lint/catalog/knowledge/diagnostics.d.ts +0 -128
  43. package/dist/src/unstable/lint/catalog/knowledge/diagnostics.js +0 -78
  44. package/dist/src/unstable/lint/catalog/knowledge/envelope.d.ts +0 -6
  45. package/dist/src/unstable/lint/catalog/knowledge/envelope.js +0 -15
  46. package/dist/src/unstable/lint/catalog/knowledge.d.ts +0 -5
  47. package/dist/src/unstable/lint/catalog/knowledge.js +0 -9
  48. package/dist/src/unstable/lint/catalog/mcp-server/envelope.d.ts +0 -6
  49. package/dist/src/unstable/lint/catalog/mcp-server/envelope.js +0 -15
  50. package/dist/src/unstable/lint/catalog/mcp-server.d.ts +0 -4
  51. package/dist/src/unstable/lint/catalog/mcp-server.js +0 -4
  52. package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.d.ts +0 -28
  53. package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js +0 -38
  54. package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts +0 -17
  55. package/dist/src/unstable/lint/catalog/pack/manifest-present.js +0 -24
  56. package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts +0 -25
  57. package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js +0 -33
  58. package/dist/src/unstable/lint/catalog/pack-accessor/contexts.d.ts +0 -51
  59. package/dist/src/unstable/lint/catalog/pack-accessor/contexts.js +0 -45
  60. package/dist/src/unstable/lint/catalog/pack-accessor/vft.d.ts +0 -60
  61. package/dist/src/unstable/lint/catalog/pack-accessor/vft.js +0 -85
  62. package/dist/src/unstable/lint/catalog/pack.d.ts +0 -31
  63. package/dist/src/unstable/lint/catalog/pack.js +0 -36
  64. package/dist/src/unstable/lint/catalog/rule/envelope.d.ts +0 -6
  65. package/dist/src/unstable/lint/catalog/rule/envelope.js +0 -15
  66. package/dist/src/unstable/lint/catalog/rule.d.ts +0 -4
  67. package/dist/src/unstable/lint/catalog/rule.js +0 -4
  68. package/dist/src/unstable/lint/catalog/shared/envelope-rules.d.ts +0 -88
  69. package/dist/src/unstable/lint/catalog/shared/envelope-rules.js +0 -84
  70. package/dist/src/unstable/lint/catalog/shared/manifest-json.d.ts +0 -18
  71. package/dist/src/unstable/lint/catalog/shared/manifest-json.js +0 -28
  72. package/dist/src/unstable/lint/catalog/shared/manifest-present.d.ts +0 -25
  73. package/dist/src/unstable/lint/catalog/shared/manifest-present.js +0 -37
  74. package/dist/src/unstable/lint/catalog/shared/recommended-packs-rules.d.ts +0 -70
  75. package/dist/src/unstable/lint/catalog/shared/recommended-packs-rules.js +0 -139
  76. package/dist/src/unstable/lint/catalog/shared/schema-rule.d.ts +0 -57
  77. package/dist/src/unstable/lint/catalog/shared/schema-rule.js +0 -102
  78. package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.d.ts +0 -31
  79. package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.js +0 -148
  80. package/dist/src/unstable/lint/catalog/skill/frontmatter-standard-valid.d.ts +0 -13
  81. package/dist/src/unstable/lint/catalog/skill/frontmatter-standard-valid.js +0 -61
  82. package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.d.ts +0 -26
  83. package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.js +0 -41
  84. package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts +0 -23
  85. package/dist/src/unstable/lint/catalog/skill/manifest-present.js +0 -32
  86. package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.d.ts +0 -21
  87. package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.js +0 -36
  88. package/dist/src/unstable/lint/catalog/skill/recommended-packs-valid.d.ts +0 -8
  89. package/dist/src/unstable/lint/catalog/skill/recommended-packs-valid.js +0 -12
  90. package/dist/src/unstable/lint/catalog/skill/skill-md-present.d.ts +0 -17
  91. package/dist/src/unstable/lint/catalog/skill/skill-md-present.js +0 -37
  92. package/dist/src/unstable/lint/catalog/skill/standalone-declaration-valid.d.ts +0 -8
  93. package/dist/src/unstable/lint/catalog/skill/standalone-declaration-valid.js +0 -12
  94. package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts +0 -61
  95. package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js +0 -55
  96. package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts +0 -77
  97. package/dist/src/unstable/lint/catalog/skill-accessor/vft.js +0 -135
  98. package/dist/src/unstable/lint/catalog/skill.d.ts +0 -38
  99. package/dist/src/unstable/lint/catalog/skill.js +0 -53
  100. package/dist/src/unstable/lint/catalog/subagent/envelope.d.ts +0 -6
  101. package/dist/src/unstable/lint/catalog/subagent/envelope.js +0 -15
  102. package/dist/src/unstable/lint/catalog/subagent.d.ts +0 -4
  103. package/dist/src/unstable/lint/catalog/subagent.js +0 -4
  104. package/dist/src/unstable/lint/catalog-metadata.d.ts +0 -125
  105. package/dist/src/unstable/lint/catalog-metadata.js +0 -642
  106. package/dist/src/unstable/lint/compose-path.d.ts +0 -28
  107. package/dist/src/unstable/lint/compose-path.js +0 -64
  108. package/dist/src/unstable/lint/config.d.ts +0 -77
  109. package/dist/src/unstable/lint/config.js +0 -99
  110. package/dist/src/unstable/lint/context.d.ts +0 -239
  111. package/dist/src/unstable/lint/context.js +0 -17
  112. package/dist/src/unstable/lint/describe-document.d.ts +0 -31
  113. package/dist/src/unstable/lint/describe-document.js +0 -50
  114. package/dist/src/unstable/lint/evaluate.d.ts +0 -47
  115. package/dist/src/unstable/lint/evaluate.js +0 -73
  116. package/dist/src/unstable/lint/issues-to-findings.d.ts +0 -35
  117. package/dist/src/unstable/lint/issues-to-findings.js +0 -149
  118. package/dist/src/unstable/lint/publish.d.ts +0 -49
  119. package/dist/src/unstable/lint/publish.js +0 -86
  120. package/dist/src/unstable/lint/rule.d.ts +0 -97
  121. package/dist/src/unstable/lint/rule.js +0 -17
  122. package/dist/src/unstable/publish/archive-guardrails.d.ts +0 -39
  123. package/dist/src/unstable/publish/archive-guardrails.js +0 -250
  124. package/dist/src/unstable/publish/filtered-package-validation.d.ts +0 -24
  125. package/dist/src/unstable/publish/filtered-package-validation.js +0 -117
  126. package/dist/src/unstable/publish/ingest-limits.d.ts +0 -25
  127. package/dist/src/unstable/publish/ingest-limits.js +0 -41
  128. package/dist/src/unstable/publish/input-normalization.d.ts +0 -40
  129. package/dist/src/unstable/publish/input-normalization.js +0 -125
  130. package/dist/src/unstable/publish/manifest-policy.d.ts +0 -611
  131. package/dist/src/unstable/publish/manifest-policy.js +0 -196
  132. package/dist/src/unstable/publish/test-zip-helpers.d.ts +0 -13
  133. package/dist/src/unstable/publish/test-zip-helpers.js +0 -117
  134. package/dist/src/unstable/registry/release-age-policy.d.ts +0 -57
  135. package/dist/src/unstable/registry/release-age-policy.js +0 -117
@@ -1,147 +0,0 @@
1
- export const KNOWLEDGE_SEARCH_TOKENIZER_PROFILE = {
2
- id: "axm-knowledge-lexical-v1",
3
- unicodeNormalization: "NFKC",
4
- caseNormalization: "unicode-case-fold",
5
- termBoundary: "unicode-whitespace-punctuation-camel-code",
6
- stemming: false,
7
- };
8
- const normalizeTokenSource = (value) => value
9
- .normalize("NFKC")
10
- .replace(/([\p{Ll}\p{N}])(\p{Lu})/gu, "$1 $2")
11
- .replace(/(\p{Lu})(\p{Lu}\p{Ll})/gu, "$1 $2")
12
- .replace(/(\p{L})(\p{N})/gu, "$1 $2")
13
- .replace(/(\p{N})(\p{L})/gu, "$1 $2")
14
- // ECMAScript does not expose Unicode's CaseFolding.txt operation directly.
15
- // Upper-then-lower handles multi-character folds such as ß -> ss while
16
- // remaining deterministic and locale-independent.
17
- .toUpperCase()
18
- .toLowerCase();
19
- export const tokenizeKnowledgeSearchText = (value) => normalizeTokenSource(value).match(/[\p{L}\p{M}\p{N}]+/gu) ?? [];
20
- const normalizeLiteral = (value) => value.normalize("NFC").toLowerCase();
21
- const parseQuotedValue = (input, quoteIndex) => {
22
- let value = "";
23
- let escaped = false;
24
- for (let index = quoteIndex + 1; index < input.length; index += 1) {
25
- const character = input[index];
26
- if (character === undefined)
27
- break;
28
- if (escaped) {
29
- value += character;
30
- escaped = false;
31
- continue;
32
- }
33
- if (character === "\\") {
34
- escaped = true;
35
- continue;
36
- }
37
- if (character === '"') {
38
- return { ok: true, value, nextIndex: index + 1 };
39
- }
40
- value += character;
41
- }
42
- return { ok: false };
43
- };
44
- const addOrdinaryTerms = (clauses, value) => {
45
- for (const token of tokenizeKnowledgeSearchText(value)) {
46
- clauses.push({ kind: "term", token });
47
- }
48
- };
49
- const startsWithLiteralOperator = (input, index) => input.slice(index, index + "literal:".length).toLowerCase() === "literal:";
50
- export const parseKnowledgeSearchQuery = (input) => {
51
- const clauses = [];
52
- let index = 0;
53
- while (index < input.length) {
54
- if (/\s/u.test(input[index] ?? "")) {
55
- index += 1;
56
- continue;
57
- }
58
- if (startsWithLiteralOperator(input, index)) {
59
- index += "literal:".length;
60
- if (input[index] === '"') {
61
- const quoted = parseQuotedValue(input, index);
62
- if (!quoted.ok) {
63
- return { ok: false, detail: "Explicit literals must end with a closing quote." };
64
- }
65
- if (quoted.value.trim().length === 0) {
66
- return { ok: false, detail: "Explicit literals cannot be empty." };
67
- }
68
- clauses.push({ kind: "literal", value: normalizeLiteral(quoted.value) });
69
- index = quoted.nextIndex;
70
- continue;
71
- }
72
- const end = input.slice(index).search(/\s/u);
73
- const nextIndex = end === -1 ? input.length : index + end;
74
- const value = input.slice(index, nextIndex);
75
- if (value.length === 0) {
76
- return { ok: false, detail: "Explicit literals cannot be empty." };
77
- }
78
- clauses.push({ kind: "literal", value: normalizeLiteral(value) });
79
- index = nextIndex;
80
- continue;
81
- }
82
- if (input[index] === '"') {
83
- const quoted = parseQuotedValue(input, index);
84
- if (!quoted.ok) {
85
- return { ok: false, detail: "Quoted phrases must end with a closing quote." };
86
- }
87
- if (quoted.value.length === 0) {
88
- return { ok: false, detail: "Quoted phrases cannot be empty." };
89
- }
90
- const tokens = tokenizeKnowledgeSearchText(quoted.value);
91
- if (tokens.length === 0) {
92
- return {
93
- ok: false,
94
- detail: "Quoted phrases must contain at least one searchable token.",
95
- };
96
- }
97
- clauses.push({ kind: "phrase", tokens });
98
- index = quoted.nextIndex;
99
- continue;
100
- }
101
- let end = index;
102
- while (end < input.length && !/\s/u.test(input[end] ?? "") && input[end] !== '"') {
103
- end += 1;
104
- }
105
- addOrdinaryTerms(clauses, input.slice(index, end));
106
- index = end;
107
- }
108
- return clauses.length === 0
109
- ? { ok: false, detail: "Search query must contain at least one term, phrase, or literal." }
110
- : { ok: true, query: { clauses } };
111
- };
112
- const containsPhrase = (fieldTokens, phraseTokens) => {
113
- if (phraseTokens.length > fieldTokens.length)
114
- return false;
115
- const finalStart = fieldTokens.length - phraseTokens.length;
116
- for (let start = 0; start <= finalStart; start += 1) {
117
- if (phraseTokens.every((token, offset) => fieldTokens[start + offset] === token))
118
- return true;
119
- }
120
- return false;
121
- };
122
- const searchableFields = (concept) => [
123
- concept.id,
124
- concept.title,
125
- ...(concept.description === undefined ? [] : [concept.description]),
126
- ...(concept.tags ?? []),
127
- ...(concept.type === undefined ? [] : [concept.type]),
128
- concept.body,
129
- ];
130
- export const matchesKnowledgeSearchQuery = (concept, query) => {
131
- const fields = searchableFields(concept);
132
- const tokenFields = fields.map(tokenizeKnowledgeSearchText);
133
- const literalFields = fields.map(normalizeLiteral);
134
- return query.clauses.every((clause) => {
135
- switch (clause.kind) {
136
- case "term":
137
- return tokenFields.some((tokens) => tokens.includes(clause.token));
138
- case "phrase":
139
- return tokenFields.some((tokens) => containsPhrase(tokens, clause.tokens));
140
- case "literal":
141
- return literalFields.some((field) => field.includes(clause.value));
142
- default:
143
- return clause;
144
- }
145
- });
146
- };
147
- //# sourceMappingURL=knowledge-search.js.map
@@ -1,86 +0,0 @@
1
- /** Open Knowledge Format discovery and AgentXM-profile validation (v0.2). */
2
- import * as Effect from "effect/Effect";
3
- import * as FileSystem from "effect/FileSystem";
4
- import * as Path from "effect/Path";
5
- import { FrontmatterParseFailure } from "../content/frontmatter.js";
6
- import { type KnowledgeSearchQuery } from "./knowledge-search.js";
7
- /** OKF dialect versions this inspector understands. */
8
- export type OkfVersion = "0.2";
9
- /** Actor that produced or confirmed a concept, per the OKF actor convention. */
10
- export interface KnowledgeActorRecord {
11
- readonly by: string;
12
- readonly at?: string;
13
- }
14
- /**
15
- * Trust tier derived from `verified`, per OKF 0.2. A concept is
16
- * `human-reviewed` when any verifier is a `human:<id>` actor,
17
- * `machine-confirmed` when verified only by non-human actors, and
18
- * `unverified` when `verified` is absent.
19
- */
20
- export type KnowledgeTrustTier = "unverified" | "machine-confirmed" | "human-reviewed";
21
- export type KnowledgeDocumentKind = "concept" | "index" | "log";
22
- /** An authored Markdown link and the bundle-local concept it resolves to, when any. */
23
- export interface KnowledgeAuthoredLink {
24
- readonly target: string;
25
- readonly line: number;
26
- readonly resolvedConceptId?: string;
27
- }
28
- export interface KnowledgeConcept {
29
- readonly id: string;
30
- readonly kind: KnowledgeDocumentKind;
31
- readonly title: string;
32
- /** The authored level-one heading, absent when `title` fell back to the concept ID. */
33
- readonly authoredTitle?: string;
34
- readonly frontmatter?: Readonly<Record<string, unknown>>;
35
- readonly type?: string;
36
- readonly description?: string;
37
- readonly tags?: ReadonlyArray<string>;
38
- readonly resource?: string;
39
- readonly status?: string;
40
- readonly staleAfter?: string;
41
- readonly generated?: KnowledgeActorRecord;
42
- readonly verified?: ReadonlyArray<KnowledgeActorRecord>;
43
- readonly trust?: KnowledgeTrustTier;
44
- readonly authoredLinks: ReadonlyArray<KnowledgeAuthoredLink>;
45
- readonly relativePath: string;
46
- readonly body: string;
47
- }
48
- export declare const KNOWLEDGE_DIAGNOSTIC_CODES: readonly ["bundle-too-large", "file-too-large", "invalid-tags", "missing-root-index", "missing-okf-version", "missing-title", "missing-description", "missing-manifest-description", "empty-bundle", "missing-tags", "symbolic-link", "too-many-files", "unsupported-okf-version", "missing-type", "invalid-frontmatter", "case-collision", "dangerous-uri", "detected-secret", "unsafe-path", "invalid-index", "invalid-log", "invalid-resource", "escaping-resource", "unresolved-resource", "broken-internal-link", "escaping-link", "unreachable-concept", "missing-index-entry", "stale-index-entry", "embedded-html", "duplicate-resource", "inconsistent-type", "large-concept", "large-index", "unreferenced-asset", "invalid-sources", "invalid-generated", "invalid-verified", "invalid-status", "invalid-stale-after", "invalid-attestation"];
49
- export type KnowledgeDiagnosticCode = (typeof KNOWLEDGE_DIAGNOSTIC_CODES)[number];
50
- export interface KnowledgeFrontmatterParseDetails {
51
- readonly kind: "frontmatter-parse";
52
- readonly reason: string;
53
- }
54
- export interface KnowledgeDiagnostic {
55
- readonly code: KnowledgeDiagnosticCode;
56
- readonly severity: "error" | "warning";
57
- readonly relativePath: string;
58
- readonly line?: number;
59
- readonly column?: number;
60
- readonly message: string;
61
- readonly details?: KnowledgeFrontmatterParseDetails;
62
- }
63
- /** Convert a typed frontmatter failure into the stable Knowledge diagnostic contract. */
64
- export declare const frontmatterParseDiagnostic: (relativePath: string, failure: FrontmatterParseFailure) => KnowledgeDiagnostic;
65
- export interface KnowledgeInspection {
66
- readonly concepts: ReadonlyArray<KnowledgeConcept>;
67
- readonly diagnostics: ReadonlyArray<KnowledgeDiagnostic>;
68
- /** Canonical dialect required at the bundle root. */
69
- readonly okfVersion: OkfVersion;
70
- }
71
- export interface KnowledgeBundleEntry {
72
- readonly relativePath: string;
73
- readonly type: FileSystem.File.Type;
74
- readonly size: bigint;
75
- }
76
- /** Collect a bundle's normalized entry inventory without following symbolic links. */
77
- export declare const collectKnowledgeBundleEntries: (sourceRoot: string) => Effect.Effect<ReadonlyArray<KnowledgeBundleEntry>, unknown, FileSystem.FileSystem | Path.Path>;
78
- /**
79
- * Inspect a canonical OKF 0.2 bundle. The root index requirement is an explicit
80
- * AgentXM profile constraint; upstream OKF permits a root without it.
81
- */
82
- export declare const inspectKnowledgeEntries: <E>(entries: ReadonlyArray<KnowledgeBundleEntry>, readMarkdown: (relativePath: string) => Effect.Effect<string, E>) => Effect.Effect<KnowledgeInspection, E>;
83
- export declare const inspectKnowledgeBundle: (sourceRoot: string) => Effect.Effect<KnowledgeInspection, unknown, FileSystem.FileSystem | Path.Path>;
84
- export declare const searchKnowledgeConcepts: (concepts: ReadonlyArray<KnowledgeConcept>, query: KnowledgeSearchQuery) => ReadonlyArray<KnowledgeConcept>;
85
- export declare const openKnowledgeConcept: (concepts: ReadonlyArray<KnowledgeConcept>, id: string) => KnowledgeConcept | undefined;
86
- //# sourceMappingURL=okf.d.ts.map