opencastle 1.2.0 → 1.3.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 (195) hide show
  1. package/README.md +90 -125
  2. package/bin/cli.mjs +12 -1
  3. package/dist/cli/adapters/antigravity.d.ts +0 -1
  4. package/dist/cli/adapters/antigravity.d.ts.map +1 -1
  5. package/dist/cli/adapters/antigravity.js +2 -1
  6. package/dist/cli/adapters/antigravity.js.map +1 -1
  7. package/dist/cli/adapters/claude-code.d.ts +5 -4
  8. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  9. package/dist/cli/adapters/claude-code.js +7 -4
  10. package/dist/cli/adapters/claude-code.js.map +1 -1
  11. package/dist/cli/adapters/cursor.d.ts.map +1 -1
  12. package/dist/cli/adapters/cursor.js +8 -1
  13. package/dist/cli/adapters/cursor.js.map +1 -1
  14. package/dist/cli/adapters/opencode.d.ts +12 -5
  15. package/dist/cli/adapters/opencode.d.ts.map +1 -1
  16. package/dist/cli/adapters/opencode.js +17 -5
  17. package/dist/cli/adapters/opencode.js.map +1 -1
  18. package/dist/cli/adapters/rules-dir-base.d.ts +12 -1
  19. package/dist/cli/adapters/rules-dir-base.d.ts.map +1 -1
  20. package/dist/cli/adapters/rules-dir-base.js +43 -57
  21. package/dist/cli/adapters/rules-dir-base.js.map +1 -1
  22. package/dist/cli/adapters/rules-dir-base.test.js +27 -18
  23. package/dist/cli/adapters/rules-dir-base.test.js.map +1 -1
  24. package/dist/cli/adapters/single-file-base.d.ts +29 -0
  25. package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
  26. package/dist/cli/adapters/single-file-base.js +49 -16
  27. package/dist/cli/adapters/single-file-base.js.map +1 -1
  28. package/dist/cli/adapters/vscode.d.ts +2 -1
  29. package/dist/cli/adapters/vscode.d.ts.map +1 -1
  30. package/dist/cli/adapters/vscode.js +2 -1
  31. package/dist/cli/adapters/vscode.js.map +1 -1
  32. package/dist/cli/adapters/windsurf.d.ts.map +1 -1
  33. package/dist/cli/adapters/windsurf.js +11 -1
  34. package/dist/cli/adapters/windsurf.js.map +1 -1
  35. package/dist/cli/agent-plugin.test.js +12 -0
  36. package/dist/cli/agent-plugin.test.js.map +1 -1
  37. package/dist/cli/baseline.d.ts.map +1 -1
  38. package/dist/cli/baseline.js +15 -8
  39. package/dist/cli/baseline.js.map +1 -1
  40. package/dist/cli/bootstrap.d.ts.map +1 -1
  41. package/dist/cli/bootstrap.js +20 -0
  42. package/dist/cli/bootstrap.js.map +1 -1
  43. package/dist/cli/ci.d.ts.map +1 -1
  44. package/dist/cli/ci.js +24 -8
  45. package/dist/cli/ci.js.map +1 -1
  46. package/dist/cli/codex-target.test.js +14 -1
  47. package/dist/cli/codex-target.test.js.map +1 -1
  48. package/dist/cli/command-namespace.test.js +33 -0
  49. package/dist/cli/command-namespace.test.js.map +1 -1
  50. package/dist/cli/convoy-cmd.d.ts.map +1 -1
  51. package/dist/cli/convoy-cmd.js +2 -1
  52. package/dist/cli/convoy-cmd.js.map +1 -1
  53. package/dist/cli/dispatcher.test.js +6 -0
  54. package/dist/cli/dispatcher.test.js.map +1 -1
  55. package/dist/cli/docs-accuracy.test.js +33 -8
  56. package/dist/cli/docs-accuracy.test.js.map +1 -1
  57. package/dist/cli/doctor.d.ts.map +1 -1
  58. package/dist/cli/doctor.js +9 -6
  59. package/dist/cli/doctor.js.map +1 -1
  60. package/dist/cli/doctor.test.js +2 -2
  61. package/dist/cli/doctor.test.js.map +1 -1
  62. package/dist/cli/explain.d.ts +5 -0
  63. package/dist/cli/explain.d.ts.map +1 -1
  64. package/dist/cli/explain.js +38 -2
  65. package/dist/cli/explain.js.map +1 -1
  66. package/dist/cli/init-own-files.test.d.ts +2 -0
  67. package/dist/cli/init-own-files.test.d.ts.map +1 -0
  68. package/dist/cli/init-own-files.test.js +133 -0
  69. package/dist/cli/init-own-files.test.js.map +1 -0
  70. package/dist/cli/init.d.ts.map +1 -1
  71. package/dist/cli/init.js +106 -7
  72. package/dist/cli/init.js.map +1 -1
  73. package/dist/cli/init.test.js +52 -27
  74. package/dist/cli/init.test.js.map +1 -1
  75. package/dist/cli/layers.d.ts.map +1 -1
  76. package/dist/cli/layers.js +13 -4
  77. package/dist/cli/layers.js.map +1 -1
  78. package/dist/cli/lesson.d.ts.map +1 -1
  79. package/dist/cli/lesson.js +6 -5
  80. package/dist/cli/lesson.js.map +1 -1
  81. package/dist/cli/managed-paths.d.ts.map +1 -1
  82. package/dist/cli/managed-paths.js +3 -1
  83. package/dist/cli/managed-paths.js.map +1 -1
  84. package/dist/cli/mcp-audit.d.ts.map +1 -1
  85. package/dist/cli/mcp-audit.js +2 -0
  86. package/dist/cli/mcp-audit.js.map +1 -1
  87. package/dist/cli/mcp-upgrade.test.js +24 -1
  88. package/dist/cli/mcp-upgrade.test.js.map +1 -1
  89. package/dist/cli/mcp.d.ts.map +1 -1
  90. package/dist/cli/mcp.js +22 -3
  91. package/dist/cli/mcp.js.map +1 -1
  92. package/dist/cli/prompt.d.ts.map +1 -1
  93. package/dist/cli/prompt.js +9 -7
  94. package/dist/cli/prompt.js.map +1 -1
  95. package/dist/cli/prompt.test.js +20 -2
  96. package/dist/cli/prompt.test.js.map +1 -1
  97. package/dist/cli/remove.d.ts.map +1 -1
  98. package/dist/cli/remove.js +3 -1
  99. package/dist/cli/remove.js.map +1 -1
  100. package/dist/cli/review.d.ts.map +1 -1
  101. package/dist/cli/review.js +7 -1
  102. package/dist/cli/review.js.map +1 -1
  103. package/dist/cli/sync-check.d.ts.map +1 -1
  104. package/dist/cli/sync-check.js +12 -3
  105. package/dist/cli/sync-check.js.map +1 -1
  106. package/dist/cli/sync-check.test.js +5 -4
  107. package/dist/cli/sync-check.test.js.map +1 -1
  108. package/dist/cli/sync.d.ts.map +1 -1
  109. package/dist/cli/sync.js +3 -2
  110. package/dist/cli/sync.js.map +1 -1
  111. package/dist/cli/team-commands.test.js +12 -0
  112. package/dist/cli/team-commands.test.js.map +1 -1
  113. package/dist/cli/team-sources.test.js +10 -0
  114. package/dist/cli/team-sources.test.js.map +1 -1
  115. package/dist/cli/types.d.ts +1 -1
  116. package/dist/cli/types.d.ts.map +1 -1
  117. package/dist/cli/update.d.ts.map +1 -1
  118. package/dist/cli/update.js +4 -3
  119. package/dist/cli/update.js.map +1 -1
  120. package/dist/cli/website-plugins.test.js +51 -2
  121. package/dist/cli/website-plugins.test.js.map +1 -1
  122. package/dist/cli/windsurf-target.test.d.ts +2 -0
  123. package/dist/cli/windsurf-target.test.d.ts.map +1 -0
  124. package/dist/cli/windsurf-target.test.js +62 -0
  125. package/dist/cli/windsurf-target.test.js.map +1 -0
  126. package/dist/orchestrator/plugins/coolify/config.d.ts.map +1 -1
  127. package/dist/orchestrator/plugins/coolify/config.js +13 -0
  128. package/dist/orchestrator/plugins/coolify/config.js.map +1 -1
  129. package/dist/orchestrator/plugins/registry.test.d.ts +2 -0
  130. package/dist/orchestrator/plugins/registry.test.d.ts.map +1 -0
  131. package/dist/orchestrator/plugins/registry.test.js +37 -0
  132. package/dist/orchestrator/plugins/registry.test.js.map +1 -0
  133. package/dist/orchestrator/plugins/sentry/config.d.ts.map +1 -1
  134. package/dist/orchestrator/plugins/sentry/config.js +13 -0
  135. package/dist/orchestrator/plugins/sentry/config.js.map +1 -1
  136. package/package.json +1 -1
  137. package/src/cli/adapters/antigravity.ts +2 -1
  138. package/src/cli/adapters/claude-code.ts +7 -4
  139. package/src/cli/adapters/cursor.ts +8 -1
  140. package/src/cli/adapters/opencode.ts +18 -6
  141. package/src/cli/adapters/rules-dir-base.test.ts +28 -18
  142. package/src/cli/adapters/rules-dir-base.ts +51 -90
  143. package/src/cli/adapters/single-file-base.ts +77 -16
  144. package/src/cli/adapters/vscode.ts +2 -1
  145. package/src/cli/adapters/windsurf.ts +11 -1
  146. package/src/cli/agent-plugin.test.ts +14 -0
  147. package/src/cli/baseline.ts +16 -6
  148. package/src/cli/bootstrap.ts +23 -0
  149. package/src/cli/ci.ts +25 -8
  150. package/src/cli/codex-target.test.ts +15 -1
  151. package/src/cli/command-namespace.test.ts +35 -0
  152. package/src/cli/convoy/TELEMETRY.md +64 -62
  153. package/src/cli/convoy-cmd.ts +2 -1
  154. package/src/cli/dispatcher.test.ts +7 -0
  155. package/src/cli/docs-accuracy.test.ts +34 -7
  156. package/src/cli/doctor.test.ts +2 -2
  157. package/src/cli/doctor.ts +9 -6
  158. package/src/cli/explain.ts +36 -2
  159. package/src/cli/init-own-files.test.ts +156 -0
  160. package/src/cli/init.test.ts +55 -27
  161. package/src/cli/init.ts +104 -7
  162. package/src/cli/layers.ts +13 -4
  163. package/src/cli/lesson.ts +6 -5
  164. package/src/cli/managed-paths.ts +3 -1
  165. package/src/cli/mcp-audit.ts +2 -0
  166. package/src/cli/mcp-upgrade.test.ts +26 -1
  167. package/src/cli/mcp.ts +22 -3
  168. package/src/cli/prompt.test.ts +21 -2
  169. package/src/cli/prompt.ts +11 -7
  170. package/src/cli/remove.ts +3 -0
  171. package/src/cli/review.ts +7 -1
  172. package/src/cli/sync-check.test.ts +5 -4
  173. package/src/cli/sync-check.ts +12 -3
  174. package/src/cli/sync.ts +3 -2
  175. package/src/cli/team-commands.test.ts +16 -0
  176. package/src/cli/team-sources.test.ts +11 -0
  177. package/src/cli/types.ts +1 -1
  178. package/src/cli/update.ts +4 -3
  179. package/src/cli/website-plugins.test.ts +55 -5
  180. package/src/cli/windsurf-target.test.ts +70 -0
  181. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  182. package/src/orchestrator/agents/team-lead.agent.md +2 -2
  183. package/src/orchestrator/customizations/README.md +58 -13
  184. package/src/orchestrator/customizations/logs/README.md +23 -18
  185. package/src/orchestrator/instructions/general.instructions.md +1 -1
  186. package/src/orchestrator/plugins/coolify/config.ts +13 -0
  187. package/src/orchestrator/plugins/registry.test.ts +42 -0
  188. package/src/orchestrator/plugins/sentry/config.ts +13 -0
  189. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +44 -49
  190. package/src/orchestrator/prompts/brainstorm.prompt.md +2 -2
  191. package/src/orchestrator/prompts/bug-fix.prompt.md +5 -4
  192. package/src/orchestrator/prompts/create-skill.prompt.md +29 -39
  193. package/src/orchestrator/prompts/generate-convoy.prompt.md +1 -1
  194. package/src/orchestrator/prompts/generate-prd.prompt.md +1 -1
  195. package/src/orchestrator/prompts/implement-feature.prompt.md +7 -6
