@meridian-flow/mars-schema 0.31.1 → 0.32.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.
Files changed (43) hide show
  1. package/README.md +16 -2
  2. package/fixtures/prepare/package-tools/expected.json +213 -0
  3. package/fixtures/prepare/package-tools/input/agents/a.md +7 -0
  4. package/fixtures/prepare/package-tools/input/agents/b.md +4 -0
  5. package/fixtures/prepare/package-tools/input/mars.toml +10 -0
  6. package/fixtures/prepare/package-tools/request.json +3 -0
  7. package/fixtures/prepare/package-tools-invalid/expected.json +112 -0
  8. package/fixtures/prepare/package-tools-invalid/input/agents/b.md +4 -0
  9. package/fixtures/prepare/package-tools-invalid/input/mars.toml +8 -0
  10. package/fixtures/prepare/package-tools-invalid/request.json +3 -0
  11. package/fixtures/project/aliases-reach-one-capability/expected.json +47 -0
  12. package/fixtures/project/aliases-reach-one-capability/request.json +15 -0
  13. package/fixtures/project/claude-allowlist-covered/expected.json +60 -0
  14. package/fixtures/project/claude-allowlist-covered/request.json +20 -0
  15. package/fixtures/project/claude-edit-beats-write/expected.json +53 -0
  16. package/fixtures/project/claude-edit-beats-write/request.json +15 -0
  17. package/fixtures/project/claude-scoped-file-rules/expected.json +68 -0
  18. package/fixtures/project/claude-scoped-file-rules/request.json +20 -0
  19. package/fixtures/project/codex-no-switch-and-absent/expected.json +49 -0
  20. package/fixtures/project/codex-no-switch-and-absent/request.json +20 -0
  21. package/fixtures/project/flow-allowlist/expected.json +44 -0
  22. package/fixtures/project/flow-allowlist/request.json +15 -0
  23. package/fixtures/project/flow-closed-tool-set/expected.json +75 -0
  24. package/fixtures/project/flow-closed-tool-set/request.json +10 -0
  25. package/fixtures/project/flow-gaps-and-ask/expected.json +57 -0
  26. package/fixtures/project/flow-gaps-and-ask/request.json +20 -0
  27. package/fixtures/project/flow-scoped-pattern/expected.json +23 -0
  28. package/fixtures/project/flow-scoped-pattern/request.json +10 -0
  29. package/fixtures/project/flow-write-deny/expected.json +29 -0
  30. package/fixtures/project/flow-write-deny/request.json +10 -0
  31. package/fixtures/project/key-with-pattern/expected.json +68 -0
  32. package/fixtures/project/key-with-pattern/request.json +8 -0
  33. package/fixtures/vocabulary/expected.json +54 -0
  34. package/index.d.ts +55 -0
  35. package/node/mars_schema_wasm.d.ts +7 -0
  36. package/node/mars_schema_wasm.js +27 -0
  37. package/node/mars_schema_wasm_bg.wasm +0 -0
  38. package/node/mars_schema_wasm_bg.wasm.d.ts +1 -0
  39. package/package.json +1 -1
  40. package/web/mars_schema_wasm.d.ts +8 -0
  41. package/web/mars_schema_wasm.js +26 -0
  42. package/web/mars_schema_wasm_bg.wasm +0 -0
  43. package/web/mars_schema_wasm_bg.wasm.d.ts +1 -0
