cofounder-crew 0.1.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 (56) hide show
  1. package/README.md +206 -0
  2. package/dist/src/cli.d.ts +2 -0
  3. package/dist/src/cli.js +249 -0
  4. package/dist/src/cli.js.map +1 -0
  5. package/dist/src/codex.d.ts +8 -0
  6. package/dist/src/codex.js +335 -0
  7. package/dist/src/codex.js.map +1 -0
  8. package/dist/src/codexConfig.d.ts +10 -0
  9. package/dist/src/codexConfig.js +136 -0
  10. package/dist/src/codexConfig.js.map +1 -0
  11. package/dist/src/codexSessions.d.ts +5 -0
  12. package/dist/src/codexSessions.js +100 -0
  13. package/dist/src/codexSessions.js.map +1 -0
  14. package/dist/src/config.d.ts +14 -0
  15. package/dist/src/config.js +154 -0
  16. package/dist/src/config.js.map +1 -0
  17. package/dist/src/errors.d.ts +4 -0
  18. package/dist/src/errors.js +12 -0
  19. package/dist/src/errors.js.map +1 -0
  20. package/dist/src/git.d.ts +15 -0
  21. package/dist/src/git.js +151 -0
  22. package/dist/src/git.js.map +1 -0
  23. package/dist/src/init.d.ts +8 -0
  24. package/dist/src/init.js +43 -0
  25. package/dist/src/init.js.map +1 -0
  26. package/dist/src/mcp.d.ts +4 -0
  27. package/dist/src/mcp.js +159 -0
  28. package/dist/src/mcp.js.map +1 -0
  29. package/dist/src/memberRuntime.d.ts +13 -0
  30. package/dist/src/memberRuntime.js +70 -0
  31. package/dist/src/memberRuntime.js.map +1 -0
  32. package/dist/src/paths.d.ts +7 -0
  33. package/dist/src/paths.js +36 -0
  34. package/dist/src/paths.js.map +1 -0
  35. package/dist/src/prompt.d.ts +2 -0
  36. package/dist/src/prompt.js +59 -0
  37. package/dist/src/prompt.js.map +1 -0
  38. package/dist/src/runtime.d.ts +50 -0
  39. package/dist/src/runtime.js +362 -0
  40. package/dist/src/runtime.js.map +1 -0
  41. package/dist/src/setup.d.ts +6 -0
  42. package/dist/src/setup.js +48 -0
  43. package/dist/src/setup.js.map +1 -0
  44. package/dist/src/tasks.d.ts +10 -0
  45. package/dist/src/tasks.js +130 -0
  46. package/dist/src/tasks.js.map +1 -0
  47. package/dist/src/templates.d.ts +15 -0
  48. package/dist/src/templates.js +158 -0
  49. package/dist/src/templates.js.map +1 -0
  50. package/dist/src/types.d.ts +141 -0
  51. package/dist/src/types.js +2 -0
  52. package/dist/src/types.js.map +1 -0
  53. package/dist/src/worker.d.ts +2 -0
  54. package/dist/src/worker.js +17 -0
  55. package/dist/src/worker.js.map +1 -0
  56. package/package.json +43 -0
