@divaltor/academy 0.2.1 → 0.2.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 CHANGED
@@ -26,9 +26,10 @@ 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
- "thread_summary": "opencode/glm-5.3-flash",
32
+ "thread_summary": "opencode-go/glm-5.3-flash",
32
33
  },
33
34
  },
34
35
  },
@@ -36,7 +37,15 @@ Add Academy to `opencode.jsonc`. All options are optional:
36
37
  }
37
38
  ```
38
39
 
39
- Each agent accepts `name` and `color`. Colors may be six-digit hex values or OpenCode theme colors.
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`.
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` |
40
49
 
41
50
  > [!WARNING] An agent's name is also its session ID. Renaming it can prevent existing sessions from continuing.
42
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divaltor/academy",
3
- "version": "0.2.1",
3
+ "version": "0.2.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/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: { id: "gpt-6-astra", providerID: "openai", variant: "xhigh" },
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: { id: "gpt-5.6-sol", providerID: "openai", variant: "none" },
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: { id: "gpt-5.6-terra", providerID: "openai", variant: "low" },
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: { id: "gpt-5.6-sol", providerID: "openai", variant: "high" },
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, Provider } from "@opencode/plugin/effect";
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 = definition.model
94
- ? {
95
- id: Model.ID.make(definition.model.id),
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
 
@@ -29,7 +29,7 @@ export namespace SessionCommunication {
29
29
  >[number];
30
30
 
31
31
  const storagePrefix = "communication/thread/";
32
- const defaultReaderModel = "opencode/glm-5.3-flash";
32
+ const defaultReaderModel = "opencode-go/glm-5.3-flash";
33
33
  const ModelReference = Schema.NonEmptyString.check(
34
34
  Schema.isPattern(/^[^/#]+\/[^#]+(?:#[^#]+)?$/u)
35
35
  );