@@ -0,0 +1,68 @@
1
+ {
2
+ "host": "claude",
3
+ "default": null,
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "write",
8
+ "pattern": "src/**",
9
+ "action": "allow",
10
+ "origin": "profile"
11
+ },
12
+ "status": "known",
13
+ "native": [],
14
+ "native_tools": [],
15
+ "note": "a stricter rule controls the same native tool and wins (deny, then ask, then allow); this rule is left out",
16
+ "covered_by": {
17
+ "action": "ask",
18
+ "key": "edit(src/**)"
19
+ }
20
+ },
21
+ {
22
+ "rule": {
23
+ "capability": "edit",
24
+ "pattern": "src/**",
25
+ "action": "ask",
26
+ "origin": "profile"
27
+ },
28
+ "status": "known",
29
+ "native": [
30
+ "Edit(src/**)"
31
+ ],
32
+ "native_tools": [
33
+ "Edit",
34
+ "Write",
35
+ "NotebookEdit"
36
+ ],
37
+ "note": "Claude uses Edit(path) to scope every built-in file-editing tool",
38
+ "covered_by": null
39
+ },
40
+ {
41
+ "rule": {
42
+ "capability": "read",
43
+ "pattern": "src/**",
44
+ "action": "deny",
45
+ "origin": "profile"
46
+ },
47
+ "status": "known",
48
+ "native": [
49
+ "Read(src/**)"
50
+ ],
51
+ "native_tools": [
52
+ "Read"
53
+ ],
54
+ "note": null,
55
+ "covered_by": null
56
+ }
57
+ ],
58
+ "allow": [],
59
+ "deny": [
60
+ "Read(src/**)"
61
+ ],
62
+ "ask": [
63
+ "Edit(src/**)"
64
+ ],
65
+ "available": [
66
+ "Edit(src/**)"
67
+ ]
68
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "host": "claude",
3
+ "rules": [
4
+ {
5
+ "capability": "write",
6
+ "pattern": "src/**",
7
+ "action": "allow"
8
+ },
9
+ {
10
+ "capability": "edit",
11
+ "pattern": "src/**",
12
+ "action": "ask"
13
+ },
14
+ {
15
+ "capability": "read",
16
+ "pattern": "src/**",
17
+ "action": "deny"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "host": "codex",
3
+ "default": null,
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "read",
8
+ "pattern": null,
9
+ "action": "deny",
10
+ "origin": "profile"
11
+ },
12
+ "status": "unknown",
13
+ "native": [],
14
+ "native_tools": [],
15
+ "note": "codex reads files through its shell; no switch",
16
+ "covered_by": null
17
+ },
18
+ {
19
+ "rule": {
20
+ "capability": "web_fetch",
21
+ "pattern": null,
22
+ "action": "deny",
23
+ "origin": "profile"
24
+ },
25
+ "status": "unknown",
26
+ "native": [],
27
+ "native_tools": [],
28
+ "note": "codex opens pages through hosted web_search; no separate switch",
29
+ "covered_by": null
30
+ },
31
+ {
32
+ "rule": {
33
+ "capability": "notebook",
34
+ "pattern": null,
35
+ "action": "deny",
36
+ "origin": "profile"
37
+ },
38
+ "status": "absent",
39
+ "native": [],
40
+ "native_tools": [],
41
+ "note": null,
42
+ "covered_by": null
43
+ }
44
+ ],
45
+ "allow": [],
46
+ "deny": [],
47
+ "ask": [],
48
+ "available": []
49
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "host": "codex",
3
+ "rules": [
4
+ {
5
+ "capability": "read",
6
+ "pattern": null,
7
+ "action": "deny"
8
+ },
9
+ {
10
+ "capability": "web_fetch",
11
+ "pattern": null,
12
+ "action": "deny"
13
+ },
14
+ {
15
+ "capability": "notebook",
16
+ "pattern": null,
17
+ "action": "deny"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "default": "deny",
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "*",
8
+ "pattern": null,
9
+ "action": "deny",
10
+ "origin": "profile"
11
+ },
12
+ "status": null,
13
+ "native": [],
14
+ "native_tools": [],
15
+ "note": null,
16
+ "covered_by": null
17
+ },
18
+ {
19
+ "rule": {
20
+ "capability": "read",
21
+ "pattern": null,
22
+ "action": "allow",
23
+ "origin": "profile"
24
+ },
25
+ "status": "known",
26
+ "native": [
27
+ "read"
28
+ ],
29
+ "native_tools": [
30
+ "read"
31
+ ],
32
+ "note": null,
33
+ "covered_by": null
34
+ }
35
+ ],
36
+ "allow": [
37
+ "read"
38
+ ],
39
+ "deny": [],
40
+ "ask": [],
41
+ "available": [
42
+ "read"
43
+ ]
44
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "rules": [
4
+ {
5
+ "capability": "*",
6
+ "pattern": null,
7
+ "action": "deny"
8
+ },
9
+ {
10
+ "capability": "read",
11
+ "pattern": null,
12
+ "action": "allow"
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "default": "deny",
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "*",
8
+ "pattern": null,
9
+ "action": "deny",
10
+ "origin": "profile"
11
+ },
12
+ "status": null,
13
+ "native": [],
14
+ "native_tools": [],
15
+ "note": null,
16
+ "covered_by": null
17
+ },
18
+ {
19
+ "rule": {
20
+ "capability": "bash",
21
+ "pattern": null,
22
+ "action": "allow",
23
+ "origin": "profile"
24
+ },
25
+ "status": "absent",
26
+ "native": [],
27
+ "native_tools": [],
28
+ "note": null,
29
+ "covered_by": null
30
+ },
31
+ {
32
+ "rule": {
33
+ "capability": "mcp",
34
+ "pattern": "github/*",
35
+ "action": "allow",
36
+ "origin": "profile"
37
+ },
38
+ "status": "absent",
39
+ "native": [],
40
+ "native_tools": [],
41
+ "note": null,
42
+ "covered_by": null
43
+ },
44
+ {
45
+ "rule": {
46
+ "capability": "mcp__github__x",
47
+ "pattern": null,
48
+ "action": "deny",
49
+ "origin": "profile"
50
+ },
51
+ "status": "absent",
52
+ "native": [],
53
+ "native_tools": [],
54
+ "note": null,
55
+ "covered_by": null
56
+ },
57
+ {
58
+ "rule": {
59
+ "capability": "bogus_tool",
60
+ "pattern": null,
61
+ "action": "allow",
62
+ "origin": "profile"
63
+ },
64
+ "status": "unknown",
65
+ "native": [],
66
+ "native_tools": [],
67
+ "note": "no native name known for this tool on this harness; left out",
68
+ "covered_by": null
69
+ }
70
+ ],
71
+ "allow": [],
72
+ "deny": [],
73
+ "ask": [],
74
+ "available": []
75
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "rules": [
4
+ { "capability": "*", "pattern": null, "action": "deny" },
5
+ { "capability": "bash", "pattern": null, "action": "allow" },
6
+ { "capability": "mcp(github)", "pattern": null, "action": "allow" },
7
+ { "capability": "mcp__github__x", "pattern": null, "action": "deny" },
8
+ { "capability": "bogus_tool", "pattern": null, "action": "allow" }
9
+ ]
10
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "default": null,
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "bash",
8
+ "pattern": null,
9
+ "action": "allow",
10
+ "origin": "profile"
11
+ },
12
+ "status": "absent",
13
+ "native": [],
14
+ "native_tools": [],
15
+ "note": null,
16
+ "covered_by": null
17
+ },
18
+ {
19
+ "rule": {
20
+ "capability": "glob",
21
+ "pattern": null,
22
+ "action": "allow",
23
+ "origin": "profile"
24
+ },
25
+ "status": "absent",
26
+ "native": [],
27
+ "native_tools": [],
28
+ "note": null,
29
+ "covered_by": null
30
+ },
31
+ {
32
+ "rule": {
33
+ "capability": "ask_user",
34
+ "pattern": null,
35
+ "action": "ask",
36
+ "origin": "profile"
37
+ },
38
+ "status": "known",
39
+ "native": [
40
+ "ask_user"
41
+ ],
42
+ "native_tools": [
43
+ "ask_user"
44
+ ],
45
+ "note": null,
46
+ "covered_by": null
47
+ }
48
+ ],
49
+ "allow": [],
50
+ "deny": [],
51
+ "ask": [
52
+ "ask_user"
53
+ ],
54
+ "available": [
55
+ "ask_user"
56
+ ]
57
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "rules": [
4
+ {
5
+ "capability": "bash",
6
+ "pattern": null,
7
+ "action": "allow"
8
+ },
9
+ {
10
+ "capability": "glob",
11
+ "pattern": null,
12
+ "action": "allow"
13
+ },
14
+ {
15
+ "capability": "ask_user",
16
+ "pattern": null,
17
+ "action": "ask"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "default": null,
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "write",
8
+ "pattern": "kb/**",
9
+ "action": "deny",
10
+ "origin": "profile"
11
+ },
12
+ "status": "unscopable",
13
+ "native": [],
14
+ "native_tools": [],
15
+ "note": "this host's tool takes no pattern, so the rule cannot be scoped",
16
+ "covered_by": null
17
+ }
18
+ ],
19
+ "allow": [],
20
+ "deny": [],
21
+ "ask": [],
22
+ "available": []
23
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "rules": [
4
+ {
5
+ "capability": "write",
6
+ "pattern": "kb/**",
7
+ "action": "deny"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "default": null,
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "write",
8
+ "pattern": null,
9
+ "action": "deny",
10
+ "origin": "profile"
11
+ },
12
+ "status": "known",
13
+ "native": [
14
+ "write"
15
+ ],
16
+ "native_tools": [
17
+ "write"
18
+ ],
19
+ "note": null,
20
+ "covered_by": null
21
+ }
22
+ ],
23
+ "allow": [],
24
+ "deny": [
25
+ "write"
26
+ ],
27
+ "ask": [],
28
+ "available": []
29
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "host": "meridian-flow",
3
+ "rules": [
4
+ {
5
+ "capability": "write",
6
+ "pattern": null,
7
+ "action": "deny"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "host": "claude",
3
+ "default": null,
4
+ "rules": [
5
+ {
6
+ "rule": {
7
+ "capability": "bash",
8
+ "pattern": "git *",
9
+ "action": "ask",
10
+ "origin": "profile"
11
+ },
12
+ "status": "known",
13
+ "native": [
14
+ "Bash(git *)"
15
+ ],
16
+ "native_tools": [
17
+ "Bash"
18
+ ],
19
+ "note": null,
20
+ "covered_by": null
21
+ },
22
+ {
23
+ "rule": {
24
+ "capability": "bash",
25
+ "pattern": "git push *",
26
+ "action": "deny",
27
+ "origin": "profile"
28
+ },
29
+ "status": "known",
30
+ "native": [
31
+ "Bash(git push *)"
32
+ ],
33
+ "native_tools": [
34
+ "Bash"
35
+ ],
36
+ "note": null,
37
+ "covered_by": null
38
+ },
39
+ {
40
+ "rule": {
41
+ "capability": "write",
42
+ "pattern": null,
43
+ "action": "deny",
44
+ "origin": "package"
45
+ },
46
+ "status": "known",
47
+ "native": [
48
+ "Write"
49
+ ],
50
+ "native_tools": [
51
+ "Write"
52
+ ],
53
+ "note": null,
54
+ "covered_by": null
55
+ }
56
+ ],
57
+ "allow": [],
58
+ "deny": [
59
+ "Bash(git push *)",
60
+ "Write"
61
+ ],
62
+ "ask": [
63
+ "Bash(git *)"
64
+ ],
65
+ "available": [
66
+ "Bash(git *)"
67
+ ]
68
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "host": "claude",
3
+ "rules": [
4
+ { "capability": "bash(git *)", "pattern": null, "action": "ask" },
5
+ { "capability": "Bash(git push:*)", "pattern": null, "action": "deny" },
6
+ { "capability": "write", "pattern": null, "action": "deny", "origin": "package" }
7
+ ]
8
+ }
@@ -626,6 +626,12 @@
626
626
  "ask_user"
627
627
  ]
