@hiai-gg/hiai-opencode 0.1.4 → 0.1.6

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.
Files changed (81) hide show
  1. package/.env.example +14 -8
  2. package/AGENTS.md +19 -8
  3. package/ARCHITECTURE.md +7 -6
  4. package/LICENSE.md +0 -1
  5. package/README.md +48 -17
  6. package/assets/cli/hiai-opencode.mjs +590 -7
  7. package/assets/mcp/mempalace.mjs +159 -25
  8. package/config/hiai-opencode.schema.json +82 -148
  9. package/dist/agents/dynamic-agent-core-sections.d.ts +4 -1
  10. package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
  11. package/dist/config/defaults.d.ts +1 -0
  12. package/dist/config/platform-schema.d.ts +275 -10
  13. package/dist/config/schema/categories.d.ts +2 -2
  14. package/dist/config/schema/commands.d.ts +1 -0
  15. package/dist/config/schema/oh-my-opencode-config.d.ts +1 -3
  16. package/dist/config/types.d.ts +22 -5
  17. package/dist/create-tools.d.ts +2 -0
  18. package/dist/features/builtin-commands/templates/doctor.d.ts +1 -0
  19. package/dist/features/builtin-commands/types.d.ts +1 -1
  20. package/dist/features/builtin-skills/skills/hiai-opencode-setup.d.ts +2 -0
  21. package/dist/features/builtin-skills/skills/index.d.ts +1 -0
  22. package/dist/index.js +870 -1711
  23. package/dist/mcp/types.d.ts +1 -1
  24. package/dist/plugin/tool-registry.d.ts +2 -0
  25. package/dist/shared/mcp-static-export.d.ts +22 -0
  26. package/dist/tools/ast-grep/constants.d.ts +1 -1
  27. package/dist/tools/ast-grep/environment-check.d.ts +1 -5
  28. package/dist/tools/ast-grep/language-support.d.ts +0 -1
  29. package/dist/tools/ast-grep/types.d.ts +1 -2
  30. package/dist/tools/skill-mcp/tools.d.ts +2 -0
  31. package/hiai-opencode.json +39 -171
  32. package/package.json +6 -4
  33. package/src/agents/bob/default.ts +6 -1
  34. package/src/agents/bob/gpt-pro.ts +1 -0
  35. package/src/agents/bob.ts +1 -0
  36. package/src/agents/coder/gpt-codex.ts +1 -0
  37. package/src/agents/coder/gpt-pro.ts +1 -0
  38. package/src/agents/coder/gpt.ts +1 -0
  39. package/src/agents/dynamic-agent-core-sections.ts +36 -0
  40. package/src/agents/dynamic-agent-prompt-builder.ts +1 -0
  41. package/src/config/defaults.ts +171 -28
  42. package/src/config/loader.test.ts +16 -1
  43. package/src/config/loader.ts +4 -2
  44. package/src/config/model-slots-and-export.test.ts +55 -0
  45. package/src/config/platform-schema.ts +37 -5
  46. package/src/config/schema/commands.ts +1 -0
  47. package/src/config/schema/oh-my-opencode-config.ts +0 -3
  48. package/src/config/types.ts +34 -5
  49. package/src/create-tools.ts +4 -1
  50. package/src/features/builtin-commands/commands.ts +7 -0
  51. package/src/features/builtin-commands/templates/doctor.ts +43 -0
  52. package/src/features/builtin-commands/types.ts +1 -1
  53. package/src/features/builtin-skills/skills/hiai-opencode-setup.ts +69 -0
  54. package/src/features/builtin-skills/skills/index.ts +1 -0
  55. package/src/features/builtin-skills/skills.ts +10 -1
  56. package/src/index.ts +4 -38
  57. package/src/lsp/index.ts +1 -0
  58. package/src/mcp/registry.ts +6 -1
  59. package/src/plugin/tool-registry.ts +4 -0
  60. package/src/shared/mcp-static-export.ts +121 -0
  61. package/src/tools/ast-grep/constants.ts +1 -1
  62. package/src/tools/ast-grep/environment-check.ts +2 -32
  63. package/src/tools/ast-grep/language-support.ts +0 -3
  64. package/src/tools/ast-grep/types.ts +1 -2
  65. package/src/tools/skill-mcp/tools.test.ts +44 -0
  66. package/src/tools/skill-mcp/tools.ts +45 -7
  67. package/dist/ast-grep-napi.win32-x64-msvc-67c0y8nc.node +0 -0
  68. package/dist/config/loader.test.d.ts +0 -1
  69. package/dist/config/models.d.ts +0 -13
  70. package/dist/internals/plugins/websearch-cited/google.d.ts +0 -38
  71. package/dist/internals/plugins/websearch-cited/index.d.ts +0 -11
  72. package/dist/internals/plugins/websearch-cited/openai.d.ts +0 -9
  73. package/dist/internals/plugins/websearch-cited/openrouter.d.ts +0 -2
  74. package/dist/internals/plugins/websearch-cited/types.d.ts +0 -5
  75. package/src/internals/plugins/websearch-cited/LICENSE +0 -214
  76. package/src/internals/plugins/websearch-cited/codex_prompt.txt +0 -79
  77. package/src/internals/plugins/websearch-cited/google.ts +0 -749
  78. package/src/internals/plugins/websearch-cited/index.ts +0 -301
  79. package/src/internals/plugins/websearch-cited/openai.ts +0 -407
  80. package/src/internals/plugins/websearch-cited/openrouter.ts +0 -190
  81. package/src/internals/plugins/websearch-cited/types.ts +0 -7
