@meridian-flow/mars-schema 0.34.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/fixtures/check/duplicate-slug-different-names/expected.json +2 -2
- package/fixtures/check/duplicate-slug-same-name/expected.json +7 -1
- package/fixtures/check/ref-missing-no-dependencies/expected.json +17 -0
- package/fixtures/check/ref-missing-no-package/expected.json +17 -0
- package/fixtures/normalize/duplicate-slug/inspection.json +9 -1
- package/fixtures/normalize/duplicate-slug/normalized.json +9 -1
- package/fixtures/prepare/package-no-schema/expected.json +1 -1
- package/node/mars_schema_wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/web/mars_schema_wasm_bg.wasm +0 -0
- package/fixtures/check/ref-external-no-package/expected.json +0 -17
- package/fixtures/check/ref-external-with-package/expected.json +0 -17
- /package/fixtures/check/{ref-external-no-package → ref-missing-no-dependencies}/input/agents/coder.md +0 -0
- /package/fixtures/check/{ref-external-with-package → ref-missing-no-dependencies}/input/mars.toml +0 -0
- /package/fixtures/check/{ref-external-with-package → ref-missing-no-dependencies}/request.json +0 -0
- /package/fixtures/check/{ref-external-with-package → ref-missing-no-package}/input/agents/coder.md +0 -0
- /package/fixtures/check/{ref-external-no-package → ref-missing-no-package}/request.json +0 -0
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ Marketplace fields are untrusted input: a marketplace is third-party text, and a
|
|
|
123
123
|
|
|
124
124
|
A level says what the author loses. **Error**: the file or package won't load or install (a duplicate `name`, a skill ref no package ships, a requirement that isn't one). **Warning**: something written won't take effect (a skill folder with no `SKILL.md`, a restriction translation dropped, a skill ref to a package the file doesn't declare). **Info**: nothing written is lost (an Agent with no `description`, a `name` that differs from the file name, a repaired value). Show errors and warnings by default and info on request. A file with an error is unusable; an error on `mars.toml` makes the whole package unusable.
|
|
125
125
|
|
|
126
|
-
Per path, `diagnostics` lists what `prepare` returns for the file and then the check's own findings, errors first, so the two never disagree: dropping the check's codes leaves `prepare`'s list. The check's own codes are `package.requirement`, `agent.description-missing`, `agent.name-missing`, `definition.name-mismatch`, `definition.duplicate-name`, `
|
|
126
|
+
Per path, `diagnostics` lists what `prepare` returns for the file and then the check's own findings, errors first, so the two never disagree: dropping the check's codes leaves `prepare`'s list. The check's own codes are `package.requirement`, `agent.description-missing`, `agent.name-missing`, `definition.name-mismatch`, `definition.duplicate-name`, `selection.duplicate-slug`, `skill-ref.missing`, `skill-ref.provider`, `skill.no-definition`, and from a translated package `field.restriction-lost`, `field.execution-ignored` and `frontmatter.repaired`.
|
|
127
127
|
|
|
128
128
|
`dependencies` is the whole closure: every package reachable from the root through any `[dependencies]` entry, filtered or not, one entry per source, keyed by the name the declaring table gives it, each as `{ prepared: prepare(...) }` (the shape of `selectItems`' `packages`, `extra_items` included though `check` ignores it), as a plain object or a `Map`; an unknown key in an entry throws `input.invalid` either way. A dependency's own Agent that names a skill no package ships is `skill-ref.dependency` in `dependency_diagnostics`, by dependency and then the Agent's output path: it is not the root's to fix, so a Save that fails on errors in `diagnostics` leaves it out.
|
|
129
129
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"diagnostics": {
|
|
3
3
|
"one/agents/x.md": [
|
|
4
4
|
{
|
|
5
|
-
"code": "
|
|
5
|
+
"code": "import.duplicate-slug",
|
|
6
6
|
"severity": "error",
|
|
7
7
|
"path": [],
|
|
8
8
|
"message": "agent slug `x` is also selected by `two/agents/x.md`"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"code": "import.duplicate-slug",
|
|
22
22
|
"severity": "error",
|
|
23
23
|
"path": [],
|
|
24
|
-
"message": "agent slug `x` is selected by
|
|
24
|
+
"message": "agent slug `x` is also selected by `one/agents/x.md`"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"code": "definition.name-mismatch",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"diagnostics": {
|
|
3
3
|
"one/agents/x.md": [
|
|
4
|
+
{
|
|
5
|
+
"code": "import.duplicate-slug",
|
|
6
|
+
"severity": "error",
|
|
7
|
+
"path": [],
|
|
8
|
+
"message": "agent slug `x` is also selected by `two/agents/x.md`"
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"code": "definition.duplicate-name",
|
|
6
12
|
"severity": "error",
|
|
@@ -15,7 +21,7 @@
|
|
|
15
21
|
"code": "import.duplicate-slug",
|
|
16
22
|
"severity": "error",
|
|
17
23
|
"path": [],
|
|
18
|
-
"message": "agent slug `x` is selected by
|
|
24
|
+
"message": "agent slug `x` is also selected by `one/agents/x.md`"
|
|
19
25
|
},
|
|
20
26
|
{
|
|
21
27
|
"code": "definition.duplicate-name",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"diagnostics": {
|
|
3
|
+
"agents/coder.md": [
|
|
4
|
+
{
|
|
5
|
+
"code": "skill-ref.missing",
|
|
6
|
+
"severity": "error",
|
|
7
|
+
"path": [
|
|
8
|
+
"skills"
|
|
9
|
+
],
|
|
10
|
+
"message": "agent `coder` references skill `elsewhere` not found in local package or dependencies\n searched: (this package)\n hint: add the skill's source package as a dependency, or remove the skill reference"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"dependency_diagnostics": {},
|
|
15
|
+
"missing_dependencies": [],
|
|
16
|
+
"unreadable_dependencies": []
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"diagnostics": {
|
|
3
|
+
"agents/coder.md": [
|
|
4
|
+
{
|
|
5
|
+
"code": "skill-ref.missing",
|
|
6
|
+
"severity": "error",
|
|
7
|
+
"path": [
|
|
8
|
+
"skills"
|
|
9
|
+
],
|
|
10
|
+
"message": "agent `coder` references skill `elsewhere` not found in local package or dependencies\n searched: (this package)\n hint: add the skill's source package as a dependency, or remove the skill reference"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"dependency_diagnostics": {},
|
|
15
|
+
"missing_dependencies": [],
|
|
16
|
+
"unreadable_dependencies": []
|
|
17
|
+
}
|
|
@@ -32,12 +32,20 @@
|
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
34
|
"diagnostics": {
|
|
35
|
+
"one/review/SKILL.md": [
|
|
36
|
+
{
|
|
37
|
+
"code": "import.duplicate-slug",
|
|
38
|
+
"severity": "error",
|
|
39
|
+
"path": [],
|
|
40
|
+
"message": "skill slug `review` is also selected by `two/review/SKILL.md`"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
35
43
|
"two/review/SKILL.md": [
|
|
36
44
|
{
|
|
37
45
|
"code": "import.duplicate-slug",
|
|
38
46
|
"severity": "error",
|
|
39
47
|
"path": [],
|
|
40
|
-
"message": "skill slug `review` is selected by
|
|
48
|
+
"message": "skill slug `review` is also selected by `one/review/SKILL.md`"
|
|
41
49
|
}
|
|
42
50
|
]
|
|
43
51
|
}
|
|
@@ -45,12 +45,20 @@
|
|
|
45
45
|
"uses_providers": []
|
|
46
46
|
},
|
|
47
47
|
"diagnostics": {
|
|
48
|
+
"one/review/SKILL.md": [
|
|
49
|
+
{
|
|
50
|
+
"code": "import.duplicate-slug",
|
|
51
|
+
"severity": "error",
|
|
52
|
+
"path": [],
|
|
53
|
+
"message": "skill slug `review` is also selected by `two/review/SKILL.md`"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
48
56
|
"two/review/SKILL.md": [
|
|
49
57
|
{
|
|
50
58
|
"code": "import.duplicate-slug",
|
|
51
59
|
"severity": "error",
|
|
52
60
|
"path": [],
|
|
53
|
-
"message": "skill slug `review` is selected by
|
|
61
|
+
"message": "skill slug `review` is also selected by `one/review/SKILL.md`"
|
|
54
62
|
}
|
|
55
63
|
]
|
|
56
64
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"package",
|
|
30
30
|
"schema"
|
|
31
31
|
],
|
|
32
|
-
"message": "`[package]` has no `schema`: add `schema = 1`, or migrate the package with `mars migrate` from
|
|
32
|
+
"message": "`[package]` has no `schema`: add `schema = 1`, or migrate the package with `mars migrate` from Mars 0.33.x (https://github.com/haowjy/mars-agents/blob/main/docs/config/retired-keys.md#package-without-schema)"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
},
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"diagnostics": {
|
|
3
|
-
"agents/coder.md": [
|
|
4
|
-
{
|
|
5
|
-
"code": "skill-ref.external",
|
|
6
|
-
"severity": "warning",
|
|
7
|
-
"path": [
|
|
8
|
-
"skills"
|
|
9
|
-
],
|
|
10
|
-
"message": "agent `coder` references skill `elsewhere`, which this package does not ship; a consumer must hold a package that does"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
},
|
|
14
|
-
"dependency_diagnostics": {},
|
|
15
|
-
"missing_dependencies": [],
|
|
16
|
-
"unreadable_dependencies": []
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"diagnostics": {
|
|
3
|
-
"agents/coder.md": [
|
|
4
|
-
{
|
|
5
|
-
"code": "skill-ref.external",
|
|
6
|
-
"severity": "warning",
|
|
7
|
-
"path": [
|
|
8
|
-
"skills"
|
|
9
|
-
],
|
|
10
|
-
"message": "agent `coder` references skill `elsewhere`, which this package does not ship; a consumer must hold a package that does"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
},
|
|
14
|
-
"dependency_diagnostics": {},
|
|
15
|
-
"missing_dependencies": [],
|
|
16
|
-
"unreadable_dependencies": []
|
|
17
|
-
}
|
|
File without changes
|
/package/fixtures/check/{ref-external-with-package → ref-missing-no-dependencies}/input/mars.toml
RENAMED
|
File without changes
|
/package/fixtures/check/{ref-external-with-package → ref-missing-no-dependencies}/request.json
RENAMED
|
File without changes
|
/package/fixtures/check/{ref-external-with-package → ref-missing-no-package}/input/agents/coder.md
RENAMED
|
File without changes
|
|
File without changes
|