multimodel-dev-os 3.1.0 → 3.2.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 (53) hide show
  1. package/README.md +1 -0
  2. package/docs/.vitepress/config.js +1 -1
  3. package/docs/index.md +5 -5
  4. package/docs/npm-publishing.md +5 -5
  5. package/docs/package-safety.md +16 -0
  6. package/docs/public/llms-full.txt +1 -1
  7. package/docs/public/llms.txt +1 -1
  8. package/docs/public/sitemap.xml +5 -0
  9. package/docs/release-policy.md +6 -5
  10. package/docs/testing.md +12 -2
  11. package/docs/v3-roadmap.md +8 -2
  12. package/package.json +5 -2
  13. package/scripts/build-cli.js +45 -3
  14. package/scripts/check-build-fresh.js +52 -0
  15. package/scripts/install.ps1 +1 -1
  16. package/scripts/install.sh +1 -1
  17. package/scripts/verify.js +128 -12
  18. package/scripts/verify.sh +10 -0
  19. package/src/catalog/loader.js +117 -0
  20. package/src/cli/args.js +118 -0
  21. package/src/cli/help.js +60 -0
  22. package/src/cli/main.js +5718 -0
  23. package/src/core/globals.js +52 -0
  24. package/src/core/hashes.js +15 -0
  25. package/src/core/policy.js +36 -0
  26. package/src/core/security.js +61 -0
  27. package/src/core/yaml.js +136 -0
  28. package/src/plugin/manifest.js +95 -0
  29. package/src/registry/sources.js +40 -0
  30. package/src/registry/validation.js +45 -0
  31. package/tests/README.md +37 -0
  32. package/tests/fixtures/README.md +22 -0
  33. package/tests/fixtures/custom-template-example/README.md +10 -0
  34. package/tests/fixtures/proposals/approved-append-line.md +28 -0
  35. package/tests/fixtures/proposals/approved-create-file.md +29 -0
  36. package/tests/fixtures/proposals/approved-replace-text.md +30 -0
  37. package/tests/fixtures/proposals/existing-create-file-no-overwrite.md +29 -0
  38. package/tests/fixtures/proposals/no-operations.md +18 -0
  39. package/tests/fixtures/proposals/path-traversal.md +29 -0
  40. package/tests/fixtures/proposals/pending-proposal.md +29 -0
  41. package/tests/fixtures/proposals/protected-path.md +29 -0
  42. package/tests/fixtures/proposals/replace-multiple-without-allow.md +30 -0
  43. package/tests/fixtures/registry-overrides/README.md +20 -0
  44. package/tests/smoke/README.md +37 -0
  45. package/tests/smoke/cli-smoke.md +49 -0
  46. package/tests/unit/build-output.test.js +40 -0
  47. package/tests/unit/catalog-loader.test.js +44 -0
  48. package/tests/unit/path-safety.test.js +62 -0
  49. package/tests/unit/plugin-manifest.test.js +94 -0
  50. package/tests/unit/prepublish-guard.test.js +35 -0
  51. package/tests/unit/registry-policy.test.js +46 -0
  52. package/tests/unit/registry-url-validation.test.js +64 -0
  53. package/tests/unit/yaml.test.js +92 -0
@@ -0,0 +1,92 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { parseYaml, parseFlowArray } from '../../src/core/yaml.js';
3
+
4
+ describe('YAML Parser', () => {
5
+ describe('parseFlowArray', () => {
6
+ it('should parse standard flow arrays', () => {
7
+ expect(parseFlowArray('[a, b, c]')).toEqual(['a', 'b', 'c']);
8
+ expect(parseFlowArray('["a", \'b\', c]')).toEqual(['a', 'b', 'c']);
9
+ expect(parseFlowArray('[true, false, null, 123, -45]')).toEqual([true, false, null, 123, -45]);
10
+ });
11
+
12
+ it('should handle empty flow array', () => {
13
+ expect(parseFlowArray('[]')).toEqual([]);
14
+ });
15
+ });
16
+
17
+ describe('parseYaml', () => {
18
+ it('should parse basic key-value pairs', () => {
19
+ const yaml = `
20
+ name: test-plugin
21
+ version: "1.0.0"
22
+ enabled: true
23
+ count: 42
24
+ `;
25
+ const result = parseYaml(yaml);
26
+ expect(result).toEqual({
27
+ name: 'test-plugin',
28
+ version: '1.0.0',
29
+ enabled: true,
30
+ count: 42
31
+ });
32
+ });
33
+
34
+ it('should ignore comments', () => {
35
+ const yaml = `
36
+ # This is a comment
37
+ name: test-plugin # trailing comment
38
+ version: '1.0.0'
39
+ `;
40
+ const result = parseYaml(yaml);
41
+ expect(result).toEqual({
42
+ name: 'test-plugin',
43
+ version: '1.0.0'
44
+ });
45
+ });
46
+
47
+ it('should not treat comments inside quoted strings as comments', () => {
48
+ const yaml = `
49
+ name: "test # plugin"
50
+ description: 'simple # description'
51
+ `;
52
+ const result = parseYaml(yaml);
53
+ expect(result).toEqual({
54
+ name: 'test # plugin',
55
+ description: 'simple # description'
56
+ });
57
+ });
58
+
59
+ it('should parse nested objects', () => {
60
+ const yaml = `
61
+ meta:
62
+ name: test
63
+ slug: test-slug
64
+ `;
65
+ const result = parseYaml(yaml);
66
+ expect(result).toEqual({
67
+ meta: {
68
+ name: 'test',
69
+ slug: 'test-slug'
70
+ }
71
+ });
72
+ });
73
+
74
+ it('should parse list arrays', () => {
75
+ const yaml = `
76
+ items:
77
+ - one
78
+ - "two"
79
+ - three
80
+ `;
81
+ const result = parseYaml(yaml);
82
+ expect(result).toEqual({
83
+ items: ['one', 'two', 'three']
84
+ });
85
+ });
86
+
87
+ it('should return empty object on malformed YAML', () => {
88
+ const result = parseYaml(null);
89
+ expect(result).toEqual({});
90
+ });
91
+ });
92
+ });