@@ -6,6 +6,149 @@ export declare const AgentConfigSchema: z.ZodObject<{
6
6
  model: z.ZodString;
7
7
  description: z.ZodOptional<z.ZodString>;
8
8
  }, z.core.$strip>;
9
+ export declare const ModelRecommendationSchema: z.ZodEnum<{
10
+ high: "high";
11
+ xhigh: "xhigh";
12
+ middle: "middle";
13
+ fast: "fast";
14
+ vision: "vision";
15
+ writing: "writing";
16
+ design: "design";
17
+ }>;
18
+ export declare const ModelSlotConfigSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
19
+ model: z.ZodString;
20
+ recommended: z.ZodOptional<z.ZodEnum<{
21
+ high: "high";
22
+ xhigh: "xhigh";
23
+ middle: "middle";
24
+ fast: "fast";
25
+ vision: "vision";
26
+ writing: "writing";
27
+ design: "design";
28
+ }>>;
29
+ }, z.core.$strip>]>;
30
+ export declare const ModelSlotsConfigSchema: z.ZodObject<{
31
+ bob: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
32
+ model: z.ZodString;
33
+ recommended: z.ZodOptional<z.ZodEnum<{
34
+ high: "high";
35
+ xhigh: "xhigh";
36
+ middle: "middle";
37
+ fast: "fast";
38
+ vision: "vision";
39
+ writing: "writing";
40
+ design: "design";
41
+ }>>;
42
+ }, z.core.$strip>]>>;
43
+ coder: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
44
+ model: z.ZodString;
45
+ recommended: z.ZodOptional<z.ZodEnum<{
46
+ high: "high";
47
+ xhigh: "xhigh";
48
+ middle: "middle";
49
+ fast: "fast";
50
+ vision: "vision";
51
+ writing: "writing";
52
+ design: "design";
53
+ }>>;
54
+ }, z.core.$strip>]>>;
55
+ strategist: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
56
+ model: z.ZodString;
57
+ recommended: z.ZodOptional<z.ZodEnum<{
58
+ high: "high";
59
+ xhigh: "xhigh";
60
+ middle: "middle";
61
+ fast: "fast";
62
+ vision: "vision";
63
+ writing: "writing";
64
+ design: "design";
65
+ }>>;
66
+ }, z.core.$strip>]>>;
67
+ guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
68
+ model: z.ZodString;
69
+ recommended: z.ZodOptional<z.ZodEnum<{
70
+ high: "high";
71
+ xhigh: "xhigh";
72
+ middle: "middle";
73
+ fast: "fast";
74
+ vision: "vision";
75
+ writing: "writing";
76
+ design: "design";
77
+ }>>;
78
+ }, z.core.$strip>]>>;
79
+ critic: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
80
+ model: z.ZodString;
81
+ recommended: z.ZodOptional<z.ZodEnum<{
82
+ high: "high";
83
+ xhigh: "xhigh";
84
+ middle: "middle";
85
+ fast: "fast";
86
+ vision: "vision";
87
+ writing: "writing";
88
+ design: "design";
89
+ }>>;
90
+ }, z.core.$strip>]>>;
91
+ designer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
92
+ model: z.ZodString;
93
+ recommended: z.ZodOptional<z.ZodEnum<{
94
+ high: "high";
95
+ xhigh: "xhigh";
96
+ middle: "middle";
97
+ fast: "fast";
98
+ vision: "vision";
99
+ writing: "writing";
100
+ design: "design";
101
+ }>>;
102
+ }, z.core.$strip>]>>;
103
+ researcher: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
104
+ model: z.ZodString;
105
+ recommended: z.ZodOptional<z.ZodEnum<{
106
+ high: "high";
107
+ xhigh: "xhigh";
108
+ middle: "middle";
109
+ fast: "fast";
110
+ vision: "vision";
111
+ writing: "writing";
112
+ design: "design";
113
+ }>>;
114
+ }, z.core.$strip>]>>;
115
+ manager: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
116
+ model: z.ZodString;
117
+ recommended: z.ZodOptional<z.ZodEnum<{
118
+ high: "high";
119
+ xhigh: "xhigh";
120
+ middle: "middle";
121
+ fast: "fast";
122
+ vision: "vision";
123
+ writing: "writing";
124
+ design: "design";
125
+ }>>;
126
+ }, z.core.$strip>]>>;
127
+ brainstormer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
128
+ model: z.ZodString;
129
+ recommended: z.ZodOptional<z.ZodEnum<{
130
+ high: "high";
131
+ xhigh: "xhigh";
132
+ middle: "middle";
133
+ fast: "fast";
134
+ vision: "vision";
135
+ writing: "writing";
136
+ design: "design";
137
+ }>>;
138
+ }, z.core.$strip>]>>;
139
+ vision: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
140
+ model: z.ZodString;
141
+ recommended: z.ZodOptional<z.ZodEnum<{
142
+ high: "high";
143
+ xhigh: "xhigh";
144
+ middle: "middle";
145
+ fast: "fast";
146
+ vision: "vision";
147
+ writing: "writing";
148
+ design: "design";
149
+ }>>;
150
+ }, z.core.$strip>]>>;
151
+ }, z.core.$strip>;
9
152
  export declare const FallbackEntrySchema: z.ZodObject<{
10
153
  providers: z.ZodArray<z.ZodString>;
11
154
  model: z.ZodString;
@@ -76,10 +219,12 @@ export declare const McpServerConfigSchema: z.ZodObject<{
76
219
  command: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
220
  timeout: z.ZodOptional<z.ZodNumber>;
78
221
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
222
+ pythonPath: z.ZodOptional<z.ZodString>;
79
223
  }, z.core.$strip>;
80
224
  export declare const LspServerConfigSchema: z.ZodObject<{
81
- command: z.ZodArray<z.ZodString>;
82
- extensions: z.ZodArray<z.ZodString>;
225
+ enabled: z.ZodOptional<z.ZodBoolean>;
226
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
227
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
228
  initialization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
84
229
  }, z.core.$strip>;
85
230
  export declare const Subtask2ConfigSchema: z.ZodObject<{
@@ -167,11 +312,9 @@ export declare const PermissionsConfigSchema: z.ZodObject<{
167
312
  }>>>;
168
313
  }, z.core.$strip>;
169
314
  export declare const AuthKeysSchema: z.ZodObject<{
170
- googleSearch: z.ZodOptional<z.ZodString>;
171
- openai: z.ZodOptional<z.ZodString>;
172
- openrouter: z.ZodOptional<z.ZodString>;
173
315
  stitch: z.ZodOptional<z.ZodString>;
174
316
  firecrawl: z.ZodOptional<z.ZodString>;
317
+ context7: z.ZodOptional<z.ZodString>;
175
318
  }, z.core.$strip>;
176
319
  export declare const OllamaConfigSchema: z.ZodObject<{
177
320
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -193,6 +336,128 @@ export declare const ModelFamilySchema: z.ZodObject<{
193
336
  }, z.core.$strip>;
194
337
  export declare const HiaiOpencodeConfigSchema: z.ZodObject<{
195
338
  $schema: z.ZodOptional<z.ZodString>;
339
+ models: z.ZodOptional<z.ZodObject<{
340
+ bob: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
341
+ model: z.ZodString;
342
+ recommended: z.ZodOptional<z.ZodEnum<{
343
+ high: "high";
344
+ xhigh: "xhigh";
345
+ middle: "middle";
346
+ fast: "fast";
347
+ vision: "vision";
348
+ writing: "writing";
349
+ design: "design";
350
+ }>>;
351
+ }, z.core.$strip>]>>;
352
+ coder: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
353
+ model: z.ZodString;
354
+ recommended: z.ZodOptional<z.ZodEnum<{
355
+ high: "high";
356
+ xhigh: "xhigh";
357
+ middle: "middle";
358
+ fast: "fast";
359
+ vision: "vision";
360
+ writing: "writing";
361
+ design: "design";
362
+ }>>;
363
+ }, z.core.$strip>]>>;
364
+ strategist: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
365
+ model: z.ZodString;
366
+ recommended: z.ZodOptional<z.ZodEnum<{
367
+ high: "high";
368
+ xhigh: "xhigh";
369
+ middle: "middle";
370
+ fast: "fast";
371
+ vision: "vision";
372
+ writing: "writing";
373
+ design: "design";
374
+ }>>;
375
+ }, z.core.$strip>]>>;
376
+ guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
377
+ model: z.ZodString;
378
+ recommended: z.ZodOptional<z.ZodEnum<{
379
+ high: "high";
380
+ xhigh: "xhigh";
381
+ middle: "middle";
382
+ fast: "fast";
383
+ vision: "vision";
384
+ writing: "writing";
385
+ design: "design";
386
+ }>>;
387
+ }, z.core.$strip>]>>;
388
+ critic: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
389
+ model: z.ZodString;
390
+ recommended: z.ZodOptional<z.ZodEnum<{
391
+ high: "high";
392
+ xhigh: "xhigh";
393
+ middle: "middle";
394
+ fast: "fast";
395
+ vision: "vision";
396
+ writing: "writing";
397
+ design: "design";
398
+ }>>;
399
+ }, z.core.$strip>]>>;
400
+ designer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
401
+ model: z.ZodString;
402
+ recommended: z.ZodOptional<z.ZodEnum<{
403
+ high: "high";
404
+ xhigh: "xhigh";
405
+ middle: "middle";
406
+ fast: "fast";
407
+ vision: "vision";
408
+ writing: "writing";
409
+ design: "design";
410
+ }>>;
411
+ }, z.core.$strip>]>>;
412
+ researcher: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
413
+ model: z.ZodString;
414
+ recommended: z.ZodOptional<z.ZodEnum<{
415
+ high: "high";
416
+ xhigh: "xhigh";
417
+ middle: "middle";
418
+ fast: "fast";
419
+ vision: "vision";
420
+ writing: "writing";
421
+ design: "design";
422
+ }>>;
423
+ }, z.core.$strip>]>>;
424
+ manager: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
425
+ model: z.ZodString;
426
+ recommended: z.ZodOptional<z.ZodEnum<{
427
+ high: "high";
428
+ xhigh: "xhigh";
429
+ middle: "middle";
430
+ fast: "fast";
431
+ vision: "vision";
432
+ writing: "writing";
433
+ design: "design";
434
+ }>>;
435
+ }, z.core.$strip>]>>;
436
+ brainstormer: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
437
+ model: z.ZodString;
438
+ recommended: z.ZodOptional<z.ZodEnum<{
439
+ high: "high";
440
+ xhigh: "xhigh";
441
+ middle: "middle";
442
+ fast: "fast";
443
+ vision: "vision";
444
+ writing: "writing";
445
+ design: "design";
446
+ }>>;
447
+ }, z.core.$strip>]>>;
448
+ vision: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
449
+ model: z.ZodString;
450
+ recommended: z.ZodOptional<z.ZodEnum<{
451
+ high: "high";
452
+ xhigh: "xhigh";
453
+ middle: "middle";
454
+ fast: "fast";
455
+ vision: "vision";
456
+ writing: "writing";
457
+ design: "design";
458
+ }>>;
459
+ }, z.core.$strip>]>>;
460
+ }, z.core.$strip>>;
196
461
  agents: z.ZodOptional<z.ZodObject<{
197
462
  bob: z.ZodOptional<z.ZodObject<{
198
463
  model: z.ZodString;
@@ -1037,10 +1302,12 @@ export declare const HiaiOpencodeConfigSchema: z.ZodObject<{
1037
1302
  command: z.ZodOptional<z.ZodArray<z.ZodString>>;
1038
1303
  timeout: z.ZodOptional<z.ZodNumber>;
1039
1304
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1305
+ pythonPath: z.ZodOptional<z.ZodString>;
1040
1306
  }, z.core.$strip>>>;
1041
1307
  lsp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1042
- command: z.ZodArray<z.ZodString>;
1043
- extensions: z.ZodArray<z.ZodString>;
1308
+ enabled: z.ZodOptional<z.ZodBoolean>;
1309
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
1310
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1044
1311
  initialization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1045
1312
  }, z.core.$strip>>>;
1046
1313
  subtask2: z.ZodOptional<z.ZodObject<{
@@ -1128,11 +1395,9 @@ export declare const HiaiOpencodeConfigSchema: z.ZodObject<{
1128
1395
  }>>>;
1129
1396
  }, z.core.$strip>>;
1130
1397
  auth: z.ZodOptional<z.ZodObject<{
1131
- googleSearch: z.ZodOptional<z.ZodString>;
1132
- openai: z.ZodOptional<z.ZodString>;
1133
- openrouter: z.ZodOptional<z.ZodString>;
1134
1398
  stitch: z.ZodOptional<z.ZodString>;
1135
1399
  firecrawl: z.ZodOptional<z.ZodString>;
1400
+ context7: z.ZodOptional<z.ZodString>;
1136
1401
  }, z.core.$strip>>;
1137
1402
  ollama: z.ZodOptional<z.ZodObject<{
1138
1403
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -78,12 +78,12 @@ export declare const CategoryConfigSchema: z.ZodObject<{
78
78
  export declare const BuiltinCategoryNameSchema: z.ZodEnum<{
79
79
  deep: "deep";
80
80
  "unspecified-high": "unspecified-high";
81
+ writing: "writing";
81
82
  "visual-engineering": "visual-engineering";
82
- ultrabrain: "ultrabrain";
83
83
  artistry: "artistry";
84
+ ultrabrain: "ultrabrain";
84
85
  quick: "quick";
85
86
  "unspecified-low": "unspecified-low";
86
- writing: "writing";
87
87
  }>;
88
88
  export declare const CategoriesConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
89
89
  description: z.ZodOptional<z.ZodString>;
@@ -9,5 +9,6 @@ export declare const BuiltinCommandNameSchema: z.ZodEnum<{
9
9
  "stop-continuation": "stop-continuation";
10
10
  "remove-ai-slops": "remove-ai-slops";
11
11
  "mcp-status": "mcp-status";
12
+ doctor: "doctor";
12
13
  }>;
13
14
  export type BuiltinCommandName = z.infer<typeof BuiltinCommandNameSchema>;
@@ -26,6 +26,7 @@ export declare const HiaiOpenCodeConfigSchema: z.ZodObject<{
26
26
  "stop-continuation": "stop-continuation";
27
27
  "remove-ai-slops": "remove-ai-slops";
28
28
  "mcp-status": "mcp-status";
29
+ doctor: "doctor";
29
30
  }>>>;
30
31
  disabled_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
32
  mcp_env_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -4216,9 +4217,6 @@ export declare const HiaiOpenCodeConfigSchema: z.ZodObject<{
4216
4217
  timeout_ms: z.ZodDefault<z.ZodNumber>;
4217
4218
  }, z.core.$strip>>;
4218
4219
  auth: z.ZodOptional<z.ZodObject<{
4219
- googleSearch: z.ZodOptional<z.ZodString>;
4220
- openai: z.ZodOptional<z.ZodString>;
4221
- openrouter: z.ZodOptional<z.ZodString>;
4222
4220
  stitch: z.ZodOptional<z.ZodString>;
4223
4221
  firecrawl: z.ZodOptional<z.ZodString>;
4224
4222
  context7: z.ZodOptional<z.ZodString>;
@@ -5,6 +5,23 @@ export interface AgentConfig {
5
5
  model: string;
6
6
  description?: string;
7
7
  }
8
+ export type ModelRecommendation = "xhigh" | "high" | "middle" | "fast" | "vision" | "writing" | "design";
9
+ export type ModelSlotConfig = string | {
10
+ model: string;
11
+ recommended?: ModelRecommendation;
12
+ };
13
+ export interface ModelSlotsConfig {
14
+ bob?: ModelSlotConfig;
15
+ coder?: ModelSlotConfig;
16
+ strategist?: ModelSlotConfig;
17
+ guard?: ModelSlotConfig;
18
+ critic?: ModelSlotConfig;
19
+ designer?: ModelSlotConfig;
20
+ researcher?: ModelSlotConfig;
21
+ manager?: ModelSlotConfig;
22
+ brainstormer?: ModelSlotConfig;
23
+ vision?: ModelSlotConfig;
24
+ }
8
25
  export declare const CANONICAL_AGENT_NAMES: readonly ["bob", "guard", "strategist", "critic", "coder", "designer", "sub", "researcher", "multimodal", "quality-guardian", "platform-manager", "brainstormer", "agent-skills"];
9
26
  export type CanonicalAgentName = (typeof CANONICAL_AGENT_NAMES)[number];
10
27
  export declare const LEGACY_AGENT_ALIAS_NAMES: readonly ["general", "zoe", "build", "pre-plan", "manager", "vision", "logician", "librarian", "explore", "ui", "code-reviewer", "systematic-debugger", "mindmodel", "ledger-creator", "bootstrapper", "project-initializer"];
@@ -55,10 +72,12 @@ export interface McpServerConfig {
55
72
  command?: string[];
56
73
  timeout?: number;
57
74
  environment?: Record<string, string>;
75
+ pythonPath?: string;
58
76
  }
59
77
  export interface LspServerConfig {
60
- command: string[];
61
- extensions: string[];
78
+ enabled?: boolean;
79
+ command?: string[];
80
+ extensions?: string[];
62
81
  initialization?: Record<string, unknown>;
63
82
  }
64
83
  export interface Subtask2Config {
@@ -85,9 +104,6 @@ export interface PermissionsConfig {
85
104
  deny_paths?: string[];
86
105
  }
87
106
  export interface AuthKeys {
88
- googleSearch?: string;
89
- openai?: string;
90
- openrouter?: string;
91
107
  stitch?: string;
92
108
  firecrawl?: string;
93
109
  context7?: string;
@@ -100,6 +116,7 @@ export interface OllamaConfig {
100
116
  }
101
117
  export interface HiaiOpencodeConfig {
102
118
  $schema?: string;
119
+ models?: ModelSlotsConfig;
103
120
  agents?: AgentConfigMap;
104
121
  agentRequirements?: AgentRequirementMap;
105
122
  categories?: Record<string, CategoryConfig>;
@@ -1,5 +1,6 @@
1
1
  import type { AvailableCategory, AvailableSkill } from "./agents/dynamic-agent-prompt-builder";
2
2
  import type { HiaiOpenCodeConfig } from "./config";
3
+ import type { HiaiOpencodeConfig } from "./config/types";
3
4
  import type { BrowserAutomationProvider } from "./config/schema/browser-automation";
4
5
  import type { LoadedSkill } from "./features/opencode-skill-loader/types";
5
6
  import type { PluginContext, ToolsRecord } from "./plugin/types";
@@ -16,6 +17,7 @@ type CreateToolsResult = {
16
17
  export declare function createTools(args: {
17
18
  ctx: PluginContext;
18
19
  pluginConfig: HiaiOpenCodeConfig;
20
+ platformConfig?: HiaiOpencodeConfig;
19
21
  managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager">;
20
22
  }): Promise<CreateToolsResult>;
21
23
  export {};
@@ -0,0 +1 @@
1
+ export declare const DOCTOR_TEMPLATE = "# Hiai OpenCode Doctor Command\n\n## Purpose\n\nUse /doctor to run the hiai-opencode install/runtime diagnostic and report actionable setup issues.\n\n## Execute\n\nRun:\n\n```bash\nhiai-opencode doctor\n```\n\nIf the binary is not on PATH, try the package-local fallback:\n\n```bash\nnode ./node_modules/@hiai-gg/hiai-opencode/assets/cli/hiai-opencode.mjs doctor\n```\n\n## Report\n\nSummarize:\n\n- config path\n- enabled and disabled MCP servers\n- missing env vars by name only\n- static `.mcp.json` freshness and whether it is managed by hiai-opencode\n- OpenCode Connect visibility for configured model providers\n- OpenCode plugin registration sanity (including `plugin: [\"list\"]` misconfiguration warning)\n- skill materialization status from skill registry\n- agent count and naming summary\n- LSP runtime availability\n- MemPalace python source and selected interpreter (env/config/auto)\n- MCP tool probes (real connect + tools/list) for stdio and basic endpoint probes for remote MCP\n\nRules:\n\n- Do not print API key values.\n- Do not ask for model provider env vars such as OPENROUTER_API_KEY or OPENAI_API_KEY; normal model auth belongs to OpenCode Connect.\n- If `opencode mcp list` is empty but doctor/mcp-status sees servers, explain the runtime-vs-static config distinction and run `hiai-opencode export-mcp .mcp.json` if the user wants static visibility.\n- Do not run package installs unless the user explicitly asks.\n";
@@ -1,5 +1,5 @@
1
1
  import type { CommandDefinition } from "../claude-code-command-loader";
2
- export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops" | "mcp-status";
2
+ export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops" | "mcp-status" | "doctor";
3
3
  export interface BuiltinCommandConfig {
4
4
  disabled_commands?: BuiltinCommandName[];
5
5
  }
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const hiaiOpencodeSetupSkill: BuiltinSkill;
@@ -5,3 +5,4 @@ export { gitMasterSkill } from "./git-master";
5
5
  export { devBrowserSkill } from "./dev-browser";
6
6
  export { reviewWorkSkill } from "./review-work";
7
7
  export { aiSlopRemoverSkill } from "./ai-slop-remover";
8
+ export { hiaiOpencodeSetupSkill } from "./hiai-opencode-setup";