ayush-opencode 0.1.1 → 0.1.2

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
@@ -105,6 +105,58 @@ This plugin automatically injects delegation guidelines into OpenCode's Build an
105
105
  | "Should I use Redux or Zustand?" | @oracle |
106
106
  | "Make this dashboard look better" | @ui-planner |
107
107
 
108
+ ## Configuration (Optional)
109
+
110
+ You can customize agent models or disable agents by creating a config file.
111
+
112
+ ### Config File Locations
113
+
114
+ | Location | Priority | Use Case |
115
+ |----------|----------|----------|
116
+ | `~/.config/opencode/ayush-opencode.json` | Base | User-level defaults |
117
+ | `.opencode/ayush-opencode.json` | Override | Project-specific settings |
118
+
119
+ Project config overrides user config when both exist.
120
+
121
+ ### Config Options
122
+
123
+ ```json
124
+ {
125
+ "agents": {
126
+ "explorer": { "model": "anthropic/claude-haiku-4-5" },
127
+ "librarian": { "model": "anthropic/claude-sonnet-4-5" },
128
+ "oracle": { "model": "openai/gpt-5.2-high" },
129
+ "ui-planner": { "model": "google/gemini-3-pro-high" }
130
+ },
131
+ "disabled_agents": []
132
+ }
133
+ ```
134
+
135
+ ### Override Models
136
+
137
+ To use different models for specific agents:
138
+
139
+ ```json
140
+ {
141
+ "agents": {
142
+ "explorer": { "model": "anthropic/claude-sonnet-4" },
143
+ "oracle": { "model": "openai/gpt-4o" }
144
+ }
145
+ }
146
+ ```
147
+
148
+ ### Disable Agents
149
+
150
+ To disable specific agents:
151
+
152
+ ```json
153
+ {
154
+ "disabled_agents": ["oracle", "ui-planner"]
155
+ }
156
+ ```
157
+
158
+ Available agent names: `explorer`, `librarian`, `oracle`, `ui-planner`
159
+
108
160
  ## MCP Tools Required
109
161
 
110
162
  This plugin assumes you have the following MCP servers configured:
