@meridian-flow/mars-schema 0.35.1 → 0.36.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 (47) hide show
  1. package/README.md +9 -3
  2. package/fixtures/alias-candidates/auto-sonnet/expected.json +7 -0
  3. package/fixtures/alias-candidates/auto-sonnet/request.json +100 -0
  4. package/fixtures/alias-candidates/no-match-is-empty/expected.json +1 -0
  5. package/fixtures/alias-candidates/no-match-is-empty/request.json +94 -0
  6. package/fixtures/alias-candidates/pinned-alone/expected.json +3 -0
  7. package/fixtures/alias-candidates/pinned-alone/request.json +92 -0
  8. package/fixtures/alias-candidates/pinned-widened-by-match/expected.json +10 -0
  9. package/fixtures/alias-candidates/pinned-widened-by-match/request.json +98 -0
  10. package/fixtures/alias-narrow/all-providers/expected.json +27 -0
  11. package/fixtures/alias-narrow/all-providers/request.json +32 -0
  12. package/fixtures/alias-narrow/default-list/expected.json +18 -0
  13. package/fixtures/alias-narrow/default-list/request.json +29 -0
  14. package/fixtures/alias-narrow/named-list/expected.json +11 -0
  15. package/fixtures/alias-narrow/named-list/request.json +33 -0
  16. package/fixtures/alias-resolve-all/meridian-base-real-rows/expected.json +21 -0
  17. package/fixtures/alias-resolve-all/meridian-base-real-rows/request.json +2759 -0
  18. package/fixtures/read/manifest-broken-tables/expected.json +78 -0
  19. package/fixtures/read/manifest-broken-tables/mars.toml +24 -0
  20. package/fixtures/read/manifest-consumer-invalid/expected.json +50 -0
  21. package/fixtures/read/manifest-consumer-invalid/mars.toml +13 -0
  22. package/fixtures/read/manifest-consumer-no-package/expected.json +16 -0
  23. package/fixtures/read/manifest-consumer-no-package/mars.toml +5 -0
  24. package/fixtures/read/manifest-dependencies/expected.json +12 -1
  25. package/fixtures/read/manifest-every-table/expected.json +211 -0
  26. package/fixtures/read/manifest-every-table/mars.toml +95 -0
  27. package/fixtures/read/manifest-meridian-base/expected.json +235 -0
  28. package/fixtures/read/manifest-meridian-base/mars.toml +161 -0
  29. package/fixtures/read/manifest-unsafe-dependencies/expected.json +82 -0
  30. package/fixtures/read/manifest-unsafe-dependencies/mars.toml +14 -0
  31. package/fixtures/read/manifest-unsafe-values/expected.json +100 -0
  32. package/fixtures/read/manifest-unsafe-values/mars.toml +28 -0
  33. package/fixtures/resolve/engine-skip/expected.json +1 -1
  34. package/fixtures/resolve/locked-commit-missing-latest/expected.json +4 -2
  35. package/fixtures/version/select-latest-constraint-keeps-lock/expected.json +3 -0
  36. package/index.d.ts +147 -15
  37. package/node/mars_schema_wasm.d.ts +30 -11
  38. package/node/mars_schema_wasm.js +97 -34
  39. package/node/mars_schema_wasm_bg.wasm +0 -0
  40. package/node/mars_schema_wasm_bg.wasm.d.ts +7 -4
  41. package/package.json +1 -1
  42. package/web/mars_schema_wasm.d.ts +37 -15
  43. package/web/mars_schema_wasm.js +94 -34
  44. package/web/mars_schema_wasm_bg.wasm +0 -0
  45. package/web/mars_schema_wasm_bg.wasm.d.ts +7 -4
  46. package/fixtures/version/select-latest-constraint-ignores-lock/expected.json +0 -3
  47. /package/fixtures/version/{select-latest-constraint-ignores-lock → select-latest-constraint-keeps-lock}/input.json +0 -0