@@ -441,6 +441,8 @@ const OWN_SPELLING: Partial<Record<IdeChoice, (name: string) => string>> = {
441
441
  // Codex expands nothing: a variable reaches a server only by being named in
442
442
  // a field that reads one.
443
443
  codex: (n) => `env_vars, bearer_token_env_var or env_http_headers naming ${n}`,
444
+ // Antigravity expands none either, and has no field that reads a variable.
445
+ antigravity: (n) => `the value in your own ~/.gemini/config/mcp_config.json — Antigravity expands no variables, and a local server inherits ${n} from the environment`,
444
446
  }
445
447
 
446
448
  /** The first `${NAME}` this target would pass through literally, as `NAME → spelling`, or null. */
@@ -11,7 +11,8 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'
11
11
  import { mkdtempSync, writeFileSync, readFileSync, rmSync, realpathSync, mkdirSync } from 'node:fs'
12
12
  import { join } from 'node:path'
13
13
  import { tmpdir } from 'node:os'
14
- import { upgradeGeneratedServers, rebuildMcpConfig, scaffoldMcpConfig } from './mcp.js'
14
+ import { upgradeGeneratedServers, rebuildMcpConfig, scaffoldMcpConfig, teamEntryFor } from './mcp.js'
15
+ import { auditMcpConfig } from './mcp-audit.js'
15
16
  import type { StackConfig } from './types.js'
