@hueyexe/opencode-ensemble 0.3.0 → 0.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.
- package/README.md +1 -1
- package/dist/index.js +10 -16
- package/package.json +1 -1
- package/src/tools/team-create.ts +1 -1
- package/src/tools/team-spawn.ts +1 -1
- package/src/tools/team-status.ts +2 -2
- package/src/tools/team-view.ts +3 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenCode Ensemble
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run a team of parallel AI agents in OpenCode. Each agent gets its own session, context window, and task. They coordinate through messaging and a shared task board.
|
|
4
4
|
|
|
5
5
|
Built as a plugin on the public OpenCode SDK. Zero internal dependencies.
|
|
6
6
|
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __returnValue = (v) => v;
|
|
4
|
-
function __exportSetter(name, newValue) {
|
|
5
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
-
}
|
|
7
3
|
var __export = (target, all) => {
|
|
8
4
|
for (var name in all)
|
|
9
5
|
__defProp(target, name, {
|
|
10
6
|
get: all[name],
|
|
11
7
|
enumerable: true,
|
|
12
8
|
configurable: true,
|
|
13
|
-
set:
|
|
9
|
+
set: (newValue) => all[name] = () => newValue
|
|
14
10
|
});
|
|
15
11
|
};
|
|
16
12
|
|
|
@@ -12743,7 +12739,7 @@ async function executeTeamCreate(deps, args, sessionId) {
|
|
|
12743
12739
|
const id = generateId("team");
|
|
12744
12740
|
const now = Date.now();
|
|
12745
12741
|
deps.db.run("INSERT INTO team (id, name, lead_session_id, status, delegate, time_created, time_updated) VALUES (?, ?, ?, 'active', 0, ?, ?)", [id, args.name, sessionId, now, now]);
|
|
12746
|
-
return `Team "${args.name}" created
|
|
12742
|
+
return `Team "${args.name}" created. You are the lead. Use team_spawn to add teammates.`;
|
|
12747
12743
|
}
|
|
12748
12744
|
|
|
12749
12745
|
// src/tools/team-spawn.ts
|
|
@@ -12811,7 +12807,7 @@ async function executeTeamSpawn(deps, args, sessionId) {
|
|
|
12811
12807
|
} catch {}
|
|
12812
12808
|
throw new Error(`Failed to send initial prompt to teammate "${args.name}": ${err instanceof Error ? err.message : String(err)}`);
|
|
12813
12809
|
}
|
|
12814
|
-
return `Teammate "${args.name}" spawned (agent: ${args.agent}).
|
|
12810
|
+
return `Teammate "${args.name}" spawned (agent: ${args.agent}). They are working on: ${args.prompt.slice(0, 120)}${args.prompt.length > 120 ? "..." : ""}`;
|
|
12815
12811
|
}
|
|
12816
12812
|
|
|
12817
12813
|
// src/tools/team-message.ts
|
|
@@ -13065,7 +13061,7 @@ async function executeTeamStatus(deps, sessionId) {
|
|
|
13065
13061
|
const now = Date.now();
|
|
13066
13062
|
const last = lastCallTime.get(teamInfo.teamId);
|
|
13067
13063
|
if (last !== undefined && now - last < RATE_LIMIT_MS) {
|
|
13068
|
-
return "
|
|
13064
|
+
return "No changes since last check.";
|
|
13069
13065
|
}
|
|
13070
13066
|
lastCallTime.set(teamInfo.teamId, now);
|
|
13071
13067
|
const members = deps.db.query("SELECT name, session_id, agent, status, execution_status FROM team_member WHERE team_id = ? ORDER BY time_created ASC").all(teamInfo.teamId);
|
|
@@ -13110,9 +13106,7 @@ async function executeTeamStatus(deps, sessionId) {
|
|
|
13110
13106
|
});
|
|
13111
13107
|
} catch {}
|
|
13112
13108
|
}
|
|
13113
|
-
return `
|
|
13114
|
-
|
|
13115
|
-
` + lines.join(`
|
|
13109
|
+
return lines.join(`
|
|
13116
13110
|
`);
|
|
13117
13111
|
}
|
|
13118
13112
|
|
|
@@ -13125,11 +13119,11 @@ async function executeTeamView(deps, args, sessionId) {
|
|
|
13125
13119
|
if (!member)
|
|
13126
13120
|
throw new Error(`Teammate "${args.member}" not found in team "${teamInfo.teamName}"`);
|
|
13127
13121
|
try {
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13122
|
+
await deps.client.tui.selectSession({ sessionID: member.session_id });
|
|
13123
|
+
return `Switched to ${args.member}'s session.`;
|
|
13124
|
+
} catch {
|
|
13125
|
+
return `Could not switch to ${args.member}'s session (${member.session_id}). The session may not be accessible from the TUI.`;
|
|
13126
|
+
}
|
|
13133
13127
|
}
|
|
13134
13128
|
|
|
13135
13129
|
// src/rate-limit.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hueyexe/opencode-ensemble",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Agent teams for OpenCode — parallel agents with peer-to-peer communication, shared tasks, and coordinated execution",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/tools/team-create.ts
CHANGED
|
@@ -28,5 +28,5 @@ export async function executeTeamCreate(
|
|
|
28
28
|
[id, args.name, sessionId, now, now]
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
-
return `Team "${args.name}" created
|
|
31
|
+
return `Team "${args.name}" created. You are the lead. Use team_spawn to add teammates.`
|
|
32
32
|
}
|
package/src/tools/team-spawn.ts
CHANGED
|
@@ -88,5 +88,5 @@ export async function executeTeamSpawn(
|
|
|
88
88
|
throw new Error(`Failed to send initial prompt to teammate "${args.name}": ${err instanceof Error ? err.message : String(err)}`)
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
return `Teammate "${args.name}" spawned (agent: ${args.agent}).
|
|
91
|
+
return `Teammate "${args.name}" spawned (agent: ${args.agent}). They are working on: ${args.prompt.slice(0, 120)}${args.prompt.length > 120 ? "..." : ""}`
|
|
92
92
|
}
|
package/src/tools/team-status.ts
CHANGED
|
@@ -19,7 +19,7 @@ export async function executeTeamStatus(
|
|
|
19
19
|
const now = Date.now()
|
|
20
20
|
const last = lastCallTime.get(teamInfo.teamId)
|
|
21
21
|
if (last !== undefined && (now - last) < RATE_LIMIT_MS) {
|
|
22
|
-
return "
|
|
22
|
+
return "No changes since last check."
|
|
23
23
|
}
|
|
24
24
|
lastCallTime.set(teamInfo.teamId, now)
|
|
25
25
|
|
|
@@ -80,5 +80,5 @@ export async function executeTeamStatus(
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
return
|
|
83
|
+
return lines.join("\n")
|
|
84
84
|
}
|
package/src/tools/team-view.ts
CHANGED
|
@@ -17,14 +17,10 @@ export async function executeTeamView(
|
|
|
17
17
|
.get(teamInfo.teamId, args.member) as { session_id: string; status: string; agent: string } | null
|
|
18
18
|
if (!member) throw new Error(`Teammate "${args.member}" not found in team "${teamInfo.teamName}"`)
|
|
19
19
|
|
|
20
|
-
// TUI session navigation — try selectSession if available, otherwise guide the user
|
|
21
20
|
try {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
21
|
+
await deps.client.tui.selectSession({ sessionID: member.session_id })
|
|
22
|
+
return `Switched to ${args.member}'s session.`
|
|
25
23
|
} catch {
|
|
26
|
-
|
|
24
|
+
return `Could not switch to ${args.member}'s session (${member.session_id}). The session may not be accessible from the TUI.`
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
return `View ${args.member}'s session: ${member.session_id}. Use the session picker (ctrl+p) to navigate to their session.`
|
|
30
26
|
}
|