@divaltor/academy 0.2.2 → 0.2.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 +13 -2
- package/package.json +1 -1
- package/src/agents.ts +5 -9
- package/src/index.ts +12 -8
- package/src/session-communication.ts +0 -1
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ Add Academy to `opencode.jsonc`. All options are optional:
|
|
|
26
26
|
"rudolf": {
|
|
27
27
|
"name": "Emperor",
|
|
28
28
|
"color": "#8994B8",
|
|
29
|
+
"model": "anthropic/claude-opus-4-1#max",
|
|
29
30
|
},
|
|
30
31
|
"communication": {
|
|
31
32
|
"thread_summary": "opencode-go/glm-5.3-flash",
|
|
@@ -36,9 +37,19 @@ Add Academy to `opencode.jsonc`. All options are optional:
|
|
|
36
37
|
}
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
Each agent accepts `name` and `
|
|
40
|
+
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`.
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
| Agent | Default model |
|
|
43
|
+
| ------ | ----------------------------- |
|
|
44
|
+
| Rudolf | OpenCode's configured default |
|
|
45
|
+
| Agnes | `openai/gpt-6-astra#xhigh` |
|
|
46
|
+
| Cafe | `openai/gpt-5.6-sol#none` |
|
|
47
|
+
| Dantsu | `openai/gpt-5.6-terra#low` |
|
|
48
|
+
| Bellno | `openai/gpt-5.6-sol#high` |
|
|
49
|
+
|
|
50
|
+
> [!WARNING]
|
|
51
|
+
>
|
|
52
|
+
> An agent's name is also its session ID. Renaming it can prevent existing sessions from continuing.
|
|
42
53
|
|
|
43
54
|
Session tools are available under Code Mode's `academy` namespace. Only the root primary session can create threads; omit `agent` for a general coding session. `find_thread` searches Academy-created sessions only.
|
|
44
55
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divaltor/academy",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.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.ts
CHANGED
|
@@ -19,11 +19,7 @@ interface AcademyAgent {
|
|
|
19
19
|
readonly mode: "primary" | "subagent";
|
|
20
20
|
readonly color: string;
|
|
21
21
|
readonly system: string;
|
|
22
|
-
readonly model?:
|
|
23
|
-
readonly providerID: string;
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly variant: string;
|
|
26
|
-
};
|
|
22
|
+
readonly model?: string;
|
|
27
23
|
readonly permissions: readonly Permission[];
|
|
28
24
|
}
|
|
29
25
|
|
|
@@ -67,7 +63,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
67
63
|
"Oracle-style read-only advisor for architecture decisions, debugging, alternatives, and high-impact plans.",
|
|
68
64
|
id: "agnes",
|
|
69
65
|
mode: "subagent",
|
|
70
|
-
model:
|
|
66
|
+
model: "openai/gpt-6-astra#xhigh",
|
|
71
67
|
name: "Agnes",
|
|
72
68
|
permissions: [
|
|
73
69
|
...defaultPermissions,
|
|
@@ -92,7 +88,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
92
88
|
"Librarian-style external research for official docs, API behavior, dependency internals, and remote repositories.",
|
|
93
89
|
id: "cafe",
|
|
94
90
|
mode: "subagent",
|
|
95
|
-
model:
|
|
91
|
+
model: "openai/gpt-5.6-sol#none",
|
|
96
92
|
name: "Cafe",
|
|
97
93
|
permissions: [
|
|
98
94
|
...defaultPermissions,
|
|
@@ -115,7 +111,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
115
111
|
"Finder-style local codebase discovery by behavior, ownership boundary, and call or data flow.",
|
|
116
112
|
id: "dantsu",
|
|
117
113
|
mode: "subagent",
|
|
118
|
-
model:
|
|
114
|
+
model: "openai/gpt-5.6-terra#low",
|
|
119
115
|
name: "Dantsu",
|
|
120
116
|
permissions: [
|
|
121
117
|
...defaultPermissions,
|
|
@@ -137,7 +133,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
137
133
|
"Read-only general reviewer for complete, systematic reviews of diffs, commits, branches, and pull requests.",
|
|
138
134
|
id: "bellno",
|
|
139
135
|
mode: "subagent",
|
|
140
|
-
model:
|
|
136
|
+
model: "openai/gpt-5.6-sol#high",
|
|
141
137
|
name: "Bellno",
|
|
142
138
|
permissions: [
|
|
143
139
|
...defaultPermissions,
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { Agent, Model, Plugin
|
|
1
|
+
import { Agent, Model, Plugin } from "@opencode/plugin/effect";
|
|
2
2
|
import { Config, Effect, Option, Redacted, Schema } from "effect";
|
|
3
3
|
|
|
4
4
|
import { agents } from "./agents";
|
|
5
5
|
import { SessionCommunication } from "./session-communication";
|
|
6
6
|
|
|
7
|
+
const ModelReference = Schema.NonEmptyString.check(
|
|
8
|
+
Schema.isPattern(/^[^/#]+\/[^#]+(?:#[^#]+)?$/u)
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
const parseModel = (reference: string | undefined) =>
|
|
12
|
+
reference ? Model.Ref.parse(reference) : undefined;
|
|
13
|
+
|
|
7
14
|
const AgentOptions = Schema.Struct({
|
|
8
15
|
color: Schema.optionalKey(Agent.Color),
|
|
16
|
+
model: Schema.optionalKey(ModelReference),
|
|
9
17
|
name: Schema.optionalKey(Schema.NonEmptyString),
|
|
10
18
|
});
|
|
11
19
|
|
|
@@ -90,13 +98,9 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
90
98
|
: permission.resource,
|
|
91
99
|
};
|
|
92
100
|
});
|
|
93
|
-
agent.model =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
providerID: Provider.ID.make(definition.model.providerID),
|
|
97
|
-
variant: Model.VariantID.make(definition.model.variant),
|
|
98
|
-
}
|
|
99
|
-
: undefined;
|
|
101
|
+
agent.model = parseModel(
|
|
102
|
+
options[definition.id]?.model ?? definition.model
|
|
103
|
+
);
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
|
|
@@ -214,7 +214,6 @@ export namespace SessionCommunication {
|
|
|
214
214
|
`${input.agent ?? "session"}: ${input.prompt.slice(0, 72)}`;
|
|
215
215
|
const thread = yield* ctx.session.create({
|
|
216
216
|
agent: input.agent,
|
|
217
|
-
location: ctx.location,
|
|
218
217
|
metadata: { academyParentSessionID: context.sessionID },
|
|
219
218
|
model: parent.model,
|
|
220
219
|
title,
|