@@ -0,0 +1,2 @@
1
+ export { AyushOpenCodeConfigSchema, AgentNameSchema, AgentOverrideConfigSchema, AgentOverridesSchema, type AyushOpenCodeConfig, type AgentName, type AgentOverrideConfig, type AgentOverrides, } from "./schema";
2
+ export { loadPluginConfig } from "./loader";
@@ -0,0 +1,6 @@
1
+ import { type AyushOpenCodeConfig } from "./schema";
2
+ /**
3
+ * Load plugin configuration from user and project paths
4
+ * Project config takes priority over user config
5
+ */
6
+ export declare function loadPluginConfig(projectDirectory: string): AyushOpenCodeConfig;
@@ -0,0 +1,176 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Agent names that can be configured
4
+ */
5
+ export declare const AgentNameSchema: z.ZodEnum<["explorer", "librarian", "oracle", "ui-planner"]>;
6
+ export type AgentName = z.infer<typeof AgentNameSchema>;
7
+ /**
8
+ * Configuration for overriding an agent's settings
9
+ * Only model override is supported - keeps it simple
10
+ */
11
+ export declare const AgentOverrideConfigSchema: z.ZodObject<{
12
+ model: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ model?: string | undefined;
15
+ }, {
16
+ model?: string | undefined;
17
+ }>;
18
+ export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
19
+ /**
20
+ * Agent overrides mapping
21
+ */
22
+ export declare const AgentOverridesSchema: z.ZodObject<{
23
+ explorer: z.ZodOptional<z.ZodObject<{
24
+ model: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ model?: string | undefined;
27
+ }, {
28
+ model?: string | undefined;
29
+ }>>;
30
+ librarian: z.ZodOptional<z.ZodObject<{
31
+ model: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ model?: string | undefined;
34
+ }, {
35
+ model?: string | undefined;
36
+ }>>;
37
+ oracle: z.ZodOptional<z.ZodObject<{
38
+ model: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ model?: string | undefined;
41
+ }, {
42
+ model?: string | undefined;
43
+ }>>;
44
+ "ui-planner": z.ZodOptional<z.ZodObject<{
45
+ model: z.ZodOptional<z.ZodString>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ model?: string | undefined;
48
+ }, {
49
+ model?: string | undefined;
50
+ }>>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ explorer?: {
53
+ model?: string | undefined;
54
+ } | undefined;
55
+ librarian?: {
56
+ model?: string | undefined;
57
+ } | undefined;
58
+ oracle?: {
59
+ model?: string | undefined;
60
+ } | undefined;
61
+ "ui-planner"?: {
62
+ model?: string | undefined;
63
+ } | undefined;
64
+ }, {
65
+ explorer?: {
66
+ model?: string | undefined;
67
+ } | undefined;
68
+ librarian?: {
69
+ model?: string | undefined;
70
+ } | undefined;
71
+ oracle?: {
72
+ model?: string | undefined;
73
+ } | undefined;
74
+ "ui-planner"?: {
75
+ model?: string | undefined;
76
+ } | undefined;
77
+ }>;
78
+ export type AgentOverrides = z.infer<typeof AgentOverridesSchema>;
79
+ /**
80
+ * Main configuration schema for ayush-opencode
81
+ */
82
+ export declare const AyushOpenCodeConfigSchema: z.ZodObject<{
83
+ $schema: z.ZodOptional<z.ZodString>;
84
+ agents: z.ZodOptional<z.ZodObject<{
85
+ explorer: z.ZodOptional<z.ZodObject<{
86
+ model: z.ZodOptional<z.ZodString>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ model?: string | undefined;
89
+ }, {
90
+ model?: string | undefined;
91
+ }>>;
92
+ librarian: z.ZodOptional<z.ZodObject<{
93
+ model: z.ZodOptional<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ model?: string | undefined;
96
+ }, {
97
+ model?: string | undefined;
98
+ }>>;
99
+ oracle: z.ZodOptional<z.ZodObject<{
100
+ model: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ model?: string | undefined;
103
+ }, {
104
+ model?: string | undefined;
105
+ }>>;
106
+ "ui-planner": z.ZodOptional<z.ZodObject<{
107
+ model: z.ZodOptional<z.ZodString>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ model?: string | undefined;
110
+ }, {
111
+ model?: string | undefined;
112
+ }>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ explorer?: {
115
+ model?: string | undefined;
116
+ } | undefined;
117
+ librarian?: {
118
+ model?: string | undefined;
119
+ } | undefined;
120
+ oracle?: {
121
+ model?: string | undefined;
122
+ } | undefined;
123
+ "ui-planner"?: {
124
+ model?: string | undefined;
125
+ } | undefined;
126
+ }, {
127
+ explorer?: {
128
+ model?: string | undefined;
129
+ } | undefined;
130
+ librarian?: {
131
+ model?: string | undefined;
132
+ } | undefined;
133
+ oracle?: {
134
+ model?: string | undefined;
135
+ } | undefined;
136
+ "ui-planner"?: {
137
+ model?: string | undefined;
138
+ } | undefined;
139
+ }>>;
140
+ disabled_agents: z.ZodOptional<z.ZodArray<z.ZodEnum<["explorer", "librarian", "oracle", "ui-planner"]>, "many">>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ $schema?: string | undefined;
143
+ agents?: {
144
+ explorer?: {
145
+ model?: string | undefined;
146
+ } | undefined;
147
+ librarian?: {
148
+ model?: string | undefined;
149
+ } | undefined;
150
+ oracle?: {
151
+ model?: string | undefined;
152
+ } | undefined;
153
+ "ui-planner"?: {
154
+ model?: string | undefined;
155
+ } | undefined;
156
+ } | undefined;
157
+ disabled_agents?: ("explorer" | "librarian" | "oracle" | "ui-planner")[] | undefined;
158
+ }, {
159
+ $schema?: string | undefined;
160
+ agents?: {
161
+ explorer?: {
162
+ model?: string | undefined;
163
+ } | undefined;
164
+ librarian?: {
165
+ model?: string | undefined;
166
+ } | undefined;
167
+ oracle?: {
168
+ model?: string | undefined;
169
+ } | undefined;
170
+ "ui-planner"?: {
171
+ model?: string | undefined;
172
+ } | undefined;
173
+ } | undefined;
174
+ disabled_agents?: ("explorer" | "librarian" | "oracle" | "ui-planner")[] | undefined;
175
+ }>;
176
+ export type AyushOpenCodeConfig = z.infer<typeof AyushOpenCodeConfigSchema>;
package/dist/index.d.ts CHANGED
@@ -4,8 +4,10 @@
4
4
  * This plugin provides:
5
5
  * 1. Custom subagents: explorer, librarian, oracle, ui-planner
6
6
  * 2. Orchestration injection into Build/Plan agents for better delegation
7
+ * 3. Optional configuration via ayush-opencode.json for model overrides
7
8
  */
8
9
  import type { Plugin } from "@opencode-ai/plugin";
9
10
  declare const AyushOpenCodePlugin: Plugin;
10
11
  export default AyushOpenCodePlugin;
11
12
  export type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides, } from "./agents";
13
+ export type { AyushOpenCodeConfig, AgentName, } from "./config";