@@ -0,0 +1,78 @@
1
+ {
2
+ "frontmatter": [
3
+ [
4
+ "name",
5
+ "broken-tables"
6
+ ],
7
+ [
8
+ "version",
9
+ "1.0.0"
10
+ ]
11
+ ],
12
+ "fields": {
13
+ "name": "broken-tables",
14
+ "version": "1.0.0"
15
+ },
16
+ "body": null,
17
+ "diagnostics": [
18
+ {
19
+ "code": "manifest.schema-missing",
20
+ "severity": "error",
21
+ "path": [
22
+ "package",
23
+ "schema"
24
+ ],
25
+ "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)"
26
+ },
27
+ {
28
+ "code": "config.invalid",
29
+ "severity": "error",
30
+ "path": [
31
+ "settings"
32
+ ],
33
+ "message": "invalid type: integer `1`, expected a sequence\nin `targets`"
34
+ },
35
+ {
36
+ "code": "config.invalid",
37
+ "severity": "error",
38
+ "path": [
39
+ "models",
40
+ "bad"
41
+ ],
42
+ "message": "model alias must have either 'model' (pinned) or 'match' (auto-resolve)"
43
+ },
44
+ {
45
+ "code": "config.invalid",
46
+ "severity": "error",
47
+ "path": [
48
+ "agents",
49
+ "coder"
50
+ ],
51
+ "message": "`approval` has invalid value `bogus`; allowed: default, auto, confirm, never\nin `approval`"
52
+ },
53
+ {
54
+ "code": "config.invalid",
55
+ "severity": "error",
56
+ "path": [
57
+ "skills",
58
+ "s"
59
+ ],
60
+ "message": "invalid type: integer `1`, expected a string\nin `description`"
61
+ }
62
+ ],
63
+ "dependencies": {
64
+ "x": {
65
+ "url": "https://example.org/x"
66
+ }
67
+ },
68
+ "models": {
69
+ "good": {
70
+ "model": "gpt-5"
71
+ }
72
+ },
73
+ "agents": {
74
+ "reviewer": {
75
+ "model": "good"
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,24 @@
1
+ [package]
2
+ name = "broken-tables"
3
+ version = "1.0.0"
4
+
5
+ [dependencies.x]
6
+ url = "https://example.org/x"
7
+
8
+ [settings]
9
+ targets = 1
10
+
11
+ [models.good]
12
+ model = "gpt-5"
13
+
14
+ [models.bad]
15
+ exclude = ["*"]
16
+
17
+ [agents.coder]
18
+ approval = "bogus"
19
+
20
+ [agents.reviewer]
21
+ model = "good"
22
+
23
+ [skills.s]
24
+ description = 1
@@ -0,0 +1,50 @@
1
+ {
2
+ "frontmatter": [
3
+ [
4
+ "name",
5
+ "consumer-invalid"
6
+ ],
7
+ [
8
+ "version",
9
+ "1.0.0"
10
+ ],
11
+ [
12
+ "schema",
13
+ 1
14
+ ]
15
+ ],
16
+ "fields": {
17
+ "name": "consumer-invalid",
18
+ "version": "1.0.0",
19
+ "schema": 1
20
+ },
21
+ "body": null,
22
+ "diagnostics": [
23
+ {
24
+ "code": "config.invalid",
25
+ "severity": "error",
26
+ "path": [
27
+ "settings",
28
+ "min_mars_version"
29
+ ],
30
+ "message": "`min_mars_version = \"not a version\"` is not a version requirement: unexpected character 'n' while parsing major version number"
31
+ },
32
+ {
33
+ "code": "config.invalid",
34
+ "severity": "error",
35
+ "path": [
36
+ "models",
37
+ "broken"
38
+ ],
39
+ "message": "model alias must have either 'model' (pinned) or 'match' (auto-resolve)"
40
+ }
41
+ ],
42
+ "dependencies": {
43
+ "base": {
44
+ "url": "https://github.com/example/base"
45
+ }
46
+ },
47
+ "settings": {
48
+ "min_mars_version": "not a version"
49
+ }
50
+ }
@@ -0,0 +1,13 @@
1
+ [package]
2
+ name = "consumer-invalid"
3
+ version = "1.0.0"
4
+ schema = 1
5
+
6
+ [dependencies.base]
7
+ url = "https://github.com/example/base"
8
+
9
+ [settings]
10
+ min_mars_version = "not a version"
11
+
12
+ [models.broken]
13
+ exclude = ["*"]
@@ -0,0 +1,16 @@
1
+ {
2
+ "frontmatter": [],
3
+ "fields": null,
4
+ "body": null,
5
+ "diagnostics": [],
6
+ "dependencies": {
7
+ "x": {
8
+ "url": "https://example.org/x"
9
+ }
10
+ },
11
+ "models": {
12
+ "a": {
13
+ "model": "gpt-5"
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,5 @@
1
+ [dependencies.x]
2
+ url = "https://example.org/x"
3
+
4
+ [models.a]
5
+ model = "gpt-5"
@@ -19,7 +19,18 @@
19
19
  "schema": 1
20
20
  },
21
21
  "body": null,
22
- "diagnostics": [],
22
+ "diagnostics": [
23
+ {
24
+ "code": "field.unknown",
25
+ "severity": "info",
26
+ "path": [
27
+ "dependencies",
28
+ "market",
29
+ "future-key"
30
+ ],
31
+ "message": "[dependencies.market] unknown key `future-key` is not read by Mars v{version} (a typo, or a key from a newer Mars); it stays in the file"
32
+ }
33
+ ],
23
34
  "dependencies": {
24
35
  "base": {
25
36
  "url": "https://github.com/haowjy/meridian-base",
@@ -0,0 +1,211 @@
1
+ {
2
+ "frontmatter": [
3
+ [
4
+ "name",
5
+ "every-table"
6
+ ],
7
+ [
8
+ "version",
9
+ "1.2.3"
10
+ ],
11
+ [
12
+ "schema",
13
+ 1
14
+ ],
15
+ [
16
+ "description",
17
+ "A manifest that uses every table Mars reads."
18
+ ],
19
+ [
20
+ "requires-mars",
21
+ ">=0.34.0"
22
+ ],
23
+ [
24
+ "uses-providers",
25
+ [
26
+ "anthropic"
27
+ ]
28
+ ],
29
+ [
30
+ "tools",
31
+ {
32
+ "bash(git push *)": "ask"
33
+ }
34
+ ]
35
+ ],
36
+ "fields": {
37
+ "name": "every-table",
38
+ "version": "1.2.3",
39
+ "description": "A manifest that uses every table Mars reads.",
40
+ "schema": 1,
41
+ "uses-providers": [
42
+ "anthropic"
43
+ ],
44
+ "requires-mars": ">=0.34.0",
45
+ "tools": {
46
+ "bash(git push *)": "ask"
47
+ }
48
+ },
49
+ "body": null,
50
+ "diagnostics": [
51
+ {
52
+ "code": "field.unknown",
53
+ "severity": "info",
54
+ "path": [
55
+ "settings",
56
+ "unknown_setting"
57
+ ],
58
+ "message": "[settings] unknown key `unknown_setting` is not read by Mars v{version} (a typo, or a key from a newer Mars); it stays in the file"
59
+ },
60
+ {
61
+ "code": "field.unknown",
62
+ "severity": "info",
63
+ "path": [
64
+ "dependencies",
65
+ "base",
66
+ "mystery"
67
+ ],
68
+ "message": "[dependencies.base] unknown key `mystery` is not read by Mars v{version} (a typo, or a key from a newer Mars); it stays in the file"
69
+ }
70
+ ],
71
+ "dependencies": {
72
+ "base": {
73
+ "url": "https://github.com/example/base",
74
+ "version": "^1.0",
75
+ "agents": [
76
+ "coder"
77
+ ],
78
+ "mystery": true
79
+ }
80
+ },
81
+ "local-dependencies": {
82
+ "helper": {
83
+ "path": "../helper"
84
+ }
85
+ },
86
+ "plugin": {
87
+ "dir": "plugin"
88
+ },
89
+ "settings": {
90
+ "managed_root": ".claude",
91
+ "targets": [
92
+ ".claude",
93
+ ".codex"
94
+ ],
95
+ "models_cache_ttl_hours": 12,
96
+ "min_mars_version": ">=0.34.0",
97
+ "default_harness": "claude",
98
+ "default_model": "sonnet",
99
+ "default_network": "allow",
100
+ "network-allow": [
101
+ "api.example.com"
102
+ ],
103
+ "network-deny": [
104
+ "evil.example.com"
105
+ ],
106
+ "tools": {
107
+ "bash(rm *)": "deny"
108
+ },
109
+ "harness_order": [
110
+ "claude",
111
+ "codex"
112
+ ],
113
+ "provider_order": [
114
+ "anthropic",
115
+ "openai"
116
+ ],
117
+ "catalog_providers": [
118
+ "anthropic",
119
+ "openai"
120
+ ],
121
+ "agent_emission": "never",
122
+ "meridian": {
123
+ "agent_copy": {
124
+ "harnesses": [
125
+ "claude"
126
+ ],
127
+ "include_fanout": true
128
+ },
129
+ "fanout": {
130
+ "agents": [
131
+ "orchestrator"
132
+ ]
133
+ }
134
+ },
135
+ "model-policies": [
136
+ {
137
+ "match": {
138
+ "alias": "opus"
139
+ },
140
+ "override": {
141
+ "effort": "high"
142
+ }
143
+ }
144
+ ]
145
+ },
146
+ "models": {
147
+ "sonnet": {
148
+ "harness": "claude",
149
+ "description": "Everyday work.",
150
+ "prompting": "Be brief.",
151
+ "default_effort": "high",
152
+ "autocompact": 200000,
153
+ "autocompact_pct": 80,
154
+ "provider": "anthropic",
155
+ "match": [
156
+ "claude*sonnet*"
157
+ ],
158
+ "exclude": [
159
+ "*:*"
160
+ ]
161
+ },
162
+ "pinned": {
163
+ "model": "gpt-5.5"
164
+ },
165
+ "pinned-widened": {
166
+ "model": "claude-opus-4-1",
167
+ "match": [
168
+ "claude*opus*"
169
+ ],
170
+ "exclude": [
171
+ "*:*"
172
+ ]
173
+ }
174
+ },
175
+ "agents": {
176
+ "coder": {
177
+ "description": "Writes code.",
178
+ "model": "sonnet",
179
+ "harness": "claude",
180
+ "effort": "medium",
181
+ "approval": "auto",
182
+ "sandbox": "workspace-write",
183
+ "network": "allow",
184
+ "network-allow": [
185
+ "docs.example.com"
186
+ ],
187
+ "model-invocable": true,
188
+ "user-invocable": false,
189
+ "tools": {
190
+ "bash(git *)": "allow"
191
+ },
192
+ "model-policies": [
193
+ {
194
+ "match": {
195
+ "model": "gpt-5.5"
196
+ },
197
+ "override": {
198
+ "effort": "low"
199
+ }
200
+ }
201
+ ]
202
+ }
203
+ },
204
+ "skills": {
205
+ "review": {
206
+ "description": "Reviews a diff.",
207
+ "model-invocable": false,
208
+ "user-invocable": true
209
+ }
210
+ }
211
+ }
@@ -0,0 +1,95 @@
1
+ [package]
2
+ name = "every-table"
3
+ version = "1.2.3"
4
+ schema = 1
5
+ description = "A manifest that uses every table Mars reads."
6
+ requires-mars = ">=0.34.0"
7
+ uses-providers = ["anthropic"]
8
+
9
+ [package.tools]
10
+ "bash(git push *)" = "ask"
11
+
12
+ [dependencies.base]
13
+ url = "https://github.com/example/base"
14
+ version = "^1.0"
15
+ agents = ["coder"]
16
+ mystery = true
17
+
18
+ [local-dependencies.helper]
19
+ path = "../helper"
20
+
21
+ [plugin]
22
+ dir = "plugin"
23
+
24
+ [settings]
25
+ managed_root = ".claude"
26
+ targets = [".claude", ".codex"]
27
+ models_cache_ttl_hours = 12
28
+ min_mars_version = ">=0.34.0"
29
+ default_harness = "claude"
30
+ default_model = "sonnet"
31
+ default_network = "allow"
32
+ network-allow = ["api.example.com"]
33
+ network-deny = ["evil.example.com"]
34
+ harness_order = ["claude", "codex"]
35
+ provider_order = ["anthropic", "openai"]
36
+ catalog_providers = ["anthropic", "openai"]
37
+ agent_emission = "never"
38
+ unknown_setting = 1
39
+
40
+ [settings.tools]
41
+ "bash(rm *)" = "deny"
42
+
43
+ [settings.meridian.agent_copy]
44
+ harnesses = ["claude"]
45
+ include_fanout = true
46
+
47
+ [settings.meridian.fanout]
48
+ agents = ["orchestrator"]
49
+
50
+ [[settings.model-policies]]
51
+ match = { alias = "opus" }
52
+ override = { effort = "high" }
53
+
54
+ [models.sonnet]
55
+ harness = "claude"
56
+ description = "Everyday work."
57
+ prompting = "Be brief."
58
+ default_effort = "high"
59
+ autocompact = 200000
60
+ autocompact_pct = 80
61
+ match = ["claude*sonnet*"]
62
+ exclude = ["*:*"]
63
+ provider = "anthropic"
64
+
65
+ [models.pinned]
66
+ model = "gpt-5.5"
67
+
68
+ [models.pinned-widened]
69
+ model = "claude-opus-4-1"
70
+ match = ["claude*opus*"]
71
+ exclude = ["*:*"]
72
+
73
+ [agents.coder]
74
+ description = "Writes code."
75
+ model = "sonnet"
76
+ harness = "claude"
77
+ effort = "medium"
78
+ approval = "auto"
79
+ sandbox = "workspace-write"
80
+ network = "allow"
81
+ network-allow = ["docs.example.com"]
82
+ model-invocable = true
83
+ user-invocable = false
84
+
85
+ [agents.coder.tools]
86
+ "bash(git *)" = "allow"
87
+
88
+ [[agents.coder.model-policies]]
89
+ match = { model = "gpt-5.5" }
90
+ override = { effort = "low" }
91
+
92
+ [skills.review]
93
+ description = "Reviews a diff."
94
+ model-invocable = false
95
+ user-invocable = true