16
17
 
17
18
  describe('upgradeGeneratedServers', () => {
@@ -22,6 +23,30 @@ describe('upgradeGeneratedServers', () => {
22
23
  expect(servers.Supabase).toEqual({ type: 'http', url: 'https://mcp.supabase.com/mcp' })
23
24
  })
24
25
 
26
+ it('moves Antigravity entries to serverUrl, and drops a ${NAME} it would send as text', () => {
27
+ // As every release before this one wrote them into .agents/mcp_config.json.
28
+ const servers: Record<string, unknown> = {
29
+ Supabase: { url: 'https://mcp.supabase.com/mcp' },
30
+ Coolify: {
31
+ command: 'npx',
32
+ args: ['-y', '@masonator/coolify-mcp@3.7.0'],
33
+ env: { COOLIFY_ACCESS_TOKEN: '${COOLIFY_ACCESS_TOKEN}', COOLIFY_BASE_URL: '${COOLIFY_BASE_URL}' },
34
+ },
35
+ }
36
+ expect(upgradeGeneratedServers(servers, 'antigravity', new Set(['Supabase', 'Coolify'])).sort()).toEqual(['Coolify', 'Supabase'])
37
+ expect(servers.Supabase).toEqual({ serverUrl: 'https://mcp.supabase.com/mcp' })
38
+ expect(servers.Coolify).toEqual({ command: 'npx', args: ['-y', '@masonator/coolify-mcp@3.7.0'] })
39
+ })
40
+
41
+ it('writes a team server for Antigravity in its shape, and the audit names what it cannot expand', () => {
42
+ const remote = teamEntryFor('docs', { url: 'https://docs.acme.example/mcp', headers: { Authorization: 'Bearer ${DOCS_TOKEN}' } }, 'antigravity').entry
43
+ expect(remote).toEqual({ serverUrl: 'https://docs.acme.example/mcp', headers: { Authorization: 'Bearer ${DOCS_TOKEN}' } })
44
+ const local = teamEntryFor('db', { command: 'npx', args: ['-y', 'db-mcp@1.0.0'], env: { DB_URL: '${DB_URL}', MODE: 'ro' } }, 'antigravity').entry
45
+ expect(local).toEqual({ command: 'npx', args: ['-y', 'db-mcp@1.0.0'], env: { MODE: 'ro' } })
46
+ const audit = auditMcpConfig({ mcpServers: { docs: remote } }, 'antigravity')
47
+ expect(audit.findings.find((f) => f.problem === 'unexpanded-variable')?.subject).toContain('${DOCS_TOKEN} →')
48
+ })
49
+
25
50
  it('moves a retired default to the current one, env vars and all', () => {
26
51
  // What earlier releases wrote into .mcp.json for Figma: a package that was
27
52
  // never published, with the token they asked for spelled into `env`.
package/src/cli/mcp.ts CHANGED
@@ -96,13 +96,24 @@ function transformMcpForIde(
96
96
  case 'windsurf':
97
97
  case 'antigravity': {
98
98
  // mcpServers format — no 'type' field
99
+ //
100
+ // Antigravity expands no variables in its MCP config: a `${NAME}` reaches
101
+ // the server as those characters. An entry that only forwards a variable
102
+ // under its own name therefore replaced the value the server would have
103
+ // inherited with literal text; it is left out, and the server reads the
104
+ // environment Antigravity was started in. Its MCP docs also require
105
+ // `serverUrl` for a remote server and call `url` a legacy field.
106
+ const antigravity = ide === 'antigravity' && !options.legacy;
99
107
  const mcpServers: Record<string, unknown> = {};
100
108
  for (const [name, server] of Object.entries(servers)) {
101
109
  if (server.type === 'stdio') {
110
+ const env = antigravity && server.env
111
+ ? Object.fromEntries(Object.entries(server.env).filter(([k, v]) => wholeReference(v) !== k))
112
+ : server.env;
102
113
  mcpServers[name] = {
103
114
  command: server.command,
104
115
  args: server.args,
105
- ...(server.env && { env: server.env }),
116
+ ...(env && Object.keys(env).length > 0 && { env }),
106
117
  };
107
118
  } else if (server.type === 'http') {
108
119
  // Strip VS Code ${input:...} placeholders for non-VS Code IDEs
@@ -115,7 +126,11 @@ function transformMcpForIde(
115
126
  // other targets in this group take the bare `url`.
116
127
  const headers = server.headers && { headers: server.headers };
117
128
  mcpServers[name] =
118
- ide === 'claude-code' && !options.legacy ? { type: 'http', url, ...headers } : { url, ...headers };
129
+ ide === 'claude-code' && !options.legacy
130
+ ? { type: 'http', url, ...headers }
131
+ : antigravity
132
+ ? { serverUrl: url, ...headers }
133
+ : { url, ...headers };
119
134
  }
120
135
  }
121
136
  return { mcpServers };
@@ -594,7 +609,7 @@ export function getMcpConfigRelPath(ide: IdeChoice): string {
594
609
  case 'opencode':
595
610
  return 'opencode.json';
596
611
  case 'windsurf':
597
- return '.windsurf/mcp.json';
612
+ return '.devin/mcp_config.json';
598
613
  case 'codex':
599
614
  return '.codex/config.toml';
600
615
  case 'antigravity':
@@ -718,6 +733,10 @@ export async function stripManagedMcpServers(
718
733
  */
719
734
  export const LEGACY_MCP_CONFIGS: Partial<Record<IdeChoice, string>> = {
720
735
  codex: '.codex/mcp.json',
736
+ // Windsurf, now Devin Desktop, never read a project `.windsurf/mcp.json`:
737
+ // Cascade reads one global file, and the default Devin Local agent reads
738
+ // `.devin/mcp_config.json`.
739
+ windsurf: '.windsurf/mcp.json',
721
740
  };
722
741
 
723
742
  /**
@@ -1,5 +1,5 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { computeVisibleWindow } from './prompt.js';
1
+ import { describe, it, expect, afterEach } from 'vitest';
2
+ import { computeVisibleWindow, c } from './prompt.js';
3
3
 
4
4
  describe('computeVisibleWindow', () => {
5
5
  it('returns full range when all items fit', () => {
@@ -64,3 +64,22 @@ describe('computeVisibleWindow', () => {
64
64
  expect(end).toBeGreaterThan(10);
65
65
  });
66
66
  });
67
+
68
+ describe('colours', () => {
69
+ const saved = process.env.NO_COLOR;
70
+ afterEach(() => {
71
+ if (saved === undefined) delete process.env.NO_COLOR;
72
+ else process.env.NO_COLOR = saved;
73
+ });
74
+
75
+ it('wrap text in an SGR sequence by default', () => {
76
+ delete process.env.NO_COLOR;
77
+ expect(c.green('ok')).toBe('\x1B[32mok\x1B[0m');
78
+ });
79
+
80
+ it('are left out when NO_COLOR is set (no-color.org)', () => {
81
+ process.env.NO_COLOR = '1';
82
+ expect(c.green('ok')).toBe('ok');
83
+ expect(c.bold(c.dim('x'))).toBe('x');
84
+ });
85
+ });
package/src/cli/prompt.ts CHANGED
@@ -16,15 +16,19 @@ function moveUp(n: number): string {
16
16
 
17
17
  // ── Color helpers ─────────────────────────────────────────────────
18
18
 
19
+ /** One SGR style, unless `NO_COLOR` is set (https://no-color.org). Read per call, so a test can set it. */
20
+ const sgr = (code: string) => (s: string) =>
21
+ process.env.NO_COLOR ? s : `\x1B[${code}m${s}\x1B[0m`;
22
+
19
23
  /** ANSI color helpers for CLI output. */
20
24
  export const c = {
21
- cyan: (s: string) => `\x1B[36m${s}\x1B[0m`,
22
- green: (s: string) => `\x1B[32m${s}\x1B[0m`,
23
- yellow: (s: string) => `\x1B[33m${s}\x1B[0m`,
24
- red: (s: string) => `\x1B[31m${s}\x1B[0m`,
25
- bold: (s: string) => `\x1B[1m${s}\x1B[0m`,
26
- dim: (s: string) => `\x1B[2m${s}\x1B[0m`,
27
- magenta: (s: string) => `\x1B[35m${s}\x1B[0m`,
25
+ cyan: sgr('36'),
26
+ green: sgr('32'),
27
+ yellow: sgr('33'),
28
+ red: sgr('31'),
29
+ bold: sgr('1'),
30
+ dim: sgr('2'),
31
+ magenta: sgr('35'),
28
32
  };
29
33
 
30
34
  // ── Scrollable window helper ──────────────────────────────────────
package/src/cli/remove.ts CHANGED
@@ -309,9 +309,12 @@ export default async function remove({ args }: CliContext): Promise<void> {
309
309
  }
310
310
 
311
311
  if (!assumeYes) {
312
+ // `refuse`: removing is not undone by running it again, so a piped run that
313
+ // ran out of answers aborts, as `sync` does, instead of taking the default.
312
314
  const proceed = await confirm(
313
315
  mode === 'all' ? 'Go ahead?' : 'Continue?',
314
316
  mode !== 'all',
317
+ 'refuse',
315
318
  )
316
319
  if (!proceed) {
317
320
  console.log(' Aborted.\n')
package/src/cli/review.ts CHANGED
@@ -366,7 +366,13 @@ function renderTerminal(report: ReviewReport): void {
366
366
  export function lockAtRef(projectRoot: string, ref: string): Lock | null {
367
367
  let prefix: string
368
368
  try {
369
- prefix = execFileSync('git', ['rev-parse', '--show-prefix'], { cwd: projectRoot, encoding: 'utf8' }).trim()
369
+ // Git's own "fatal: not a git repository" went to the terminal above the
370
+ // sentence below, which says the same thing in terms of this command.
371
+ prefix = execFileSync('git', ['rev-parse', '--show-prefix'], {
372
+ cwd: projectRoot,
373
+ encoding: 'utf8',
374
+ stdio: ['ignore', 'pipe', 'ignore'],
375
+ }).trim()
370
376
  } catch {
371
377
  throw new Error('this is not a git repository, so there is no base to compare with')
372
378
  }
@@ -212,10 +212,11 @@ describe('two targets that share a root file', () => {
212
212
  }
213
213
  const text = readFileSync(join(projectRoot, 'AGENTS.md'), 'utf8')
214
214
  expect(text).toContain('shared by more than one assistant')
215
- expect(text).toContain('.opencode/skills/')
216
- expect(text).toContain('`.codex/`, `.agents/skills/`')
217
- // Both assistants still get their own files.
218
- expect(existsSync(join(projectRoot, '.opencode', 'skills'))).toBe(true)
215
+ expect(text).toContain('Skills are in `.agents/skills/`')
216
+ expect(text).toContain('also installed under `.codex/`.')
217
+ // Each keeps its own agents; both read the one skills directory.
218
+ expect(existsSync(join(projectRoot, '.opencode', 'agents'))).toBe(true)
219
+ expect(existsSync(join(projectRoot, '.codex', 'agents'))).toBe(true)
219
220
  expect(existsSync(join(projectRoot, '.agents', 'skills'))).toBe(true)
220
221
  })
221
222
  })
@@ -718,7 +718,16 @@ function render(report: CheckReport): void {
718
718
  // The lock is not edited by anyone; when it differs, the sources moved and
719
719
  // nobody has synced. Filed under "edited in place" it told people they had
720
720
  // an edit to lose.
721
- const lockDrift = [...changed, ...missing].filter((d) => d.path === LOCK_REL)
721
+ //
722
+ // The lessons index is the same kind of thing: compiled from
723
+ // `.opencastle/lessons/` and stale until `sync` runs. It was filed under "MCP
724
+ // servers sync would change", which it has nothing to do with.
725
+ const lessonsIndex = `.opencastle/${LESSONS_INDEX}`
726
+ const lockDrift = [
727
+ ...[...changed, ...missing].filter((d) => d.path === LOCK_REL),
728
+ ...outdated.filter((d) => d.path === lessonsIndex),
729
+ ]
730
+ const outdatedMcp = outdated.filter((d) => d.path !== lessonsIndex)
722
731
  const changedFiles = changed.filter((d) => d.path !== LOCK_REL)
723
732
  const missingFiles = missing.filter((d) => d.path !== LOCK_REL)
724
733
  if (lockDrift.length > 0) {
@@ -742,11 +751,11 @@ function render(report: CheckReport): void {
742
751
  console.log('')
743
752
  }
744
753
 
745
- if (outdated.length > 0) {
754
+ if (outdatedMcp.length > 0) {
746
755
  console.log(
747
756
  ` ${c.bold('MCP servers sync would change')} ${c.dim('(integration defaults move forward, team servers are written as defined; entries you added or edited stay yours)')}`,
748
757
  )
749
- for (const d of outdated) {
758
+ for (const d of outdatedMcp) {
750
759
  console.log(` ${c.yellow('~')} ${d.path} ${c.dim(`(${d.ide})`)}`)
751
760
  if (d.detail) console.log(` ${c.dim(d.detail)}`)
752
761
  }
package/src/cli/sync.ts CHANGED
@@ -19,10 +19,11 @@ const SYNC_HELP = `
19
19
  Options:
20
20
  --check Report drift and exit non-zero; writes nothing (for CI)
21
21
  --dry-run Preview what would change
22
- --force Sync even when versions match
22
+ --force Recompile even when everything already matches its sources
23
23
  --allow-downgrade Recompile with this OpenCastle even though a newer one
24
24
  compiled the project
25
- --reconfigure Re-run IDE and stack selection
25
+ --reconfigure Choose the tech and team tools again (the assistants
26
+ are chosen by opencastle init)
26
27
  --yes Skip the confirmation prompt
27
28
  --json Machine-readable output (with --check)
28
29
  --help, -h Show this help
@@ -240,6 +240,22 @@ describe.skipIf(!built)('a baseline package', () => {
240
240
  expect(check.out).toContain('points outside the package')
241
241
  })
242
242
 
243
+ it('names each problem once, by the path it was given', () => {
244
+ run(dir, ['baseline', 'init', 'base', '--name', '@acme/base'])
245
+ writeFileSync(
246
+ join(dir, 'base', 'mcp.json'),
247
+ JSON.stringify({ $schema: 'https://agent-plugins.org/schemas/1.0.0/mcp.schema.json', mcpServers: { docs: { type: 'streamable-http', url: 'https://docs.acme.example/mcp' } } }),
248
+ )
249
+ run(dir, ['plugin', 'build', 'base'])
250
+ const check = run(dir, ['baseline', 'check', 'base'])
251
+ // eslint-disable-next-line no-control-regex
252
+ check.out = check.out.replace(/\x1b\[[0-9;]*m/g, '')
253
+ expect(check.code).toBe(1)
254
+ expect(check.out).toContain('✗ base/mcp.json: defines MCP server "docs", which @acme/base does not allow\n → add it to policy.mcp.allow in @acme/base')
255
+ expect(check.out).not.toContain('✗ ✗')
256
+ expect(check.out).not.toContain(dir.replace(/^\//, ''))
257
+ })
258
+
243
259
  it('fails one that would publish empty', () => {
244
260
  run(dir, ['baseline', 'init', 'base', '--name', '@acme/base'])
245
261
  const path = join(dir, 'base', 'package.json')
@@ -484,6 +484,17 @@ describe('what review found, kept fixed (compiler and commands)', () => {
484
484
  expect(plan.codeowners?.block).toContain('/apps/web/.opencastle/lock.json @acme/platform')
485
485
  })
486
486
 
487
+ it('ci: names paths as the project spells them, through a linked checkout', () => {
488
+ const real = join(project, 'real')
489
+ write(real, { 'package.json': '{}', 'package-lock.json': '{}', CODEOWNERS: '* @acme/everyone\n' })
490
+ execFileSync('git', ['init', '-q'], { cwd: real })
491
+ const linked = join(project, 'linked')
492
+ symlinkSync(real, linked)
493
+ const plan = planCi(linked, '0.36.0', '@acme/platform')
494
+ expect(plan.codeowners?.path).toBe(join(linked, 'CODEOWNERS'))
495
+ expect(plan.workflowPath.startsWith(linked)).toBe(true)
496
+ })
497
+
487
498
  it('ci: gives pnpm a version when package.json does not name one', () => {
488
499
  write(project, { 'package.json': '{}', 'pnpm-lock.yaml': '' })
489
500
  expect(planCi(project, '0.36.0').workflow).toContain('version: 10')
package/src/cli/types.ts CHANGED
@@ -4,7 +4,7 @@ import type { CompileSource } from './layers.js';
4
4
  // ── Stack selection types ──────────────────────────────────────
5
5
 
6
6
  export type IdeChoice = 'vscode' | 'cursor' | 'claude-code' | 'opencode' | 'windsurf' | 'codex' | 'antigravity';
7
- export type TechTool = 'sanity' | 'contentful' | 'strapi' | 'supabase' | 'convex' | 'vercel' | 'nx' | 'chrome-devtools' | 'nextjs' | 'astro' | 'netlify' | 'turborepo' | 'prisma' | 'cypress' | 'playwright' | 'vitest' | 'figma' | 'resend' | 'stripe' | 'sentry' | 'drizzle' | 'cloudflare' | 'coolify' | 'expo';
7
+ export type TechTool = 'sanity' | 'contentful' | 'strapi' | 'supabase' | 'convex' | 'vercel' | 'nx' | 'chrome-devtools' | 'nextjs' | 'astro' | 'netlify' | 'turborepo' | 'prisma' | 'cypress' | 'playwright' | 'vitest' | 'figma' | 'resend' | 'stripe' | 'sentry' | 'drizzle' | 'cloudflare' | 'coolify' | 'expo' | 'hetzner';
8
8
  export type TeamTool = 'linear' | 'jira' | 'trello' | 'notion' | 'slack' | 'teams';
9
9
 
10
10
  export interface StackConfig {
package/src/cli/update.ts CHANGED
@@ -75,7 +75,8 @@ const UPDATE_HELP = `
75
75
  --force Force update even if versions match
76
76
  --allow-downgrade Recompile with this OpenCastle even though a newer one
77
77
  compiled the project
78
- --reconfigure Re-run IDE and stack selection
78
+ --reconfigure Choose the tech and team tools again (the assistants
79
+ are chosen by opencastle init)
79
80
  --help, -h Show this help
80
81
  `
81
82
 
@@ -422,11 +423,11 @@ export default async function update({
422
423
 
423
424
  if (isVersionBump) {
424
425
  console.log(
425
- `\n 🏰 ${c.bold('OpenCastle')} ${dryRun ? 'dry-run' : 'update'}: ${c.dim(`v${manifest.version}`)} → ${c.green(`v${pkg.version}`)}\n`
426
+ `\n 🏰 ${c.bold('OpenCastle')} ${dryRun ? 'dry-run' : 'sync'}: ${c.dim(`v${manifest.version}`)} → ${c.green(`v${pkg.version}`)}\n`
426
427
  )
427
428
  } else {
428
429
  console.log(
429
- `\n 🏰 ${c.bold('OpenCastle')} ${dryRun ? 'dry-run' : 'reconfigure'} ${c.dim(`v${pkg.version}`)}\n`
430
+ `\n 🏰 ${c.bold('OpenCastle')} ${dryRun ? 'dry-run' : 'sync'} ${c.dim(`v${pkg.version}`)}\n`
430
431
  )
431
432
  }
432
433
 
@@ -6,17 +6,27 @@
6
6
  * `@latest`, and the dead packages — because nothing tied them to the code. The
7
7
  * page now renders each snippet from `PLUGINS`; these tests keep it that way.
8
8
  */
9
- import { readFileSync } from 'node:fs'
9
+ import { readFileSync, readdirSync } from 'node:fs'
10
10
  import { join, resolve } from 'node:path'
11
11
  import { describe, it, expect } from 'vitest'
12
12
  import { PLUGINS } from '../orchestrator/plugins/index.js'
13
13
 
14
- const page = readFileSync(
15
- join(resolve(import.meta.dirname, '..', '..'), 'website', 'src', 'pages', 'docs', 'plugins.astro'),
16
- 'utf8',
17
- )
14
+ const repoRoot = resolve(import.meta.dirname, '..', '..')
15
+ const pages = join(repoRoot, 'website', 'src', 'pages')
16
+ const page = readFileSync(join(pages, 'docs', 'plugins.astro'), 'utf8')
17
+ const home = readFileSync(join(pages, 'index.astro'), 'utf8')
18
+ const landing = readFileSync(join(pages, 'docs', 'index.astro'), 'utf8')
18
19
  const rendered = [...page.matchAll(/mcpSnippet\('([\w-]+)'\)/g)].map((m) => m[1])
19
20
  const withServer = Object.values(PLUGINS).filter((p) => p.mcpServerKey && p.mcpConfig)
21
+ const ids = Object.values(PLUGINS).map((p) => p.id)
22
+
23
+ /** The keys of an object literal `const <name>… = { … };` in a page's frontmatter. */
24
+ function keysOf(source: string, name: string): string[] {
25
+ const start = source.indexOf(`const ${name}`)
26
+ if (start < 0) return []
27
+ const body = source.slice(start, source.indexOf('\n};', start))
28
+ return [...body.matchAll(/^\s{2}(?:'([^']+)'|([\w-]+)):/gm)].map((m) => m[1] ?? m[2])
29
+ }
20
30
 
21
31
  describe('the plugin guide', () => {
22
32
  it('writes no MCP config by hand', () => {
@@ -39,3 +49,43 @@ describe('the plugin guide', () => {
39
49
  }
40
50
  })
41
51
  })
52
+
53
+ /**
54
+ * Hetzner Cloud shipped in the CLI — `add --list` showed it — and was missing from
55
+ * both lists on the site, which said 31 integrations and showed 30. The tests above
56
+ * only covered integrations with an MCP server, and Hetzner has none.
57
+ */
58
+ describe('every integration is on the site', () => {
59
+ it('has a card on the integrations page, which init links to by id', () => {
60
+ const cards = [...page.matchAll(/class="plugin-card" id="([\w-]+)"/g)].map((m) => m[1])
61
+ expect(ids.filter((id) => !cards.includes(id))).toEqual([])
62
+ expect(cards.filter((id) => !ids.includes(id))).toEqual([])
63
+ })
64
+
65
+ it('is in the homepage grid', () => {
66
+ // The grid takes names and the count from PLUGINS, and each tile's icon and
67
+ // one-line description from these two maps — keyed by the same ids.
68
+ expect(home).toContain("from '../../../src/orchestrator/plugins/index'")
69
+ for (const map of ['integrationBlurbs', 'integrationIcons']) {
70
+ const keys = keysOf(home, map)
71
+ expect(ids.filter((id) => !keys.includes(id)), map).toEqual([])
72
+ expect(keys.filter((id) => !ids.includes(id)), map).toEqual([])
73
+ }
74
+ })
75
+
76
+ it('counts the skills the homepage states', () => {
77
+ // The stat is the core skills plus one per integration; it said 57 when it was 62.
78
+ const core = readdirSync(join(repoRoot, 'src', 'orchestrator', 'skills'), { withFileTypes: true })
79
+ .filter((d) => d.isDirectory()).length
80
+ expect(home.match(/const coreSkillCount = (\d+);/)?.[1]).toBe(String(core))
81
+ })
82
+
83
+ it('states no integration count by hand', () => {
84
+ // 31 was right until a 32nd ships; the pages print Object.keys(PLUGINS).length.
85
+ const count = String(ids.length)
86
+ const sources = [['index.astro', home], ['docs/index.astro', landing], ['plugins.astro', page]] as const
87
+ for (const [name, source] of sources) {
88
+ expect(source.match(new RegExp(`\\b${count} (?:plugins|integrations)\\b`))?.[0], name).toBeUndefined()
89
+ }
90
+ })
91
+ })
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Windsurf — now Devin Desktop — through the built CLI.
3
+ *
4
+ * Releases before this one wrote `.windsurf/mcp.json`, which no Devin Desktop
5
+ * agent reads (the legacy Cascade agent reads one global file, the default
6
+ * Devin Local agent `.devin/mcp_config.json`), and flattened every skill into
7
+ * a `.windsurf/rules/skills/` rule although both agents read Agent Skills.
8
+ */
9
+ import { execFileSync } from 'node:child_process'
10
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
11
+ import { tmpdir } from 'node:os'
12
+ import { dirname, join, resolve } from 'node:path'
13
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest'
14
+ import type { Manifest } from './types.js'
15
+
16
+ const pkgRoot = resolve(import.meta.dirname, '..', '..')
17
+ const cli = join(pkgRoot, 'bin', 'cli.mjs')
18
+ const built = existsSync(join(pkgRoot, 'dist', 'cli', 'init.js'))
19
+
20
+ function write(root: string, files: Record<string, string>): void {
21
+ for (const [rel, text] of Object.entries(files)) {
22
+ mkdirSync(dirname(join(root, rel)), { recursive: true })
23
+ writeFileSync(join(root, rel), text)
24
+ }
25
+ }
26
+
27
+ const run = (cwd: string, ...args: string[]): string =>
28
+ execFileSync('node', [cli, ...args], { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] })
29
+
30
+ describe.skipIf(!built)('Windsurf as a target', () => {
31
+ let project: string
32
+ beforeEach(() => {
33
+ project = mkdtempSync(join(tmpdir(), 'oc-windsurf-'))
34
+ execFileSync('git', ['init', '-q'], { cwd: project })
35
+ write(project, {
36
+ 'package.json': JSON.stringify({ name: 'app', dependencies: { '@supabase/supabase-js': '^2.0.0' } }),
37
+ '.windsurfrules': '# House rules\n',
38
+ })
39
+ run(project, 'init', '--yes')
40
+ })
41
+ afterEach(() => rmSync(project, { recursive: true, force: true }))
42
+
43
+ it('installs skills and servers where Devin Desktop reads them', () => {
44
+ expect(existsSync(join(project, '.agents', 'skills', 'testing-workflow', 'SKILL.md'))).toBe(true)
45
+ const mcp = JSON.parse(readFileSync(join(project, '.devin', 'mcp_config.json'), 'utf8'))
46
+ expect(mcp.mcpServers.Supabase).toEqual({ url: 'https://mcp.supabase.com/mcp' })
47
+ expect(readFileSync(join(project, '.windsurfrules'), 'utf8')).toContain('Skills are in `.agents/skills/`')
48
+ run(project, 'sync', '--check')
49
+ })
50
+
51
+ it('the sync that upgrades a 1.0 install moves both, and leaves nothing behind', () => {
52
+ write(project, {
53
+ '.windsurf/mcp.json': JSON.stringify({ mcpServers: { Supabase: { url: 'https://mcp.supabase.com/mcp' } } }, null, 2) + '\n',
54
+ '.windsurf/rules/skills/testing-workflow.md': '---\ntrigger: model_decision\n---\n\nold\n',
55
+ '.windsurf/rules/skills/testing-workflow/REFERENCE.md': 'old\n',
56
+ })
57
+ const path = join(project, '.opencastle', 'manifest.json')
58
+ const manifest = JSON.parse(readFileSync(path, 'utf8')) as Manifest
59
+ manifest.version = '1.0.0'
60
+ manifest.createdConfigs = ['.windsurf/mcp.json']
61
+ writeFileSync(path, JSON.stringify(manifest, null, 2))
62
+
63
+ const out = run(project, 'sync', '--yes')
64
+ expect(out).toContain('Removed .windsurf/mcp.json')
65
+ expect(existsSync(join(project, '.windsurf', 'mcp.json'))).toBe(false)
66
+ expect(existsSync(join(project, '.windsurf', 'rules', 'skills'))).toBe(false)
67
+ expect(existsSync(join(project, '.devin', 'mcp_config.json'))).toBe(true)
68
+ run(project, 'sync', '--check')
69
+ })
70
+ })
@@ -1,25 +1,25 @@
1
1
  {
2
- "hash": "dcab8e95",
2
+ "hash": "7b1346f9",
3
3
  "configHash": "30f8ea04",
4
- "lockfileHash": "8759a89c",
5
- "browserHash": "54e2a2ba",
4
+ "lockfileHash": "63a60284",
5
+ "browserHash": "f21b7f0d",
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": "422538c3",
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": "52ed552b",
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": "12ac41cb",
23
23
  "needsInterop": true
24
24
  }
25
25
  },
@@ -19,7 +19,7 @@ handoffs:
19
19
  prompt: 'Use the quick-refinement prompt to handle these follow-up refinements (UI tweaks, polish, adjustments):'
20
20
  - label: Generate Convoy
21
21
  agent: 'Team Lead (OpenCastle)'
22
- prompt: 'Use the generate-convoy prompt to create a .convoy.yml spec for autonomous convoy execution based on:'
22
+ prompt: 'Plan the work by the rules in the generate-convoy prompt and write it as a convoy spec at .opencastle/convoys/<name>.convoy.yml for autonomous execution by the experimental convoy engine, based on:'
23
23
  - label: Run Convoy
24
24
  agent: 'Team Lead (OpenCastle)'
25
25
  prompt: 'Run an existing .convoy.yml spec file. Parse the spec, validate the DAG, and execute via the convoy engine:'
@@ -73,7 +73,7 @@ Developer | UI/UX Expert | Content Engineer | Data Engineer | Testing Expert | S
73
73
  | Path | When | Action |
74
74
  |------|------|--------|
75
75
  | Compact | score ≤2, single subtask | Sub-agent directly; fast review + logs still required |
76
- | Convoy | score 3+ or multi-task | `generate-convoy` → `.opencastle/convoys/<name>.convoy.yml` → validation gates → PR |
76
+ | Convoy (experimental) | score 3+ or multi-task | plan by `generate-convoy`'s rules → write `.opencastle/convoys/<name>.convoy.yml` → user runs `npx opencastle convoy run -f <spec>` → validation gates → PR |
77
77
  | Utility | `create-skill`, `brainstorm`, `quick-refinement` | Direct delegation, no convoy |
78
78
 
79
79
  ## Workflow