opencastle 1.2.0 → 1.3.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 (103) hide show
  1. package/README.md +4 -4
  2. package/dist/cli/adapters/antigravity.d.ts +0 -1
  3. package/dist/cli/adapters/antigravity.d.ts.map +1 -1
  4. package/dist/cli/adapters/antigravity.js +2 -1
  5. package/dist/cli/adapters/antigravity.js.map +1 -1
  6. package/dist/cli/adapters/claude-code.d.ts +0 -1
  7. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  8. package/dist/cli/adapters/claude-code.js +0 -1
  9. package/dist/cli/adapters/claude-code.js.map +1 -1
  10. package/dist/cli/adapters/cursor.d.ts.map +1 -1
  11. package/dist/cli/adapters/cursor.js +8 -1
  12. package/dist/cli/adapters/cursor.js.map +1 -1
  13. package/dist/cli/adapters/opencode.d.ts +12 -5
  14. package/dist/cli/adapters/opencode.d.ts.map +1 -1
  15. package/dist/cli/adapters/opencode.js +17 -5
  16. package/dist/cli/adapters/opencode.js.map +1 -1
  17. package/dist/cli/adapters/rules-dir-base.d.ts +12 -1
  18. package/dist/cli/adapters/rules-dir-base.d.ts.map +1 -1
  19. package/dist/cli/adapters/rules-dir-base.js +43 -57
  20. package/dist/cli/adapters/rules-dir-base.js.map +1 -1
  21. package/dist/cli/adapters/rules-dir-base.test.js +27 -18
  22. package/dist/cli/adapters/rules-dir-base.test.js.map +1 -1
  23. package/dist/cli/adapters/single-file-base.d.ts +11 -0
  24. package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
  25. package/dist/cli/adapters/single-file-base.js +20 -12
  26. package/dist/cli/adapters/single-file-base.js.map +1 -1
  27. package/dist/cli/adapters/vscode.d.ts +2 -1
  28. package/dist/cli/adapters/vscode.d.ts.map +1 -1
  29. package/dist/cli/adapters/vscode.js +2 -1
  30. package/dist/cli/adapters/vscode.js.map +1 -1
  31. package/dist/cli/adapters/windsurf.d.ts.map +1 -1
  32. package/dist/cli/adapters/windsurf.js +11 -1
  33. package/dist/cli/adapters/windsurf.js.map +1 -1
  34. package/dist/cli/baseline.d.ts.map +1 -1
  35. package/dist/cli/baseline.js +15 -8
  36. package/dist/cli/baseline.js.map +1 -1
  37. package/dist/cli/ci.d.ts.map +1 -1
  38. package/dist/cli/ci.js +18 -4
  39. package/dist/cli/ci.js.map +1 -1
  40. package/dist/cli/codex-target.test.js +14 -1
  41. package/dist/cli/codex-target.test.js.map +1 -1
  42. package/dist/cli/doctor.test.js +2 -2
  43. package/dist/cli/doctor.test.js.map +1 -1
  44. package/dist/cli/explain.d.ts +5 -0
  45. package/dist/cli/explain.d.ts.map +1 -1
  46. package/dist/cli/explain.js +38 -2
  47. package/dist/cli/explain.js.map +1 -1
  48. package/dist/cli/init.test.js +47 -23
  49. package/dist/cli/init.test.js.map +1 -1
  50. package/dist/cli/managed-paths.d.ts.map +1 -1
  51. package/dist/cli/managed-paths.js +3 -1
  52. package/dist/cli/managed-paths.js.map +1 -1
  53. package/dist/cli/mcp-audit.d.ts.map +1 -1
  54. package/dist/cli/mcp-audit.js +2 -0
  55. package/dist/cli/mcp-audit.js.map +1 -1
  56. package/dist/cli/mcp-upgrade.test.js +24 -1
  57. package/dist/cli/mcp-upgrade.test.js.map +1 -1
  58. package/dist/cli/mcp.d.ts.map +1 -1
  59. package/dist/cli/mcp.js +22 -3
  60. package/dist/cli/mcp.js.map +1 -1
  61. package/dist/cli/sync-check.test.js +5 -4
  62. package/dist/cli/sync-check.test.js.map +1 -1
  63. package/dist/cli/team-commands.test.js +12 -0
  64. package/dist/cli/team-commands.test.js.map +1 -1
  65. package/dist/cli/team-sources.test.js +10 -0
  66. package/dist/cli/team-sources.test.js.map +1 -1
  67. package/dist/cli/types.d.ts +1 -1
  68. package/dist/cli/types.d.ts.map +1 -1
  69. package/dist/cli/windsurf-target.test.d.ts +2 -0
  70. package/dist/cli/windsurf-target.test.d.ts.map +1 -0
  71. package/dist/cli/windsurf-target.test.js +62 -0
  72. package/dist/cli/windsurf-target.test.js.map +1 -0
  73. package/dist/orchestrator/plugins/registry.test.d.ts +2 -0
  74. package/dist/orchestrator/plugins/registry.test.d.ts.map +1 -0
  75. package/dist/orchestrator/plugins/registry.test.js +37 -0
  76. package/dist/orchestrator/plugins/registry.test.js.map +1 -0
  77. package/package.json +1 -1
  78. package/src/cli/adapters/antigravity.ts +2 -1
  79. package/src/cli/adapters/claude-code.ts +0 -1
  80. package/src/cli/adapters/cursor.ts +8 -1
  81. package/src/cli/adapters/opencode.ts +18 -6
  82. package/src/cli/adapters/rules-dir-base.test.ts +28 -18
  83. package/src/cli/adapters/rules-dir-base.ts +51 -90
  84. package/src/cli/adapters/single-file-base.ts +30 -12
  85. package/src/cli/adapters/vscode.ts +2 -1
  86. package/src/cli/adapters/windsurf.ts +11 -1
  87. package/src/cli/baseline.ts +16 -6
  88. package/src/cli/ci.ts +19 -4
  89. package/src/cli/codex-target.test.ts +15 -1
  90. package/src/cli/doctor.test.ts +2 -2
  91. package/src/cli/explain.ts +36 -2
  92. package/src/cli/init.test.ts +50 -23
  93. package/src/cli/managed-paths.ts +3 -1
  94. package/src/cli/mcp-audit.ts +2 -0
  95. package/src/cli/mcp-upgrade.test.ts +26 -1
  96. package/src/cli/mcp.ts +22 -3
  97. package/src/cli/sync-check.test.ts +5 -4
  98. package/src/cli/team-commands.test.ts +16 -0
  99. package/src/cli/team-sources.test.ts +11 -0
  100. package/src/cli/types.ts +1 -1
  101. package/src/cli/windsurf-target.test.ts +70 -0
  102. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  103. package/src/orchestrator/plugins/registry.test.ts +42 -0
