@cluesmith/codev 1.1.0 → 1.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.
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +19 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +18 -1
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/consult.d.ts +16 -0
- package/dist/agent-farm/commands/consult.d.ts.map +1 -0
- package/dist/agent-farm/commands/consult.js +51 -0
- package/dist/agent-farm/commands/consult.js.map +1 -0
- package/dist/agent-farm/commands/open.js +6 -6
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +51 -42
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts.map +1 -1
- package/dist/agent-farm/commands/start.js +9 -14
- package/dist/agent-farm/commands/start.js.map +1 -1
- package/dist/agent-farm/commands/util.js +2 -2
- package/dist/agent-farm/commands/util.js.map +1 -1
- package/dist/agent-farm/db/errors.d.ts +4 -0
- package/dist/agent-farm/db/errors.d.ts.map +1 -1
- package/dist/agent-farm/db/errors.js +8 -0
- package/dist/agent-farm/db/errors.js.map +1 -1
- package/dist/agent-farm/servers/dashboard-server.js +125 -71
- package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
- package/dist/agent-farm/servers/open-server.d.ts +9 -0
- package/dist/agent-farm/servers/open-server.d.ts.map +1 -0
- package/dist/agent-farm/servers/{annotate-server.js → open-server.js} +17 -15
- package/dist/agent-farm/servers/open-server.js.map +1 -0
- package/dist/agent-farm/servers/tower-server.js +4 -7
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/state.d.ts +5 -0
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +17 -0
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +1 -1
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +13 -7
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/port-registry.d.ts +1 -1
- package/dist/agent-farm/utils/port-registry.d.ts.map +1 -1
- package/dist/agent-farm/utils/port-registry.js +1 -1
- package/dist/agent-farm/utils/port-registry.js.map +1 -1
- package/dist/agent-farm/utils/shell.d.ts +19 -0
- package/dist/agent-farm/utils/shell.d.ts.map +1 -1
- package/dist/agent-farm/utils/shell.js +28 -0
- package/dist/agent-farm/utils/shell.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +33 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +3 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +31 -25
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +3 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +128 -54
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +88 -36
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/eject.d.ts +18 -0
- package/dist/commands/eject.d.ts.map +1 -0
- package/dist/commands/eject.js +149 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/import.d.ts +16 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +278 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +32 -27
- package/dist/commands/init.js.map +1 -1
- package/dist/lib/projectlist-parser.d.ts +70 -0
- package/dist/lib/projectlist-parser.d.ts.map +1 -0
- package/dist/lib/projectlist-parser.js +200 -0
- package/dist/lib/projectlist-parser.js.map +1 -0
- package/dist/lib/skeleton.d.ts +41 -0
- package/dist/lib/skeleton.d.ts.map +1 -0
- package/dist/lib/skeleton.js +110 -0
- package/dist/lib/skeleton.js.map +1 -0
- package/dist/lib/templates.d.ts +2 -1
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +11 -10
- package/dist/lib/templates.js.map +1 -1
- package/package.json +5 -4
- package/{templates → skeleton}/DEPENDENCIES.md +3 -48
- package/skeleton/bin/agent-farm +7 -0
- package/skeleton/docs/commands/agent-farm.md +469 -0
- package/skeleton/docs/commands/codev.md +253 -0
- package/skeleton/docs/commands/consult.md +286 -0
- package/skeleton/docs/commands/overview.md +108 -0
- package/skeleton/maintain/.gitkeep +2 -0
- package/{templates → skeleton}/protocols/experiment/protocol.md +2 -2
- package/skeleton/protocols/maintain/protocol.md +502 -0
- package/skeleton/protocols/maintain/templates/maintenance-run.md +64 -0
- package/{templates → skeleton}/protocols/spider/protocol.md +9 -9
- package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/plan.md +22 -1
- package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/spec.md +30 -1
- package/skeleton/protocols/tick/protocol.md +277 -0
- package/skeleton/resources/lessons-learned.md +30 -0
- package/skeleton/resources/workflow-reference.md +242 -0
- package/skeleton/roles/architect.md +283 -0
- package/{templates → skeleton}/roles/builder.md +2 -0
- package/skeleton/roles/review-types/impl-review.md +56 -0
- package/skeleton/roles/review-types/integration-review.md +68 -0
- package/skeleton/roles/review-types/plan-review.md +59 -0
- package/skeleton/roles/review-types/pr-ready.md +72 -0
- package/skeleton/roles/review-types/spec-review.md +55 -0
- package/skeleton/templates/lessons-learned.md +28 -0
- package/{templates → skeleton}/templates/projectlist.md +17 -16
- package/dist/agent-farm/servers/annotate-server.d.ts +0 -9
- package/dist/agent-farm/servers/annotate-server.d.ts.map +0 -1
- package/dist/agent-farm/servers/annotate-server.js.map +0 -1
- package/templates/agents/architecture-documenter.md +0 -189
- package/templates/agents/codev-updater.md +0 -276
- package/templates/agents/spider-protocol-updater.md +0 -118
- package/templates/annotate.html +0 -903
- package/templates/bin/agent-farm +0 -18
- package/templates/bin/annotate-server.js +0 -140
- package/templates/dashboard-split.html +0 -1679
- package/templates/dashboard.html +0 -149
- package/templates/protocols/maintain/protocol.md +0 -235
- package/templates/protocols/spider/templates/plan.md +0 -169
- package/templates/protocols/spider/templates/review.md +0 -207
- package/templates/protocols/spider/templates/spec.md +0 -140
- package/templates/protocols/spider-solo/protocol.md +0 -619
- package/templates/protocols/tick/protocol.md +0 -250
- package/templates/roles/architect.md +0 -230
- package/templates/tower.html +0 -1032
- /package/{templates/AGENTS.md → skeleton/AGENTS.md.template} +0 -0
- /package/{templates/CLAUDE.md → skeleton/CLAUDE.md.template} +0 -0
- /package/{templates → skeleton}/bin/codev-doctor +0 -0
- /package/{templates → skeleton}/builders.md +0 -0
- /package/{templates → skeleton}/config.json +0 -0
- /package/{templates → skeleton}/plans/.gitkeep +0 -0
- /package/{templates → skeleton}/protocols/experiment/templates/notes.md +0 -0
- /package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/review.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/plan.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/review.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/spec.md +0 -0
- /package/{templates → skeleton}/reviews/.gitkeep +0 -0
- /package/{templates → skeleton}/roles/consultant.md +0 -0
- /package/{templates → skeleton}/specs/.gitkeep +0 -0
package/templates/bin/agent-farm
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Thin wrapper - forwards all commands to @cluesmith/codev af
|
|
3
|
-
# This script allows projects to use ./codev/bin/agent-farm without
|
|
4
|
-
# having codev installed globally.
|
|
5
|
-
|
|
6
|
-
# First, try the globally installed 'af' command (from @cluesmith/codev)
|
|
7
|
-
if command -v af &> /dev/null; then
|
|
8
|
-
exec af "$@"
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
# Fall back to npx if af is not globally installed
|
|
12
|
-
if command -v npx &> /dev/null; then
|
|
13
|
-
exec npx @cluesmith/codev af "$@"
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
echo "Error: Could not find 'af' command" >&2
|
|
17
|
-
echo "Install @cluesmith/codev globally: npm install -g @cluesmith/codev" >&2
|
|
18
|
-
exit 1
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Simple annotation server for the Architect-Builder pattern.
|
|
5
|
-
* Serves the annotation viewer and handles file saves.
|
|
6
|
-
*
|
|
7
|
-
* Usage: node annotate-server.js --builder XXXX --file path/to/file.ts --port 8080
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const http = require('http');
|
|
11
|
-
const fs = require('fs');
|
|
12
|
-
const path = require('path');
|
|
13
|
-
|
|
14
|
-
// Parse arguments
|
|
15
|
-
const args = process.argv.slice(2);
|
|
16
|
-
const getArg = (name) => {
|
|
17
|
-
const idx = args.indexOf('--' + name);
|
|
18
|
-
return idx !== -1 ? args[idx + 1] : null;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const builderId = getArg('builder');
|
|
22
|
-
const filePath = getArg('file');
|
|
23
|
-
const port = parseInt(getArg('port') || '8080', 10);
|
|
24
|
-
|
|
25
|
-
if (!builderId || !filePath) {
|
|
26
|
-
console.error('Usage: annotate-server.js --builder XXXX --file path/to/file.ts [--port 8080]');
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Paths
|
|
31
|
-
const projectRoot = process.cwd();
|
|
32
|
-
const buildersDir = path.join(projectRoot, '.builders');
|
|
33
|
-
const builderDir = path.join(buildersDir, builderId);
|
|
34
|
-
const fullFilePath = path.join(builderDir, filePath);
|
|
35
|
-
const templatePath = path.join(projectRoot, 'codev', 'templates', 'annotate.html');
|
|
36
|
-
|
|
37
|
-
// Validate builder exists
|
|
38
|
-
if (!fs.existsSync(builderDir)) {
|
|
39
|
-
console.error(`Builder directory not found: ${builderDir}`);
|
|
40
|
-
process.exit(1);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Validate file exists
|
|
44
|
-
if (!fs.existsSync(fullFilePath)) {
|
|
45
|
-
console.error(`File not found: ${fullFilePath}`);
|
|
46
|
-
process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Get language from extension
|
|
50
|
-
const ext = path.extname(filePath).slice(1).toLowerCase();
|
|
51
|
-
const langMap = {
|
|
52
|
-
js: 'javascript', ts: 'typescript', jsx: 'javascript', tsx: 'typescript',
|
|
53
|
-
py: 'python', sh: 'bash', bash: 'bash',
|
|
54
|
-
md: 'markdown', html: 'markup', css: 'css',
|
|
55
|
-
json: 'json', yaml: 'yaml', yml: 'yaml'
|
|
56
|
-
};
|
|
57
|
-
const lang = langMap[ext] || ext;
|
|
58
|
-
|
|
59
|
-
// Create server
|
|
60
|
-
const server = http.createServer((req, res) => {
|
|
61
|
-
// CORS headers
|
|
62
|
-
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
63
|
-
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
|
64
|
-
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
65
|
-
|
|
66
|
-
if (req.method === 'OPTIONS') {
|
|
67
|
-
res.writeHead(200);
|
|
68
|
-
res.end();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Serve annotation viewer
|
|
73
|
-
if (req.method === 'GET' && (req.url === '/' || req.url === '/index.html')) {
|
|
74
|
-
try {
|
|
75
|
-
let template = fs.readFileSync(templatePath, 'utf-8');
|
|
76
|
-
const fileContent = fs.readFileSync(fullFilePath, 'utf-8');
|
|
77
|
-
|
|
78
|
-
// Replace placeholders
|
|
79
|
-
template = template.replace(/\{\{BUILDER_ID\}\}/g, builderId);
|
|
80
|
-
template = template.replace(/\{\{FILE_PATH\}\}/g, filePath);
|
|
81
|
-
template = template.replace(/\{\{FILE\}\}/g, path.basename(filePath));
|
|
82
|
-
template = template.replace(/\{\{LANG\}\}/g, lang);
|
|
83
|
-
|
|
84
|
-
// Inject file content
|
|
85
|
-
const escapedContent = JSON.stringify(fileContent);
|
|
86
|
-
template = template.replace(
|
|
87
|
-
'// FILE_CONTENT will be injected by the server',
|
|
88
|
-
`init(${escapedContent});`
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
92
|
-
res.end(template);
|
|
93
|
-
} catch (err) {
|
|
94
|
-
res.writeHead(500, { 'Content-Type': 'text/plain' });
|
|
95
|
-
res.end('Error loading viewer: ' + err.message);
|
|
96
|
-
}
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Handle file save
|
|
101
|
-
if (req.method === 'POST' && req.url === '/save') {
|
|
102
|
-
let body = '';
|
|
103
|
-
req.on('data', chunk => body += chunk);
|
|
104
|
-
req.on('end', () => {
|
|
105
|
-
try {
|
|
106
|
-
const { file, content } = JSON.parse(body);
|
|
107
|
-
|
|
108
|
-
// Security: only allow saving the opened file
|
|
109
|
-
if (file !== filePath) {
|
|
110
|
-
res.writeHead(403, { 'Content-Type': 'text/plain' });
|
|
111
|
-
res.end('Cannot save to different file');
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
fs.writeFileSync(fullFilePath, content, 'utf-8');
|
|
116
|
-
console.log(`Saved: ${fullFilePath}`);
|
|
117
|
-
|
|
118
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
119
|
-
res.end(JSON.stringify({ success: true }));
|
|
120
|
-
} catch (err) {
|
|
121
|
-
res.writeHead(500, { 'Content-Type': 'text/plain' });
|
|
122
|
-
res.end('Error saving file: ' + err.message);
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// 404 for everything else
|
|
129
|
-
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
130
|
-
res.end('Not found');
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
server.listen(port, () => {
|
|
134
|
-
console.log(`\nAnnotation Viewer`);
|
|
135
|
-
console.log(`================`);
|
|
136
|
-
console.log(`Builder: ${builderId}`);
|
|
137
|
-
console.log(`File: ${filePath}`);
|
|
138
|
-
console.log(`\nOpen in browser: http://localhost:${port}`);
|
|
139
|
-
console.log(`\nPress Ctrl+C to stop the server`);
|
|
140
|
-
});
|