@divaltor/academy 0.1.1 → 0.1.4
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 +7 -11
- package/package.json +1 -1
- package/src/agents/bourbon.txt +1 -1
- package/src/agents/diana.txt +1 -1
- package/src/agents.ts +22 -3
- package/src/index.ts +19 -5
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Inspired by _Umamusume: Pretty Derby_, Academy gives OpenCode a focused team of
|
|
|
8
8
|
|
|
9
9
|
Academy registers a focused roster of Umamusume agents:
|
|
10
10
|
|
|
11
|
-
- **
|
|
11
|
+
- **Rudolf** — default primary coding agent, replacing OpenCode's Build agent
|
|
12
12
|
- **Bourbon** — general-purpose implementation and validation subagent
|
|
13
13
|
- **Agnes** — Oracle-style technical advisor
|
|
14
14
|
- **Cafe** — Librarian-style external researcher
|
|
@@ -17,7 +17,7 @@ Academy registers a focused roster of Umamusume agents:
|
|
|
17
17
|
|
|
18
18
|
## Configuration
|
|
19
19
|
|
|
20
|
-
Add Academy to `opencode.jsonc`.
|
|
20
|
+
Add Academy to `opencode.jsonc`. Each agent can override its display name and color; omit an agent or field to keep the Academy default:
|
|
21
21
|
|
|
22
22
|
```jsonc
|
|
23
23
|
{
|
|
@@ -26,13 +26,9 @@ Add Academy to `opencode.jsonc`. Agent names are optional; omit `agentNames` or
|
|
|
26
26
|
{
|
|
27
27
|
"package": "@divaltor/academy",
|
|
28
28
|
"options": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"agnes": "Agnes",
|
|
33
|
-
"cafe": "Cafe",
|
|
34
|
-
"dantsu": "Dantsu",
|
|
35
|
-
"bellno": "Bellno",
|
|
29
|
+
"diana": {
|
|
30
|
+
"name": "Emperor",
|
|
31
|
+
"color": "#8994B8",
|
|
36
32
|
},
|
|
37
33
|
},
|
|
38
34
|
},
|
|
@@ -40,11 +36,11 @@ Add Academy to `opencode.jsonc`. Agent names are optional; omit `agentNames` or
|
|
|
40
36
|
}
|
|
41
37
|
```
|
|
42
38
|
|
|
43
|
-
|
|
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. Stable IDs (`diana`, `bourbon`, `agnes`, `cafe`, `dantsu`, and `bellno`) remain unchanged for permissions and invocation. The previous `agentNames` option remains supported for compatibility. See the [plugin docs](https://opencode.ai/v2/docs/build/plugins) to learn more.
|
|
44
40
|
|
|
45
41
|
### Private GitHub repositories
|
|
46
42
|
|
|
47
|
-
Academy connects Cafe,
|
|
43
|
+
Academy connects Cafe, Rudolf, and Bellno to GitHub's official MCP server in read-only mode when `GITHUB_TOKEN` is set. Use a dedicated fine-grained personal access token limited to the required repositories, with read-only Contents, Issues, and Pull requests permissions:
|
|
48
44
|
|
|
49
45
|
```bash
|
|
50
46
|
export GITHUB_TOKEN="github_pat_..."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divaltor/academy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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/agents/bourbon.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
You are **Bourbon**, a task-execution agent modeled on
|
|
1
|
+
You are **Bourbon**, a task-execution agent modeled on Rudolf. Execute the delegated task directly and return correct, scoped results.
|
|
2
2
|
|
|
3
3
|
# Authorization
|
|
4
4
|
|
package/src/agents/diana.txt
CHANGED
package/src/agents.ts
CHANGED
|
@@ -11,8 +11,17 @@ interface Permission {
|
|
|
11
11
|
readonly effect: "allow" | "ask" | "deny";
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
const agentIds = [
|
|
15
|
+
"agnes",
|
|
16
|
+
"bellno",
|
|
17
|
+
"bourbon",
|
|
18
|
+
"cafe",
|
|
19
|
+
"dantsu",
|
|
20
|
+
"diana",
|
|
21
|
+
] as const;
|
|
22
|
+
|
|
14
23
|
interface AcademyAgent {
|
|
15
|
-
readonly id:
|
|
24
|
+
readonly id: (typeof agentIds)[number];
|
|
16
25
|
readonly name: string;
|
|
17
26
|
readonly description: string;
|
|
18
27
|
readonly mode: "primary" | "subagent";
|
|
@@ -26,15 +35,20 @@ interface AcademyAgent {
|
|
|
26
35
|
readonly permissions: readonly Permission[];
|
|
27
36
|
}
|
|
28
37
|
|
|
38
|
+
const defaultPermissions: readonly Permission[] = [
|
|
39
|
+
{ action: "*", effect: "allow", resource: "*" },
|
|
40
|
+
];
|
|
41
|
+
|
|
29
42
|
export const agents: readonly AcademyAgent[] = [
|
|
30
43
|
{
|
|
31
|
-
color: "#
|
|
44
|
+
color: "#6678A4",
|
|
32
45
|
description:
|
|
33
46
|
"Primary agent for scoped implementation, research, and delegation.",
|
|
34
47
|
id: "diana",
|
|
35
48
|
mode: "primary",
|
|
36
|
-
name: "
|
|
49
|
+
name: "Rudolf",
|
|
37
50
|
permissions: [
|
|
51
|
+
...defaultPermissions,
|
|
38
52
|
{ action: "todowrite", effect: "deny", resource: "*" },
|
|
39
53
|
{ action: "websearch", effect: "allow", resource: "*" },
|
|
40
54
|
{ action: "webfetch", effect: "allow", resource: "*" },
|
|
@@ -59,6 +73,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
59
73
|
mode: "subagent",
|
|
60
74
|
name: "Bourbon",
|
|
61
75
|
permissions: [
|
|
76
|
+
...defaultPermissions,
|
|
62
77
|
{ action: "subagent", effect: "deny", resource: "*" },
|
|
63
78
|
{ action: "todowrite", effect: "deny", resource: "*" },
|
|
64
79
|
{ action: "question", effect: "deny", resource: "*" },
|
|
@@ -78,6 +93,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
78
93
|
model: { id: "gpt-6-astra", providerID: "openai", variant: "xhigh" },
|
|
79
94
|
name: "Agnes",
|
|
80
95
|
permissions: [
|
|
96
|
+
...defaultPermissions,
|
|
81
97
|
{ action: "edit", effect: "deny", resource: "*" },
|
|
82
98
|
{ action: "shell", effect: "deny", resource: "*" },
|
|
83
99
|
{ action: "subagent", effect: "deny", resource: "*" },
|
|
@@ -101,6 +117,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
101
117
|
model: { id: "gpt-5.6-sol", providerID: "openai", variant: "none" },
|
|
102
118
|
name: "Cafe",
|
|
103
119
|
permissions: [
|
|
120
|
+
...defaultPermissions,
|
|
104
121
|
{ action: "edit", effect: "deny", resource: "*" },
|
|
105
122
|
{ action: "shell", effect: "deny", resource: "*" },
|
|
106
123
|
{ action: "subagent", effect: "deny", resource: "*" },
|
|
@@ -122,6 +139,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
122
139
|
model: { id: "gpt-5.6-terra", providerID: "openai", variant: "low" },
|
|
123
140
|
name: "Dantsu",
|
|
124
141
|
permissions: [
|
|
142
|
+
...defaultPermissions,
|
|
125
143
|
{ action: "edit", effect: "deny", resource: "*" },
|
|
126
144
|
{ action: "subagent", effect: "deny", resource: "*" },
|
|
127
145
|
{ action: "todowrite", effect: "deny", resource: "*" },
|
|
@@ -142,6 +160,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
142
160
|
model: { id: "gpt-5.6-sol", providerID: "openai", variant: "high" },
|
|
143
161
|
name: "Bellno",
|
|
144
162
|
permissions: [
|
|
163
|
+
...defaultPermissions,
|
|
145
164
|
{ action: "edit", effect: "deny", resource: "*" },
|
|
146
165
|
{ action: "subagent", effect: "deny", resource: "*" },
|
|
147
166
|
{ action: "todowrite", effect: "deny", resource: "*" },
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,11 @@ import { Config, Effect, Option, Redacted, Schema } from "effect";
|
|
|
3
3
|
|
|
4
4
|
import { agents } from "./agents";
|
|
5
5
|
|
|
6
|
+
const AgentOptions = Schema.Struct({
|
|
7
|
+
color: Schema.optionalKey(Agent.Color),
|
|
8
|
+
name: Schema.optionalKey(Schema.NonEmptyString),
|
|
9
|
+
});
|
|
10
|
+
|
|
6
11
|
const AcademyOptions = Schema.Struct({
|
|
7
12
|
agentNames: Schema.optionalKey(
|
|
8
13
|
Schema.Struct({
|
|
@@ -14,6 +19,12 @@ const AcademyOptions = Schema.Struct({
|
|
|
14
19
|
diana: Schema.optionalKey(Schema.NonEmptyString),
|
|
15
20
|
})
|
|
16
21
|
),
|
|
22
|
+
agnes: Schema.optionalKey(AgentOptions),
|
|
23
|
+
bellno: Schema.optionalKey(AgentOptions),
|
|
24
|
+
bourbon: Schema.optionalKey(AgentOptions),
|
|
25
|
+
cafe: Schema.optionalKey(AgentOptions),
|
|
26
|
+
dantsu: Schema.optionalKey(AgentOptions),
|
|
27
|
+
diana: Schema.optionalKey(AgentOptions),
|
|
17
28
|
});
|
|
18
29
|
|
|
19
30
|
const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
@@ -23,10 +34,12 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
23
34
|
const options = yield* Schema.decodeUnknownEffect(AcademyOptions, {
|
|
24
35
|
onExcessProperty: "error",
|
|
25
36
|
})(ctx.options).pipe(Effect.orDie);
|
|
26
|
-
const
|
|
27
|
-
options.agentNames ?? {};
|
|
37
|
+
const legacyNames = options.agentNames ?? {};
|
|
28
38
|
const agentNames = new Map(
|
|
29
|
-
agents.map((agent) => [
|
|
39
|
+
agents.map((agent) => [
|
|
40
|
+
agent.name,
|
|
41
|
+
options[agent.id]?.name ?? legacyNames[agent.id] ?? agent.name,
|
|
42
|
+
])
|
|
30
43
|
);
|
|
31
44
|
|
|
32
45
|
yield* ctx.mcp.transform((editor) => {
|
|
@@ -57,9 +70,10 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
57
70
|
);
|
|
58
71
|
agent.description = definition.description;
|
|
59
72
|
agent.mode = definition.mode;
|
|
60
|
-
agent.color =
|
|
73
|
+
agent.color =
|
|
74
|
+
options[definition.id]?.color ?? agent.color ?? definition.color;
|
|
61
75
|
agent.system = definition.system.replaceAll(
|
|
62
|
-
/\b(?:
|
|
76
|
+
/\b(?:Rudolf|Agnes|Bourbon|Cafe|Dantsu|Bellno)\b/gu,
|
|
63
77
|
(name) => agentNames.get(name) ?? name
|
|
64
78
|
);
|
|
65
79
|
agent.permissions = definition.permissions.map((permission) => ({
|