@@ -1,25 +1,25 @@
1
1
  {
2
- "hash": "dcab8e95",
2
+ "hash": "12c645f9",
3
3
  "configHash": "30f8ea04",
4
- "lockfileHash": "8759a89c",
5
- "browserHash": "54e2a2ba",
4
+ "lockfileHash": "af43301a",
5
+ "browserHash": "13776f9b",
6
6
  "optimized": {
7
7
  "astro > cssesc": {
8
8
  "src": "../../../../../node_modules/cssesc/cssesc.js",
9
9
  "file": "astro___cssesc.js",
10
- "fileHash": "3f540abc",
10
+ "fileHash": "94f71dbc",
11
11
  "needsInterop": true
12
12
  },
13
13
  "astro > aria-query": {
14
14
  "src": "../../../../../node_modules/aria-query/lib/index.js",
15
15
  "file": "astro___aria-query.js",
16
- "fileHash": "4ca37322",
16
+ "fileHash": "6f2c077e",
17
17
  "needsInterop": true
18
18
  },
19
19
  "astro > axobject-query": {
20
20
  "src": "../../../../../node_modules/axobject-query/lib/index.js",
21
21
  "file": "astro___axobject-query.js",
22
- "fileHash": "592dc429",
22
+ "fileHash": "4c620914",
23
23
  "needsInterop": true
24
24
  }
25
25
  },
@@ -0,0 +1,42 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { readFileSync } from 'node:fs'
3
+ import { join } from 'node:path'
4
+ import { TECH_PLUGINS, TEAM_PLUGINS } from './index.js'
5
+ import { getMcpConfigRelPath } from '../../cli/mcp.js'
6
+ import { IDE_ADAPTERS, VALID_IDES } from '../../cli/adapters/index.js'
7
+ import type { IdeChoice } from '../../cli/types.js'
8
+
9
+ /**
10
+ * Facts written down twice, held to each other.
11
+ *
12
+ * `TechTool` and `TeamTool` are hand-written unions beside the registry, and
13
+ * `hetzner` was in the registry and missing from `TechTool`. Each target's MCP
14
+ * config path is in its adapter and again in `getMcpConfigRelPath`, which the
15
+ * rebuild, strip and audit read — the two must name the same file, or `sync`
16
+ * writes one file and `remove` cleans another.
17
+ */
18
+ const types = readFileSync(join(import.meta.dirname, '..', '..', 'cli', 'types.ts'), 'utf8')
19
+
20
+ function union(name: string): string[] {
21
+ const m = new RegExp(`export type ${name} = ([^;]+);`).exec(types)
22
+ expect(m, `${name} not found in types.ts`).toBeTruthy()
23
+ return [...m![1].matchAll(/'([^']+)'/g)].map((x) => x[1]).sort()
24
+ }
25
+
26
+ describe('the plugin registry and the types that name it', () => {
27
+ it('TechTool names every tech integration', () => {
28
+ expect(union('TechTool')).toEqual(TECH_PLUGINS.map((p) => p.id).sort())
29
+ })
30
+
31
+ it('TeamTool names every team integration', () => {
32
+ expect(union('TeamTool')).toEqual(TEAM_PLUGINS.map((p) => p.id).sort())
33
+ })
34
+ })
35
+
36
+ describe('MCP config paths', () => {
37
+ it.each(VALID_IDES)('%s: the adapter and getMcpConfigRelPath name the same file', async (ide) => {
38
+ const adapter = await IDE_ADAPTERS[ide]()
39
+ const configs = adapter.getManagedPaths().customizable.filter((p) => !p.endsWith('/'))
40
+ expect(configs).toEqual([getMcpConfigRelPath(ide as IdeChoice)])
41
+ })
42
+ })