628
628
  },
629
+ "bash": {
630
+ "kind": "absent"
631
+ },
632
+ "cron": {
633
+ "kind": "absent"
634
+ },
629
635
  "edit": {
630
636
  "kind": "tools",
631
637
  "tools": [
@@ -641,30 +647,78 @@
641
647
  "grep"
642
648
  ]
643
649
  },
650
+ "image": {
651
+ "kind": "absent"
652
+ },
644
653
  "ls": {
645
654
  "kind": "tools",
646
655
  "tools": [
647
656
  "ls"
648
657
  ]
649
658
  },
659
+ "lsp": {
660
+ "kind": "absent"
661
+ },
662
+ "monitor": {
663
+ "kind": "absent"
664
+ },
665
+ "notebook": {
666
+ "kind": "absent"
667
+ },
668
+ "notifications": {
669
+ "kind": "absent"
670
+ },
671
+ "plan_mode": {
672
+ "kind": "absent"
673
+ },
650
674
  "read": {
651
675
  "kind": "tools",
652
676
  "tools": [
653
677
  "read"
654
678
  ]
655
679
  },
680
+ "remote_trigger": {
681
+ "kind": "absent"
682
+ },
683
+ "schedule_wakeup": {
684
+ "kind": "absent"
685
+ },
686
+ "send_user_file": {
687
+ "kind": "absent"
688
+ },
656
689
  "skill": {
657
690
  "kind": "tools",
658
691
  "tools": [
659
692
  "skill"
660
693
  ]
661
694
  },
695
+ "task": {
696
+ "kind": "absent"
697
+ },
698
+ "tool_search": {
699
+ "kind": "absent"
700
+ },
701
+ "web": {
702
+ "kind": "absent"
703
+ },
704
+ "web_fetch": {
705
+ "kind": "absent"
706
+ },
707
+ "web_search": {
708
+ "kind": "absent"
709
+ },
662
710
  "work": {
663
711
  "kind": "tools",
664
712
  "tools": [
665
713
  "work"
666
714
  ]
667
715
  },
716
+ "workflow": {
717
+ "kind": "absent"
718
+ },
719
+ "worktree": {
720
+ "kind": "absent"
721
+ },
668
722
  "write": {
669
723
  "kind": "tools",
670
724
  "tools": [