@skj1724/oh-my-opencode 3.18.2 → 3.18.4
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/agents/builtin-agents/atlas-agent.d.ts +2 -0
- package/dist/agents/sisyphus-junior/agent.d.ts +1 -1
- package/dist/cli/index.js +3 -2
- package/dist/config/schema/commands.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +1 -0
- package/dist/index.js +86 -69
- package/dist/oh-my-opencode.schema.json +2 -1
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +5 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export declare function getSisyphusJuniorPromptSource(model?: string): SisyphusJ
|
|
|
21
21
|
* Builds the appropriate Sisyphus-Junior prompt based on model.
|
|
22
22
|
*/
|
|
23
23
|
export declare function buildSisyphusJuniorPrompt(model: string | undefined, useTaskSystem: boolean, promptAppend?: string): string;
|
|
24
|
-
export declare function createSisyphusJuniorAgentWithOverrides(override: AgentOverrideConfig | undefined, systemDefaultModel?: string, useTaskSystem?: boolean): AgentConfig;
|
|
24
|
+
export declare function createSisyphusJuniorAgentWithOverrides(override: AgentOverrideConfig | undefined, systemDefaultModel?: string, useTaskSystem?: boolean, directory?: string, language?: string, disableOmoEnv?: boolean): AgentConfig;
|
|
25
25
|
export declare namespace createSisyphusJuniorAgentWithOverrides {
|
|
26
26
|
var mode: "subagent";
|
|
27
27
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -53770,7 +53770,7 @@ var {
|
|
|
53770
53770
|
// package.json
|
|
53771
53771
|
var package_default = {
|
|
53772
53772
|
name: "@skj1724/oh-my-opencode",
|
|
53773
|
-
version: "3.18.
|
|
53773
|
+
version: "3.18.4",
|
|
53774
53774
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
53775
53775
|
main: "./dist/index.js",
|
|
53776
53776
|
types: "dist/index.d.ts",
|
|
@@ -74094,7 +74094,8 @@ var BuiltinCommandNameSchema = exports_external.enum([
|
|
|
74094
74094
|
"refactor",
|
|
74095
74095
|
"start-work",
|
|
74096
74096
|
"stop-continuation",
|
|
74097
|
-
"remove-ai-slops"
|
|
74097
|
+
"remove-ai-slops",
|
|
74098
|
+
"open-plan"
|
|
74098
74099
|
]);
|
|
74099
74100
|
// src/config/schema/dynamic-context-pruning.ts
|
|
74100
74101
|
var DynamicContextPruningConfigSchema = exports_external.object({
|
|
@@ -8,5 +8,6 @@ export declare const BuiltinCommandNameSchema: z.ZodEnum<{
|
|
|
8
8
|
"start-work": "start-work";
|
|
9
9
|
"stop-continuation": "stop-continuation";
|
|
10
10
|
"remove-ai-slops": "remove-ai-slops";
|
|
11
|
+
"open-plan": "open-plan";
|
|
11
12
|
}>;
|
|
12
13
|
export type BuiltinCommandName = z.infer<typeof BuiltinCommandNameSchema>;
|
|
@@ -25,6 +25,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
25
25
|
"start-work": "start-work";
|
|
26
26
|
"stop-continuation": "stop-continuation";
|
|
27
27
|
"remove-ai-slops": "remove-ai-slops";
|
|
28
|
+
"open-plan": "open-plan";
|
|
28
29
|
}>>>;
|
|
29
30
|
disabled_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
31
|
mcp_env_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
package/dist/index.js
CHANGED
|
@@ -81749,7 +81749,8 @@ var BuiltinCommandNameSchema = z12.enum([
|
|
|
81749
81749
|
"refactor",
|
|
81750
81750
|
"start-work",
|
|
81751
81751
|
"stop-continuation",
|
|
81752
|
-
"remove-ai-slops"
|
|
81752
|
+
"remove-ai-slops",
|
|
81753
|
+
"open-plan"
|
|
81753
81754
|
]);
|
|
81754
81755
|
// src/config/schema/dynamic-context-pruning.ts
|
|
81755
81756
|
import { z as z13 } from "zod";
|
|
@@ -120054,6 +120055,50 @@ No tasks on multi-step work = INCOMPLETE WORK. The user tracks your progress thr
|
|
|
120054
120055
|
|
|
120055
120056
|
No todos on multi-step work = INCOMPLETE WORK. The user tracks your progress through todos.`;
|
|
120056
120057
|
}
|
|
120058
|
+
// src/agents/env-context.ts
|
|
120059
|
+
var LANGUAGE_GUIDANCE = {
|
|
120060
|
+
"zh-CN": "Language Guidance: Respond in Chinese unless explicitly requested otherwise",
|
|
120061
|
+
"zh-TW": "Language Guidance: Respond in Traditional Chinese unless explicitly requested otherwise",
|
|
120062
|
+
"ja-JP": "Language Guidance: Respond in Japanese unless explicitly requested otherwise",
|
|
120063
|
+
"ko-KR": "Language Guidance: Respond in Korean unless explicitly requested otherwise",
|
|
120064
|
+
"fr-FR": "Language Guidance: Respond in French unless explicitly requested otherwise",
|
|
120065
|
+
"de-DE": "Language Guidance: Respond in German unless explicitly requested otherwise",
|
|
120066
|
+
"es-ES": "Language Guidance: Respond in Spanish unless explicitly requested otherwise",
|
|
120067
|
+
"pt-BR": "Language Guidance: Respond in Portuguese unless explicitly requested otherwise",
|
|
120068
|
+
"ru-RU": "Language Guidance: Respond in Russian unless explicitly requested otherwise",
|
|
120069
|
+
"vi-VN": "Language Guidance: Respond in Vietnamese unless explicitly requested otherwise",
|
|
120070
|
+
"th-TH": "Language Guidance: Respond in Thai unless explicitly requested otherwise",
|
|
120071
|
+
"id-ID": "Language Guidance: Respond in Indonesian unless explicitly requested otherwise",
|
|
120072
|
+
"ms-MY": "Language Guidance: Respond in Malay unless explicitly requested otherwise",
|
|
120073
|
+
"hi-IN": "Language Guidance: Respond in Hindi unless explicitly requested otherwise",
|
|
120074
|
+
"ar-SA": "Language Guidance: Respond in Arabic unless explicitly requested otherwise",
|
|
120075
|
+
"he-IL": "Language Guidance: Respond in Hebrew unless explicitly requested otherwise"
|
|
120076
|
+
};
|
|
120077
|
+
function createEnvContext(language) {
|
|
120078
|
+
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
120079
|
+
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
|
|
120080
|
+
const lines = [`Timezone: ${timezone}`, `Locale: ${locale}`];
|
|
120081
|
+
if (language && language !== "en" && language !== "en-US") {
|
|
120082
|
+
const guidance = LANGUAGE_GUIDANCE[language];
|
|
120083
|
+
if (guidance) {
|
|
120084
|
+
lines.push(guidance);
|
|
120085
|
+
}
|
|
120086
|
+
}
|
|
120087
|
+
return `
|
|
120088
|
+
<omo-env>
|
|
120089
|
+
${lines.map((l) => ` ${l}`).join(`
|
|
120090
|
+
`)}
|
|
120091
|
+
</omo-env>`;
|
|
120092
|
+
}
|
|
120093
|
+
|
|
120094
|
+
// src/agents/builtin-agents/environment-context.ts
|
|
120095
|
+
function applyEnvironmentContext(config2, directory, options = {}) {
|
|
120096
|
+
if (options.disableOmoEnv || !directory || !config2.prompt)
|
|
120097
|
+
return config2;
|
|
120098
|
+
const envContext = createEnvContext(options.language);
|
|
120099
|
+
return { ...config2, prompt: config2.prompt + envContext };
|
|
120100
|
+
}
|
|
120101
|
+
|
|
120057
120102
|
// src/agents/sisyphus-junior/agent.ts
|
|
120058
120103
|
var MODE11 = "subagent";
|
|
120059
120104
|
var BLOCKED_TOOLS3 = ["task"];
|
|
@@ -120092,7 +120137,7 @@ function buildSisyphusJuniorPrompt(model, useTaskSystem, promptAppend) {
|
|
|
120092
120137
|
return buildDefaultSisyphusJuniorPrompt(useTaskSystem, promptAppend);
|
|
120093
120138
|
}
|
|
120094
120139
|
}
|
|
120095
|
-
function createSisyphusJuniorAgentWithOverrides(override, systemDefaultModel, useTaskSystem = false) {
|
|
120140
|
+
function createSisyphusJuniorAgentWithOverrides(override, systemDefaultModel, useTaskSystem = false, directory, language, disableOmoEnv) {
|
|
120096
120141
|
if (override?.disable) {
|
|
120097
120142
|
override = undefined;
|
|
120098
120143
|
}
|
|
@@ -120115,7 +120160,7 @@ function createSisyphusJuniorAgentWithOverrides(override, systemDefaultModel, us
|
|
|
120115
120160
|
...toolsConfig.permission,
|
|
120116
120161
|
...getGptApplyPatchPermission(model)
|
|
120117
120162
|
};
|
|
120118
|
-
|
|
120163
|
+
let config2 = {
|
|
120119
120164
|
description: override?.description ?? "Focused task executor. Same discipline, no delegation. (Sisyphus-Junior - OhMyOpenCode)",
|
|
120120
120165
|
mode: MODE11,
|
|
120121
120166
|
model,
|
|
@@ -120126,18 +120171,20 @@ function createSisyphusJuniorAgentWithOverrides(override, systemDefaultModel, us
|
|
|
120126
120171
|
permission
|
|
120127
120172
|
};
|
|
120128
120173
|
if (override?.top_p !== undefined) {
|
|
120129
|
-
|
|
120174
|
+
config2.top_p = override.top_p;
|
|
120130
120175
|
}
|
|
120131
120176
|
if (isGptModel(model)) {
|
|
120132
|
-
|
|
120133
|
-
}
|
|
120134
|
-
|
|
120135
|
-
|
|
120177
|
+
config2 = { ...config2, reasoningEffort: "medium" };
|
|
120178
|
+
} else if (!isGlmModel(model)) {
|
|
120179
|
+
config2 = {
|
|
120180
|
+
...config2,
|
|
120181
|
+
thinking: { type: "enabled", budgetTokens: 32000 }
|
|
120182
|
+
};
|
|
120136
120183
|
}
|
|
120137
|
-
return {
|
|
120138
|
-
|
|
120139
|
-
|
|
120140
|
-
};
|
|
120184
|
+
return applyEnvironmentContext(config2, directory, {
|
|
120185
|
+
disableOmoEnv,
|
|
120186
|
+
language: override?.language ?? language
|
|
120187
|
+
});
|
|
120141
120188
|
}
|
|
120142
120189
|
createSisyphusJuniorAgentWithOverrides.mode = MODE11;
|
|
120143
120190
|
// src/agents/builtin-agents.ts
|
|
@@ -120255,50 +120302,6 @@ function applyOverrides(config2, override, mergedCategories, directory) {
|
|
|
120255
120302
|
return result;
|
|
120256
120303
|
}
|
|
120257
120304
|
|
|
120258
|
-
// src/agents/env-context.ts
|
|
120259
|
-
var LANGUAGE_GUIDANCE = {
|
|
120260
|
-
"zh-CN": "Language Guidance: Respond in Chinese unless explicitly requested otherwise",
|
|
120261
|
-
"zh-TW": "Language Guidance: Respond in Traditional Chinese unless explicitly requested otherwise",
|
|
120262
|
-
"ja-JP": "Language Guidance: Respond in Japanese unless explicitly requested otherwise",
|
|
120263
|
-
"ko-KR": "Language Guidance: Respond in Korean unless explicitly requested otherwise",
|
|
120264
|
-
"fr-FR": "Language Guidance: Respond in French unless explicitly requested otherwise",
|
|
120265
|
-
"de-DE": "Language Guidance: Respond in German unless explicitly requested otherwise",
|
|
120266
|
-
"es-ES": "Language Guidance: Respond in Spanish unless explicitly requested otherwise",
|
|
120267
|
-
"pt-BR": "Language Guidance: Respond in Portuguese unless explicitly requested otherwise",
|
|
120268
|
-
"ru-RU": "Language Guidance: Respond in Russian unless explicitly requested otherwise",
|
|
120269
|
-
"vi-VN": "Language Guidance: Respond in Vietnamese unless explicitly requested otherwise",
|
|
120270
|
-
"th-TH": "Language Guidance: Respond in Thai unless explicitly requested otherwise",
|
|
120271
|
-
"id-ID": "Language Guidance: Respond in Indonesian unless explicitly requested otherwise",
|
|
120272
|
-
"ms-MY": "Language Guidance: Respond in Malay unless explicitly requested otherwise",
|
|
120273
|
-
"hi-IN": "Language Guidance: Respond in Hindi unless explicitly requested otherwise",
|
|
120274
|
-
"ar-SA": "Language Guidance: Respond in Arabic unless explicitly requested otherwise",
|
|
120275
|
-
"he-IL": "Language Guidance: Respond in Hebrew unless explicitly requested otherwise"
|
|
120276
|
-
};
|
|
120277
|
-
function createEnvContext(language) {
|
|
120278
|
-
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
120279
|
-
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
|
|
120280
|
-
const lines = [`Timezone: ${timezone}`, `Locale: ${locale}`];
|
|
120281
|
-
if (language && language !== "en" && language !== "en-US") {
|
|
120282
|
-
const guidance = LANGUAGE_GUIDANCE[language];
|
|
120283
|
-
if (guidance) {
|
|
120284
|
-
lines.push(guidance);
|
|
120285
|
-
}
|
|
120286
|
-
}
|
|
120287
|
-
return `
|
|
120288
|
-
<omo-env>
|
|
120289
|
-
${lines.map((l) => ` ${l}`).join(`
|
|
120290
|
-
`)}
|
|
120291
|
-
</omo-env>`;
|
|
120292
|
-
}
|
|
120293
|
-
|
|
120294
|
-
// src/agents/builtin-agents/environment-context.ts
|
|
120295
|
-
function applyEnvironmentContext(config2, directory, options = {}) {
|
|
120296
|
-
if (options.disableOmoEnv || !directory || !config2.prompt)
|
|
120297
|
-
return config2;
|
|
120298
|
-
const envContext = createEnvContext(options.language);
|
|
120299
|
-
return { ...config2, prompt: config2.prompt + envContext };
|
|
120300
|
-
}
|
|
120301
|
-
|
|
120302
120305
|
// src/agents/builtin-agents/model-resolution.ts
|
|
120303
120306
|
function applyModelResolution(input) {
|
|
120304
120307
|
const { uiSelectedModel, userModel, requirement, availableModels, systemDefaultModel } = input;
|
|
@@ -120388,7 +120391,7 @@ function collectPendingBuiltinAgents(input) {
|
|
|
120388
120391
|
if (resolvedVariant) {
|
|
120389
120392
|
config2 = { ...config2, variant: resolvedVariant };
|
|
120390
120393
|
}
|
|
120391
|
-
if (
|
|
120394
|
+
if (["librarian", "oracle", "momus", "explore", "metis", "multimodal-looker"].includes(agentName)) {
|
|
120392
120395
|
config2 = applyEnvironmentContext(config2, directory, { disableOmoEnv, language: override?.language ?? language });
|
|
120393
120396
|
}
|
|
120394
120397
|
config2 = applyOverrides(config2, override, mergedCategories, directory);
|
|
@@ -120526,7 +120529,9 @@ function maybeCreateAtlasConfig(input) {
|
|
|
120526
120529
|
availableSkills,
|
|
120527
120530
|
mergedCategories,
|
|
120528
120531
|
directory,
|
|
120529
|
-
userCategories
|
|
120532
|
+
userCategories,
|
|
120533
|
+
disableOmoEnv,
|
|
120534
|
+
language
|
|
120530
120535
|
} = input;
|
|
120531
120536
|
if (disabledAgents.includes("atlas"))
|
|
120532
120537
|
return;
|
|
@@ -120552,6 +120557,7 @@ function maybeCreateAtlasConfig(input) {
|
|
|
120552
120557
|
orchestratorConfig = { ...orchestratorConfig, variant: atlasResolvedVariant };
|
|
120553
120558
|
}
|
|
120554
120559
|
orchestratorConfig = applyOverrides(orchestratorConfig, orchestratorOverride, mergedCategories, directory);
|
|
120560
|
+
orchestratorConfig = applyEnvironmentContext(orchestratorConfig, directory, { disableOmoEnv, language: orchestratorOverride?.language ?? language });
|
|
120555
120561
|
return orchestratorConfig;
|
|
120556
120562
|
}
|
|
120557
120563
|
|
|
@@ -120660,7 +120666,9 @@ async function createBuiltinAgents(disabledAgents = [], agentOverrides = {}, dir
|
|
|
120660
120666
|
availableSkills,
|
|
120661
120667
|
mergedCategories,
|
|
120662
120668
|
directory,
|
|
120663
|
-
userCategories: categories2
|
|
120669
|
+
userCategories: categories2,
|
|
120670
|
+
disableOmoEnv,
|
|
120671
|
+
language
|
|
120664
120672
|
});
|
|
120665
120673
|
if (atlasConfig) {
|
|
120666
120674
|
result["atlas"] = atlasConfig;
|
|
@@ -122976,15 +122984,21 @@ async function buildPrometheusAgentConfig(params) {
|
|
|
122976
122984
|
...textVerbosityToUse !== undefined ? { textVerbosity: textVerbosityToUse } : {}
|
|
122977
122985
|
};
|
|
122978
122986
|
const override = params.pluginPrometheusOverride;
|
|
122979
|
-
|
|
122980
|
-
|
|
122981
|
-
|
|
122982
|
-
|
|
122983
|
-
|
|
122984
|
-
|
|
122987
|
+
let config2;
|
|
122988
|
+
if (!override) {
|
|
122989
|
+
config2 = base;
|
|
122990
|
+
} else {
|
|
122991
|
+
const { prompt_append, ...restOverride } = override;
|
|
122992
|
+
config2 = { ...base, ...restOverride };
|
|
122993
|
+
if (prompt_append && typeof config2.prompt === "string") {
|
|
122994
|
+
config2.prompt = config2.prompt + `
|
|
122985
122995
|
` + resolvePromptAppend(prompt_append);
|
|
122996
|
+
}
|
|
122986
122997
|
}
|
|
122987
|
-
return
|
|
122998
|
+
return applyEnvironmentContext(config2, params.directory, {
|
|
122999
|
+
disableOmoEnv: params.disableOmoEnv,
|
|
123000
|
+
language: params.language
|
|
123001
|
+
});
|
|
122988
123002
|
}
|
|
122989
123003
|
|
|
122990
123004
|
// src/plugin-handlers/plan-model-inheritance.ts
|
|
@@ -123126,13 +123140,16 @@ async function applyAgentConfig(params) {
|
|
|
123126
123140
|
pluginPrometheusOverride: prometheusOverride,
|
|
123127
123141
|
userCategories: params.pluginConfig.categories,
|
|
123128
123142
|
currentModel,
|
|
123129
|
-
disabledTools: params.pluginConfig.disabled_tools
|
|
123143
|
+
disabledTools: params.pluginConfig.disabled_tools,
|
|
123144
|
+
directory: params.ctx.directory,
|
|
123145
|
+
language,
|
|
123146
|
+
disableOmoEnv
|
|
123130
123147
|
});
|
|
123131
123148
|
}
|
|
123132
123149
|
if (builtinAgents.atlas) {
|
|
123133
123150
|
agentConfig["atlas"] = builtinAgents.atlas;
|
|
123134
123151
|
}
|
|
123135
|
-
agentConfig["sisyphus-junior"] = createSisyphusJuniorAgentWithOverrides(params.pluginConfig.agents?.["sisyphus-junior"], builtinAgents.atlas?.model, useTaskSystem);
|
|
123152
|
+
agentConfig["sisyphus-junior"] = createSisyphusJuniorAgentWithOverrides(params.pluginConfig.agents?.["sisyphus-junior"], builtinAgents.atlas?.model, useTaskSystem, params.ctx.directory, language, disableOmoEnv);
|
|
123136
123153
|
if (builderEnabled) {
|
|
123137
123154
|
const { name: _buildName, ...buildConfigWithoutName } = configAgent?.build ?? {};
|
|
123138
123155
|
const migratedBuildConfig = migrateAgentConfig(buildConfigWithoutName);
|
|
@@ -130491,7 +130508,7 @@ class PostHog extends PostHogBackendClient {
|
|
|
130491
130508
|
// package.json
|
|
130492
130509
|
var package_default = {
|
|
130493
130510
|
name: "@skj1724/oh-my-opencode",
|
|
130494
|
-
version: "3.18.
|
|
130511
|
+
version: "3.18.4",
|
|
130495
130512
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
130496
130513
|
main: "./dist/index.js",
|
|
130497
130514
|
types: "dist/index.d.ts",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
1
2
|
import type { CategoryConfig } from "../config/schema";
|
|
2
3
|
type PrometheusOverride = Record<string, unknown> & {
|
|
3
4
|
category?: string;
|
|
@@ -20,5 +21,8 @@ export declare function buildPrometheusAgentConfig(params: {
|
|
|
20
21
|
userCategories: Record<string, CategoryConfig> | undefined;
|
|
21
22
|
currentModel: string | undefined;
|
|
22
23
|
disabledTools?: readonly string[];
|
|
23
|
-
|
|
24
|
+
directory: string;
|
|
25
|
+
language?: string;
|
|
26
|
+
disableOmoEnv?: boolean;
|
|
27
|
+
}): Promise<AgentConfig>;
|
|
24
28
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skj1724/oh-my-opencode",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.4",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|