opencastle 0.31.5 → 0.31.7

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 (38) hide show
  1. package/LICENSE +93 -21
  2. package/README.md +5 -3
  3. package/dist/cli/convoy/engine.d.ts +1 -1
  4. package/dist/cli/convoy/engine.d.ts.map +1 -1
  5. package/dist/cli/convoy/engine.js +32 -17
  6. package/dist/cli/convoy/engine.js.map +1 -1
  7. package/dist/cli/convoy/pipeline.d.ts.map +1 -1
  8. package/dist/cli/convoy/pipeline.js +12 -8
  9. package/dist/cli/convoy/pipeline.js.map +1 -1
  10. package/dist/cli/dashboard.d.ts.map +1 -1
  11. package/dist/cli/dashboard.js +90 -0
  12. package/dist/cli/dashboard.js.map +1 -1
  13. package/dist/cli/run.d.ts.map +1 -1
  14. package/dist/cli/run.js +10 -1
  15. package/dist/cli/run.js.map +1 -1
  16. package/dist/cli/update.js +2 -2
  17. package/dist/dashboard/scripts/etl.d.ts +9 -0
  18. package/dist/dashboard/scripts/etl.d.ts.map +1 -0
  19. package/dist/dashboard/scripts/etl.js +88 -0
  20. package/dist/dashboard/scripts/etl.js.map +1 -0
  21. package/package.json +2 -2
  22. package/src/cli/convoy/engine.ts +30 -19
  23. package/src/cli/convoy/pipeline.ts +12 -6
  24. package/src/cli/dashboard.ts +93 -0
  25. package/src/cli/run.ts +14 -1
  26. package/src/cli/update.ts +2 -2
  27. package/src/dashboard/dist/_astro/{index.Je1YjU_y.css → index.BRDFmNzR.css} +1 -1
  28. package/src/dashboard/dist/index.html +181 -2
  29. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  30. package/src/dashboard/src/pages/index.astro +180 -1
  31. package/src/dashboard/src/styles/dashboard.css +85 -0
  32. package/src/orchestrator/agents/developer.agent.md +8 -0
  33. package/src/orchestrator/agents/ui-ux-expert.agent.md +7 -0
  34. package/src/orchestrator/prompts/brainstorm.prompt.md +18 -0
  35. package/src/orchestrator/prompts/generate-convoy.prompt.md +42 -0
  36. package/src/orchestrator/skills/decomposition/SKILL.md +35 -0
  37. package/src/orchestrator/skills/frontend-design/SKILL.md +27 -1
  38. package/src/orchestrator/skills/project-consistency/SKILL.md +350 -0
