@divaltor/academy 0.3.2 → 0.3.3
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 +8 -6
- package/package.json +1 -1
- package/src/index.ts +15 -7
package/README.md
CHANGED
|
@@ -23,10 +23,12 @@ Add Academy to `opencode.jsonc`. All options are optional:
|
|
|
23
23
|
{
|
|
24
24
|
"package": "@divaltor/academy",
|
|
25
25
|
"options": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
"agents": {
|
|
27
|
+
"rudolf": {
|
|
28
|
+
"name": "Emperor",
|
|
29
|
+
"color": "#8994B8",
|
|
30
|
+
"model": "anthropic/claude-opus-4-1#max",
|
|
31
|
+
},
|
|
30
32
|
},
|
|
31
33
|
"communication": {
|
|
32
34
|
"thread_summary": "opencode-go/glm-5.3-flash",
|
|
@@ -38,9 +40,9 @@ Add Academy to `opencode.jsonc`. All options are optional:
|
|
|
38
40
|
}
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
Each agent accepts `name`, `color`, and `model`. Colors may be six-digit hex values or OpenCode theme colors. Model references use `provider/model` or `provider/model#variant`.
|
|
43
|
+
Each agent under `agents` accepts `name`, `color`, and `model`. Colors may be six-digit hex values or OpenCode theme colors. Model references use `provider/model` or `provider/model#variant`.
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
`use_fff` replaces OpenCode's built-in `glob` and `grep` tools globally with [FFF](https://github.com/d-kimuson/fff.nvim) for every agent. Enabled by default; set to `false` to keep the built-in tools. This requires a platform supported by `@ff-labs/fff-bun`.
|
|
44
46
|
|
|
45
47
|
| Agent | Default model |
|
|
46
48
|
| ------ | ----------------------------- |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divaltor/academy",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "An OpenCode plugin that trains a Tracen Academy roster of specialist coding agents to research, build, and review.",
|
|
5
5
|
"homepage": "https://github.com/divaltor/academy#readme",
|
|
6
6
|
"bugs": {
|
package/src/index.ts
CHANGED
|
@@ -18,13 +18,17 @@ const AgentOptions = Schema.Struct({
|
|
|
18
18
|
name: Schema.optionalKey(Schema.NonEmptyString),
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const AgentsOptions = Schema.Struct({
|
|
22
22
|
agnes: Schema.optionalKey(AgentOptions),
|
|
23
23
|
bellno: Schema.optionalKey(AgentOptions),
|
|
24
24
|
cafe: Schema.optionalKey(AgentOptions),
|
|
25
|
-
communication: Schema.optionalKey(SessionCommunication.Options),
|
|
26
25
|
dantsu: Schema.optionalKey(AgentOptions),
|
|
27
26
|
rudolf: Schema.optionalKey(AgentOptions),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const AcademyOptions = Schema.Struct({
|
|
30
|
+
agents: Schema.optionalKey(AgentsOptions),
|
|
31
|
+
communication: Schema.optionalKey(SessionCommunication.Options),
|
|
28
32
|
use_fff: Schema.optionalKey(Schema.Boolean),
|
|
29
33
|
});
|
|
30
34
|
|
|
@@ -35,11 +39,15 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
35
39
|
const options = yield* Schema.decodeUnknownEffect(AcademyOptions, {
|
|
36
40
|
onExcessProperty: "error",
|
|
37
41
|
})(ctx.options).pipe(Effect.orDie);
|
|
42
|
+
const agentOptions = options.agents ?? {};
|
|
38
43
|
const agentNames = new Map(
|
|
39
|
-
agents.map((agent) => [
|
|
44
|
+
agents.map((agent) => [
|
|
45
|
+
agent.name,
|
|
46
|
+
agentOptions[agent.id]?.name ?? agent.name,
|
|
47
|
+
])
|
|
40
48
|
);
|
|
41
49
|
const agentID = (id: (typeof agents)[number]["id"]) =>
|
|
42
|
-
Agent.ID.make(
|
|
50
|
+
Agent.ID.make(agentOptions[id]?.name ?? id);
|
|
43
51
|
const configuredAgentIDs = agents.map((agent) => agentID(agent.id));
|
|
44
52
|
|
|
45
53
|
if (new Set(configuredAgentIDs).size !== configuredAgentIDs.length) {
|
|
@@ -64,7 +72,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
64
72
|
});
|
|
65
73
|
});
|
|
66
74
|
|
|
67
|
-
if (options.use_fff) {
|
|
75
|
+
if (options.use_fff ?? true) {
|
|
68
76
|
yield* FffTools.register(ctx);
|
|
69
77
|
}
|
|
70
78
|
|
|
@@ -87,7 +95,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
87
95
|
agent.description = definition.description;
|
|
88
96
|
agent.mode = definition.mode;
|
|
89
97
|
agent.color =
|
|
90
|
-
|
|
98
|
+
agentOptions[definition.id]?.color ?? agent.color ?? definition.color;
|
|
91
99
|
agent.system = definition.system.replaceAll(
|
|
92
100
|
/\b(?:Rudolf|Agnes|Cafe|Dantsu|Bellno)\b/gu,
|
|
93
101
|
(name) => agentNames.get(name) ?? name
|
|
@@ -105,7 +113,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
105
113
|
};
|
|
106
114
|
});
|
|
107
115
|
agent.model = parseModel(
|
|
108
|
-
|
|
116
|
+
agentOptions[definition.id]?.model ?? definition.model
|
|
109
117
|
);
|
|
110
118
|
});
|
|
111
119
|
}
|