@meridian-flow/mars-schema 0.33.7 → 0.34.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.
Files changed (450) hide show
  1. package/README.md +23 -8
  2. package/fixtures/check/agent-description-missing/expected.json +17 -0
  3. package/fixtures/{upgrade/agent-bom/expected.md → check/agent-description-missing/input/agents/coder.md} +2 -2
  4. package/fixtures/{prepare/legacy-changed/expected → check/agent-description-missing/input}/mars.toml +1 -1
  5. package/fixtures/check/agent-name-missing/expected.json +17 -0
  6. package/fixtures/check/agent-name-missing/input/agents/coder.md +4 -0
  7. package/fixtures/{prepare/legacy-definition-unchanged/expected → check/agent-name-missing/input}/mars.toml +1 -1
  8. package/fixtures/check/agent-no-frontmatter/expected.json +15 -0
  9. package/fixtures/check/agent-no-frontmatter/input/agents/coder.md +1 -0
  10. package/fixtures/{prepare/legacy-execution-non-string/expected → check/agent-no-frontmatter/input}/mars.toml +1 -1
  11. package/fixtures/check/claude-execution-fields-ignored/expected.json +33 -0
  12. package/fixtures/check/claude-execution-fields-ignored/input/agents/g.md +8 -0
  13. package/fixtures/check/claude-execution-fields-ignored/request.json +4 -0
  14. package/fixtures/check/claude-policy-override-dropped/expected.json +31 -0
  15. package/fixtures/check/claude-policy-override-dropped/input/agents/g.md +11 -0
  16. package/fixtures/check/claude-policy-override-dropped/request.json +4 -0
  17. package/fixtures/check/claude-repaired-value/expected.json +17 -0
  18. package/fixtures/check/claude-repaired-value/input/agents/g.md +5 -0
  19. package/fixtures/check/claude-repaired-value/request.json +4 -0
  20. package/fixtures/check/claude-restriction-entries-dropped/expected.json +18 -0
  21. package/fixtures/check/claude-restriction-entries-dropped/input/agents/g.md +10 -0
  22. package/fixtures/check/claude-restriction-entries-dropped/request.json +4 -0
  23. package/fixtures/check/claude-skill-name-differs/expected.json +43 -0
  24. package/fixtures/check/claude-skill-name-differs/input/skills/lint/SKILL.md +5 -0
  25. package/fixtures/check/claude-skill-name-differs/input/skills/ok/SKILL.md +5 -0
  26. package/fixtures/check/claude-skill-name-differs/request.json +4 -0
  27. package/fixtures/check/clean/expected.json +6 -0
  28. package/fixtures/check/clean/input/agents/coder.md +6 -0
  29. package/fixtures/check/clean/input/mars.toml +4 -0
  30. package/fixtures/check/clean/input/skills/review/SKILL.md +5 -0
  31. package/fixtures/check/dependency-ref-direct/deps/one/agents/helper.md +6 -0
  32. package/fixtures/check/dependency-ref-direct/deps/one/mars.toml +4 -0
  33. package/fixtures/check/dependency-ref-direct/expected.json +19 -0
  34. package/fixtures/check/dependency-ref-direct/input/agents/coder.md +5 -0
  35. package/fixtures/check/dependency-ref-direct/input/mars.toml +7 -0
  36. package/fixtures/check/dependency-ref-transitive/deps/one/mars.toml +7 -0
  37. package/fixtures/check/dependency-ref-transitive/deps/two/agents/helper.md +6 -0
  38. package/fixtures/check/dependency-ref-transitive/deps/two/mars.toml +4 -0
  39. package/fixtures/check/dependency-ref-transitive/expected.json +19 -0
  40. package/fixtures/check/dependency-ref-transitive/input/agents/coder.md +5 -0
  41. package/fixtures/check/dependency-ref-transitive/input/mars.toml +7 -0
  42. package/fixtures/check/duplicate-names/expected.json +97 -0
  43. package/fixtures/check/duplicate-names/input/agents/a.md +5 -0
  44. package/fixtures/check/duplicate-names/input/agents/b.md +5 -0
  45. package/fixtures/check/duplicate-names/input/agents/c.md +5 -0
  46. package/fixtures/check/duplicate-names/input/mars.toml +4 -0
  47. package/fixtures/check/duplicate-names/input/skills/s1/SKILL.md +5 -0
  48. package/fixtures/check/duplicate-names/input/skills/s2/SKILL.md +5 -0
  49. package/fixtures/check/duplicate-names/request.json +3 -0
  50. package/fixtures/check/duplicate-slug-different-names/expected.json +39 -0
  51. package/fixtures/check/duplicate-slug-different-names/input/mars.toml +4 -0
  52. package/fixtures/check/duplicate-slug-different-names/input/one/agents/x.md +5 -0
  53. package/fixtures/check/duplicate-slug-different-names/input/two/agents/x.md +5 -0
  54. package/fixtures/check/duplicate-slug-different-names/request.json +3 -0
  55. package/fixtures/check/duplicate-slug-same-name/expected.json +33 -0
  56. package/fixtures/check/duplicate-slug-same-name/input/mars.toml +4 -0
  57. package/fixtures/check/duplicate-slug-same-name/input/one/agents/x.md +5 -0
  58. package/fixtures/check/duplicate-slug-same-name/input/two/agents/x.md +5 -0
  59. package/fixtures/check/duplicate-slug-same-name/request.json +3 -0
  60. package/fixtures/check/filtered-entry-absent/deps/one/mars.toml +7 -0
  61. package/fixtures/check/filtered-entry-absent/deps/one/skills/near/SKILL.md +5 -0
  62. package/fixtures/check/filtered-entry-absent/expected.json +11 -0
  63. package/fixtures/check/filtered-entry-absent/input/agents/coder.md +6 -0
  64. package/fixtures/check/filtered-entry-absent/input/mars.toml +8 -0
  65. package/fixtures/check/filtered-entry-absent/request.json +3 -0
  66. package/fixtures/check/filtered-entry-present/deps/one/mars.toml +7 -0
  67. package/fixtures/check/filtered-entry-present/deps/one/skills/near/SKILL.md +5 -0
  68. package/fixtures/check/filtered-entry-present/deps/two/mars.toml +4 -0
  69. package/fixtures/check/filtered-entry-present/deps/two/skills/far/SKILL.md +5 -0
  70. package/fixtures/check/filtered-entry-present/expected.json +6 -0
  71. package/fixtures/check/filtered-entry-present/input/agents/coder.md +6 -0
  72. package/fixtures/check/filtered-entry-present/input/mars.toml +8 -0
  73. package/fixtures/check/filtered-entry-present/request.json +3 -0
  74. package/fixtures/check/foreign-dependency/deps/one/.claude-plugin/plugin.json +1 -0
  75. package/fixtures/check/foreign-dependency/deps/one/skills/lint/SKILL.md +5 -0
  76. package/fixtures/check/foreign-dependency/expected.json +6 -0
  77. package/fixtures/check/foreign-dependency/input/agents/coder.md +6 -0
  78. package/fixtures/check/foreign-dependency/input/mars.toml +7 -0
  79. package/fixtures/check/foreign-dependency/request.json +3 -0
  80. package/fixtures/check/invalid-root/expected.json +15 -0
  81. package/fixtures/check/invalid-root/input/agents/coder.md +5 -0
  82. package/fixtures/check/invalid-root/input/mars.toml +1 -0
  83. package/fixtures/check/invalid-root/request.json +3 -0
  84. package/fixtures/check/missing-dependency-no-refs/expected.json +11 -0
  85. package/fixtures/check/missing-dependency-no-refs/input/agents/coder.md +5 -0
  86. package/fixtures/check/missing-dependency-no-refs/input/mars.toml +7 -0
  87. package/fixtures/check/missing-dependency-no-refs/request.json +3 -0
  88. package/fixtures/check/name-mismatch/expected.json +27 -0
  89. package/fixtures/check/name-mismatch/input/agents/coder.md +5 -0
  90. package/fixtures/check/name-mismatch/input/mars.toml +4 -0
  91. package/fixtures/check/name-mismatch/input/skills/review/SKILL.md +5 -0
  92. package/fixtures/check/name-mismatch/request.json +3 -0
  93. package/fixtures/check/package-no-version/expected.json +18 -0
  94. package/fixtures/check/package-no-version/input/agents/coder.md +5 -0
  95. package/fixtures/{normalize/pre-v1-mars-permission/expected/mars-dep → check/package-no-version/input}/mars.toml +1 -1
  96. package/fixtures/check/package-no-version/request.json +3 -0
  97. package/fixtures/check/prepare-error-and-check-error-one-file/expected.json +51 -0
  98. package/fixtures/check/prepare-error-and-check-error-one-file/input/agents/a.md +6 -0
  99. package/fixtures/check/prepare-error-and-check-error-one-file/input/agents/b.md +5 -0
  100. package/fixtures/check/prepare-error-and-check-error-one-file/input/mars.toml +4 -0
  101. package/fixtures/check/prepare-error-and-check-error-one-file/request.json +3 -0
  102. package/fixtures/check/provider-ref-declared/deps/one/mars.toml +4 -0
  103. package/fixtures/check/provider-ref-declared/deps/one/skills/x/SKILL.md +5 -0
  104. package/fixtures/check/provider-ref-declared/expected.json +6 -0
  105. package/fixtures/check/provider-ref-declared/input/agents/coder.md +6 -0
  106. package/fixtures/check/provider-ref-declared/input/mars.toml +8 -0
  107. package/fixtures/check/provider-ref-declared/request.json +3 -0
  108. package/fixtures/check/provider-ref-no-dependencies/expected.json +17 -0
  109. package/fixtures/check/provider-ref-no-dependencies/input/agents/coder.md +6 -0
  110. package/fixtures/check/provider-ref-no-dependencies/input/mars.toml +4 -0
  111. package/fixtures/check/provider-ref-no-dependencies/request.json +3 -0
  112. package/fixtures/check/provider-ref-undeclared/deps/one/mars.toml +4 -0
  113. package/fixtures/check/provider-ref-undeclared/deps/one/skills/x/SKILL.md +5 -0
  114. package/fixtures/check/provider-ref-undeclared/expected.json +17 -0
  115. package/fixtures/check/provider-ref-undeclared/input/agents/coder.md +6 -0
  116. package/fixtures/check/provider-ref-undeclared/input/mars.toml +7 -0
  117. package/fixtures/check/provider-ref-undeclared/request.json +3 -0
  118. package/fixtures/check/provider-ref-unresolved-in-complete-graph/deps/one/mars.toml +7 -0
  119. package/fixtures/check/provider-ref-unresolved-in-complete-graph/deps/one/skills/near/SKILL.md +5 -0
  120. package/fixtures/check/provider-ref-unresolved-in-complete-graph/deps/two/mars.toml +4 -0
  121. package/fixtures/check/provider-ref-unresolved-in-complete-graph/deps/two/skills/far/SKILL.md +5 -0
  122. package/fixtures/check/provider-ref-unresolved-in-complete-graph/expected.json +17 -0
  123. package/fixtures/check/provider-ref-unresolved-in-complete-graph/input/agents/coder.md +6 -0
  124. package/fixtures/check/provider-ref-unresolved-in-complete-graph/input/mars.toml +7 -0
  125. package/fixtures/check/provider-ref-unresolved-in-complete-graph/request.json +3 -0
  126. package/fixtures/check/ref-external-no-package/expected.json +17 -0
  127. package/fixtures/check/ref-external-no-package/input/agents/coder.md +6 -0
  128. package/fixtures/check/ref-external-with-package/expected.json +17 -0
  129. package/fixtures/check/ref-external-with-package/input/agents/coder.md +6 -0
  130. package/fixtures/check/ref-external-with-package/input/mars.toml +4 -0
  131. package/fixtures/check/ref-external-with-package/request.json +3 -0
  132. package/fixtures/check/ref-through-transitive-dependency/deps/one/mars.toml +7 -0
  133. package/fixtures/check/ref-through-transitive-dependency/deps/one/skills/near/SKILL.md +5 -0
  134. package/fixtures/check/ref-through-transitive-dependency/deps/two/mars.toml +4 -0
  135. package/fixtures/check/ref-through-transitive-dependency/deps/two/skills/far/SKILL.md +5 -0
  136. package/fixtures/check/ref-through-transitive-dependency/expected.json +6 -0
  137. package/fixtures/check/ref-through-transitive-dependency/input/agents/coder.md +6 -0
  138. package/fixtures/check/ref-through-transitive-dependency/input/mars.toml +7 -0
  139. package/fixtures/check/ref-through-transitive-dependency/request.json +3 -0
  140. package/fixtures/check/ref-through-unreadable-dependency/deps/legacy/mars.toml +3 -0
  141. package/fixtures/check/ref-through-unreadable-dependency/deps/legacy/skills/near/SKILL.md +5 -0
  142. package/fixtures/check/ref-through-unreadable-dependency/expected.json +11 -0
  143. package/fixtures/check/ref-through-unreadable-dependency/input/agents/coder.md +6 -0
  144. package/fixtures/check/ref-through-unreadable-dependency/input/mars.toml +7 -0
  145. package/fixtures/check/ref-through-unreadable-dependency/request.json +3 -0
  146. package/fixtures/check/ref-unresolved-in-complete-graph/deps/one/mars.toml +7 -0
  147. package/fixtures/check/ref-unresolved-in-complete-graph/deps/one/skills/near/SKILL.md +5 -0
  148. package/fixtures/check/ref-unresolved-in-complete-graph/deps/two/mars.toml +4 -0
  149. package/fixtures/check/ref-unresolved-in-complete-graph/deps/two/skills/far/SKILL.md +5 -0
  150. package/fixtures/check/ref-unresolved-in-complete-graph/expected.json +17 -0
  151. package/fixtures/check/ref-unresolved-in-complete-graph/input/agents/coder.md +6 -0
  152. package/fixtures/check/ref-unresolved-in-complete-graph/input/mars.toml +7 -0
  153. package/fixtures/check/ref-unresolved-in-complete-graph/request.json +3 -0
  154. package/fixtures/check/ref-with-transitive-dependency-missing/deps/one/mars.toml +7 -0
  155. package/fixtures/check/ref-with-transitive-dependency-missing/deps/one/skills/near/SKILL.md +5 -0
  156. package/fixtures/check/ref-with-transitive-dependency-missing/expected.json +11 -0
  157. package/fixtures/check/ref-with-transitive-dependency-missing/input/agents/coder.md +6 -0
  158. package/fixtures/check/ref-with-transitive-dependency-missing/input/mars.toml +7 -0
  159. package/fixtures/check/ref-with-transitive-dependency-missing/request.json +3 -0
  160. package/fixtures/check/requirement-invalid/expected.json +27 -0
  161. package/fixtures/check/requirement-invalid/input/agents/coder.md +5 -0
  162. package/fixtures/check/requirement-invalid/input/mars.toml +6 -0
  163. package/fixtures/check/requirement-invalid/request.json +3 -0
  164. package/fixtures/check/root-skill-shadows-dependency/deps/dep/agents/coder.md +5 -0
  165. package/fixtures/check/root-skill-shadows-dependency/deps/dep/mars.toml +4 -0
  166. package/fixtures/check/root-skill-shadows-dependency/deps/dep/skills/x/SKILL.md +5 -0
  167. package/fixtures/check/root-skill-shadows-dependency/expected.json +23 -0
  168. package/fixtures/check/root-skill-shadows-dependency/input/agents/coder.md +5 -0
  169. package/fixtures/check/root-skill-shadows-dependency/input/mars.toml +7 -0
  170. package/fixtures/check/root-skill-shadows-dependency/input/skills/x/SKILL.md +5 -0
  171. package/fixtures/check/root-skill-shadows-dependency/request.json +3 -0
  172. package/fixtures/check/schema-1-ignores-target-facts/expected.json +6 -0
  173. package/fixtures/check/schema-1-ignores-target-facts/input/agents/coder.md +8 -0
  174. package/fixtures/check/schema-1-ignores-target-facts/input/mars.toml +5 -0
  175. package/fixtures/check/schema-1-ignores-target-facts/request.json +3 -0
  176. package/fixtures/check/schema-newer-root/expected.json +18 -0
  177. package/fixtures/check/schema-newer-root/input/agents/coder.md +5 -0
  178. package/fixtures/{prepare/legacy-definition-unchanged → check/schema-newer-root}/input/mars.toml +2 -1
  179. package/fixtures/check/schema-newer-root/request.json +3 -0
  180. package/fixtures/check/skill-folder-no-definition-at-all/expected.json +6 -0
  181. package/fixtures/check/skill-folder-no-definition-at-all/input/mars.toml +4 -0
  182. package/fixtures/check/skill-folder-no-definition-at-all/input/skills/notes/README.md +1 -0
  183. package/fixtures/check/skill-folder-no-definition-at-all/request.json +3 -0
  184. package/fixtures/check/skill-folder-no-skill-md/expected.json +23 -0
  185. package/fixtures/check/skill-folder-no-skill-md/input/mars.toml +4 -0
  186. package/fixtures/check/skill-folder-no-skill-md/input/skills/deep/inner/data.txt +1 -0
  187. package/fixtures/check/skill-folder-no-skill-md/input/skills/notes/README.md +1 -0
  188. package/fixtures/check/skill-folder-no-skill-md/input/skills/ok/SKILL.md +5 -0
  189. package/fixtures/check/skill-folder-no-skill-md/request.json +3 -0
  190. package/fixtures/check/skill-folder-under-deeper-container/expected.json +6 -0
  191. package/fixtures/check/skill-folder-under-deeper-container/input/agents/coder.md +5 -0
  192. package/fixtures/check/skill-folder-under-deeper-container/input/mars.toml +4 -0
  193. package/fixtures/check/skill-folder-under-deeper-container/input/vendor/skills/notes/README.md +1 -0
  194. package/fixtures/check/skill-folder-under-deeper-container/request.json +3 -0
  195. package/fixtures/check/two-dependencies-one-skill/deps/one/mars.toml +4 -0
  196. package/fixtures/check/two-dependencies-one-skill/deps/one/skills/x/SKILL.md +5 -0
  197. package/fixtures/check/two-dependencies-one-skill/deps/two/mars.toml +4 -0
  198. package/fixtures/check/two-dependencies-one-skill/deps/two/skills/x/SKILL.md +5 -0
  199. package/fixtures/check/two-dependencies-one-skill/expected.json +17 -0
  200. package/fixtures/check/two-dependencies-one-skill/input/agents/coder.md +5 -0
  201. package/fixtures/check/two-dependencies-one-skill/input/mars.toml +10 -0
  202. package/fixtures/check/two-dependencies-one-skill/request.json +3 -0
  203. package/fixtures/normalize/declared-mars-native/expected/native-dep/agents/planner.md +1 -2
  204. package/fixtures/normalize/declared-mars-native/inspection.json +1 -1
  205. package/fixtures/normalize/declared-mars-native/normalized.json +20 -26
  206. package/fixtures/normalize/invalid-plugin-json/normalized.json +2 -1
  207. package/fixtures/normalize/marketplace-strict-table/normalized.json +2 -1
  208. package/fixtures/normalize/mixed-claude-and-mars/expected/mixed-dep/skills/notes/SKILL.md +1 -1
  209. package/fixtures/normalize/mixed-claude-and-mars/normalized.json +13 -4
  210. package/fixtures/normalize/root-skill-fallback-name/normalized.json +1 -1
  211. package/fixtures/normalize/skill-translation/normalized.json +4 -12
  212. package/fixtures/prepare/authored-local-current/expected.json +1 -1
  213. package/fixtures/prepare/claude-reserved-keys/expected/agents/g.md +2 -4
  214. package/fixtures/prepare/claude-reserved-keys/expected.json +13 -22
  215. package/fixtures/prepare/invalid-toml/expected.json +2 -1
  216. package/fixtures/prepare/manifest-without-package/expected.json +2 -1
  217. package/fixtures/prepare/package-no-schema/expected.json +49 -0
  218. package/fixtures/prepare/package-no-schema/request.json +3 -0
  219. package/fixtures/prepare/{schema-1-meridian-keys → schema-1-retired-keys}/expected.json +29 -25
  220. package/fixtures/prepare/schema-1-retired-keys/request.json +1 -0
  221. package/fixtures/prepare/schema-newer/expected.json +2 -1
  222. package/fixtures/read/agent-approval-yolo/expected.json +2 -2
  223. package/fixtures/read/agent-network-invalid/expected.json +3 -3
  224. package/fixtures/read/{agent-removed-autocompact → agent-retired-autocompact}/expected.json +3 -3
  225. package/fixtures/read/{agent-removed-autocompact-pct → agent-retired-autocompact-pct}/expected.json +3 -3
  226. package/fixtures/read/{agent-removed-disallowed-tools → agent-retired-disallowed-tools}/expected.json +3 -3
  227. package/fixtures/read/{agent-removed-fanout → agent-retired-fanout}/expected.json +3 -3
  228. package/fixtures/read/{agent-removed-host-namespaces → agent-retired-host-namespaces}/expected.json +6 -6
  229. package/fixtures/read/{agent-removed-mcp-tools → agent-retired-mcp-tools}/expected.json +3 -3
  230. package/fixtures/read/{agent-removed-meridian-keys → agent-retired-meridian-keys}/expected.json +6 -6
  231. package/fixtures/read/{agent-removed-model-invocable → agent-retired-model-invocable}/expected.json +3 -3
  232. package/fixtures/read/{agent-removed-models → agent-retired-models}/expected.json +3 -3
  233. package/fixtures/read/{agent-removed-permission → agent-retired-permission}/expected.json +3 -3
  234. package/fixtures/read/{agent-removed-user-invocable → agent-retired-user-invocable}/expected.json +3 -3
  235. package/fixtures/read/manifest-missing-version/expected.json +1 -1
  236. package/fixtures/read/{manifest-removed-visibility → manifest-retired-visibility}/expected.json +3 -3
  237. package/fixtures/read/{skill-removed-allow-implicit-invocation → skill-retired-allow-implicit-invocation}/expected.json +3 -3
  238. package/fixtures/read/{skill-removed-allowed-tools → skill-retired-allowed-tools}/expected.json +3 -3
  239. package/fixtures/read/{skill-removed-disable-model-invocation → skill-retired-disable-model-invocation}/expected.json +3 -3
  240. package/fixtures/read/{skill-removed-disallowed-tools → skill-retired-disallowed-tools}/expected.json +3 -3
  241. package/fixtures/read/{skill-removed-invocation → skill-retired-invocation}/expected.json +3 -3
  242. package/fixtures/read/{skill-removed-model-invocable-alias → skill-retired-model-invocable-alias}/expected.json +3 -3
  243. package/fixtures/read/{skill-removed-tools → skill-retired-tools}/expected.json +3 -3
  244. package/fixtures/read/{skill-removed-type → skill-retired-type}/expected.json +3 -3
  245. package/fixtures/read/{skill-removed-user-invocable-alias → skill-retired-user-invocable-alias}/expected.json +3 -3
  246. package/fixtures/read/{skill-removed-when-to-use → skill-retired-when-to-use}/expected.json +3 -3
  247. package/index.d.ts +72 -17
  248. package/node/mars_schema_wasm.d.ts +9 -1
  249. package/node/mars_schema_wasm.js +30 -1
  250. package/node/mars_schema_wasm_bg.wasm +0 -0
  251. package/node/mars_schema_wasm_bg.wasm.d.ts +1 -0
  252. package/package.json +1 -1
  253. package/web/mars_schema_wasm.d.ts +10 -1
  254. package/web/mars_schema_wasm.js +29 -1
  255. package/web/mars_schema_wasm_bg.wasm +0 -0
  256. package/web/mars_schema_wasm_bg.wasm.d.ts +1 -0
  257. package/fixtures/normalize/pre-v1-mars-permission/expected/mars-dep/agents/reader.md +0 -12
  258. package/fixtures/normalize/pre-v1-mars-permission/input/agents/reader.md +0 -7
  259. package/fixtures/normalize/pre-v1-mars-permission/inspection.json +0 -21
  260. package/fixtures/normalize/pre-v1-mars-permission/normalized.json +0 -155
  261. package/fixtures/normalize/pre-v1-mars-permission/request.json +0 -3
  262. package/fixtures/normalize/pre-v1-mars-predicted/expected/legacy-dep/agents/old.md +0 -11
  263. package/fixtures/normalize/pre-v1-mars-predicted/expected/legacy-dep/mars.toml +0 -3
  264. package/fixtures/normalize/pre-v1-mars-predicted/expected/legacy-dep/skills/review/SKILL.md +0 -8
  265. package/fixtures/normalize/pre-v1-mars-predicted/input/agents/old.md +0 -10
  266. package/fixtures/normalize/pre-v1-mars-predicted/input/skills/review/SKILL.md +0 -7
  267. package/fixtures/normalize/pre-v1-mars-predicted/inspection.json +0 -28
  268. package/fixtures/normalize/pre-v1-mars-predicted/normalized.json +0 -222
  269. package/fixtures/normalize/pre-v1-mars-predicted/request.json +0 -3
  270. package/fixtures/prepare/authored-local-legacy/expected/agents/local.md +0 -6
  271. package/fixtures/prepare/authored-local-legacy/expected.json +0 -79
  272. package/fixtures/prepare/authored-local-legacy/input/agents/local.md +0 -6
  273. package/fixtures/prepare/legacy-agent-no-frontmatter/expected.json +0 -94
  274. package/fixtures/prepare/legacy-agent-no-frontmatter/input/agents/coder.md +0 -1
  275. package/fixtures/prepare/legacy-changed/expected/agents/coder.md +0 -6
  276. package/fixtures/prepare/legacy-changed/expected.json +0 -115
  277. package/fixtures/prepare/legacy-changed/input/agents/coder.md +0 -6
  278. package/fixtures/prepare/legacy-changed/input/mars.toml +0 -3
  279. package/fixtures/prepare/legacy-definition-unchanged/expected.json +0 -89
  280. package/fixtures/prepare/legacy-definition-unchanged/input/skills/steady/SKILL.md +0 -5
  281. package/fixtures/prepare/legacy-execution-non-string/expected/agents/runner.md +0 -5
  282. package/fixtures/prepare/legacy-execution-non-string/expected.json +0 -142
  283. package/fixtures/prepare/legacy-execution-non-string/input/agents/runner.md +0 -8
  284. package/fixtures/prepare/legacy-execution-non-string/input/mars.toml +0 -3
  285. package/fixtures/prepare/policy-override-bad-key/expected/agents/runner.md +0 -13
  286. package/fixtures/prepare/policy-override-bad-key/expected/mars.toml +0 -4
  287. package/fixtures/prepare/policy-override-bad-key/expected.json +0 -178
  288. package/fixtures/prepare/policy-override-bad-key/input/agents/runner.md +0 -10
  289. package/fixtures/prepare/policy-override-bad-key/input/mars.toml +0 -3
  290. package/fixtures/prepare/pre-v1-old-host-namespaces/expected/agents/demo.md +0 -15
  291. package/fixtures/prepare/pre-v1-old-host-namespaces/expected/mars.toml +0 -4
  292. package/fixtures/prepare/pre-v1-old-host-namespaces/expected.json +0 -135
  293. package/fixtures/prepare/pre-v1-old-host-namespaces/input/agents/demo.md +0 -15
  294. package/fixtures/prepare/pre-v1-old-host-namespaces/input/mars.toml +0 -3
  295. package/fixtures/prepare/schema-1-both-host-namespaces/expected/agents/demo.md +0 -14
  296. package/fixtures/prepare/schema-1-both-host-namespaces/expected.json +0 -160
  297. package/fixtures/prepare/schema-1-both-host-namespaces/input/agents/demo.md +0 -20
  298. package/fixtures/prepare/schema-1-both-host-namespaces/input/mars.toml +0 -4
  299. package/fixtures/prepare/schema-1-both-host-namespaces/request.json +0 -4
  300. package/fixtures/prepare/schema-1-meridian-keys/expected/agents/demo.md +0 -12
  301. package/fixtures/prepare/schema-1-meridian-keys/input/mars.toml +0 -4
  302. package/fixtures/prepare/schema-1-meridian-keys/request.json +0 -4
  303. package/fixtures/prepare/schema-1-old-host-namespaces/expected/agents/demo.md +0 -13
  304. package/fixtures/prepare/schema-1-old-host-namespaces/expected.json +0 -130
  305. package/fixtures/prepare/schema-1-old-host-namespaces/input/agents/demo.md +0 -13
  306. package/fixtures/prepare/schema-1-old-host-namespaces/input/mars.toml +0 -4
  307. package/fixtures/prepare/schema-1-old-host-namespaces/request.json +0 -4
  308. package/fixtures/upgrade/agent-approval-yolo/expected-diagnostics.json +0 -1
  309. package/fixtures/upgrade/agent-approval-yolo/expected.md +0 -4
  310. package/fixtures/upgrade/agent-approval-yolo/input.md +0 -4
  311. package/fixtures/upgrade/agent-approval-yolo/kind.txt +0 -1
  312. package/fixtures/upgrade/agent-bom/expected-diagnostics.json +0 -1
  313. package/fixtures/upgrade/agent-bom/input.md +0 -5
  314. package/fixtures/upgrade/agent-bom/kind.txt +0 -1
  315. package/fixtures/upgrade/agent-claude-keys-conflict/expected-diagnostics.json +0 -4
  316. package/fixtures/upgrade/agent-claude-keys-conflict/expected.md +0 -9
  317. package/fixtures/upgrade/agent-claude-keys-conflict/fully-rewritten.txt +0 -2
  318. package/fixtures/upgrade/agent-claude-keys-conflict/input.md +0 -11
  319. package/fixtures/upgrade/agent-claude-keys-conflict/kind.txt +0 -1
  320. package/fixtures/upgrade/agent-claude-keys-unmoved/expected-diagnostics.json +0 -3
  321. package/fixtures/upgrade/agent-claude-keys-unmoved/expected.md +0 -6
  322. package/fixtures/upgrade/agent-claude-keys-unmoved/input.md +0 -6
  323. package/fixtures/upgrade/agent-claude-keys-unmoved/kind.txt +0 -1
  324. package/fixtures/upgrade/agent-disallowed-tools/expected-diagnostics.json +0 -1
  325. package/fixtures/upgrade/agent-disallowed-tools/expected.md +0 -6
  326. package/fixtures/upgrade/agent-disallowed-tools/input.md +0 -5
  327. package/fixtures/upgrade/agent-disallowed-tools/kind.txt +0 -1
  328. package/fixtures/upgrade/agent-effort-adaptive/expected-diagnostics.json +0 -1
  329. package/fixtures/upgrade/agent-effort-adaptive/expected.md +0 -4
  330. package/fixtures/upgrade/agent-effort-adaptive/input.md +0 -4
  331. package/fixtures/upgrade/agent-effort-adaptive/kind.txt +0 -1
  332. package/fixtures/upgrade/agent-effort-disabled/expected-diagnostics.json +0 -1
  333. package/fixtures/upgrade/agent-effort-disabled/expected.md +0 -4
  334. package/fixtures/upgrade/agent-effort-disabled/input.md +0 -4
  335. package/fixtures/upgrade/agent-effort-disabled/kind.txt +0 -1
  336. package/fixtures/upgrade/agent-fallback-bom-no-trailing-newline/expected-diagnostics.json +0 -1
  337. package/fixtures/upgrade/agent-fallback-bom-no-trailing-newline/expected.md +0 -5
  338. package/fixtures/upgrade/agent-fallback-bom-no-trailing-newline/fully-rewritten.txt +0 -2
  339. package/fixtures/upgrade/agent-fallback-bom-no-trailing-newline/input.md +0 -4
  340. package/fixtures/upgrade/agent-fallback-bom-no-trailing-newline/kind.txt +0 -1
  341. package/fixtures/upgrade/agent-fallback-mixed-body/expected-diagnostics.json +0 -1
  342. package/fixtures/upgrade/agent-fallback-mixed-body/expected.md +0 -6
  343. package/fixtures/upgrade/agent-fallback-mixed-body/fully-rewritten.txt +0 -2
  344. package/fixtures/upgrade/agent-fallback-mixed-body/input.md +0 -5
  345. package/fixtures/upgrade/agent-fallback-mixed-body/kind.txt +0 -1
  346. package/fixtures/upgrade/agent-flow-top-level-fallback/expected-diagnostics.json +0 -1
  347. package/fixtures/upgrade/agent-flow-top-level-fallback/expected.md +0 -4
  348. package/fixtures/upgrade/agent-flow-top-level-fallback/fully-rewritten.txt +0 -1
  349. package/fixtures/upgrade/agent-flow-top-level-fallback/input.md +0 -3
  350. package/fixtures/upgrade/agent-flow-top-level-fallback/kind.txt +0 -1
  351. package/fixtures/upgrade/agent-invocability-aliases/expected-diagnostics.json +0 -1
  352. package/fixtures/upgrade/agent-invocability-aliases/expected.md +0 -5
  353. package/fixtures/upgrade/agent-invocability-aliases/input.md +0 -5
  354. package/fixtures/upgrade/agent-invocability-aliases/kind.txt +0 -1
  355. package/fixtures/upgrade/agent-meridian-keys/expected-diagnostics.json +0 -1
  356. package/fixtures/upgrade/agent-meridian-keys/expected.md +0 -11
  357. package/fixtures/upgrade/agent-meridian-keys/input.md +0 -10
  358. package/fixtures/upgrade/agent-meridian-keys/kind.txt +0 -1
  359. package/fixtures/upgrade/agent-minimal-comments/expected-diagnostics.json +0 -3
  360. package/fixtures/upgrade/agent-minimal-comments/expected.md +0 -8
  361. package/fixtures/upgrade/agent-minimal-comments/input.md +0 -10
  362. package/fixtures/upgrade/agent-minimal-comments/kind.txt +0 -1
  363. package/fixtures/upgrade/agent-model-policy-removed/expected-diagnostics.json +0 -5
  364. package/fixtures/upgrade/agent-model-policy-removed/expected.md +0 -8
  365. package/fixtures/upgrade/agent-model-policy-removed/input.md +0 -10
  366. package/fixtures/upgrade/agent-model-policy-removed/kind.txt +0 -1
  367. package/fixtures/upgrade/agent-network-both-spellings/expected-diagnostics.json +0 -1
  368. package/fixtures/upgrade/agent-network-both-spellings/expected.md +0 -11
  369. package/fixtures/upgrade/agent-network-both-spellings/input.md +0 -8
  370. package/fixtures/upgrade/agent-network-both-spellings/kind.txt +0 -1
  371. package/fixtures/upgrade/agent-network-kept/expected-diagnostics.json +0 -3
  372. package/fixtures/upgrade/agent-network-kept/expected.md +0 -10
  373. package/fixtures/upgrade/agent-network-kept/input.md +0 -8
  374. package/fixtures/upgrade/agent-network-kept/kind.txt +0 -1
  375. package/fixtures/upgrade/agent-permission/expected-diagnostics.json +0 -1
  376. package/fixtures/upgrade/agent-permission/expected.md +0 -8
  377. package/fixtures/upgrade/agent-permission/input.md +0 -7
  378. package/fixtures/upgrade/agent-permission/kind.txt +0 -1
  379. package/fixtures/upgrade/agent-removed-keys/expected-diagnostics.json +0 -7
  380. package/fixtures/upgrade/agent-removed-keys/expected.md +0 -3
  381. package/fixtures/upgrade/agent-removed-keys/input.md +0 -8
  382. package/fixtures/upgrade/agent-removed-keys/kind.txt +0 -1
  383. package/fixtures/upgrade/agent-tools-list/expected-diagnostics.json +0 -1
  384. package/fixtures/upgrade/agent-tools-list/expected.md +0 -7
  385. package/fixtures/upgrade/agent-tools-list/input.md +0 -5
  386. package/fixtures/upgrade/agent-tools-list/kind.txt +0 -1
  387. package/fixtures/upgrade/agent-unreadable-values/expected-diagnostics.json +0 -7
  388. package/fixtures/upgrade/agent-unreadable-values/expected.md +0 -9
  389. package/fixtures/upgrade/agent-unreadable-values/input.md +0 -13
  390. package/fixtures/upgrade/agent-unreadable-values/kind.txt +0 -1
  391. package/fixtures/upgrade/manifest-crlf/expected-diagnostics.json +0 -3
  392. package/fixtures/upgrade/manifest-crlf/expected.toml +0 -6
  393. package/fixtures/upgrade/manifest-crlf/input.toml +0 -6
  394. package/fixtures/upgrade/manifest-crlf/kind.txt +0 -1
  395. package/fixtures/upgrade/manifest-schema-visibility/expected-diagnostics.json +0 -3
  396. package/fixtures/upgrade/manifest-schema-visibility/expected.toml +0 -7
  397. package/fixtures/upgrade/manifest-schema-visibility/input.toml +0 -7
  398. package/fixtures/upgrade/manifest-schema-visibility/kind.txt +0 -1
  399. package/fixtures/upgrade/manifest-v1-idempotent/expected-diagnostics.json +0 -1
  400. package/fixtures/upgrade/manifest-v1-idempotent/expected.toml +0 -4
  401. package/fixtures/upgrade/manifest-v1-idempotent/input.toml +0 -4
  402. package/fixtures/upgrade/manifest-v1-idempotent/kind.txt +0 -1
  403. package/fixtures/upgrade/skill-crlf/expected-diagnostics.json +0 -3
  404. package/fixtures/upgrade/skill-crlf/expected.md +0 -7
  405. package/fixtures/upgrade/skill-crlf/input.md +0 -7
  406. package/fixtures/upgrade/skill-crlf/kind.txt +0 -1
  407. package/fixtures/upgrade/skill-tools-dropped/expected-diagnostics.json +0 -5
  408. package/fixtures/upgrade/skill-tools-dropped/expected.md +0 -3
  409. package/fixtures/upgrade/skill-tools-dropped/input.md +0 -6
  410. package/fixtures/upgrade/skill-tools-dropped/kind.txt +0 -1
  411. package/fixtures/upgrade/skill-type-when-to-use/expected-diagnostics.json +0 -1
  412. package/fixtures/upgrade/skill-type-when-to-use/expected.md +0 -10
  413. package/fixtures/upgrade/skill-type-when-to-use/input.md +0 -7
  414. package/fixtures/upgrade/skill-type-when-to-use/kind.txt +0 -1
  415. package/fixtures/upgrade/supporting-markdown/expected-diagnostics.json +0 -1
  416. package/fixtures/upgrade/supporting-markdown/expected.md +0 -4
  417. package/fixtures/upgrade/supporting-markdown/input.md +0 -4
  418. package/fixtures/upgrade/supporting-markdown/kind.txt +0 -1
  419. /package/fixtures/{prepare/legacy-agent-no-frontmatter → check/agent-description-missing}/request.json +0 -0
  420. /package/fixtures/{prepare/legacy-changed → check/agent-name-missing}/request.json +0 -0
  421. /package/fixtures/{prepare/legacy-definition-unchanged → check/agent-no-frontmatter}/request.json +0 -0
  422. /package/fixtures/{prepare/legacy-execution-non-string → check/clean}/request.json +0 -0
  423. /package/fixtures/{prepare/policy-override-bad-key → check/dependency-ref-direct}/request.json +0 -0
  424. /package/fixtures/{prepare/pre-v1-old-host-namespaces → check/dependency-ref-transitive}/request.json +0 -0
  425. /package/fixtures/{prepare/authored-local-legacy → check/ref-external-no-package}/request.json +0 -0
  426. /package/fixtures/prepare/{legacy-agent-no-frontmatter → package-no-schema}/input/mars.toml +0 -0
  427. /package/fixtures/prepare/{schema-1-meridian-keys → schema-1-retired-keys}/input/agents/demo.md +0 -0
  428. /package/fixtures/prepare/{legacy-agent-no-frontmatter/expected → schema-1-retired-keys/input}/mars.toml +0 -0
  429. /package/fixtures/read/{agent-removed-autocompact → agent-retired-autocompact}/agent.md +0 -0
  430. /package/fixtures/read/{agent-removed-autocompact-pct → agent-retired-autocompact-pct}/agent.md +0 -0
  431. /package/fixtures/read/{agent-removed-disallowed-tools → agent-retired-disallowed-tools}/agent.md +0 -0
  432. /package/fixtures/read/{agent-removed-fanout → agent-retired-fanout}/agent.md +0 -0
  433. /package/fixtures/read/{agent-removed-host-namespaces → agent-retired-host-namespaces}/agent.md +0 -0
  434. /package/fixtures/read/{agent-removed-mcp-tools → agent-retired-mcp-tools}/agent.md +0 -0
  435. /package/fixtures/read/{agent-removed-meridian-keys → agent-retired-meridian-keys}/agent.md +0 -0
  436. /package/fixtures/read/{agent-removed-model-invocable → agent-retired-model-invocable}/agent.md +0 -0
  437. /package/fixtures/read/{agent-removed-models → agent-retired-models}/agent.md +0 -0
  438. /package/fixtures/read/{agent-removed-permission → agent-retired-permission}/agent.md +0 -0
  439. /package/fixtures/read/{agent-removed-user-invocable → agent-retired-user-invocable}/agent.md +0 -0
  440. /package/fixtures/read/{manifest-removed-visibility → manifest-retired-visibility}/mars.toml +0 -0
  441. /package/fixtures/read/{skill-removed-allow-implicit-invocation → skill-retired-allow-implicit-invocation}/skill.md +0 -0
  442. /package/fixtures/read/{skill-removed-allowed-tools → skill-retired-allowed-tools}/skill.md +0 -0
  443. /package/fixtures/read/{skill-removed-disable-model-invocation → skill-retired-disable-model-invocation}/skill.md +0 -0
  444. /package/fixtures/read/{skill-removed-disallowed-tools → skill-retired-disallowed-tools}/skill.md +0 -0
  445. /package/fixtures/read/{skill-removed-invocation → skill-retired-invocation}/skill.md +0 -0
  446. /package/fixtures/read/{skill-removed-model-invocable-alias → skill-retired-model-invocable-alias}/skill.md +0 -0
  447. /package/fixtures/read/{skill-removed-tools → skill-retired-tools}/skill.md +0 -0
  448. /package/fixtures/read/{skill-removed-type → skill-retired-type}/skill.md +0 -0
  449. /package/fixtures/read/{skill-removed-user-invocable-alias → skill-retired-user-invocable-alias}/skill.md +0 -0
  450. /package/fixtures/read/{skill-removed-when-to-use → skill-retired-when-to-use}/skill.md +0 -0
