@divaltor/academy 0.1.5 → 0.1.6
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/package.json +1 -1
- package/src/index.ts +3 -26
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ Add Academy to `opencode.jsonc`. Each agent can override its display name and co
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
Colors accept six-digit hex values or OpenCode theme colors: `primary`, `secondary`, `accent`, `success`, `warning`, `error`, and `info`. You can alternatively set a color with OpenCode's native `agents.<id>.color` configuration. Custom names also update persona references. Agent IDs are `rudolf`, `bourbon`, `agnes`, `cafe`, `dantsu`, and `bellno`.
|
|
39
|
+
Colors accept six-digit hex values or OpenCode theme colors: `primary`, `secondary`, `accent`, `success`, `warning`, `error`, and `info`. You can alternatively set a color with OpenCode's native `agents.<id>.color` configuration. Custom names also update persona references. Agent IDs are `rudolf`, `bourbon`, `agnes`, `cafe`, `dantsu`, and `bellno`. See the [plugin docs](https://opencode.ai/v2/docs/build/plugins) to learn more.
|
|
40
40
|
|
|
41
41
|
### Private GitHub repositories
|
|
42
42
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divaltor/academy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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
|
@@ -9,23 +9,11 @@ const AgentOptions = Schema.Struct({
|
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
const AcademyOptions = Schema.Struct({
|
|
12
|
-
agentNames: Schema.optionalKey(
|
|
13
|
-
Schema.Struct({
|
|
14
|
-
agnes: Schema.optionalKey(Schema.NonEmptyString),
|
|
15
|
-
bellno: Schema.optionalKey(Schema.NonEmptyString),
|
|
16
|
-
bourbon: Schema.optionalKey(Schema.NonEmptyString),
|
|
17
|
-
cafe: Schema.optionalKey(Schema.NonEmptyString),
|
|
18
|
-
dantsu: Schema.optionalKey(Schema.NonEmptyString),
|
|
19
|
-
diana: Schema.optionalKey(Schema.NonEmptyString),
|
|
20
|
-
rudolf: Schema.optionalKey(Schema.NonEmptyString),
|
|
21
|
-
})
|
|
22
|
-
),
|
|
23
12
|
agnes: Schema.optionalKey(AgentOptions),
|
|
24
13
|
bellno: Schema.optionalKey(AgentOptions),
|
|
25
14
|
bourbon: Schema.optionalKey(AgentOptions),
|
|
26
15
|
cafe: Schema.optionalKey(AgentOptions),
|
|
27
16
|
dantsu: Schema.optionalKey(AgentOptions),
|
|
28
|
-
diana: Schema.optionalKey(AgentOptions),
|
|
29
17
|
rudolf: Schema.optionalKey(AgentOptions),
|
|
30
18
|
});
|
|
31
19
|
|
|
@@ -36,16 +24,8 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
36
24
|
const options = yield* Schema.decodeUnknownEffect(AcademyOptions, {
|
|
37
25
|
onExcessProperty: "error",
|
|
38
26
|
})(ctx.options).pipe(Effect.orDie);
|
|
39
|
-
const legacyNames = options.agentNames ?? {};
|
|
40
27
|
const agentNames = new Map(
|
|
41
|
-
agents.map((agent) => [
|
|
42
|
-
agent.name,
|
|
43
|
-
options[agent.id]?.name ??
|
|
44
|
-
(agent.id === "rudolf" ? options.diana?.name : undefined) ??
|
|
45
|
-
legacyNames[agent.id] ??
|
|
46
|
-
(agent.id === "rudolf" ? legacyNames.diana : undefined) ??
|
|
47
|
-
agent.name,
|
|
48
|
-
])
|
|
28
|
+
agents.map((agent) => [agent.name, options[agent.id]?.name ?? agent.name])
|
|
49
29
|
);
|
|
50
30
|
|
|
51
31
|
yield* ctx.mcp.transform((editor) => {
|
|
@@ -65,7 +45,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
65
45
|
});
|
|
66
46
|
|
|
67
47
|
yield* ctx.agent.transform((editor) => {
|
|
68
|
-
for (const id of ["build", "plan", "explore", "general"
|
|
48
|
+
for (const id of ["build", "plan", "explore", "general"]) {
|
|
69
49
|
editor.remove(id);
|
|
70
50
|
}
|
|
71
51
|
|
|
@@ -77,10 +57,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
77
57
|
agent.description = definition.description;
|
|
78
58
|
agent.mode = definition.mode;
|
|
79
59
|
agent.color =
|
|
80
|
-
options[definition.id]?.color ??
|
|
81
|
-
(definition.id === "rudolf" ? options.diana?.color : undefined) ??
|
|
82
|
-
agent.color ??
|
|
83
|
-
definition.color;
|
|
60
|
+
options[definition.id]?.color ?? agent.color ?? definition.color;
|
|
84
61
|
agent.system = definition.system.replaceAll(
|
|
85
62
|
/\b(?:Rudolf|Agnes|Bourbon|Cafe|Dantsu|Bellno)\b/gu,
|
|
86
63
|
(name) => agentNames.get(name) ?? name
|