oh-my-opencode-serverlocal 0.1.1 → 0.1.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/dist/cli/index.js +128 -220
- package/dist/config/constants.d.ts +3 -3
- package/dist/config/index.d.ts +0 -1
- package/dist/config/loader.d.ts +4 -4
- package/dist/config/schema.d.ts +0 -41
- package/dist/hooks/auto-update-checker/skill-sync.d.ts +2 -2
- package/dist/hooks/phase-reminder/index.d.ts +1 -1
- package/dist/hooks/task-session-manager/index.d.ts +1 -1
- package/dist/index.js +576 -1298
- package/dist/tools/index.d.ts +0 -1
- package/dist/tui.js +103 -203
- package/dist/utils/internal-initiator.d.ts +2 -2
- package/dist/utils/session.d.ts +1 -1
- package/dist/utils/subagent-depth.d.ts +2 -2
- package/package.json +1 -1
- package/src/companion/companion-manifest.json +6 -6
- package/src/skills/clonedeps/SKILL.md +4 -4
- package/src/skills/codemap/README.md +1 -1
- package/src/skills/codemap/SKILL.md +3 -3
- package/src/skills/codemap.md +2 -2
- package/src/skills/{oh-my-opencode-slim → oh-my-opencode-serverlocal}/SKILL.md +24 -24
- package/src/skills/reflect/SKILL.md +5 -5
- package/src/skills/simplify/README.md +1 -1
- package/src/skills/worktrees/SKILL.md +4 -4
- package/dist/agents/council.d.ts +0 -27
- package/dist/agents/councillor.d.ts +0 -2
- package/dist/config/council-schema.d.ts +0 -137
- package/dist/council/council-manager.d.ts +0 -53
- package/dist/council/index.d.ts +0 -1
- package/dist/tools/council.d.ts +0 -10
- package/dist/utils/councillor-models.d.ts +0 -20
package/dist/cli/index.js
CHANGED
|
@@ -154,7 +154,7 @@ var init_zip_extractor = __esm(() => {
|
|
|
154
154
|
|
|
155
155
|
// src/cli/doctor.ts
|
|
156
156
|
import * as fs2 from "node:fs";
|
|
157
|
-
import { z as
|
|
157
|
+
import { z as z2 } from "zod";
|
|
158
158
|
|
|
159
159
|
// src/config/loader.ts
|
|
160
160
|
import * as fs from "node:fs";
|
|
@@ -215,10 +215,10 @@ function getConfigJsonc() {
|
|
|
215
215
|
return getOpenCodeConfigPaths()[1];
|
|
216
216
|
}
|
|
217
217
|
function getLiteConfig() {
|
|
218
|
-
return join(getConfigDir(), "oh-my-opencode-
|
|
218
|
+
return join(getConfigDir(), "oh-my-opencode-serverlocal.json");
|
|
219
219
|
}
|
|
220
220
|
function getLiteConfigJsonc() {
|
|
221
|
-
return join(getConfigDir(), "oh-my-opencode-
|
|
221
|
+
return join(getConfigDir(), "oh-my-opencode-serverlocal.jsonc");
|
|
222
222
|
}
|
|
223
223
|
function getTuiConfig() {
|
|
224
224
|
const customConfigPath = getCustomTuiConfigPath();
|
|
@@ -285,12 +285,10 @@ var SUBAGENT_NAMES = [
|
|
|
285
285
|
"oracle",
|
|
286
286
|
"designer",
|
|
287
287
|
"fixer",
|
|
288
|
-
"observer"
|
|
289
|
-
"council",
|
|
290
|
-
"councillor"
|
|
288
|
+
"observer"
|
|
291
289
|
];
|
|
292
290
|
var ALL_AGENT_NAMES = ["orchestrator", ...SUBAGENT_NAMES];
|
|
293
|
-
var PROTECTED_AGENTS = new Set(["orchestrator"
|
|
291
|
+
var PROTECTED_AGENTS = new Set(["orchestrator"]);
|
|
294
292
|
var MAX_POLL_TIME_MS = 5 * 60 * 1000;
|
|
295
293
|
var PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!`;
|
|
296
294
|
function formatSystemReminder(text) {
|
|
@@ -299,96 +297,10 @@ ${text}
|
|
|
299
297
|
</system-reminder>`;
|
|
300
298
|
}
|
|
301
299
|
var PHASE_REMINDER = formatSystemReminder(PHASE_REMINDER_TEXT);
|
|
302
|
-
// src/config/council-schema.ts
|
|
303
|
-
import { z } from "zod";
|
|
304
|
-
|
|
305
|
-
// src/utils/councillor-models.ts
|
|
306
|
-
function normalizeCouncillorModels(model, fallbackVariant) {
|
|
307
|
-
const raw = Array.isArray(model) ? model : [model];
|
|
308
|
-
return raw.map((entry) => typeof entry === "string" ? { id: entry, variant: fallbackVariant } : { id: entry.id, variant: entry.variant ?? fallbackVariant });
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// src/config/council-schema.ts
|
|
312
|
-
var ModelIdSchema = z.string().regex(/^[^/\s]+\/[^\s]+$/, 'Expected provider/model format (e.g. "openai/gpt-5.6-luna")');
|
|
313
|
-
var CouncillorModelEntrySchema = z.object({
|
|
314
|
-
id: ModelIdSchema,
|
|
315
|
-
variant: z.string().optional()
|
|
316
|
-
});
|
|
317
|
-
var CouncillorModelSchema = z.union([
|
|
318
|
-
ModelIdSchema,
|
|
319
|
-
z.array(z.union([ModelIdSchema, CouncillorModelEntrySchema])).min(1)
|
|
320
|
-
]).describe('Model ID in provider/model format (e.g. "openai/gpt-5.6-luna"), or an ' + "ordered fallback chain (array of model IDs or { id, variant } entries) " + "tried in order until one responds.");
|
|
321
|
-
var CouncillorConfigSchema = z.object({
|
|
322
|
-
model: CouncillorModelSchema,
|
|
323
|
-
variant: z.string().optional(),
|
|
324
|
-
prompt: z.string().optional().describe("Optional role/guidance injected into the councillor user prompt")
|
|
325
|
-
}).transform((c) => {
|
|
326
|
-
const models = normalizeCouncillorModels(c.model, c.variant);
|
|
327
|
-
return {
|
|
328
|
-
model: models[0].id,
|
|
329
|
-
variant: c.variant,
|
|
330
|
-
prompt: c.prompt,
|
|
331
|
-
models
|
|
332
|
-
};
|
|
333
|
-
});
|
|
334
|
-
var CouncilPresetSchema = z.record(z.string(), z.record(z.string(), z.unknown())).transform((entries, ctx) => {
|
|
335
|
-
const councillors = {};
|
|
336
|
-
for (const [key, raw] of Object.entries(entries)) {
|
|
337
|
-
if (key === "master")
|
|
338
|
-
continue;
|
|
339
|
-
if (key === "councillors" && typeof raw === "object" && raw !== null) {
|
|
340
|
-
for (const [innerKey, innerRaw] of Object.entries(raw)) {
|
|
341
|
-
const innerParsed = CouncillorConfigSchema.safeParse(innerRaw);
|
|
342
|
-
if (!innerParsed.success) {
|
|
343
|
-
ctx.addIssue({
|
|
344
|
-
code: z.ZodIssueCode.custom,
|
|
345
|
-
message: `Invalid councillor "${innerKey}" (nested under legacy "councillors" key): ${innerParsed.error.issues.map((i) => i.message).join(", ")}`
|
|
346
|
-
});
|
|
347
|
-
return z.NEVER;
|
|
348
|
-
}
|
|
349
|
-
councillors[innerKey] = innerParsed.data;
|
|
350
|
-
}
|
|
351
|
-
continue;
|
|
352
|
-
}
|
|
353
|
-
const parsed = CouncillorConfigSchema.safeParse(raw);
|
|
354
|
-
if (!parsed.success) {
|
|
355
|
-
ctx.addIssue({
|
|
356
|
-
code: z.ZodIssueCode.custom,
|
|
357
|
-
message: `Invalid councillor "${key}": ${parsed.error.issues.map((i) => i.message).join(", ")}`
|
|
358
|
-
});
|
|
359
|
-
return z.NEVER;
|
|
360
|
-
}
|
|
361
|
-
councillors[key] = parsed.data;
|
|
362
|
-
}
|
|
363
|
-
return councillors;
|
|
364
|
-
});
|
|
365
|
-
var CouncillorExecutionModeSchema = z.enum(["parallel", "serial"]).default("parallel").describe('Execution mode for councillors. Use "serial" for single-model systems to avoid conflicts. ' + 'Use "parallel" for multi-model systems for faster execution.');
|
|
366
|
-
var CouncilConfigSchema = z.object({
|
|
367
|
-
presets: z.record(z.string(), CouncilPresetSchema),
|
|
368
|
-
timeout: z.number().min(0).default(180000),
|
|
369
|
-
default_preset: z.string().default("default"),
|
|
370
|
-
councillor_execution_mode: CouncillorExecutionModeSchema.describe('Execution mode for councillors. "serial" runs them one at a time (required for single-model systems). "parallel" runs them concurrently (default, faster for multi-model systems).'),
|
|
371
|
-
councillor_retries: z.number().int().min(0).max(5).default(3).describe("Number of retry attempts for councillors that return empty responses " + "(e.g. due to provider rate limiting). Default: 3 retries."),
|
|
372
|
-
master: z.unknown().optional().describe("DEPRECATED - ignored. Council agent synthesizes directly.")
|
|
373
|
-
}).transform((data) => {
|
|
374
|
-
const deprecated = [];
|
|
375
|
-
if (data.master !== undefined)
|
|
376
|
-
deprecated.push("master");
|
|
377
|
-
const legacyMasterModel = typeof data.master === "object" && data.master !== null && "model" in data.master && typeof data.master.model === "string" ? data.master.model : undefined;
|
|
378
|
-
return {
|
|
379
|
-
presets: data.presets,
|
|
380
|
-
timeout: data.timeout,
|
|
381
|
-
default_preset: data.default_preset,
|
|
382
|
-
councillor_execution_mode: data.councillor_execution_mode,
|
|
383
|
-
councillor_retries: data.councillor_retries,
|
|
384
|
-
_deprecated: deprecated.length > 0 ? deprecated : undefined,
|
|
385
|
-
_legacyMasterModel: legacyMasterModel
|
|
386
|
-
};
|
|
387
|
-
});
|
|
388
300
|
// src/config/schema.ts
|
|
389
|
-
import { z
|
|
390
|
-
var ProviderModelIdSchema =
|
|
391
|
-
var ManualAgentPlanSchema =
|
|
301
|
+
import { z } from "zod";
|
|
302
|
+
var ProviderModelIdSchema = z.string().regex(/^[^/\s]+\/[^\s]+$/, "Expected provider/model format (provider/.../model)");
|
|
303
|
+
var ManualAgentPlanSchema = z.object({
|
|
392
304
|
primary: ProviderModelIdSchema,
|
|
393
305
|
fallback1: ProviderModelIdSchema,
|
|
394
306
|
fallback2: ProviderModelIdSchema,
|
|
@@ -402,12 +314,12 @@ var ManualAgentPlanSchema = z2.object({
|
|
|
402
314
|
]);
|
|
403
315
|
if (unique.size !== 4) {
|
|
404
316
|
ctx.addIssue({
|
|
405
|
-
code:
|
|
317
|
+
code: z.ZodIssueCode.custom,
|
|
406
318
|
message: "primary and fallbacks must be unique per agent"
|
|
407
319
|
});
|
|
408
320
|
}
|
|
409
321
|
});
|
|
410
|
-
var ManualPlanSchema =
|
|
322
|
+
var ManualPlanSchema = z.object({
|
|
411
323
|
orchestrator: ManualAgentPlanSchema,
|
|
412
324
|
oracle: ManualAgentPlanSchema,
|
|
413
325
|
designer: ManualAgentPlanSchema,
|
|
@@ -415,12 +327,12 @@ var ManualPlanSchema = z2.object({
|
|
|
415
327
|
librarian: ManualAgentPlanSchema,
|
|
416
328
|
fixer: ManualAgentPlanSchema
|
|
417
329
|
}).strict();
|
|
418
|
-
var PermissionActionSchema =
|
|
419
|
-
var PermissionRuleSchema =
|
|
330
|
+
var PermissionActionSchema = z.enum(["ask", "allow", "deny"]);
|
|
331
|
+
var PermissionRuleSchema = z.union([
|
|
420
332
|
PermissionActionSchema,
|
|
421
|
-
|
|
333
|
+
z.record(z.string(), PermissionActionSchema)
|
|
422
334
|
]);
|
|
423
|
-
var PermissionObjectSchema =
|
|
335
|
+
var PermissionObjectSchema = z.object({
|
|
424
336
|
read: PermissionRuleSchema.optional(),
|
|
425
337
|
edit: PermissionRuleSchema.optional(),
|
|
426
338
|
glob: PermissionRuleSchema.optional(),
|
|
@@ -438,32 +350,32 @@ var PermissionObjectSchema = z2.object({
|
|
|
438
350
|
codesearch: PermissionActionSchema.optional(),
|
|
439
351
|
doom_loop: PermissionActionSchema.optional()
|
|
440
352
|
}).catchall(PermissionRuleSchema);
|
|
441
|
-
var PermissionConfigSchema =
|
|
353
|
+
var PermissionConfigSchema = z.union([
|
|
442
354
|
PermissionActionSchema,
|
|
443
355
|
PermissionObjectSchema
|
|
444
356
|
]);
|
|
445
|
-
var AgentOverrideConfigSchema =
|
|
446
|
-
model:
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
id:
|
|
452
|
-
variant:
|
|
357
|
+
var AgentOverrideConfigSchema = z.object({
|
|
358
|
+
model: z.union([
|
|
359
|
+
z.string(),
|
|
360
|
+
z.array(z.union([
|
|
361
|
+
z.string(),
|
|
362
|
+
z.object({
|
|
363
|
+
id: z.string(),
|
|
364
|
+
variant: z.string().optional()
|
|
453
365
|
})
|
|
454
366
|
])).min(1)
|
|
455
367
|
]).optional(),
|
|
456
|
-
temperature:
|
|
457
|
-
variant:
|
|
458
|
-
skills:
|
|
459
|
-
mcps:
|
|
460
|
-
prompt:
|
|
461
|
-
orchestratorPrompt:
|
|
462
|
-
options:
|
|
463
|
-
displayName:
|
|
368
|
+
temperature: z.number().min(0).max(2).optional(),
|
|
369
|
+
variant: z.string().optional().catch(undefined),
|
|
370
|
+
skills: z.array(z.string()).optional(),
|
|
371
|
+
mcps: z.array(z.string()).optional(),
|
|
372
|
+
prompt: z.string().min(1).optional(),
|
|
373
|
+
orchestratorPrompt: z.string().min(1).optional(),
|
|
374
|
+
options: z.record(z.string(), z.unknown()).optional(),
|
|
375
|
+
displayName: z.string().min(1).optional(),
|
|
464
376
|
permission: PermissionConfigSchema.optional()
|
|
465
377
|
}).strict();
|
|
466
|
-
var MultiplexerTypeSchema =
|
|
378
|
+
var MultiplexerTypeSchema = z.enum([
|
|
467
379
|
"auto",
|
|
468
380
|
"tmux",
|
|
469
381
|
"zellij",
|
|
@@ -471,107 +383,106 @@ var MultiplexerTypeSchema = z2.enum([
|
|
|
471
383
|
"cmux",
|
|
472
384
|
"none"
|
|
473
385
|
]);
|
|
474
|
-
var MultiplexerLayoutSchema =
|
|
386
|
+
var MultiplexerLayoutSchema = z.enum([
|
|
475
387
|
"main-horizontal",
|
|
476
388
|
"main-vertical",
|
|
477
389
|
"tiled",
|
|
478
390
|
"even-horizontal",
|
|
479
391
|
"even-vertical"
|
|
480
392
|
]);
|
|
481
|
-
var ZellijPaneModeSchema =
|
|
393
|
+
var ZellijPaneModeSchema = z.enum(["agent-tab", "current-tab"]);
|
|
482
394
|
var TmuxLayoutSchema = MultiplexerLayoutSchema;
|
|
483
|
-
var MultiplexerConfigSchema =
|
|
395
|
+
var MultiplexerConfigSchema = z.object({
|
|
484
396
|
type: MultiplexerTypeSchema.default("none"),
|
|
485
397
|
layout: MultiplexerLayoutSchema.default("main-vertical"),
|
|
486
|
-
main_pane_size:
|
|
398
|
+
main_pane_size: z.number().min(20).max(80).default(60),
|
|
487
399
|
zellij_pane_mode: ZellijPaneModeSchema.default("agent-tab")
|
|
488
400
|
});
|
|
489
|
-
var TmuxConfigSchema =
|
|
490
|
-
enabled:
|
|
401
|
+
var TmuxConfigSchema = z.object({
|
|
402
|
+
enabled: z.boolean().default(false),
|
|
491
403
|
layout: TmuxLayoutSchema.default("main-vertical"),
|
|
492
|
-
main_pane_size:
|
|
404
|
+
main_pane_size: z.number().min(20).max(80).default(60)
|
|
493
405
|
});
|
|
494
|
-
var PresetSchema =
|
|
495
|
-
var WebsearchConfigSchema =
|
|
496
|
-
provider:
|
|
406
|
+
var PresetSchema = z.record(z.string(), AgentOverrideConfigSchema);
|
|
407
|
+
var WebsearchConfigSchema = z.object({
|
|
408
|
+
provider: z.enum(["exa", "tavily"]).default("exa")
|
|
497
409
|
});
|
|
498
|
-
var McpNameSchema =
|
|
499
|
-
var InterviewConfigSchema =
|
|
500
|
-
maxQuestions:
|
|
501
|
-
outputFolder:
|
|
502
|
-
autoOpenBrowser:
|
|
503
|
-
port:
|
|
504
|
-
dashboard:
|
|
410
|
+
var McpNameSchema = z.enum(["websearch", "context7", "gh_grep"]);
|
|
411
|
+
var InterviewConfigSchema = z.object({
|
|
412
|
+
maxQuestions: z.number().int().min(1).max(10).default(2),
|
|
413
|
+
outputFolder: z.string().min(1).default("interview"),
|
|
414
|
+
autoOpenBrowser: z.boolean().default(true).describe("Automatically open the interview UI in your default browser during interactive runs. Disabled automatically in tests and CI."),
|
|
415
|
+
port: z.number().int().min(0).max(65535).default(0),
|
|
416
|
+
dashboard: z.boolean().default(false)
|
|
505
417
|
});
|
|
506
|
-
var BackgroundJobsConfigSchema =
|
|
507
|
-
maxSessionsPerAgent:
|
|
508
|
-
readContextMinLines:
|
|
509
|
-
readContextMaxFiles:
|
|
418
|
+
var BackgroundJobsConfigSchema = z.object({
|
|
419
|
+
maxSessionsPerAgent: z.number().int().min(1).max(10).default(2),
|
|
420
|
+
readContextMinLines: z.number().int().min(0).max(1000).default(10),
|
|
421
|
+
readContextMaxFiles: z.number().int().min(0).max(50).default(8)
|
|
510
422
|
});
|
|
511
|
-
var FailoverConfigSchema =
|
|
512
|
-
enabled:
|
|
513
|
-
timeoutMs:
|
|
514
|
-
retryDelayMs:
|
|
515
|
-
maxRetries:
|
|
516
|
-
retry_on_empty:
|
|
517
|
-
runtimeOverride:
|
|
423
|
+
var FailoverConfigSchema = z.object({
|
|
424
|
+
enabled: z.boolean().default(true),
|
|
425
|
+
timeoutMs: z.number().min(0).default(15000),
|
|
426
|
+
retryDelayMs: z.number().min(0).default(500),
|
|
427
|
+
maxRetries: z.number().int().min(0).default(3).describe("Number of consecutive 429/rate-limit responses tolerated on the " + "same model before aborting (or swapping to the next fallback " + "model when a chain is configured)."),
|
|
428
|
+
retry_on_empty: z.boolean().default(true).describe("When true (default), empty provider responses are treated as failures, " + "triggering fallback/retry. Set to false to treat them as successes."),
|
|
429
|
+
runtimeOverride: z.boolean().optional().describe("DEPRECATED: no longer used. Previously controlled whether out-of-chain " + "runtime model picks triggered fallback. Fallback is now always " + "disabled when a user explicitly selects a model via /model.")
|
|
518
430
|
}).strict();
|
|
519
|
-
var CompanionConfigSchema =
|
|
520
|
-
enabled:
|
|
521
|
-
binaryPath:
|
|
522
|
-
position:
|
|
523
|
-
size:
|
|
524
|
-
gifPack:
|
|
525
|
-
loopStyle:
|
|
526
|
-
speed:
|
|
527
|
-
debug:
|
|
431
|
+
var CompanionConfigSchema = z.object({
|
|
432
|
+
enabled: z.boolean().optional(),
|
|
433
|
+
binaryPath: z.string().min(1).optional().describe("Path to a custom companion binary to launch."),
|
|
434
|
+
position: z.enum(["bottom-right", "bottom-left", "top-right", "top-left"]).optional(),
|
|
435
|
+
size: z.enum(["small", "medium", "large"]).optional(),
|
|
436
|
+
gifPack: z.enum(["default"]).optional().describe("Bundled companion animation pack to use."),
|
|
437
|
+
loopStyle: z.enum(["classic", "smooth"]).optional().describe("Companion animation playback style: classic loops or smooth ping-pong playback."),
|
|
438
|
+
speed: z.number().min(0.25).max(4).optional().describe("Companion animation playback speed multiplier. Defaults to 1."),
|
|
439
|
+
debug: z.boolean().optional().describe("Enable verbose native companion debug logs.")
|
|
528
440
|
});
|
|
529
|
-
var AcpAgentPermissionModeSchema =
|
|
441
|
+
var AcpAgentPermissionModeSchema = z.enum(["ask", "allow", "reject"]);
|
|
530
442
|
var MAX_ACP_TIMEOUT_MS = 2147483647;
|
|
531
|
-
var AcpAgentConfigSchema =
|
|
532
|
-
command:
|
|
533
|
-
args:
|
|
534
|
-
env:
|
|
535
|
-
cwd:
|
|
536
|
-
description:
|
|
537
|
-
prompt:
|
|
538
|
-
orchestratorPrompt:
|
|
443
|
+
var AcpAgentConfigSchema = z.object({
|
|
444
|
+
command: z.string().min(1),
|
|
445
|
+
args: z.array(z.string()).default([]),
|
|
446
|
+
env: z.record(z.string(), z.string()).default({}),
|
|
447
|
+
cwd: z.string().min(1).optional(),
|
|
448
|
+
description: z.string().min(1).optional(),
|
|
449
|
+
prompt: z.string().min(1).optional(),
|
|
450
|
+
orchestratorPrompt: z.string().min(1).optional(),
|
|
539
451
|
wrapperModel: ProviderModelIdSchema.optional(),
|
|
540
|
-
timeoutMs:
|
|
452
|
+
timeoutMs: z.number().int().min(0).max(MAX_ACP_TIMEOUT_MS).default(0).describe("Timeout for a single ACP run in milliseconds. Set to 0 to disable the timeout."),
|
|
541
453
|
permissionMode: AcpAgentPermissionModeSchema.default("ask")
|
|
542
454
|
}).strict();
|
|
543
|
-
var AcpAgentsConfigSchema =
|
|
455
|
+
var AcpAgentsConfigSchema = z.record(z.string(), AcpAgentConfigSchema);
|
|
544
456
|
function rejectOrchestratorPromptOnOrchestrator(overrides, ctx, pathPrefix) {
|
|
545
457
|
for (const [name, override] of Object.entries(overrides)) {
|
|
546
458
|
if (name === "orchestrator" && override.orchestratorPrompt !== undefined) {
|
|
547
459
|
ctx.addIssue({
|
|
548
|
-
code:
|
|
460
|
+
code: z.ZodIssueCode.custom,
|
|
549
461
|
path: [...pathPrefix, name, "orchestratorPrompt"],
|
|
550
462
|
message: "orchestratorPrompt is not supported for the orchestrator agent"
|
|
551
463
|
});
|
|
552
464
|
}
|
|
553
465
|
}
|
|
554
466
|
}
|
|
555
|
-
var PluginConfigSchema =
|
|
556
|
-
preset:
|
|
557
|
-
setDefaultAgent:
|
|
558
|
-
compactSidebar:
|
|
559
|
-
stripOrchestratorModel:
|
|
560
|
-
autoUpdate:
|
|
561
|
-
presets:
|
|
562
|
-
agents:
|
|
563
|
-
disabled_agents:
|
|
564
|
-
image_routing:
|
|
565
|
-
disabled_mcps:
|
|
566
|
-
disabled_tools:
|
|
567
|
-
disabled_skills:
|
|
467
|
+
var PluginConfigSchema = z.object({
|
|
468
|
+
preset: z.string().optional(),
|
|
469
|
+
setDefaultAgent: z.boolean().optional(),
|
|
470
|
+
compactSidebar: z.boolean().optional().describe("Use the compact TUI sidebar layout. Defaults to true; set false to use the expanded layout."),
|
|
471
|
+
stripOrchestratorModel: z.boolean().optional().describe("When true, omit orchestrator.model and orchestrator.variant from the SDK config so OpenCode uses the session model selected with /model after subagent dispatch. An explicitly selected preset that sets orchestrator.model is preserved. Defaults to false."),
|
|
472
|
+
autoUpdate: z.boolean().optional().describe("Disable automatic installation of plugin updates when false. Defaults to true."),
|
|
473
|
+
presets: z.record(z.string(), PresetSchema).optional(),
|
|
474
|
+
agents: z.record(z.string(), AgentOverrideConfigSchema).optional(),
|
|
475
|
+
disabled_agents: z.array(z.string()).optional().describe("Agent names to disable completely. " + "Disabled agents are not instantiated and cannot be delegated to. " + "Orchestrator cannot be disabled. " + "By default, 'observer' is disabled. Remove it from this list and configure a vision-capable model to enable."),
|
|
476
|
+
image_routing: z.enum(["auto", "direct"]).optional().describe("How image attachments are handled. " + "When omitted, preserves legacy conditional behavior: intercept " + 'attachments only when observer is enabled. "auto": requires ' + "observer to be enabled and saves attachments to disk before " + 'nudging delegation to @observer. "direct": always passes ' + "attachments to the orchestrator untouched."),
|
|
477
|
+
disabled_mcps: z.array(z.string()).optional().describe("MCP server names to disable completely. Disabled servers are not " + "started and cannot be used by agents."),
|
|
478
|
+
disabled_tools: z.array(z.string()).optional().describe("Tool names to disable completely. Disabled tools are not registered with OpenCode and cannot be used by agents."),
|
|
479
|
+
disabled_skills: z.array(z.string()).optional().describe("Skill names to disable completely. Disabled skills are not granted to agents, even when referenced by presets or agent overrides."),
|
|
568
480
|
multiplexer: MultiplexerConfigSchema.optional(),
|
|
569
481
|
tmux: TmuxConfigSchema.optional(),
|
|
570
482
|
websearch: WebsearchConfigSchema.optional(),
|
|
571
483
|
interview: InterviewConfigSchema.optional(),
|
|
572
484
|
backgroundJobs: BackgroundJobsConfigSchema.optional(),
|
|
573
485
|
fallback: FailoverConfigSchema.optional(),
|
|
574
|
-
council: CouncilConfigSchema.optional(),
|
|
575
486
|
companion: CompanionConfigSchema.optional(),
|
|
576
487
|
acpAgents: AcpAgentsConfigSchema.optional()
|
|
577
488
|
}).superRefine((value, ctx) => {
|
|
@@ -595,9 +506,7 @@ var DEFAULT_AGENT_MCPS = {
|
|
|
595
506
|
librarian: ["websearch", "context7", "gh_grep"],
|
|
596
507
|
explorer: [],
|
|
597
508
|
fixer: [],
|
|
598
|
-
observer: []
|
|
599
|
-
council: [],
|
|
600
|
-
councillor: []
|
|
509
|
+
observer: []
|
|
601
510
|
};
|
|
602
511
|
|
|
603
512
|
// src/cli/custom-skills-registry.ts
|
|
@@ -639,10 +548,10 @@ var CUSTOM_SKILLS = [
|
|
|
639
548
|
sourcePath: "src/skills/reflect"
|
|
640
549
|
},
|
|
641
550
|
{
|
|
642
|
-
name: "oh-my-opencode-
|
|
643
|
-
description: "Configure, customize, and safely improve oh-my-opencode-
|
|
551
|
+
name: "oh-my-opencode-serverlocal",
|
|
552
|
+
description: "Configure, customize, and safely improve oh-my-opencode-serverlocal setups",
|
|
644
553
|
allowedAgents: ["orchestrator"],
|
|
645
|
-
sourcePath: "src/skills/oh-my-opencode-
|
|
554
|
+
sourcePath: "src/skills/oh-my-opencode-serverlocal"
|
|
646
555
|
},
|
|
647
556
|
{
|
|
648
557
|
name: "worktrees",
|
|
@@ -653,7 +562,7 @@ var CUSTOM_SKILLS = [
|
|
|
653
562
|
];
|
|
654
563
|
|
|
655
564
|
// src/cli/providers.ts
|
|
656
|
-
var SCHEMA_URL = "https://unpkg.com/oh-my-opencode-
|
|
565
|
+
var SCHEMA_URL = "https://unpkg.com/oh-my-opencode-serverlocal@latest/oh-my-opencode-serverlocal.schema.json";
|
|
657
566
|
var GENERATED_PRESETS = ["openai", "opencode-go"];
|
|
658
567
|
var MODEL_MAPPINGS = {
|
|
659
568
|
openai: {
|
|
@@ -1308,7 +1217,6 @@ function mergePluginConfigs(base, override) {
|
|
|
1308
1217
|
interview: deepMerge(base.interview, override.interview),
|
|
1309
1218
|
backgroundJobs: deepMerge(base.backgroundJobs, override.backgroundJobs),
|
|
1310
1219
|
fallback: deepMerge(base.fallback, override.fallback),
|
|
1311
|
-
council: deepMerge(base.council, override.council),
|
|
1312
1220
|
acpAgents: deepMerge(base.acpAgents, override.acpAgents),
|
|
1313
1221
|
companion: deepMerge(base.companion, override.companion)
|
|
1314
1222
|
};
|
|
@@ -1374,7 +1282,7 @@ function checkConfigFile(scope, configPath) {
|
|
|
1374
1282
|
ok: false,
|
|
1375
1283
|
error: {
|
|
1376
1284
|
kind: "invalid-schema",
|
|
1377
|
-
message:
|
|
1285
|
+
message: z2.prettifyError(parseResult.error),
|
|
1378
1286
|
issues: parseResult.error.issues
|
|
1379
1287
|
}
|
|
1380
1288
|
};
|
|
@@ -1505,7 +1413,7 @@ function formatJsonDoctorResult(result) {
|
|
|
1505
1413
|
}
|
|
1506
1414
|
async function doctor(args) {
|
|
1507
1415
|
if (args.help) {
|
|
1508
|
-
console.log(`Usage: oh-my-opencode-
|
|
1416
|
+
console.log(`Usage: oh-my-opencode-serverlocal doctor [OPTIONS]
|
|
1509
1417
|
|
|
1510
1418
|
Options:
|
|
1511
1419
|
--json Print diagnostics as JSON
|
|
@@ -1966,7 +1874,7 @@ function syncBundledSkillsFromPackage(packageRoot, options = {}) {
|
|
|
1966
1874
|
} catch (err) {
|
|
1967
1875
|
log(`[skill-sync] Failed to read package version from ${packageRoot}:`, err);
|
|
1968
1876
|
}
|
|
1969
|
-
const manifestDir = path2.join(getConfigDir(), ".oh-my-opencode-
|
|
1877
|
+
const manifestDir = path2.join(getConfigDir(), ".oh-my-opencode-serverlocal");
|
|
1970
1878
|
const lockDir = path2.join(manifestDir, "skills.lock");
|
|
1971
1879
|
try {
|
|
1972
1880
|
mkdirSync3(manifestDir, { recursive: true });
|
|
@@ -2474,8 +2382,8 @@ import { existsSync as existsSync5, mkdirSync as mkdirSync4, readFileSync as rea
|
|
|
2474
2382
|
import { homedir as homedir3 } from "node:os";
|
|
2475
2383
|
import { dirname as dirname4, join as join5 } from "node:path";
|
|
2476
2384
|
var ENV_NAME = "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS";
|
|
2477
|
-
var START_MARKER = "# >>> oh-my-opencode-
|
|
2478
|
-
var END_MARKER = "# <<< oh-my-opencode-
|
|
2385
|
+
var START_MARKER = "# >>> oh-my-opencode-serverlocal background subagents >>>";
|
|
2386
|
+
var END_MARKER = "# <<< oh-my-opencode-serverlocal background subagents <<<";
|
|
2479
2387
|
function isBackgroundSubagentsEnabled(value) {
|
|
2480
2388
|
if (!value)
|
|
2481
2389
|
return false;
|
|
@@ -2590,13 +2498,13 @@ var FIRST_METADATA_VERSION = "0.1.2";
|
|
|
2590
2498
|
var COMPANION_MANIFEST = {
|
|
2591
2499
|
version: "0.1.3",
|
|
2592
2500
|
tag: "companion-v0.1.3",
|
|
2593
|
-
repo: "
|
|
2501
|
+
repo: "Darthph0enix7/oh-my-opencode-serverlocal",
|
|
2594
2502
|
checksums: {
|
|
2595
|
-
"oh-my-opencode-
|
|
2596
|
-
"oh-my-opencode-
|
|
2597
|
-
"oh-my-opencode-
|
|
2598
|
-
"oh-my-opencode-
|
|
2599
|
-
"oh-my-opencode-
|
|
2503
|
+
"oh-my-opencode-serverlocal-companion-v0.1.3-aarch64-apple-darwin.tar.gz": "b4885f9b1900c02376e5f8f5ae6f3b8a89d26f7514b03f836d7e3d618164a0ed",
|
|
2504
|
+
"oh-my-opencode-serverlocal-companion-v0.1.3-aarch64-unknown-linux-gnu.tar.gz": "ed7cffc583e1eaa78c9bea702e6b6aa3bbc5bb4d881713fb2050237ba6b7aca5",
|
|
2505
|
+
"oh-my-opencode-serverlocal-companion-v0.1.3-x86_64-apple-darwin.tar.gz": "98d8ea7c7bc4415b18e0d4c524adb4eb9a84c872919840fdc021f0f50c61f808",
|
|
2506
|
+
"oh-my-opencode-serverlocal-companion-v0.1.3-x86_64-pc-windows-msvc.zip": "9316a49bf01f3b4fb1ce2d62edfc46094e73bb153d6ce023fb7df085afcf77bd",
|
|
2507
|
+
"oh-my-opencode-serverlocal-companion-v0.1.3-x86_64-unknown-linux-gnu.tar.gz": "33f5fd4b6c80155a019391e5efb13904ca9531ba8dd8c6cba30a161f1b07b764"
|
|
2600
2508
|
}
|
|
2601
2509
|
};
|
|
2602
2510
|
function getCompanionTarget() {
|
|
@@ -2621,7 +2529,7 @@ function getCompanionTarget() {
|
|
|
2621
2529
|
function getCompanionBinaryPath() {
|
|
2622
2530
|
const xdg = process.env.XDG_DATA_HOME?.trim();
|
|
2623
2531
|
const base = xdg && path3.isAbsolute(xdg) ? xdg : path3.join(homedir4(), ".local", "share");
|
|
2624
|
-
return path3.join(base, "opencode", "storage", "oh-my-opencode-
|
|
2532
|
+
return path3.join(base, "opencode", "storage", "oh-my-opencode-serverlocal", "bin", platform() === "win32" ? "oh-my-opencode-serverlocal-companion.exe" : "oh-my-opencode-serverlocal-companion");
|
|
2625
2533
|
}
|
|
2626
2534
|
async function ensureCompanionVersion(options) {
|
|
2627
2535
|
const { config, dryRun = false } = options;
|
|
@@ -2748,7 +2656,7 @@ async function installCompanionArchive(finalBinaryPath, target, manifest, downlo
|
|
|
2748
2656
|
};
|
|
2749
2657
|
}
|
|
2750
2658
|
}
|
|
2751
|
-
const binaryName = isWindows ? "oh-my-opencode-
|
|
2659
|
+
const binaryName = isWindows ? "oh-my-opencode-serverlocal-companion.exe" : "oh-my-opencode-serverlocal-companion";
|
|
2752
2660
|
const extractedBinaryPath = path3.join(extractedDir, binaryName);
|
|
2753
2661
|
if (!existsSync6(extractedBinaryPath)) {
|
|
2754
2662
|
return {
|
|
@@ -2856,7 +2764,7 @@ async function withCompanionInstallLock(binaryPath, timeoutMs, staleMs, run) {
|
|
|
2856
2764
|
}
|
|
2857
2765
|
function companionArchiveName(version, target, isWindows = process.platform === "win32") {
|
|
2858
2766
|
const ext = isWindows ? "zip" : "tar.gz";
|
|
2859
|
-
return `oh-my-opencode-
|
|
2767
|
+
return `oh-my-opencode-serverlocal-companion-v${version}-${target}.${ext}`;
|
|
2860
2768
|
}
|
|
2861
2769
|
function compareSemver(a, b) {
|
|
2862
2770
|
const left = parseSemver(a);
|
|
@@ -2892,7 +2800,7 @@ async function installCompanion(config) {
|
|
|
2892
2800
|
};
|
|
2893
2801
|
}
|
|
2894
2802
|
const ext = process.platform === "win32" ? "zip" : "tar.gz";
|
|
2895
|
-
const archiveName = `oh-my-opencode-
|
|
2803
|
+
const archiveName = `oh-my-opencode-serverlocal-companion-v${COMPANION_MANIFEST.version}-${target}.${ext}`;
|
|
2896
2804
|
const downloadUrl = `https://github.com/${COMPANION_MANIFEST.repo}/releases/download/${COMPANION_MANIFEST.tag}/${archiveName}`;
|
|
2897
2805
|
if (config.dryRun) {
|
|
2898
2806
|
console.log(` [dry-run] Detected companion target: ${target}`);
|
|
@@ -3064,11 +2972,11 @@ var SYMBOLS = {
|
|
|
3064
2972
|
warn: `${YELLOW}[!]${RESET}`,
|
|
3065
2973
|
star: `${YELLOW}★${RESET}`
|
|
3066
2974
|
};
|
|
3067
|
-
var GITHUB_REPO = "
|
|
2975
|
+
var GITHUB_REPO = "Darthph0enix7/oh-my-opencode-serverlocal";
|
|
3068
2976
|
var GITHUB_URL = `https://github.com/${GITHUB_REPO}`;
|
|
3069
2977
|
function printHeader(isUpdate) {
|
|
3070
2978
|
console.log();
|
|
3071
|
-
console.log(`${BOLD}oh-my-opencode-
|
|
2979
|
+
console.log(`${BOLD}oh-my-opencode-serverlocal ${isUpdate ? "Update" : "Install"}${RESET}`);
|
|
3072
2980
|
console.log("=".repeat(30));
|
|
3073
2981
|
console.log();
|
|
3074
2982
|
}
|
|
@@ -3248,7 +3156,7 @@ async function runInstall(config) {
|
|
|
3248
3156
|
if (!ok)
|
|
3249
3157
|
return 1;
|
|
3250
3158
|
}
|
|
3251
|
-
printStep(step++, totalSteps, "Adding oh-my-opencode-
|
|
3159
|
+
printStep(step++, totalSteps, "Adding oh-my-opencode-serverlocal plugin...");
|
|
3252
3160
|
if (config.dryRun) {
|
|
3253
3161
|
printInfo("Dry run mode - skipping plugin installation");
|
|
3254
3162
|
} else {
|
|
@@ -3305,7 +3213,7 @@ async function runInstall(config) {
|
|
|
3305
3213
|
if (!companionResult.success)
|
|
3306
3214
|
config.companion = "no";
|
|
3307
3215
|
}
|
|
3308
|
-
printStep(step++, totalSteps, "Writing oh-my-opencode-
|
|
3216
|
+
printStep(step++, totalSteps, "Writing oh-my-opencode-serverlocal configuration...");
|
|
3309
3217
|
if (config.dryRun) {
|
|
3310
3218
|
const liteConfig = generateLiteConfig(config);
|
|
3311
3219
|
printInfo("Dry run mode - configuration that would be written:");
|
|
@@ -3416,7 +3324,7 @@ ${JSON.stringify(liteConfig, null, 2)}
|
|
|
3416
3324
|
console.log(`${modelsInfo}`);
|
|
3417
3325
|
const altProviders = "For the full configuration reference, see:";
|
|
3418
3326
|
console.log(altProviders);
|
|
3419
|
-
const docsUrl = "https://github.com/
|
|
3327
|
+
const docsUrl = "https://github.com/Darthph0enix7/oh-my-opencode-serverlocal/blob/master/docs/configuration.md";
|
|
3420
3328
|
console.log(` ${BLUE}${docsUrl}${RESET}`);
|
|
3421
3329
|
console.log();
|
|
3422
3330
|
await askToStarRepo(config);
|
|
@@ -3495,11 +3403,11 @@ function parseArgs(args) {
|
|
|
3495
3403
|
}
|
|
3496
3404
|
function printHelp() {
|
|
3497
3405
|
console.log(`
|
|
3498
|
-
oh-my-opencode-
|
|
3406
|
+
oh-my-opencode-serverlocal installer
|
|
3499
3407
|
|
|
3500
3408
|
Usage:
|
|
3501
|
-
bunx oh-my-opencode-
|
|
3502
|
-
bunx oh-my-opencode-
|
|
3409
|
+
bunx oh-my-opencode-serverlocal install [OPTIONS]
|
|
3410
|
+
bunx oh-my-opencode-serverlocal doctor [OPTIONS]
|
|
3503
3411
|
|
|
3504
3412
|
Options:
|
|
3505
3413
|
--skills=yes|no Install bundled skills (default: yes)
|
|
@@ -3526,12 +3434,12 @@ OpenAI is active unless --preset selects another generated preset.
|
|
|
3526
3434
|
For the full config reference, see docs/configuration.md.
|
|
3527
3435
|
|
|
3528
3436
|
Examples:
|
|
3529
|
-
bunx oh-my-opencode-
|
|
3530
|
-
bunx oh-my-opencode-
|
|
3531
|
-
bunx oh-my-opencode-
|
|
3532
|
-
bunx oh-my-opencode-
|
|
3533
|
-
bunx oh-my-opencode-
|
|
3534
|
-
bunx oh-my-opencode-
|
|
3437
|
+
bunx oh-my-opencode-serverlocal install
|
|
3438
|
+
bunx oh-my-opencode-serverlocal install --no-tui --skills=yes
|
|
3439
|
+
bunx oh-my-opencode-serverlocal install --background-subagents=yes
|
|
3440
|
+
bunx oh-my-opencode-serverlocal install --preset=opencode-go
|
|
3441
|
+
bunx oh-my-opencode-serverlocal install --reset
|
|
3442
|
+
bunx oh-my-opencode-serverlocal doctor
|
|
3535
3443
|
`);
|
|
3536
3444
|
}
|
|
3537
3445
|
async function main() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const AGENT_ALIASES: Record<string, string>;
|
|
2
|
-
export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "fixer", "observer"
|
|
3
|
-
export declare const ALL_AGENT_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "fixer", "observer"
|
|
2
|
+
export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "fixer", "observer"];
|
|
3
|
+
export declare const ALL_AGENT_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "fixer", "observer"];
|
|
4
4
|
export type AgentName = (typeof ALL_AGENT_NAMES)[number];
|
|
5
5
|
/** Agents that cannot be disabled even if listed in disabled_agents config. */
|
|
6
6
|
export declare const PROTECTED_AGENTS: Set<string>;
|
|
7
7
|
/**
|
|
8
8
|
* Default models for each agent.
|
|
9
9
|
* All set to undefined so agents follow the global/session model.
|
|
10
|
-
* Users can override per-agent via oh-my-opencode-
|
|
10
|
+
* Users can override per-agent via oh-my-opencode-serverlocal.json agents.<name>.model.
|
|
11
11
|
*/
|
|
12
12
|
export declare const DEFAULT_MODELS: Record<AgentName, string | undefined>;
|
|
13
13
|
export declare const POLL_INTERVAL_MS = 500;
|
package/dist/config/index.d.ts
CHANGED
package/dist/config/loader.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface LoadPluginConfigOptions {
|
|
|
29
29
|
/**
|
|
30
30
|
* Find plugin config paths (user and project) for a given directory.
|
|
31
31
|
* User config uses getConfigSearchDirs() for lookup.
|
|
32
|
-
* Project config uses <directory>/.opencode/oh-my-opencode-
|
|
32
|
+
* Project config uses <directory>/.opencode/oh-my-opencode-serverlocal.
|
|
33
33
|
*
|
|
34
34
|
* @param directory - Project directory to search for .opencode config
|
|
35
35
|
* @returns Object with userConfigPath and projectConfigPath (null if not found)
|
|
@@ -56,9 +56,9 @@ export declare function deepMerge<T extends Record<string, unknown>>(base?: T, o
|
|
|
56
56
|
* Load plugin configuration from user and project config files, merging them appropriately.
|
|
57
57
|
*
|
|
58
58
|
* Configuration is loaded from two locations:
|
|
59
|
-
* 1. User config: $OPENCODE_CONFIG_DIR/oh-my-opencode-
|
|
60
|
-
* or ~/.config/opencode/oh-my-opencode-
|
|
61
|
-
* 2. Project config: <directory>/.opencode/oh-my-opencode-
|
|
59
|
+
* 1. User config: $OPENCODE_CONFIG_DIR/oh-my-opencode-serverlocal.jsonc or .json,
|
|
60
|
+
* or ~/.config/opencode/oh-my-opencode-serverlocal.jsonc or .json (or $XDG_CONFIG_HOME)
|
|
61
|
+
* 2. Project config: <directory>/.opencode/oh-my-opencode-serverlocal.jsonc or .json
|
|
62
62
|
*
|
|
63
63
|
* JSONC format is preferred over JSON (allows comments and trailing commas).
|
|
64
64
|
* Project config takes precedence over user config. Nested objects (agents, tmux) are
|