package/index.d.ts CHANGED
@@ -45,7 +45,7 @@ export function version(): string;
45
45
  // ---------------------------------------------------------------------------------------
46
46
 
47
47
  export interface Diagnostic {
48
- /** Stable code, e.g. `field.unknown`, `yaml.invalid`, `field.removed`. */
48
+ /** Stable code, e.g. `field.unknown`, `yaml.invalid`, `field.retired`. */
49
49
  code: string;
50
50
  severity: "error" | "warning" | "info";
51
51
  /** Key path into the authored file, e.g. `["model-policies", 0, "when"]`. */
@@ -318,7 +318,6 @@ export interface DialectChoice {
318
318
 
319
319
  export type Classification =
320
320
  | { kind: "schema-1" }
321
- | { kind: "mars-legacy" }
322
321
  | { kind: "schema-newer"; schema: number }
323
322
  | { kind: "invalid" }
324
323
  | ({ kind: "foreign" } & DialectChoice)
@@ -329,7 +328,6 @@ export type ChangeRecord =
329
328
  | { kind: "none" }
330
329
  /** The file has no source: `normalize` wrote it (a package's generated `mars.toml`). */
331
330
  | { kind: "generated" }
332
- | { kind: "edited"; paths: (string | number)[][] }
333
331
  | { kind: "fully-rewritten" };
334
332
 
335
333
  export interface PreparedManifest {
@@ -378,14 +376,15 @@ export interface Prepared {
378
376
  /**
379
377
  * Package-level findings by source path: what discovery and translation met and could not
380
378
  * convert (`skill.*`, `agent.*`, `import.*`). A file's own reading diagnostics are on its
381
- * `reading`.
379
+ * `reading`. `manifest.version-missing`, `skill.name-invalid` and `skill.description-too-long`
380
+ * are `info`: nothing the author wrote is lost. `skill.name-mismatch` no longer exists;
381
+ * `check` reports `definition.name-mismatch` (`info`) for every dialect.
382
382
  */
383
383
  diagnostics: { [sourcePath: string]: Diagnostic[] };
384
384
  /**
385
- * What preparing changed in each file, by source path: the keys a pre-v1 upgrade
386
- * (`classification.kind === "mars-legacy"`) or a foreign translation dropped, moved or
387
- * repaired (legacy keys, skill tool rules, Claude-only keys, a repaired `description`, a key
388
- * set aside under `harness-overrides` or dropped). A change coded `field.restriction-lost`
385
+ * What translating a foreign package changed in each file, by source path: the keys it
386
+ * dropped, moved or repaired (skill tool rules, Claude-only keys, a repaired `description`, a
387
+ * key set aside under `harness-overrides` or dropped). A change coded `field.restriction-lost`
389
388
  * means a restriction (a `deny` or `ask` tool entry, `permission`, `sandbox`, `approval`) was
390
389
  * dropped or moved, so the agent is less restricted than its file says; a caller reports
391
390
  * these every time. A file changed when its `change.kind` is not `none` or `generated`.
@@ -395,8 +394,8 @@ export interface Prepared {
395
394
  }
396
395
 
397
396
  /**
398
- * Reads one root held in memory: classify it, select its definitions, upgrade a pre-v1 package
399
- * or translate a foreign one, and read each result. This is the supported way to read a single
397
+ * Reads one root held in memory: classify it, select its definitions, translate a foreign
398
+ * package, and read each result. This is the supported way to read a single
400
399
  * package, a consumer's `.mars-src` (`"authored-local"`) or a project directory (`"project"`,
401
400
  * where a `mars.toml` with no `[package]` is consumer configuration) without choosing items;
402
401
  * `normalize` is `prepare` plus a selection, a generated `mars.toml` and provenance. Throws for
@@ -406,19 +405,68 @@ export function prepare(input: {
406
405
  files: Map<string, Uint8Array>;
407
406
  context?: "package" | "authored-local" | "project";
408
407
  declaredDialect?: Dialect;
408
+ }): Prepared;
409
+
410
+ /**
411
+ * What a package's files say is wrong with it, wherever it runs: every finding `mars check`
412
+ * reports about an Agent, a skill or `mars.toml`, except those about a harness target or an
413
+ * older Mars. (`mars check` also reports the `requires-mars` floor, hooks, plugin output, model
414
+ * aliases, harness field loss and an empty package, so it can fail a package this accepts.)
415
+ * A level says what the author loses: an `error`, that it won't load or install; a `warning`,
416
+ * that something written won't take effect; an `info`, that nothing written is lost. Show errors
417
+ * and warnings by default, and info on request.
418
+ *
419
+ * Takes `prepare`'s input plus the dependencies, and prepares the root as `prepare` does. Throws
420
+ * `input.invalid` for an unknown key or an unrecognized `context`.
421
+ */
422
+ export function check(input: {
423
+ files: Map<string, Uint8Array>;
424
+ context?: "package" | "authored-local" | "project";
425
+ declaredDialect?: Dialect;
409
426
  /**
410
- * `migrate` adds `mars migrate`'s repair: a removed Agent key whose replacement is a
411
- * `harness-overrides` key moves there. A reader leaves it off, because an authored schema 1
412
- * file is read exactly as written.
427
+ * The package's whole dependency closure, flat: every package reachable through any
428
+ * `[dependencies]` entry, filtered or not, one entry per source. The key is the name the
429
+ * source has in the `[dependencies]` table that declares it. Each value holds `prepare`'s
430
+ * result for the dependency, as `selectItems` takes a package; only its `selection` is read
431
+ * (`extra_items` is accepted and ignored). A plain object or a `Map`; an unknown key in an
432
+ * entry throws `input.invalid` either way.
413
433
  */
414
- migrate?: boolean;
415
- }): Prepared;
434
+ dependencies?: { [name: string]: SelectionPackage } | Map<string, SelectionPackage>;
435
+ }): Check;
436
+
437
+ export interface Check {
438
+ /**
439
+ * Findings in the root's own files, `mars.toml` first and then the paths in lexical order: for
440
+ * each path, what `prepare` returns for the same input plus the check's own, errors first.
441
+ * Dropping the check's own codes leaves what `prepare` returns for the path. A file with an
442
+ * `error` is unusable; an `error` on `mars.toml` makes the whole package unusable.
443
+ */
444
+ diagnostics: { [sourcePath: string]: Diagnostic[] };
445
+ /**
446
+ * `skill-ref.dependency` only: a dependency's own Agent names a skill no package ships. By the
447
+ * dependency's name, then the Agent's output path in it. Not the root's to fix.
448
+ */
449
+ dependency_diagnostics: { [dependency: string]: { [outputPath: string]: Diagnostic[] } };
450
+ /**
451
+ * Dependencies reachable from the root that `dependencies` lacks; `declared_in` is null for
452
+ * the root. While this is not empty the result is not a verdict: no skill ref was judged.
453
+ * Supply them and call again.
454
+ */
455
+ missing_dependencies: { name: string; declared_in: string | null }[];
456
+ /**
457
+ * Dependencies reachable from the root that `dependencies` has but could not be read (their
458
+ * `selection.unreadable` is true: an invalid or newer-schema manifest); `declared_in` is null
459
+ * for the root. While this is not empty the result is not a verdict: no skill ref was judged,
460
+ * because an unreadable dependency may be the one that ships the skill. Its own error is in
461
+ * `prepare`'s result for it.
462
+ */
463
+ unreadable_dependencies: { name: string; declared_in: string | null }[];
464
+ }
416
465
 
417
466
  export type Tree = Map<string, Uint8Array>;
418
467
 
419
468
  export type Kind =
420
469
  | "schema-1"
421
- | "mars-legacy"
422
470
  | "schema-newer"
423
471
  | "marketplace"
424
472
  | "plugin"
@@ -500,6 +548,7 @@ export interface Inspection {
500
548
  }[];
501
549
  /** The items of a plugin or skill tree. */
502
550
  items: InspectedItem[];
551
+ /** For `kind: "invalid"`, the manifest's findings under `mars.toml` (`manifest.schema-missing` for a package with no `schema`). */
503
552
  diagnostics: { [path: string]: Diagnostic[] };
504
553
  }
505
554
 
@@ -615,6 +664,12 @@ export interface SelectionFacts {
615
664
  /** The manifest's `[dependencies]` entries in declaration order, never `[local-dependencies]`. */
616
665
  edges: { name: string; filter: SelectionFilter }[];
617
666
  uses_providers: string[];
667
+ /**
668
+ * The package could not be read (`prepared.classification` is `invalid` or `schema-newer`), so
669
+ * `definitions` is empty because nothing was read. `check` judges no skill ref against it.
670
+ * Absent when false.
671
+ */
672
+ unreadable?: boolean;
618
673
  }
619
674
 
620
675
  export type SelectionFilter =
@@ -689,7 +744,7 @@ export interface SelectionResult {
689
744
  */
690
745
  export function selectItems(input: {
691
746
  requests?: ({ name: string } & FilterConfig)[];
692
- packages: { [name: string]: SelectionPackage };
747
+ packages: { [name: string]: SelectionPackage } | Map<string, SelectionPackage>;
693
748
  root?: SelectionPackage;
694
749
  }): SelectionResult;
695
750
 
@@ -1,6 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * What a package's files say is wrong with it, from `{files, context?, declaredDialect?,
6
+ * dependencies?}`: `prepare`, `links::package` and `mars_schema::check::check`, in that order.
7
+ * `dependencies` is `{name: {prepared, extra_items?}}`, a plain object or a `Map`, the shape of
8
+ * `selectItems`' `packages` (only each `prepared.selection` is read), so one value serves both.
9
+ */
10
+ export function check(argument: any): any;
11
+
4
12
  /**
5
13
  * YAML for the value of the key at column `indent`; see `index.d.ts`.
6
14
  */
@@ -21,7 +29,7 @@ export function normalize(argument: any): any;
21
29
 
22
30
  /**
23
31
  * Prepare one root from
24
- * `{files: Map<path, Uint8Array>, context?, declaredDialect?, migrate?}`. A supported export in
32
+ * `{files: Map<path, Uint8Array>, context?, declaredDialect?}`. A supported export in
25
33
  * its own right: `normalize` is this plus a selection, a generated manifest and provenance. An
26
34
  * unrecognized `context` or `declaredDialect` throws.
27
35
  */
@@ -1,5 +1,30 @@
1
1
  /* @ts-self-types="./mars_schema_wasm.d.ts" */
2
2
 
3
+ /**
4
+ * What a package's files say is wrong with it, from `{files, context?, declaredDialect?,
5
+ * dependencies?}`: `prepare`, `links::package` and `mars_schema::check::check`, in that order.
6
+ * `dependencies` is `{name: {prepared, extra_items?}}`, a plain object or a `Map`, the shape of
7
+ * `selectItems`' `packages` (only each `prepared.selection` is read), so one value serves both.
8
+ * @param {any} argument
9
+ * @returns {any}
10
+ */
11
+ function check(argument) {
12
+ try {
13
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
14
+ wasm.check(retptr, addHeapObject(argument));
15
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
16
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
17
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
18
+ if (r2) {
19
+ throw takeObject(r1);
20
+ }
21
+ return takeObject(r0);
22
+ } finally {
23
+ wasm.__wbindgen_add_to_stack_pointer(16);
24
+ }
25
+ }
26
+ exports.check = check;
27
+
3
28
  /**
4
29
  * YAML for the value of the key at column `indent`; see `index.d.ts`.
5
30
  * @param {any} value
@@ -81,7 +106,7 @@ exports.normalize = normalize;
81
106
 
82
107
  /**
83
108
  * Prepare one root from
84
- * `{files: Map<path, Uint8Array>, context?, declaredDialect?, migrate?}`. A supported export in
109
+ * `{files: Map<path, Uint8Array>, context?, declaredDialect?}`. A supported export in
85
110
  * its own right: `normalize` is this plus a selection, a generated manifest and provenance. An
86
111
  * unrecognized `context` or `declaredDialect` throws.
87
112
  * @param {any} argument
@@ -625,6 +650,10 @@ function __wbg_get_imports() {
625
650
  const ret = Object.values(getObject(arg0));
626
651
  return addHeapObject(ret);
627
652
  },
653
+ __wbg_values_9219e780744036e4: function(arg0) {
654
+ const ret = getObject(arg0).values();
655
+ return addHeapObject(ret);
656
+ },
628
657
  __wbindgen_cast_0000000000000001: function(arg0) {
629
658
  // Cast intrinsic for `F64 -> Externref`.
630
659
  const ret = arg0;
Binary file
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const check: (a: number, b: number) => void;
4
5
  export const emitValue: (a: number, b: number, c: number) => void;
5
6
  export const inspect: (a: number, b: number) => void;
6
7
  export const normalize: (a: number, b: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridian-flow/mars-schema",
3
- "version": "0.33.7",
3
+ "version": "0.34.0",
4
4
  "description": "Mars agent schema reader and lossless editor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * What a package's files say is wrong with it, from `{files, context?, declaredDialect?,
6
+ * dependencies?}`: `prepare`, `links::package` and `mars_schema::check::check`, in that order.
7
+ * `dependencies` is `{name: {prepared, extra_items?}}`, a plain object or a `Map`, the shape of
8
+ * `selectItems`' `packages` (only each `prepared.selection` is read), so one value serves both.
9
+ */
10
+ export function check(argument: any): any;
11
+
4
12
  /**
5
13
  * YAML for the value of the key at column `indent`; see `index.d.ts`.
6
14
  */
@@ -21,7 +29,7 @@ export function normalize(argument: any): any;
21
29
 
22
30
  /**
23
31
  * Prepare one root from
24
- * `{files: Map<path, Uint8Array>, context?, declaredDialect?, migrate?}`. A supported export in
32
+ * `{files: Map<path, Uint8Array>, context?, declaredDialect?}`. A supported export in
25
33
  * its own right: `normalize` is this plus a selection, a generated manifest and provenance. An
26
34
  * unrecognized `context` or `declaredDialect` throws.
27
35
  */
@@ -98,6 +106,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
98
106
 
99
107
  export interface InitOutput {
100
108
  readonly memory: WebAssembly.Memory;
109
+ readonly check: (a: number, b: number) => void;
101
110
  readonly emitValue: (a: number, b: number, c: number) => void;
102
111
  readonly inspect: (a: number, b: number) => void;
103
112
  readonly normalize: (a: number, b: number) => void;
@@ -1,5 +1,29 @@
1
1
  /* @ts-self-types="./mars_schema_wasm.d.ts" */
2
2
 
3
+ /**
4
+ * What a package's files say is wrong with it, from `{files, context?, declaredDialect?,
5
+ * dependencies?}`: `prepare`, `links::package` and `mars_schema::check::check`, in that order.
6
+ * `dependencies` is `{name: {prepared, extra_items?}}`, a plain object or a `Map`, the shape of
7
+ * `selectItems`' `packages` (only each `prepared.selection` is read), so one value serves both.
8
+ * @param {any} argument
9
+ * @returns {any}
10
+ */
11
+ export function check(argument) {
12
+ try {
13
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
14
+ wasm.check(retptr, addHeapObject(argument));
15
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
16
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
17
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
18
+ if (r2) {
19
+ throw takeObject(r1);
20
+ }
21
+ return takeObject(r0);
22
+ } finally {
23
+ wasm.__wbindgen_add_to_stack_pointer(16);
24
+ }
25
+ }
26
+
3
27
  /**
4
28
  * YAML for the value of the key at column `indent`; see `index.d.ts`.
5
29
  * @param {any} value
@@ -78,7 +102,7 @@ export function normalize(argument) {
78
102
 
79
103
  /**
80
104
  * Prepare one root from
81
- * `{files: Map<path, Uint8Array>, context?, declaredDialect?, migrate?}`. A supported export in
105
+ * `{files: Map<path, Uint8Array>, context?, declaredDialect?}`. A supported export in
82
106
  * its own right: `normalize` is this plus a selection, a generated manifest and provenance. An
83
107
  * unrecognized `context` or `declaredDialect` throws.
84
108
  * @param {any} argument
@@ -611,6 +635,10 @@ function __wbg_get_imports() {
611
635
  const ret = Object.values(getObject(arg0));
612
636
  return addHeapObject(ret);
613
637
  },
638
+ __wbg_values_9219e780744036e4: function(arg0) {
639
+ const ret = getObject(arg0).values();
640
+ return addHeapObject(ret);
641
+ },
614
642
  __wbindgen_cast_0000000000000001: function(arg0) {
615
643
  // Cast intrinsic for `F64 -> Externref`.
616
644
  const ret = arg0;
Binary file
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const check: (a: number, b: number) => void;
4
5
  export const emitValue: (a: number, b: number, c: number) => void;
5
6
  export const inspect: (a: number, b: number) => void;
6
7
  export const normalize: (a: number, b: number) => void;
@@ -1,12 +0,0 @@
1
- ---
2
- name: reader
3
- description: Reads and searches only
4
- tools:
5
- '*': deny
6
- Read: allow
7
- Grep: allow
8
- harness-overrides:
9
- meridian-flow:
10
- permission: read
11
- ---
12
- Read the code.
@@ -1,7 +0,0 @@
1
- ---
2
- name: reader
3
- description: Reads and searches only
4
- permission: read
5
- tools: [Read, Grep]
6
- ---
7
- Read the code.
@@ -1,21 +0,0 @@
1
- {
2
- "kind": "skill-tree",
3
- "dialect": {
4
- "dialect": "claude",
5
- "evidence": {
6
- "source": "predicted",
7
- "paths": []
8
- }
9
- },
10
- "also_found": [],
11
- "plugins": [],
12
- "items": [
13
- {
14
- "kind": "agent",
15
- "slug": "reader",
16
- "source_path": "agents/reader.md",
17
- "output_path": "agents/reader.md"
18
- }
19
- ],
20
- "diagnostics": {}
21
- }
@@ -1,155 +0,0 @@
1
- {
2
- "kind": "skill-tree",
3
- "packages": [
4
- {
5
- "id": "mars-dep",
6
- "provenance": {
7
- "translator": "{version}",
8
- "dialect": "claude",
9
- "source": {
10
- "name": "mars-dep"
11
- },
12
- "selected_items": [
13
- "agents/reader.md"
14
- ]
15
- },
16
- "prepared": {
17
- "classification": {
18
- "kind": "foreign",
19
- "dialect": "claude",
20
- "evidence": {
21
- "source": "predicted",
22
- "paths": []
23
- }
24
- },
25
- "manifest": {
26
- "output_path": "mars.toml",
27
- "reading": {
28
- "frontmatter": [
29
- [
30
- "schema",
31
- 1
32
- ],
33
- [
34
- "name",
35
- "mars-dep"
36
- ]
37
- ],
38
- "fields": {
39
- "name": "mars-dep",
40
- "version": "",
41
- "schema": 1
42
- },
43
- "body": null,
44
- "diagnostics": []
45
- },
46
- "change": {
47
- "kind": "generated"
48
- }
49
- },
50
- "definitions": [
51
- {
52
- "kind": "agent",
53
- "slug": "reader",
54
- "source_path": "agents/reader.md",
55
- "output_path": "agents/reader.md",
56
- "reading": {
57
- "frontmatter": [
58
- [
59
- "name",
60
- "reader"
61
- ],
62
- [
63
- "description",
64
- "Reads and searches only"
65
- ],
66
- [
67
- "tools",
68
- {
69
- "*": "deny",
70
- "Read": "allow",
71
- "Grep": "allow"
72
- }
73
- ],
74
- [
75
- "harness-overrides",
76
- {
77
- "meridian-flow": {
78
- "permission": "read"
79
- }
80
- }
81
- ]
82
- ],
83
- "fields": {
84
- "name": "reader",
85
- "description": "Reads and searches only",
86
- "harness": null,
87
- "model": null,
88
- "mode": null,
89
- "model-invocable": true,
90
- "user-invocable": true,
91
- "approval": null,
92
- "sandbox": null,
93
- "network": null,
94
- "network-allow": [],
95
- "network-deny": [],
96
- "effort": null,
97
- "skills": {
98
- "load": [],
99
- "available": []
100
- },
101
- "subagents": [],
102
- "tools": [
103
- {
104
- "capability": "*",
105
- "pattern": null,
106
- "action": "deny",
107
- "origin": "profile"
108
- },
109
- {
110
- "capability": "read",
111
- "pattern": null,
112
- "action": "allow",
113
- "origin": "profile"
114
- },
115
- {
116
- "capability": "grep",
117
- "pattern": null,
118
- "action": "allow",
119
- "origin": "profile"
120
- }
121
- ],
122
- "harness-overrides": {
123
- "meridian-flow": {
124
- "permission": "read"
125
- }
126
- },
127
- "model-policies": []
128
- },
129
- "body": "Read the code.\n",
130
- "diagnostics": []
131
- },
132
- "change": {
133
- "kind": "fully-rewritten"
134
- }
135
- }
136
- ],
137
- "payload": [],
138
- "selection": {
139
- "definitions": [
140
- {
141
- "kind": "agent",
142
- "slug": "reader",
143
- "output_path": "agents/reader.md",
144
- "skills": []
145
- }
146
- ],
147
- "edges": [],
148
- "uses_providers": []
149
- },
150
- "diagnostics": {}
151
- }
152
- }
153
- ],
154
- "diagnostics": {}
155
- }
@@ -1,3 +0,0 @@
1
- {
2
- "source": { "name": "mars-dep" }
3
- }
@@ -1,11 +0,0 @@
1
- ---
2
- name: old
3
- description: An agent written for Mars before schema v1
4
- tools:
5
- '*': deny
6
- Read: allow
7
- Grep: allow
8
- approval: never
9
- network: deny
10
- ---
11
- Review the change.
@@ -1,3 +0,0 @@
1
- [package]
2
- schema = 1
3
- name = "legacy-dep"
@@ -1,8 +0,0 @@
1
- ---
2
- name: review
3
- description: A skill written for Mars before schema v1
4
- model-invocable: false
5
- metadata:
6
- type: workflow
7
- ---
8
- Read the diff.
@@ -1,10 +0,0 @@
1
- ---
2
- name: old
3
- description: An agent written for Mars before schema v1
4
- tools: [Read, Grep]
5
- approval: yolo
6
- network: deny
7
- autocompact: 80
8
- fanout: 3
9
- ---
10
- Review the change.
@@ -1,7 +0,0 @@
1
- ---
2
- name: review
3
- description: A skill written for Mars before schema v1
4
- type: workflow
5
- model_invocable: false
6
- ---
7
- Read the diff.
@@ -1,28 +0,0 @@
1
- {
2
- "kind": "skill-tree",
3
- "dialect": {
4
- "dialect": "claude",
5
- "evidence": {
6
- "source": "predicted",
7
- "paths": []
8
- }
9
- },
10
- "also_found": [],
11
- "plugins": [],
12
- "items": [
13
- {
14
- "kind": "agent",
15
- "slug": "old",
16
- "source_path": "agents/old.md",
17
- "output_path": "agents/old.md"
18
- },
19
- {
20
- "kind": "skill",
21
- "slug": "review",
22
- "source_path": "skills/review/SKILL.md",
23
- "skill_root": "skills/review",
24
- "output_path": "skills/review/SKILL.md"
25
- }
26
- ],
27
- "diagnostics": {}
28
- }