package/LICENSE CHANGED
@@ -1,21 +1,93 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Filip Mares
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: Filip Mares
6
+ Licensed Work: OpenCastle 0.31.6 and later versions.
7
+ The Licensed Work is (c) 2026 Filip Mares.
8
+ Additional Use Grant: You may make use of the Licensed Work, provided that
9
+ you may not use the Licensed Work for a Commercial
10
+ Purpose. A "Commercial Purpose" is any use intended
11
+ for or directed toward commercial advantage or
12
+ monetary compensation. For the avoidance of doubt,
13
+ use of the Licensed Work for personal projects,
14
+ education, research, evaluation, and non-commercial
15
+ production use is permitted.
16
+ Change Date: Two years from the date each version of the
17
+ Licensed Work is first publicly distributed by
18
+ the Licensor.
19
+ Change License: Apache License, Version 2.0
20
+
21
+ For information about alternative licensing arrangements for the Licensed Work,
22
+ please contact Filip Mares.
23
+
24
+ Notice
25
+
26
+ Business Source License 1.1
27
+
28
+ Terms
29
+
30
+ The Licensor hereby grants you the right to copy, modify, create derivative
31
+ works, redistribute, and make non-production use of the Licensed Work. The
32
+ Licensor may make an Additional Use Grant, above, permitting limited production
33
+ use.
34
+
35
+ Effective on the Change Date, or the fourth anniversary of the first publicly
36
+ available distribution of a specific version of the Licensed Work under this
37
+ License, whichever comes first, the Licensor hereby grants you rights under the
38
+ terms of the Change License, and the rights granted in the paragraph above
39
+ terminate.
40
+
41
+ If your use of the Licensed Work does not comply with the requirements currently
42
+ in effect as described in this License, you must purchase a commercial license
43
+ from the Licensor, its affiliated entities, or authorized resellers, or you must
44
+ refrain from using the Licensed Work.
45
+
46
+ All copies of the original and modified Licensed Work, and derivative works of
47
+ the Licensed Work, are subject to this License. This License applies separately
48
+ for each version of the Licensed Work and the Change Date may vary for each
49
+ version of the Licensed Work released by Licensor.
50
+
51
+ You must conspicuously display this License on each original or modified copy of
52
+ the Licensed Work. If you receive the Licensed Work in original or modified form
53
+ from a third party, the terms and conditions set forth in this License apply to
54
+ your use of that work.
55
+
56
+ Any use of the Licensed Work in violation of this License will automatically
57
+ terminate your rights under this License for the current and all other versions
58
+ of the Licensed Work.
59
+
60
+ This License does not grant you any right in any trademark or logo of Licensor
61
+ or its affiliates (provided that you may use a trademark or logo of Licensor as
62
+ expressly required by this License).
63
+
64
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
65
+ "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
66
+ OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY,
67
+ FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
68
+
69
+ MariaDB hereby grants you permission to use this License's text to license your
70
+ works, and to refer to it using the trademark "Business Source License", as long
71
+ as you comply with the Covenants of Licensor below.
72
+
73
+ Covenants of Licensor
74
+
75
+ In consideration of the right to use this License's text and the "Business
76
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
77
+ other recipients of the licensed work to be provided by Licensor:
78
+
79
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
80
+ or a license that is compatible with GPL Version 2.0 or a later version,
81
+ where "compatible" means that software provided under the Change License can
82
+ be included in a program with software provided under GPL Version 2.0 or a
83
+ later version. Licensor may specify additional Change Licenses without
84
+ limitation.
85
+
86
+ 2. To either: (a) specify an additional grant of rights to use that does not
87
+ impose any additional condition, limitation, or restriction on the right
88
+ granted in this License, as the Additional Use Grant; or (b) insert the text
89
+ "None".
90
+
91
+ 3. To specify a Change Date.
92
+
93
+ 4. Not to modify this License in any other way.
package/README.md CHANGED
@@ -134,7 +134,6 @@ Runs multiple health checks — manifest, configs, skills, observability logs, I
134
134
  📖 [Doctor CLI documentation →](https://www.opencastle.dev/docs/cli#doctor)
135
135
 
136
136
  <br>
137
-
138
137
  ## Convoy Engine
139
138
 
140
139
  A deterministic, crash-recoverable orchestrator inspired by Steve Yegge's [Gas Town](https://github.com/steveyegge/gastown). Define tasks in YAML, run overnight, resume after crashes.
@@ -147,22 +146,25 @@ npx opencastle run convoy.yml
147
146
  # convoy.yml
148
147
  name: "Overnight feature batch"
149
148
  version: 1
150
- adapter: claude-code
149
+ adapter: claude
151
150
  branch: feat/reviews
152
151
 
153
152
  tasks:
154
153
  - id: migrate-db
155
154
  agent: database-engineer
156
155
  prompt: "Create a reviews table migration."
156
+ files: ["db/migrations/"]
157
157
 
158
158
  - id: build-component
159
159
  agent: ui-ux-expert
160
160
  prompt: "Build a ReviewCard component."
161
+ files: ["src/components/reviews/"]
161
162
 
162
163
  - id: wire-page
163
164
  agent: developer
164
165
  prompt: "Add reviews to the place detail page."
165
166
  depends_on: [migrate-db, build-component]
167
+ files: ["src/pages/places/"]
166
168
 
167
169
  gates:
168
170
  - npm run lint
@@ -217,4 +219,4 @@ For corporate sponsorship inquiries, open a [GitHub Discussion](https://github.c
217
219
 
218
220
  ## License
219
221
 
220
- [MIT](LICENSE) — Filip Mares, 2026
222
+ [BSL 1.1](LICENSE) — Free for non-commercial use. Commercial use requires a paid license. Each version converts to Apache 2.0 two years after its release.
@@ -85,7 +85,7 @@ export declare class CircuitBreakerManager {
85
85
  * Creates the branch from HEAD if it does not yet exist.
86
86
  * Fails fast if there are uncommitted changes.
87
87
  */
88
- export declare function ensureBranch(branchName: string, basePath: string): Promise<void>;
88
+ export declare function ensureBranch(branchName: string, basePath: string, skipDirtyCheck?: boolean): Promise<void>;
89
89
  export interface ConvoyGuardResult {
90
90
  passed: boolean;
91
91
  warnings: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/cli/convoy/engine.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAQ,QAAQ,EAAE,YAAY,EAAiB,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAChG,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AAG1F,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAC3E,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AAElF,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAoB,WAAW,EAAE,oBAAoB,EAAyC,MAAM,YAAY,CAAA;AAgBtJ,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,YAAY,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE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AmB,CACjC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,EACf,UAAU,CAAC,EAAE,gBAAgB,EAC7B,cAAc,CAAC,EAAE,OAAO,GACvB,WAAW,CAsBb;AAoqED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAqb7E"}
@@ -105,22 +105,24 @@ export class CircuitBreakerManager {
105
105
  * Creates the branch from HEAD if it does not yet exist.
106
106
  * Fails fast if there are uncommitted changes.
107
107
  */
108
- export async function ensureBranch(branchName, basePath) {
108
+ export async function ensureBranch(branchName, basePath, skipDirtyCheck = false) {
109
109
  // Validate refspec — reject shell metacharacters
110
110
  if (!/^[a-zA-Z0-9\-/_\.]+$/.test(branchName)) {
111
111
  throw new Error(`Invalid branch name "${branchName}": only alphanumeric, -, /, _, and . are allowed`);
112
112
  }
113
- // Refuse to switch branches with uncommitted changes
114
- // Untracked files (??) don't block branch checkout — ignore them
115
- const { stdout: statusOut } = await execFile('git', ['status', '--porcelain'], {
116
- cwd: basePath,
117
- });
118
- const trackedChanges = statusOut
119
- .split('\n')
120
- .filter(line => line.trim() && !line.startsWith('??'))
121
- .join('\n');
122
- if (trackedChanges) {
123
- throw new Error(`Uncommitted changes detected in "${basePath}". Commit or stash before switching branches.`);
113
+ if (!skipDirtyCheck) {
114
+ // Refuse to switch branches with uncommitted changes
115
+ // Untracked files (??) don't block branch checkout ignore them
116
+ const { stdout: statusOut } = await execFile('git', ['status', '--porcelain'], {
117
+ cwd: basePath,
118
+ });
119
+ const trackedChanges = statusOut
120
+ .split('\n')
121
+ .filter(line => line.trim() && !line.startsWith('??'))
122
+ .join('\n');
123
+ if (trackedChanges) {
124
+ throw new Error(`Uncommitted changes detected in "${basePath}". Commit or stash before switching branches.`);
125
+ }
124
126
  }
125
127
  // Check if branch already exists
126
128
  try {
@@ -1169,12 +1171,12 @@ async function runConvoy(convoyId, spec, adapter, store, events, wtManager, merg
1169
1171
  try {
1170
1172
  // SECURITY: Gate/hook commands come from the .convoy.yml spec file, which is operator-controlled.
1171
1173
  // They are NOT user-supplied and are part of the trusted build configuration.
1172
- await execFile('sh', ['-c', command], { cwd: worktreePath ?? basePath });
1174
+ await execFile('sh', ['-c', command], { cwd: worktreePath ?? basePath, maxBuffer: 10 * 1024 * 1024 });
1173
1175
  }
1174
1176
  catch (err) {
1175
1177
  const execErr = err;
1176
1178
  const code = typeof execErr.code === 'number' ? execErr.code : 1;
1177
- const output = execErr.stderr || execErr.stdout || execErr.message || '';
1179
+ const output = [execErr.stderr, execErr.stdout].filter(Boolean).join('\n').trim() || execErr.message || '';
1178
1180
  gateFailure = { command, exitCode: code, output };
1179
1181
  break;
1180
1182
  }
@@ -2086,14 +2088,14 @@ async function runConvoy(convoyId, spec, adapter, store, events, wtManager, merg
2086
2088
  try {
2087
2089
  // SECURITY: Gate/hook commands come from the .convoy.yml spec file, which is operator-controlled.
2088
2090
  // They are NOT user-supplied and are part of the trusted build configuration.
2089
- await execFile('sh', ['-c', command], { cwd: basePath });
2091
+ await execFile('sh', ['-c', command], { cwd: basePath, maxBuffer: 10 * 1024 * 1024 });
2090
2092
  gateResults.push({ command, exitCode: 0, passed: true });
2091
2093
  process.stdout.write(` ${c.green('✓')} ${c.dim(command)}\n`);
2092
2094
  }
2093
2095
  catch (err) {
2094
2096
  const execErr = err;
2095
2097
  const code = typeof execErr.code === 'number' ? execErr.code : 1;
2096
- const output = execErr.stderr || execErr.stdout || execErr.message || '';
2098
+ const output = [execErr.stderr, execErr.stdout].filter(Boolean).join('\n').trim() || execErr.message || '';
2097
2099
  gateResults.push({ command, exitCode: code, passed: false, output });
2098
2100
  process.stdout.write(` ${c.red('✗')} ${c.dim(command)}\n`);
2099
2101
  }
@@ -2109,7 +2111,20 @@ async function runConvoy(convoyId, spec, adapter, store, events, wtManager, merg
2109
2111
  const failureSummary = failedGates
2110
2112
  .map(g => `Command: ${g.command}\nExit code: ${g.exitCode}\nOutput:\n${g.output ?? '(no output)'}`)
2111
2113
  .join('\n\n---\n\n');
2112
- const fixPrompt = `The following validation gates failed after all convoy tasks completed. Fix the issues so these commands pass.\n\n${failureSummary}`;
2114
+ // Gather files touched by convoy tasks to give the fix agent context
2115
+ const allTasks = store.getTasksByConvoy(convoyId);
2116
+ const touchedFiles = allTasks
2117
+ .filter(t => t.files)
2118
+ .flatMap(t => { try {
2119
+ return JSON.parse(t.files);
2120
+ }
2121
+ catch {
2122
+ return [];
2123
+ } });
2124
+ const filesContext = touchedFiles.length > 0
2125
+ ? `\n\nFiles modified by the convoy tasks:\n${touchedFiles.map(f => `- ${f}`).join('\n')}\n`
2126
+ : '';
2127
+ const fixPrompt = `The following validation gates failed after all convoy tasks completed. Fix the issues so these commands pass.${filesContext}\n\n${failureSummary}`;
2113
2128
  const fixTaskId = `gate-fix-${gateAttempt}`;
2114
2129
  process.stdout.write(`\n ${c.yellow('⟳')} ${c.bold(`[${fixTaskId}]`)} fixing gate failures (attempt ${gateAttempt}/${maxGateRetries})\n`);
2115
2130
  const fixTask = {