@divaltor/academy 0.1.4 → 0.1.5

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,7 +26,7 @@ Add Academy to `opencode.jsonc`. Each agent can override its display name and co
26
26
  {
27
27
  "package": "@divaltor/academy",
28
28
  "options": {
29
- "diana": {
29
+ "rudolf": {
30
30
  "name": "Emperor",
31
31
  "color": "#8994B8",
32
32
  },
@@ -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. 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.
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`. The previous `agentNames` option and `diana` plugin option remain supported for compatibility. 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.4",
3
+ "version": "0.1.5",
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
@@ -3,7 +3,7 @@ import bellnoSystem from "./agents/bellno.txt" with { type: "text" };
3
3
  import bourbonSystem from "./agents/bourbon.txt" with { type: "text" };
4
4
  import cafeSystem from "./agents/cafe.txt" with { type: "text" };
5
5
  import dantsuSystem from "./agents/dantsu.txt" with { type: "text" };
6
- import dianaSystem from "./agents/diana.txt" with { type: "text" };
6
+ import rudolfSystem from "./agents/rudolf.txt" with { type: "text" };
7
7
 
8
8
  interface Permission {
9
9
  readonly action: string;
@@ -17,7 +17,7 @@ const agentIds = [
17
17
  "bourbon",
18
18
  "cafe",
19
19
  "dantsu",
20
- "diana",
20
+ "rudolf",
21
21
  ] as const;
22
22
 
23
23
  interface AcademyAgent {
@@ -44,7 +44,7 @@ export const agents: readonly AcademyAgent[] = [
44
44
  color: "#6678A4",
45
45
  description:
46
46
  "Primary agent for scoped implementation, research, and delegation.",
47
- id: "diana",
47
+ id: "rudolf",
48
48
  mode: "primary",
49
49
  name: "Rudolf",
50
50
  permissions: [
@@ -63,7 +63,7 @@ export const agents: readonly AcademyAgent[] = [
63
63
  { action: "subagent", effect: "allow", resource: "bellno" },
64
64
  { action: "subagent", effect: "allow", resource: "bourbon" },
65
65
  ],
66
- system: dianaSystem,
66
+ system: rudolfSystem,
67
67
  },
68
68
  {
69
69
  color: "#f6c177",
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ const AcademyOptions = Schema.Struct({
17
17
  cafe: Schema.optionalKey(Schema.NonEmptyString),
18
18
  dantsu: Schema.optionalKey(Schema.NonEmptyString),
19
19
  diana: Schema.optionalKey(Schema.NonEmptyString),
20
+ rudolf: Schema.optionalKey(Schema.NonEmptyString),
20
21
  })
21
22
  ),
22
23
  agnes: Schema.optionalKey(AgentOptions),
@@ -25,6 +26,7 @@ const AcademyOptions = Schema.Struct({
25
26
  cafe: Schema.optionalKey(AgentOptions),
26
27
  dantsu: Schema.optionalKey(AgentOptions),
27
28
  diana: Schema.optionalKey(AgentOptions),
29
+ rudolf: Schema.optionalKey(AgentOptions),
28
30
  });
29
31
 
30
32
  const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
@@ -38,7 +40,11 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
38
40
  const agentNames = new Map(
39
41
  agents.map((agent) => [
40
42
  agent.name,
41
- options[agent.id]?.name ?? legacyNames[agent.id] ?? 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,
42
48
  ])
43
49
  );
44
50
 
@@ -59,7 +65,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
59
65
  });
60
66
 
61
67
  yield* ctx.agent.transform((editor) => {
62
- for (const id of ["build", "plan", "explore", "general"]) {
68
+ for (const id of ["build", "plan", "explore", "general", "diana"]) {
63
69
  editor.remove(id);
64
70
  }
65
71
 
@@ -71,7 +77,10 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
71
77
  agent.description = definition.description;
72
78
  agent.mode = definition.mode;
73
79
  agent.color =
74
- options[definition.id]?.color ?? agent.color ?? definition.color;
80
+ options[definition.id]?.color ??
81
+ (definition.id === "rudolf" ? options.diana?.color : undefined) ??
82
+ agent.color ??
83
+ definition.color;
75
84
  agent.system = definition.system.replaceAll(
76
85
  /\b(?:Rudolf|Agnes|Bourbon|Cafe|Dantsu|Bellno)\b/gu,
77
86
  (name) => agentNames.get(name) ?? name
@@ -89,7 +98,7 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
89
98
  });
90
99
  }
91
100
 
92
- editor.default("diana");
101
+ editor.default("rudolf");
93
102
  });
94
103
  });
95
104
 
File without changes