package/README.md ADDED
@@ -0,0 +1,206 @@
1
+ # Cofounder Crew
2
+
3
+ Local AI teams for Codex. No dashboard, no orchestration server, no new IDE.
4
+
5
+ Cofounder Crew gives a project a small file-based team runtime: named members, role prompts, per-member Codex settings, optional memory, MCP access controls, task logs, and safe delegation from the terminal or from Codex itself.
6
+
7
+ ```bash
8
+ cd my-project
9
+ npm create cofounder@latest
10
+ codex
11
+ ```
12
+
13
+ Inside Codex, the main agent can list the team, delegate work, watch progress, cancel or steer tasks, inspect logs, and apply worktree edits.
14
+
15
+ ## Quick Start
16
+
17
+ Create a team skeleton:
18
+
19
+ ```bash
20
+ npm create cofounder@latest
21
+ ```
22
+
23
+ Use isolated Git worktrees for implementation tasks and install the Codex MCP entry:
24
+
25
+ ```bash
26
+ npm create cofounder@latest -- --template worktree --setup-codex --yes
27
+ ```
28
+
29
+ Existing project:
30
+
31
+ ```bash
32
+ npm install --save-dev cofounder-crew
33
+ npx cofounder init --template worktree
34
+ npx cofounder setup codex --install
35
+ ```
36
+
37
+ Then open Codex from the project:
38
+
39
+ ```bash
40
+ codex
41
+ ```
42
+
43
+ ## What It Creates
44
+
45
+ ```text
46
+ .cofounder/
47
+ team.yaml
48
+ members/
49
+ lead/
50
+ prompt.md
51
+ settings.toml
52
+ home/
53
+ backend/
54
+ prompt.md
55
+ settings.toml
56
+ home/
57
+ reviewer/
58
+ prompt.md
59
+ settings.toml
60
+ home/
61
+ memory/
62
+ runs/
63
+ worktrees/
64
+ ```
65
+
66
+ The important part is that everything is plain files. You can inspect prompts, settings, task records, logs, generated Codex config, and final results.
67
+
68
+ ## Core Commands
69
+
70
+ ```bash
71
+ cofounder team
72
+ cofounder run backend "inspect this repo"
73
+ cofounder delegate backend "add focused tests for the parser"
74
+ cofounder status <task_id>
75
+ cofounder logs <task_id>
76
+ cofounder watch <task_id>
77
+ cofounder cancel <task_id>
78
+ cofounder interrupt <task_id> "revise the approach and continue"
79
+ ```
80
+
81
+ For isolated worktree tasks:
82
+
83
+ ```bash
84
+ cofounder diff <task_id>
85
+ cofounder apply <task_id>
86
+ ```
87
+
88
+ `diff` prints the generated patch. `apply` validates it with `git apply --check`, applies it to the main working tree, and stores the patch under `.cofounder/runs/<task_id>/apply.patch`.
89
+
90
+ ## Codex MCP
91
+
92
+ Install the MCP entry:
93
+
94
+ ```bash
95
+ cofounder setup codex --install
96
+ ```
97
+
98
+ Equivalent command:
99
+
100
+ ```bash
101
+ codex mcp add cofounder -- npx -y cofounder-crew mcp
102
+ ```
103
+
104
+ Codex will get these tools:
105
+
106
+ - `team.list`
107
+ - `team.capabilities`
108
+ - `team.delegate`
109
+ - `team.status`
110
+ - `team.logs`
111
+ - `team.diff`
112
+ - `team.apply`
113
+ - `team.cancel`
114
+ - `team.interrupt`
115
+
116
+ ## Team Members
117
+
118
+ Team members are configured in `.cofounder/team.yaml`.
119
+
120
+ Each member has:
121
+
122
+ - a role prompt
123
+ - responsibilities
124
+ - allowed delegation targets
125
+ - Codex model/sandbox/approval settings
126
+ - optional MCP allowlist
127
+ - optional memory scope
128
+ - optional isolated write mode
129
+
130
+ Example MCP restriction:
131
+
132
+ ```toml
133
+ [mcp]
134
+ mode = "allowlist"
135
+ allow = ["linear", "mempalace"]
136
+ ```
137
+
138
+ `inherit` keeps normal Codex MCP access. `none` disables MCP servers for that member. `allowlist` injects only selected servers from the source Codex config.
139
+
140
+ ## Write Modes
141
+
142
+ Direct mode runs in the project working tree:
143
+
144
+ ```toml
145
+ [write]
146
+ mode = "direct"
147
+ ```
148
+
149
+ Worktree mode runs tasks in `.cofounder/worktrees/<task_id>`:
150
+
151
+ ```toml
152
+ [write]
153
+ mode = "worktree"
154
+ ```
155
+
156
+ Worktrees are created from `HEAD`; uncommitted main-tree changes are not copied. This keeps delegated edits inspectable before applying them.
157
+
158
+ ## Interruption
159
+
160
+ Codex `exec` does not expose confirmed live mid-turn input. Cofounder Crew therefore uses cancel-and-resume:
161
+
162
+ 1. capture or discover the Codex session id,
163
+ 2. cancel the running process,
164
+ 3. start a new task with `codex exec resume <session_id>`.
165
+
166
+ Capabilities report this honestly:
167
+
168
+ ```json
169
+ {
170
+ "live_interrupt": false,
171
+ "interrupt_mode": "cancel-resume"
172
+ }
173
+ ```
174
+
175
+ ## Packages
176
+
177
+ There are two npm packages because `npm create cofounder` maps to the initializer package `create-cofounder`, while the runtime lives in `cofounder-crew`.
178
+
179
+ - `create-cofounder`: tiny initializer used by `npm create cofounder@latest`
180
+ - `cofounder-crew`: runtime package exposing `cofounder` and `cofounder-mcp`
181
+
182
+ The package name `cofounder` is already taken on npm, so the runtime package is published as `cofounder-crew`.
183
+
184
+ ## Development
185
+
186
+ ```bash
187
+ npm install
188
+ npm run check
189
+ npm test
190
+ npm run build
191
+ ```
192
+
193
+ Local CLI:
194
+
195
+ ```bash
196
+ node dist/src/cli.js templates
197
+ node dist/src/cli.js init --template worktree
198
+ node dist/src/cli.js setup codex
199
+ ```
200
+
201
+ Local initializer test:
202
+
203
+ ```bash
204
+ COFOUNDER_CLI=/absolute/path/to/dist/src/cli.js \
205
+ node packages/create-cofounder/index.js --template worktree --yes
206
+ ```
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,249 @@
1
+ #!/usr/bin/env node
2
+ import { CofounderError } from "./errors.js";
3
+ import { initProject } from "./init.js";
4
+ import { startMcpServer } from "./mcp.js";
5
+ import { formatCodexSetup, installCodexMcp } from "./setup.js";
6
+ import { listProjectTemplates } from "./templates.js";
7
+ import { applyTaskPatch, cancelTask, delegateMember, formatLogEntry, formatTaskStatus, formatTeam, getCapabilities, getTask, interruptTask, listTeam, readTaskEventContent, readTaskLogs, readTaskPatch, readTaskResult, runMember, runWorkerTask } from "./runtime.js";
8
+ async function main(argv = process.argv.slice(2)) {
9
+ const [command, ...args] = argv;
10
+ switch (command) {
11
+ case "init":
12
+ await commandInit(args);
13
+ return;
14
+ case "templates":
15
+ commandTemplates();
16
+ return;
17
+ case "setup":
18
+ await commandSetup(args);
19
+ return;
20
+ case "team":
21
+ await commandTeam();
22
+ return;
23
+ case "run":
24
+ await commandRun(args);
25
+ return;
26
+ case "delegate":
27
+ await commandDelegate(args);
28
+ return;
29
+ case "status":
30
+ await commandStatus(args);
31
+ return;
32
+ case "logs":
33
+ await commandLogs(args);
34
+ return;
35
+ case "diff":
36
+ await commandDiff(args);
37
+ return;
38
+ case "apply":
39
+ await commandApply(args);
40
+ return;
41
+ case "watch":
42
+ await commandWatch(args);
43
+ return;
44
+ case "cancel":
45
+ await commandCancel(args);
46
+ return;
47
+ case "interrupt":
48
+ await commandInterrupt(args);
49
+ return;
50
+ case "capabilities":
51
+ commandCapabilities();
52
+ return;
53
+ case "mcp":
54
+ await startMcpServer();
55
+ return;
56
+ case "__worker":
57
+ await commandWorker(args);
58
+ return;
59
+ case "-h":
60
+ case "--help":
61
+ case undefined:
62
+ printHelp();
63
+ return;
64
+ default:
65
+ throw new CofounderError(`Unknown command: ${command}`);
66
+ }
67
+ }
68
+ async function commandInit(args) {
69
+ const templateOption = readOption(args, "--template");
70
+ if (args.includes("--template") && !templateOption) {
71
+ throw new CofounderError("Missing --template value");
72
+ }
73
+ const template = templateOption ?? "default";
74
+ const result = await initProject(process.cwd(), { template });
75
+ console.log(`template ${result.template}`);
76
+ for (const item of result.created) {
77
+ console.log(`created ${item}`);
78
+ }
79
+ for (const item of result.skipped) {
80
+ console.log(`skipped ${item}`);
81
+ }
82
+ }
83
+ function commandTemplates() {
84
+ for (const template of listProjectTemplates()) {
85
+ console.log(`${template.name}: ${template.description}`);
86
+ }
87
+ }
88
+ async function commandSetup(args) {
89
+ const target = requiredArg(args[0], "setup target");
90
+ if (target !== "codex") {
91
+ throw new CofounderError(`Unknown setup target: ${target}`);
92
+ }
93
+ if (args.includes("--install")) {
94
+ const command = await installCodexMcp();
95
+ console.log(`installed ${command}`);
96
+ return;
97
+ }
98
+ console.log(formatCodexSetup());
99
+ }
100
+ async function commandTeam() {
101
+ console.log(formatTeam(await listTeam()));
102
+ }
103
+ async function commandRun(args) {
104
+ const { memberId, task, caller } = parseMemberTask(args, { defaultCaller: "lead" });
105
+ const finalRecord = await runMember(memberId, task, { caller, streamToConsole: true });
106
+ await printTaskResult(finalRecord.id);
107
+ }
108
+ async function commandDelegate(args) {
109
+ const { memberId, task, caller } = parseMemberTask(args, { defaultCaller: "lead" });
110
+ const record = await delegateMember(memberId, task, { caller });
111
+ console.log(record.id);
112
+ }
113
+ async function commandStatus(args) {
114
+ const taskId = requiredArg(args[0], "task_id");
115
+ console.log(formatTaskStatus(await getTask(taskId)));
116
+ }
117
+ async function commandLogs(args) {
118
+ const taskId = requiredArg(args[0], "task_id");
119
+ const tail = Number(readOption(args, "--tail") ?? "50");
120
+ const entries = await readTaskLogs(taskId, { tail });
121
+ for (const entry of entries) {
122
+ console.log(formatLogEntry(entry));
123
+ }
124
+ }
125
+ async function commandDiff(args) {
126
+ const taskId = requiredArg(args[0], "task_id");
127
+ const patch = await readTaskPatch(taskId);
128
+ process.stdout.write(patch);
129
+ }
130
+ async function commandApply(args) {
131
+ const taskId = requiredArg(args[0], "task_id");
132
+ const result = await applyTaskPatch(taskId);
133
+ console.log(`applied ${result.files.length} file(s) from ${taskId}`);
134
+ console.log(`patch: ${result.patch_path}`);
135
+ if (result.files.length > 0) {
136
+ console.log(`files: ${result.files.join(", ")}`);
137
+ }
138
+ }
139
+ async function commandWatch(args) {
140
+ const taskId = requiredArg(args[0], "task_id");
141
+ let offset = 0;
142
+ while (true) {
143
+ const task = await getTask(taskId);
144
+ const content = await readTaskEventContent(taskId);
145
+ const next = content.slice(offset);
146
+ offset = content.length;
147
+ for (const line of next.split("\n").filter(Boolean)) {
148
+ console.log(formatLogEntry(JSON.parse(line)));
149
+ }
150
+ if (["succeeded", "failed", "cancelled"].includes(task.status)) {
151
+ break;
152
+ }
153
+ await sleep(750);
154
+ }
155
+ }
156
+ async function commandCancel(args) {
157
+ const taskId = requiredArg(args[0], "task_id");
158
+ console.log(formatTaskStatus(await cancelTask(taskId)));
159
+ }
160
+ async function commandInterrupt(args) {
161
+ const taskId = requiredArg(args[0], "task_id");
162
+ const message = args.slice(1).join(" ").trim();
163
+ if (!message) {
164
+ throw new CofounderError("Missing interrupt message");
165
+ }
166
+ const record = await interruptTask(taskId, message);
167
+ console.log(record.id);
168
+ }
169
+ function commandCapabilities() {
170
+ console.log(JSON.stringify(getCapabilities(), null, 2));
171
+ }
172
+ async function commandWorker(args) {
173
+ const taskId = requiredArg(args[0], "task_id");
174
+ await runWorkerTask(taskId);
175
+ }
176
+ async function printTaskResult(taskId) {
177
+ const result = await readTaskResult(taskId);
178
+ if (result.trim().length > 0) {
179
+ console.log("\n--- result ---");
180
+ console.log(result.trim());
181
+ }
182
+ }
183
+ function parseMemberTask(args, options) {
184
+ const caller = readOption(args, "--caller") ?? options.defaultCaller;
185
+ const positional = stripOptions(args, ["--caller"]);
186
+ const memberId = requiredArg(positional[0], "member");
187
+ const task = positional.slice(1).join(" ").trim();
188
+ if (!task) {
189
+ throw new CofounderError("Missing task text");
190
+ }
191
+ return { memberId, task, caller };
192
+ }
193
+ function readOption(args, name) {
194
+ const index = args.indexOf(name);
195
+ if (index === -1) {
196
+ return undefined;
197
+ }
198
+ return args[index + 1];
199
+ }
200
+ function stripOptions(args, optionNames) {
201
+ const result = [];
202
+ for (let index = 0; index < args.length; index += 1) {
203
+ if (optionNames.includes(args[index])) {
204
+ index += 1;
205
+ continue;
206
+ }
207
+ result.push(args[index]);
208
+ }
209
+ return result;
210
+ }
211
+ function requiredArg(value, name) {
212
+ if (!value) {
213
+ throw new CofounderError(`Missing ${name}`);
214
+ }
215
+ return value;
216
+ }
217
+ function sleep(ms) {
218
+ return new Promise((resolve) => setTimeout(resolve, ms));
219
+ }
220
+ function printHelp() {
221
+ console.log(`Usage:
222
+ cofounder init
223
+ cofounder init --template <default|worktree>
224
+ cofounder templates
225
+ cofounder setup codex
226
+ cofounder setup codex --install
227
+ cofounder team
228
+ cofounder run <member> <task>
229
+ cofounder delegate <member> <task> [--caller <member>]
230
+ cofounder status <task_id>
231
+ cofounder logs <task_id> [--tail <n>]
232
+ cofounder diff <task_id>
233
+ cofounder apply <task_id>
234
+ cofounder watch <task_id>
235
+ cofounder cancel <task_id>
236
+ cofounder interrupt <task_id> <message>
237
+ cofounder capabilities
238
+ cofounder mcp
239
+ `);
240
+ }
241
+ main().catch((error) => {
242
+ if (error instanceof CofounderError) {
243
+ console.error(`error: ${error.message}`);
244
+ process.exitCode = 1;
245
+ return;
246
+ }
247
+ throw error;
248
+ });
249
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,OAAO,EACP,aAAa,EACb,QAAQ,EACR,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,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CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,KAAyB,EAAE,IAAY;IAC1D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,cAAc,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;CAkBb,CAAC,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACzC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IACD,MAAM,KAAK,CAAC;AACd,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { PreparedCodexConfig } from "./codexConfig.js";
2
+ import type { CodexCommand, MemberDefinition, MemberSettings, RunnerCapabilities, TaskRecord } from "./types.js";
3
+ export declare const CODEX_CAPABILITIES: RunnerCapabilities;
4
+ export declare function buildCodexCommand(task: TaskRecord, member: MemberDefinition, settings: MemberSettings, codexConfig?: PreparedCodexConfig): CodexCommand;
5
+ export declare function runCodexTask(task: TaskRecord, member: MemberDefinition, settings: MemberSettings, options?: {
6
+ streamToConsole?: boolean;
7
+ codexConfig?: PreparedCodexConfig;
8
+ }): Promise<TaskRecord>;